This is the first in (what may be a series) of posts where I’ll share some concepts, or mantras, that I’ve found helpful in my experiences with software development.
The following are some of the lowest hanging fruit. These should be (but aren’t necessarily) common sense for all software developers:
DRY
Don’t Repeat Yourself. In fact, be wary of any code that does essentially the same thing but you’ve still got multiple implementations. Think about it before you copy and paste. There’s a superclass just waiting to be refactored into existence, or a strategy hoping to be extracted.
KISS/YAGNI
Keep it Simple, and You Aren’t Going To Need It. Simpler, smaller implementations can be grokked faster. Codebases should be considered “plastic” — if you don’t need extensibility, and it’s going to complicate the design, assume that when that need comes, the next developer that will add it sensibly.
The Boy Scout Rule
Taken from Clean Code, this is the oath given by every developer on your team: “I promise to leave the tree better than I found it.”
Better might be because there are more unit tests. Better might be because you found a way to delete a bunch of code by DRYing it up.
There’s a potential issue here that can arise because one developer may think a dramatic shift from the prior design of the code makes things “better,” so temper this mantra with consistency brought by “Worse is better.”
Worse is better
Read the linked wikipedia article, but IMHO, a passion for simplicity, consistency, and correctness should be what you look for when you hire people.