unwwwritten
misguided neatness
Posted February 23rd, 2009 at 4:58 pm EST by S. Brent Faulkner — View Comments
A minor complaint to get things going again...
Why is it that programmers feel the need to line a series of assignments up in columns?
1 a.id = b.id 2 a.foo = b.foo 3 a.baz = b.baz
This is a completely misguided effort.
Why? Look at this changed version...
1 a.id = b.id 2 a.foo = b.foo 3 a.baz = b.baz 4 a.something_else_really_long = b.foobar
the introduction of a long member screws with your alignment and if you want to be anal about it, you'll wind up committing a change to more lines than necessary as you add extra spaces to the existing line
look how far your eyes have to travel to see what's being assigned now... lots of room to accidentally look at the preceding or following line instead
it's not really that hard to read the code without that extra whitespace... the assignment operator acts as a natural column divider anyway
1 a.id = b.id 2 a.foo = b.foo 3 a.baz = b.baz 4 a.something_else_really_long = b.foobar
Cheers.
blog comments powered by Disqus