November 2011
Beginner
258 pages
5h 1m
English
| Tip 2 | Insist on Correctness |
![]() | [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.
Textbooks love to use math problems for programming examples, partly because computers are good at math, but mostly because it’s easy to ...
Read now
Unlock full access