-3

I recently asked a question on StackOverflow that was related to string splitting and pattern matching in .NET.

Some beady eyed developers that viewed the question said: "It looks like you're trying to parse a JSON string...why don't you just use JSON.NET or JavaScriptSerializer".

The conversation went off at on a tangent, (and was voted down, most likely because they could not see the point of writing some functionality, which has already been done.)

I have my reasons for writing this functionality...my implementation so far is slick, and super-fast (though suffers a little with string splitting, hence the StackOverflow question).

I think the point these developers were trying to make was, "why reinvent the wheel?"

I might equally argue: "Why bother developing NHibernate, when Microsoft have built a perfectly good Entity Framework?", or "Why bother building Windows 8, when Windows 7 is a perfectly suitable desktop operating system?" The same principle applies, does it not?

When an automobile company designs a new car, they are not re-inventing the wheel; rather, they are improving on the technology that drives it. Similarly, my JSON parser is a nice, neat and fast implementation (although, as states above, suffers a little on string splitting), therefore, when my parser is ready, should I be shunned for writing something that has already been done, or praised for doing it better?

EDIT: Consider the following Q/A : Is reinventing the wheel really all that bad?

1 Answers1

5

There are 2 reasons why this happens:

  1. Someone thinks they can do it better. This is case of NHibernate vs Entity Framework. They were created by different (groups of) people to solve same problems. They both approached the problem from different side, thinking they will be better at solving it. Every time someone does this, they need to be sure, they are able to create something better than what exists. If your JSON parser you wrote in a week cannot do everything existing JSON parsers do and something more, then it is worthless. Or if this JSON parser does it in way that you need but other JSON parsers cannot provide. But JSON parsing is relatively simple and it is hard to believe you would need something other parsers don't provide. Only reason why you would create it is to learn how to write JSON parsers.
  2. The problems change. This is case of Windows 8 vs Windows 7. Win 8 was created for new age, where touch, app stores, locked down platforms and small devices have future, instead of old heavy desktops, keyboard and mouse. This doesn't seem to be your problem, because JSON is still one of the top choices for data serialization. Of course it would be worth it if you came up with a storage format that would be somehow better than JSON. And I hardly doubt that.
Euphoric
  • 38,149