Monday, October 12, 2009

Long line lengths suck

I hate to vent, but I feel the need to. You see, in late August/early September on the one project I'm working on, some of the people on the project decided to revisit our coding standards. The only topic I argued was line lengths. I'm personally a fan of the 80 column rule mainly because it allows me to view two files at the same time without any horizontal scrolling. My work monitor supports a resolution of over 1600 pixels wide. Nice :-)

Well, I was overruled because, to paraphrase, it's too much wasted space and that if we are to do 80 columns, we may as well do only 10. It's so terrible to scroll vertically, that we must use up all of the horizontal space possible!

Perhaps it's a difference between those of us who have at least been exposed to real programming and Java code monkeys. (Btw: I like the guys on the project, but that doesn't mean I like all of the decisions I'm ignored on.) Well, it has bitten me in the ass recently and I'm guessing it won't change.

Now, if I do any work in Eclipse, we have an automatic code formatter that we must use to reformat our code when we save. Well, the tool followed the rules it was given and took the nice statement that I reformatted to fit on the screen and made it god-awful long. First, I believe that manual line-length formatting should be preserved, but that's not the real issue. The real issue is that I can't see the whole line of code. I have a wider monitor that most of the people on the project and I CAN'T SEE THE WHOLE LINE OF CODE! WTF?!?!?! This is supposed to be a good thing?

In my opinion, it's completely moronic. I understand wanting to allow longer lines, like perhaps 100-150 characters or whatever will fit on a common screen where I work. But I have no idea how long this line is and I have no idea what the limit it. Lesson to learn here: if you're going against convention, make sure it fits on the damn screen.

Again, apologies for the rant, but I had to vent.


Post a Comment

Links to this post:

Create a Link

<< Home