Re: Alignment Nazi?

Gordon J Milne <[email protected]>
Newsgroups gmane.comp.programming.language-of-the-year
Message-ID <[email protected]>
Al,

I suppose that means I ain't a big enough Nazi to be an Alignment Nazi.

My personal beef about this topic (in general) is mainly with co-workers 
who pay no attention whatsoever to any kind of alignment-for-clarity 
that their colleagues might employ to make things easier on their 
brains. I fully admit to having a limited brain.

During the past 19 years I have met many developers who don't give a 
hoot about how their code looks. However, they usually have the decency 
to ensure that code that has been carefully formatted is left that way. 
I have only met a handful of developers that don't even care about that. 
These people annoy the hell out of me, and they know that too. I work 
with one of these people now. He excuses himself by saying his text 
editor is the culprit. Frankly, his inattention to detail on checkins is 
at fault. This is very easy to get right with modern IDEs.

I think I might start questions about code style the next time I hire 
somebody. I'm fed up with working with people that think all that 
matters is what the compiler generates.

Hell, we write the code for each other, not the compiler.

Regards,

Gordon

Al Chou wrote:
> Gordon,
> 
> I'm sorry, I can't let this one just slide by.  If I were an Alignment Nazi, I would not let the difficulty of realignment get in the way of a needed rename refactoring.  I would find a tool to do the desired realignment.  For example, someone mentioned in this thread that EMACS can do it, IIRC....
> 
> 
> Al
> 
> 
> ----- Original Message ----
>> From: Gordon J Milne <[email protected]>
>> To: [email protected]
>> Sent: Wednesday, May 14, 2008 8:04:38 PM
>> Subject: Re: [pragprog] Alignment Nazi?
>>
>> Ged,
>>
>> Personally, I would not care what happened on such a rename operation. 
>> It is unlikely, however, that the temperature class would be renamed 
>> since it is one of our basic, low-level utility classes. In any event, 
>> if such a rename were performed I would expect things to get realigned 
>> when someone had reason to delve into that area of the code, otherwise I 
>> would not care.
>>
>> FYI, if I was the person doing the rename, I'd probably realign 
>> everything because I'm wired that way. However, I'd probably take the 
>> pragmatic road and abort the rename once I saw how many changes in the 
>> code base it would produce.
>>
>> Regards,
>>
>> Gordon
>>
>> Ged Byrne wrote:
>>> Gorden,
>>>
>>> My question is what happens if the Temperature class is renamed to
>>> something longer?  Do you have to go through all of the classes that
>>> declare a Temperature instance and move every single = to maintain
>>> alignment?
>>>
>>> Are you forced to keep names short, so that alignment is easy?  Would
>>> you prefer correct alignment over descriptive names?
>>>
>>> If names aren't kept short, then you start having to scroll sideways
>>> in the IDE and word wrap in the printouts.  Is that desirable?
>>>
>>> I've been working with SQL that uses the same type of alignment
>>> scheme, and these are the problems I've been encountering.
>>>
>>>
>>> Ged.
>>>
>>> On Sun, Apr 27, 2008 at 11:06 PM, gjmilne64 wrote:
>>>> Hi!
>>>>
>>>> I am an Alignment Nazi. When I see a block of code like this:
>>>>
>>>>         final int         counts              = result.getCounts();
>>>>         final int         periodMicros        = result.getMicros();
>>>>         final Rate        rate                = new Rate(new
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.