What makes code good? Code is good when two things are true:
- it works to solve the required problem in the given domain
- it is clear
and that’s it. We can quibble about everything else, but I’m going to throw flexibility, commentedness, testedness, object-orientedness, and everything else out the window here except as they are required to achieve either of the two points.
Code is hard to write. It’s even harder to read. So why would you write code that was anything other than crystal clear? If your code is not as simple as possible, why would I want to deal with it? Like the man said: everything should be as simple as possible and no simpler
. Why is your code so complex?
Students have repeatedly asked me for coding standards in class, but I stand by my criteria for grading: Is the code correct? Is the code clear? And no standard in the world is going to make unclear incorrect sows-ear code into a high-grade-earning silken purse.









