Tip 3Design with Tests
Brown Belt[​​Brown Belt] You may not start designing new code right up front, but you will soon enough.

Where our previous tip, Tip 2, ​Insist on Correctness​, focused on making sure your code does what it’s supposed to do, here we focus on the meta-question, “What should this code do?”

On the surface, it would seem puzzling that a programmer would write code without knowing, well ahead of time, what it’s supposed to do. Yet we do it all the time. Faced with a problem, we charge off writing code and figure things out as we go. Programming is a creative act, not a mechanical one, and this process is akin to a painter ...

Get New Programmer's Survival Manual now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.