When does it make sense to reinvent the wheel?

time to read 2 min | 349 words

Well, when the wheel is a square, of course:

© Performance Management Company, 1993 
Square Wheels® is a registered trademark of Performance Management Company

Adi asks about my seemingly inconsistent behavior regarding when to roll your own, and when to use the stuff that is already there:

I find it difficult to understand Oren. Sometimes he'd rather write his own code from scratch (Rhino mocks), but he keeps preaching the use of known OSS solutions, such as Rails, NHibernate, or the Castle project.

What can I say, I have a Pavlovian conditioning with regards to software, I tend to avoid software that cause me pain. Let me quote David Hayden about the CAB and SCSF:

I have never had the pleasure of working with the Composite Application Block ( CAB ) or Smart Client Software Factory ( SCSF )

That is quite telling. And I don't think that anyone can say that David is not very well familiar with the CAB/SCSF.

Why do I promote OSS solutions such as NHibernate, Castle?

  • Those solutions are (nearly) painless. In fact, they are often elegant and fun to work with. As an example, I worked with a team member today, introducing him to NHibernate Query Generator, he was very happy about it. Talk about painless persistence.

Why did I decide to write my own Mocking Framework instead of using the standard one (at the time)?

  • NMock, the mocking framework that I used at the time (2005), was annoying as hell for the agile developer. Bad support for overloads, no way to Lean On The Compiler and No ReSharper. It was a pain to use. I wrote my own, and I like using it. Incidently, it looks like a lot of other people are liking it, but that isn't why I wrote it.

Removing pain points will make you a better developer, period.

Oh, and I do enjoy the discussion, although I wouldn't call it a post war.