As Simple as Possible

A useful truth about programming is that it always takes more effort to debug a piece of code than it does to write it. If, at first pass, you make a piece of code as clever as possible then you're not smart enough to fix it.

Most people hear that insight and think "I'm fine, I can still debug my code", but that's only the first piece of the puzzle. Unless you are actively trying to make work for yourself and others, write all code as simply as possible. If you ever do something clever, ask yourself if it is truly necessary. Odds are it isn't and you're just making more work to be finished later.

1 comment:

Matthew Loera said...
This comment has been removed by a blog administrator.