Good programming is not born from mere technical competence. I’ve seen highly intellectual programmers who can produce intense and impressive algorithms, who know their language standard by heart, but who write the most awful code.
Write code as if you had to support it for the rest of your life.
If your code needs comments, consider refactoring it so it doesn’t.
As Tony Hoare observed: There are two ways of constructing a software design: one way is to make it so simple that there are obviously no deficiencies and the other is to make it so complicated that there are no obvious deficiencies.
When did things go wrong? Probably already at the kick-off meeting. Some of the project members didn’t pay attention. Others didn’t understand the point. Worse, some disagreed and were already planning their coding standard rebellion. Finally, some got the point and agreed but, when the pressure in the project got too high, they had to let something go.
You don’t have to make every module perfect before you check it in. You simply have to make it a little bit better than when you checked it out.
We programmers are weird creatures. We love writing code. But when it comes to reading it we usually shy away. After all, writing code is so much more fun, and reading code is hard – sometimes almost impossible.
Beauty is born of and found in simplicity.
Fixing bugs is not making progress. You aren’t paid to debug. Debugging is waste.
Reading other people’s code is particularly hard. Not necessarily because other people’s code is bad, but because they probably think and solve problems in a different way to you.
You need to spend evenings, weekends, and holidays educating yourself, therefore you cannot spend your evenings, weekends, and holidays working overtime on your current project.
Ask yourself, how much of your time do you spend developing someone else’s product? How much developing yourself?
A non-programmer friend once remarked that code looks like poetry. I get that feeling from really good code, that everything in the text has a purpose and that it’s there to help me understand the idea. Unfortunately, writing code doesn’t have the same romantic image as writing poetry.