Category Archives: Coding Yups and Nopes
Readable If Statements
To kick of the Coding Yups and Nopes section, I’ll start with something simple. There are a set of things to do, and a set of things to avoid. For each thing, there are one or more reasons justifying its classification. These reasons are ordered by descending importance and increasing subjectivity. – Nope: if (condition) doWork(); else doOtherWork(); If you’re stepping through with a debugger (I used gdb), it is difficult to tell when stepping over the line if the … Continue reading