Having discussed the maladies of code in the previous chapter, it is easy to get scared of writing it. After all, the conclusion to chapter 9 was that code adds cost. When talking about code, another source of fear is not writing perfect code. Considering how many ways code can be flawed, perfection is an utterly unrealistic goal. Many considerations play into “perfection”: performance, structure, level of abstraction, ease of use, ease of maintenance, novelty, creativity, correctness, security, and so on. Trying to keep all this in our heads while also trying to solve a nontrivial problem is impossible.
I started coding before I got a formal education in computer science. Back then, I was very productive and creative because my only consideration was making the code work. Then I started university and learned about all the ways code can fail or be bad. My productivity plummeted. I would be given a task and begin by contemplating it for hours or days before writing the first line of code. Once I realized how much effect this coding stage fright was having on me, I started combating it—and I have been fighting it ever since, both in myself and in others.