A Living List
What follows is a living list of heuristics I've come to internalize over the years as a developer. My goal is to periodically add to this list. Consider it a repository of programming wisdom. If you have something you'd like added to the list, feel free to comment and I may update the list ʕ•ᴥ•ʔ If you disagree with anything on the list, let's fight it out in the comments. I believe in respectful, healthy debate on the open marketplace of ideas. If you find any of these nuggets to be a paraphrase or quote from someone of note, let me know! I'm not interested in plagiarizing, just sharing.
Sagesse
No matter how many alerts or people are screaming at you, the first step is to reliably replicate the bug.
Everything in software development has already been invented.
Don’t trust the compiler. Don’t trust the tools. Don’t trust the documentation. Don’t trust yourself.
We don’t need any more computer languages.
Maintaining code is harder than writing it.
Do not overload your working memory. Protect it, keep it focused only on the task at hand if possible.
You have been taught to program as though memory, processor time, and network bandwidth are all free and infinite: none is.
"We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil. Yet we should not pass up our opportunities in that critical 3%." -Knuth
You’re going to forget what your code does in a few months: make it easy to read.
Sometimes, all you need is a one-liner in
sed
Beware of programmers who speak in absolutes. Programming is an art, not a religion.
If you know you will do a fixed sequence of steps more than ten times, automate it.
Backing it up is one thing. Restoring it is another.
"Just because it works on your machine does not mean there is not a bug." -Piers Sutton
Wait for the point-one release of development tools before installing them. Let other people be guinea pigs.
Good programmers write good code. Great programmers write no code. Zen programmers delete code.
Lock in on one task and focus on completing it quickly and correctly, to the exclusion of all others. Every successful person does this.
Don't memorize commands or syntax; memorize concepts. Concentrate on problem solving.
When really stuck, go beyond questioning the code: question your assumptions about what the code does.
When you get overwhelmed by using new software just remember that you simply have to learn its API. Understand what it does, then learn its interface.
Ask yourself how hard your code will be to change later. Remember code is cheap.
"After you have left, remember to look back into the abyss." - Douglas Crockford
Almost everything
rms
has ever said re: proprietary software.