Tip 2Insist on Correctness
White Belt[​​White Belt] These considerations are essential to your coding from day one.

In toy programs it’s easy to tell the difference between correct and incorrect. Does factorial(n) return the correct number? That’s easy to check: one number goes in, and another number comes out. But in big programs, there are potentially many inputs—not just function parameters, but also state within the system—and many outputs or other side effects. That’s not so easy to check.

Isolation and Side Effects

Textbooks love to use math problems for programming examples, partly because computers are good at math, but mostly because ...

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.