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.


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 »

Features I’d like to see in my Editor.

February 2, 2010

Do you ever have pipe-dreams about what you should be able to do with your computer? Like those crazy virtual interfaces like they had in the movie Minority Report or like every CSI lab seems to have? (well, that’s at the movies, of course). What about just more down-to-earth matters such as making large, complex documents such as source code more legible? I have few ideas—maybe a bit wacky.

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.


Read the rest of this entry »

What’s a Good Color Scheme?

September 15, 2009

Although EMACS is growing old, filled with passé idiosyncrasies, and rather complicated to tweak, I grew accustomed to it and is now my main editor. I use it for shell scripting, C++, HTML, even. But to use EMACS properly, or a least make it enjoyable a little bit, one must do a fair bit of configuration. Key bindings to match modern keyboards, adding the macros you’re using the most, and, finally, adjusting the color scheme so that your eyes do not bleed after a few hours of work.


But what is a good color scheme?

Read the rest of this entry »

UEID: Unique Enough IDs

September 30, 2008

Generating unique, unambiguous, IDs for data is something we do often, but we do not always know what level of uniqueness is really needed. In some cases, we want to be really sure that two instances of the same ID identify two copies of the same object or data. In other cases, we only want to be reasonably sure. In other cases, yet, we just assume that collisions—two different objects yielding the same ID—are very unlikely, and, if the need be, we can proceed to further testing to establish equality.

There are many ways of generating IDs, each with varying levels of confidence on uniqueness and differing applications.

Read the rest of this entry »