Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on The security hole in sudo. Parent comment
switch (uint8_t bla){ case 0: stuff; ...
... and filling everything as you go along, first type the skeleton ...
switch () {case: break; default: break;}
... and then fill everything in. It's anal/pedantic but it becomes second nature really fast. Do it for everything (loops, structs, functions,...).
I once lost 2 entire days of my life I kid you not hunting an if (a = b) that had to be a == b and decided to change my approach.
There are no comments on this comment yet.
switch (uint8_t bla){ case 0: stuff; ...
... and filling everything as you go along, first type the skeleton ...
switch () {case: break; default: break;}
... and then fill everything in. It's anal/pedantic but it becomes second nature really fast. Do it for everything (loops, structs, functions,...).
I once lost 2 entire days of my life I kid you not hunting an if (a = b) that had to be a == b and decided to change my approach.