Monday, November 28, 2016


There’s a Joel on Software [1] blog about why you should never rewrite a program from scratch.

He gives a couple of examples from the 90s (? I guess … I wasn’t active in the field until the late 00s) that all ended in disaster because people tried to rewrite some very complex program from scratch.  Then comes the punchline:  The reason why everyone hates their programs is because they’re filled with badly written components that have had hundreds of independent incremental changes made over time.  And the reason that these programs work and need to be kept is because these hundreds of independent incremental changes are all bug fixes.

So when I hear this I immediately think of stories about machine learning being able to create well optimized sorting algorithms, but the source code is completely incomprehensible.  My interpretation is that some problems exist in a space that has bad cognitive complexity [2].  When you hit this problems with a machine learning algorithm the algorithm starts charting out the space, but it’s blind and stupid.  It bumps into all of the little holes and discontinuities and makes ad hoc fixes that make sense in the moment but generate code that doesn’t make any sense.

My thought is that the Software Engineering process that was in place in the 90s (and let’s be honest, is probably still is in place nearly everywhere) is basically nothing more than a machine learning algorithm.  A blind and stupid algorithm that doesn’t have the wherewithal to conceptualize the problem that it is trying to solve.  Joel sees all of these less than ideal software components and says this is how we get working software; I see all of these less than ideal software components and think that we need a better way to analyze what the end users need and generate requirements.  Better bug tracking, better flaw resolution procedures, better discovery phases, better prototyping, better implementation techniques.  It has been over 15 years, I wonder if Joel’s opinion has changed or been otherwise refined.

Can the software engineering process be better?  Well I heard a story about how the JPL resolves bugs.  Every bug at the JPL isn’t a problem with the software it’s a problem with the process.  When they find a bug in the software they find out how to change the process such that the bug wouldn’t have shown up in the first place.  The next thing they do is to audit the entire code base to ensure that they get all instances of the bug that may have been introduced when they were using the faulty process.  Probably too involved to use for a throw away web app, but it does give you something to think about.

No comments:

Post a Comment