News for hackers. Stuff that matters.
Re:Syntax Off (2012) by jpollock on Sunday November 17, 2013 @05:38PM (#6751366)
Ever since I spent a week wondering why my main loop only ran 3 times, I always turn syntax highlighting on.

This is what my code looked like:

  // Initialise
  for (i=0;i<3;++i) {
    /* Do initialisation here!
    niftyConfig = 1;
    funkyValue = 2;
  }

  // Run forever
  for (;;) {
   /* So, this is where we do stuff! */
  ...
  }
Syntax highlighting would have shown the problem instantly. In fact, the bug would never have happened.

Anything that can increase the chance to catch an error is a good thing.

[EDITED for code formatting.]

Re:Syntax Off (2012) by _sigma on Sunday November 17, 2013 @06:09PM (#6751489)
This is a fantastic example! Took me having to turn on code highlighting to catch it.