Saturday, August 24, 2013

IDE - The BlOtS test

One of the first things you should do when you get a new IDE or code editor is perform a simple test.  Type the following into your editor:

BlOtS
810+5

That's:
  {capital letter B}{lower case L}{capital O}{lowercase T}{capital S}
  {number 8}{number 1}{number 0}{plus sign}{number 5}

If you cannot easily distinguish the letters in the upper word from the numbers in the lower characters, you need to adjust your editor typeface settings. Otherwise you'll find yourself scratching your head wondering why that database connection string in your code is not working, or other situations where the accuracy of the text is very important.

Java - The importance of syntax highlighting

Q: What's wrong with this code?

while( true);
{
  System.out.println("Hello Dave");
}


A: It only runs once.


while( true);
{
  System.out.println("Hello Dave");
}

The semicolon ends the block, so the subsequent block in curly braces only runs once.  All the more reason to change your font and colors to accentuate symbols so they're harder to miss.  I'm old school and have a black background with all my symbols in bright red.