Thursday, April 9, 2009

Reading Code

These days I've been reading a lot of source code, and it can get pretty miserable if the code isn't well commented or if it isn't properly formatted.

It's a time-honored tradition (or requirement) to indent code so that you can see when statements are nested. This is ok, but for long documents where the nesting statements can stretch for pages and pages this can be inadequate. I feel like a good IDE must have a way of telling at a glance how deep you are.

I'm sure there are lots of tricks out there, but has anyone thought of displaying the nesting level in a 3rd dimension or colormap? For example, a line of code that looks further away than its neighbors would be clearly on a different nesting level, and you'd be able to instantly grasp the structure of the code you're looking at.

Am I crazy? Someone with more experience please tell me your secrets. (I'm looking at you Paul).

No comments:

Post a Comment