Respace

April 19, 2016

The two seemingly trivial and unimportant problems of what kind of whitespaces and how to use them are still not solved. Some still use hard-coded tabs in their source code, and because they set tabs to be two spaces wide in their favorite editor, they expect the rest of the planet to have done so. The result is that spacing will break in another person’s editor, and the code will look like it’s been written by a four years old. Also, when tabs and spaces are mixed, and randomly interpreted, the indentation, the general aspect of how the code is presented, is broken.

turbo-napkin

While marking assignments, I encountered a number of such pieces of code. So I decided to fix that with a simple Emacs command.

Read the rest of this entry »


Code Style: Vertical vs Horizontal?

October 20, 2009

The only difference between coding styles and religion discussions is that coding styles have claimed fewer victims—at least until now. A few post back I discussed color schemes, and this week I’ll be discussing code geometry for enhanced clarity.

fish-on-stilts

Read the rest of this entry »