Friday, May 30, 2008

A Million Lines of Code

I went to a product demo the other day for a CMS that is being developed in house.  I guess they want everybody to start using it.  The presenter went on an on about how flexible it was and how it could do anything.  It can scramble your eggs as long as you can pass in the eggs in a parseable format.  Apparently, they started development in back in 2000 and now it's ready for prime time.  That's right pasters, 8 years ago. 

Anyway, things were going along great, when something the presenter said hit me like a ton of bricks.  "This [application] has over a million lines of code."  Now, what would your reaction be if someone told you that their application had a million lines of code?  I had two.

1.  What does that even mean?

It seems silly to even mention this type of metric.  Are they still getting paid by the number of lines they produce?  I assume he was trying to impress the more non-technical folks in the room who now think that this thing is approaching the same level as the space shuttle.  (The avionics system, the code that flies the shuttle, has roughly 2 million lines of code.)  But to me it sounds like bloat, which lead me to my next reaction.

2. I bet I could write that in 999,999 lines of code.

You would think that in a million lines of code, there'd be a good refactor somewhere.  I would have expected them to find it by at least the sixth year.

The million lines of code also scream, "This is really complex and when it breaks, boy is it going to break."  Simplicity, that gets the job done, beats complexity any day.  Simplicity breeds confidence and attracts users.  I've added it to my developer's ethos.

No comments: