tags:

views:

230

answers:

13

When cutting code, some of the things I have to enforce (or my head explodes) are:

  • .cvsignore (or whatever version system) files must list files in alphabetical order
  • include/import file names must be in alphabetical order (and they follow a certain structure for C or C++ files)

(my editor makes this simple, so it's not a maintainance issue)

What is your quirk?

+2  A: 

I can't stand spelling errors in comments.

Feet
A: 

I insult my variables in the comments when I'm tired.

TraumaPony
+2  A: 

I am obsessive about enforcing proper coding standards for readability. I'm constantly correcting lack of spaces, braces, etc... Strangely obsessed with EXACTLY 1 line of whitespace between namespace, class, and methods brackets. When I create a new class it's the first thing I do - add those newlines. You'd think I'd edit the template by now....

I'm also obsessive about replacing old foreach statements with clearer Linq statements as of late.

In final, I'm obsessive about leaving funny comments as to lighten the day for those who come behind me.

//don't remove this comment, code will break

^^ would you remove it? :)

TheSoftwareJedi
I'm obsessive about the single line of whitespace between members...I come across code where you've got members that just appear to run into each other and it's impossible to read - I hate that.
BenAlabaster
A: 
  • I hate it when a function has XML comments missing.

  • All the grammar in the comments has to be good (to the best of my ability).

  • Every function should have exactly one line of whitespace above it.

Cyril Gupta
I hate it when people enforce that xml comment nonsense. I assume you mean only public functions, but come on, if your method is named "CreateGuid", do I really have to bloat the code to write a comments saying "Creates a Guid"?!?!?! I can't stand that crap. Comments repeating method names. ugh.
TheSoftwareJedi
love the "one line of whitespace" though. I do the same with namespace and class - and am very picky about it.
TheSoftwareJedi
+4  A: 

casing. If something isn't cased right I go ballistic because I can so easily get lost.

Also is proper indentation and proper code commenting comments must be why not what.

percent20
Yeah, I hate not following consistent naming, especially in casing. I've seen people mix camel casing with underscore, very weird.
BobbyShaftoe
A: 

If my code can't be easily regionized using #Region notation then I structure my classes in the following order:

  • Fields (Alphabetical)
  • Public Properties (Alphabetical)
  • Private Properties (Alphabetical)
  • Public Methods (Alphabetical)
  • Private/Protected Methods (Alphabetical)

If they can be easily regionized into logical regions, then I use the same order within each region... regions may or may not be in alphabetical order depending on how picky I'm feeling at the time.

BenAlabaster
#region makes it a pain in the ass to read IMHO. I hate right clicking and saying "toggle all outlining" on every file. Properly ordered (as you list, though I disagree with alpha) is way better. I prefer logical location vs alphabetical any day.
TheSoftwareJedi
@TSJ: Yeah, but while any given location may seem logical right now, 6 months later you come back to the code and you're in a different frame of mind and suddenly you're wondering what the hell you were thinking. Alphabetical is always consistent, so it's easier to find things after the fact.
BenAlabaster
+1  A: 

I hate #region. It makes the code completely unreadable to me. Just order your crap correctly and I'll be able to find it!!!

TheSoftwareJedi
I swear you hunt me out just to mock me :P
BenAlabaster
+3  A: 

If I find a Perl script that doesn't have the use strict; and use warnings; pragmas, I have to add them and fix all the warnings and errors in the file until it works like it did before I touched it.

cowgod
I think you've been watching me code! I hate when there is an error, even if it STRICT and just something like 'Timezone not trusted use X instead', I HAVE to fix it.
Unkwntech
+2  A: 

I get obsessive about whether the code works or not. Everything else is subordinate to that. Mind you, as a Clipper maintenance programmer, I do get a little peeved when I come across code like this lot:

DO CASE
CASE &B>0.AND.&C=0.AND.&D=0.AND.&E=0.AND.MMW$'BLWD'
    &M=CBF+'xMORNING'
CASE &B=0.AND.&C>0.AND.&D=0.AND.&E=0.AND.MMW='W'
    &M=CLUN+'xLUNCH'
CASE &B=0.AND.&C>0.AND.&D=0.AND.&E=0.AND.MMW$'BL'
    &M=CLUN+'xMORNING'
CASE &B=0.AND.&C=0.AND.&D>0.AND.&E=0.AND.MMW$'BW'
    &M=CDIN+'xDINNER'
CASE &B=0.AND.&C=0.AND.&D>0.AND.&E=0.AND.MMW='L'
    &M=CDIN+'xLUNCH'
CASE &B=0.AND.&C>0.AND.&D=0.AND.&E=0.AND.MMW='D'
    &M=CLUN+'xLUNCH'
CASE &B=0.AND.&C=0.AND.&D=0.AND.&E>0.AND.MMW$'BLW'
    &M=CBED+'xBEDTIME'
CASE &B=0.AND.&C=0.AND.&D=0.AND.&E>0.AND.MMW='D'
    &M=CBED+'xDINNER'
CASE &B=0.AND.&C=0.AND.&D>0.AND.&E>0.AND.MMW$'BW'
    IF &D=&E
 &M=CDIN+'xDINNER/BEDTIME'
    ELSE
 &M=CDIN+'xDINNER '+CBED+'xBEDTIME'
    ENDIF
CASE &B=0.AND.&C=0.AND.&D>0.AND.&E>0.AND.MMW='D'
    IF &D=&E
 &M=CDIN+'xDINNER/DINNER'
    ELSE
 &M=CDIN+'xDINNER '+CBED+'xDINNER'
    ENDIF    
CASE &B=0.AND.&C=0.AND.&D>0.AND.&E>0.AND.MMW='L'
    IF &D=&E
 &M=CDIN+'xLUNCH/BEDTIME'
    ELSE
 &M=CDIN+'xLUNCH '+CBED+'xBEDTIME'
    ENDIF
CASE &B>0.AND.&C>0.AND.&D=0.AND.&E=0.AND.MMW='W'
    IF &B=&C
 &M=CBF+'xMORNING/LUNCH'
    ELSE
 &M=CBF+'xMORNING '+CLUN+'xLUNCH'
    ENDIF
CASE &B>0.AND.&C>0.AND.&D=0.AND.&E=0.AND.MMW$'BL'
    IF &B=&C
 &M=CBF+'xMORNING/MORNING'
    ELSE
 &M=CBF+'xMORNING '+CLUN+'xMORNING'
    ENDIF
CASE &B>0.AND.&C=0.AND.&D=0.AND.&E>0.AND.MMW$'BLW'
    IF &B=&E
 &M=CBF+'xMORNING/BEDTIME'
    ELSE
 &M=CBF+'xMORNING '+CBED+'xBEDTIME'
    ENDIF
CASE &B>0.AND.&C=0.AND.&D=0.AND.&E>0.AND.MMW='D'
    IF &B=&E
 &M=CBF+'xMORNING/DINNER'
    ELSE
 &M=CBF+'xMORNING '+CBED+'xDINNER'
    ENDIF
CASE &B>0.AND.&C=0.AND.&D>0.AND.&E=0.AND.MMW$'BWD'
   IF &B=&D
 &M=CBF+'xMORNING/DINNER'
    ELSE
 &M=CBF+'xMORNING '+CDIN+'xDINNER'
    ENDIF
CASE &B>0.AND.&C=0.AND.&D>0.AND.&E=0.AND.MMW$'BWD'
    IF &B=&D
 &M=CBF+' 2xDAILY'
    ELSE
 &M=CBF+'xMORNING/'+CDIN+'xDINNER'
    ENDIF
CASE &B>0.AND.&C=0.AND.&D>0.AND.&E=0.AND.MMW='L'
    IF &B=&D
 &M=CBF+' 2xDAILY'
    ELSE
 &M=CBF+'xMORNING/'+CDIN+'xLUNCH'
    ENDIF
CASE &B=0.AND.&C>0.AND.&D=0.AND.&E>0.AND.MMW='W'
    IF &C=&E
 &M=CLUN+' 2xDAILY'
    ELSE
 &M=CLUN+'xLUNCH/'+CBED+'xBEDTIME'
    ENDIF
CASE &B=0.AND.&C>0.AND.&D=0.AND.&E>0.AND.MMW='D'
    IF &C=&E
 &M=CLUN+' 2xDAILY'
    ELSE
 &M=CLUN+'xLUNCH/'+CBED+'xDINNER'
    ENDIF
CASE &B=0.AND.&C>0.AND.&D=0.AND.&E>0.AND.MMW$'BL'
    IF &C=&E
 &M=CLUN+' 2xDAILY'
    ELSE
 &M=CLUN+'xB/FAST/'+CBED+'xBEDTIME'
    ENDIF
CASE &B=0.AND.&C>0.AND.&D>0.AND.&E=0.AND.MMW='W'
    IF &C=&D
 &M=CLUN+' 2xDAILY'
    ELSE
 &M=CLUN+'xLUNCH/'+CDIN+'xDINNER'
    ENDIF
CASE &B=0.AND.&C>0.AND.&D>0.AND.&E=0.AND.MMW='B'
    IF &C=&D
 &M=CLUN+' 2xDAILY'
    ELSE
 &M=CLUN+'xB/FAST/'+CDIN+'xDINNER'
    ENDIF
CASE &B=0.AND.&C>0.AND.&D>0.AND.&E=0.AND.MMW='L'
    IF &C=&D
 &M=CLUN+' 2xDAILY'
    ELSE
 &M=CLUN+'xB/FAST/'+CDIN+'xLUNCH'
    ENDIF
CASE &B=0.AND.&C>0.AND.&D>0.AND.&E>0.AND.MMW='W'
    DO CASE
    CASE (&C=&D).AND.(&D=&E)
 &M=CLUN+' 3xDAILY'
    CASE (&C#&D).AND.(&D=&E)
 &M=CLUN+'xLUNCH/'+CDIN+'xDIN&BED'
    CASE (&C=&D).AND.(&D#&E)
 &M=CLUN+'xLUNCH/DINN'+CBED+'xBED'
    ENDCASE
CASE &B=0.AND.&C>0.AND.&D>0.AND.&E>0.AND.MMW='D'
    DO CASE
    CASE (&C=&D).AND.(&D=&E)
 &M=CLUN+'xLUNCH/DINNER/DINNER'
    CASE (&C#&D).AND.(&D=&E)
 &M=CLUN+'xLUNCH/'+CDIN+'xDIN/DIN'
    CASE (&C=&D).AND.(&D#&E)
 &M=CLUN+'xLUNCH/DINN'+CBED+'xDIN'
    ENDCASE
CASE &B=0.AND.&C>0.AND.&D>0.AND.&E>0.AND.MMW='B'
    DO CASE
    CASE (&C=&D).AND.(&D=&E)
 &M=CLUN+' 3xDAILY'
    CASE (&C#&D).AND.(&D=&E)
 &M=CLUN+'xB/FST/'+CDIN+'xDIN&BED'
    CASE (&C=&D).AND.(&D#&E)
 &M=CLUN+'xB/FST/DINN'+CBED+'xBED'
    ENDCASE
CASE &B=0.AND.&C>0.AND.&D>0.AND.&E>0.AND.MMW='L'
    DO CASE
    CASE (&C=&D).AND.(&D=&E)
 &M=CLUN+' 3xDAILY'
    CASE (&C#&D).AND.(&D=&E)
 &M=CLUN+'xB/FST/'+CDIN+'xLUN&BED'
    CASE (&C=&D).AND.(&D#&E)
 &M=CLUN+'xB/FAST/LUN'+CBED+'xBED'
    ENDCASE
CASE &B>0.AND.&C>0.AND.&D>0.AND.&E=0.AND.MMW$'DW'
    DO CASE
    CASE (&C=&B).AND.(&B=&D)
 &M=CBF+' 3xDAILY'
    CASE &B=&C
 &M=CBF+'xMORN/LUN '+CDIN+'xDINNER'
    CASE &B=&D
 &M=CBF+'xMORN/DINN'+CLUN+'xLUNCH'
    CASE &C=&D
 &M=CBF+'xMORN '+CLUN+'xLUN/DINNER'
    CASE (&B#&C).AND.(&B#&D)
 &M=CBF+'xMORN '+CLUN+'xLUN '+CDIN+'xDINN'
    ENDCASE
CASE &B>0.AND.&C>0.AND.&D>0.AND.&E=0.AND.MMW='B'
    DO CASE
    CASE (&C=&B).AND.(&B=&D)
 &M=CBF+'xMORN/MORN/DINNER'
    CASE &B=&C
 &M=CBF+'xMORN/MORN'+CDIN+'xDINNER'
    CASE &B=&D
 &M=CBF+'xMORN/DINN'+CLUN+'xB/FST'
    CASE &C=&D
 &M=CBF+'xMORN '+CLUN+'xB/FST/DINN'
    CASE (&B#&C).AND.(&B#&D)
 &M=CBF+'xMORN '+CLUN+'xB/F '+CDIN+'xDINN'
    ENDCASE
CASE &B>0.AND.&C>0.AND.&D>0.AND.&E=0.AND.MMW='B'
    DO CASE
    CASE (&C=&B).AND.(&B=&D)
 &M=CBF+'xMORN/MORN/LUNCH'
    CASE &B=&C
 &M=CBF+'xMORN/MORN'+CDIN+'xLUNCH'
    CASE &B=&D
 &M=CBF+'xMORN/LUN'+CLUN+'xB/FST'
    CASE &C=&D
 &M=CBF+'xMORN '+CLUN+'xB/FST/LUN'
    CASE (&B#&C).AND.(&B#&D)
 &M=CBF+'xMORN '+CLUN+'xB/F '+CDIN+'xLUN'
    ENDCASE
CASE &B>0.AND.&C>0.AND.&D=0.AND.&E>0.AND.MMW='W'
    DO CASE
    CASE (&C=&B).AND.(&E=&C)
 &M=CBF+' 3xDAILY'
    CASE (&C#&B).AND.(&E=&B)
 &M=CBF+'xMORN/BED '+CLUN+'xLUN'
    CASE (&B#&C).AND.(&B#&E).AND.(&C=&E)
 &M=CBF+'xMORN '+CLUN+'xLUN/NIGHT'
    CASE (&B=&C).AND.(&B#&E).AND.(&C#&E)
 &M=CBF+'xMORN/LUN '+CBED+'xNIGHT'
    ENDCASE
CASE &B>0.AND.&C>0.AND.&D=0.AND.&E>0.AND.MMW='D'
    DO CASE
    CASE (&C=&B).AND.(&E=&C)
 &M=CBF+' 3xDAILY'
    CASE (&C#&B).AND.(&E=&B)
 &M=CBF+'xMORN/DIN '+CLUN+'xLUN'
    CASE (&B#&C).AND.(&B#&E).AND.(&C=&E)
 &M=CBF+'xMORN '+CLUN+'xLUN/DIN'
    CASE (&B=&C).AND.(&B#&E).AND.(&C#&E)
 &M=CBF+'xMORN/LUN '+CBED+'xDIN'
    ENDCASE
CASE &B>0.AND.&C>0.AND.&D=0.AND.&E>0.AND.MMW$'BL'
    DO CASE
    CASE (&C=&B).AND.(&E=&C)
 &M=CBF+'xMORN/MORN/NIGHT'
    CASE (&C#&B).AND.(&E=&B)
 &M=CBF+'xMORN/BED '+CLUN+'xB/FST'
    CASE (&B#&C).AND.(&B#&E).AND.(&C=&E)
 &M=CBF+'xMORN '+CLUN+'xMORN/BED'
    CASE (&B=&C).AND.(&B#&E).AND.(&C#&E)
 &M=CBF+'xMORN/MORN '+CBED+'xBED'
    ENDCASE
CASE &B>0.AND.&C=0.AND.&D>0.AND.&E>0.AND.MMW$'BW'
    DO CASE
    CASE (&D=&B).AND.(&E=&D)
 &M=CBF+' 3xDAILY'
    CASE (&D#&B).AND.(&E=&B)
 &M=CBF+'xMORN/BED '+CDIN+'xDINN'
    CASE (&B#&D).AND.(&B#&E).AND.(&D=&E)
 &M=CBF+'xMORN '+CDIN+'xDIN/NIGHT'
    CASE (&B=&D).AND.(&B#&E).AND.(&D#&E)
 &M=CBF+'xMORN/DINN '+CBED+'xNIGHT'
    ENDCASE
CASE &B>0.AND.&C=0.AND.&D>0.AND.&E>0.AND.MMW='L'
    DO CASE
    CASE (&D=&B).AND.(&E=&D)
 &M=CBF+' 3xDAILY'
    CASE (&D#&B).AND.(&E=&B)
 &M=CBF+'xMORN/BED '+CDIN+'xLUN'
    CASE (&B#&D).AND.(&B#&E).AND.(&D=&E)
 &M=CBF+'xMORN '+CDIN+'xLUN/NIGHT'
    CASE (&B=&D).AND.(&B#&E).AND.(&D#&E)
 &M=CBF+'xMORN/LUN '+CBED+'xNIGHT'
    ENDCASE
CASE &B>0.AND.&C=0.AND.&D>0.AND.&E>0.AND.MMW='D'
    DO CASE
    CASE (&D=&B).AND.(&E=&D)
 &M=CBF+'xMORNING/DINNER/DINNER'
    CASE (&D#&B).AND.(&E=&B)
 &M=CBF+'xMORN/DIN '+CDIN+'xDIN'
    CASE (&B#&D).AND.(&B#&E).AND.(&D=&E)
 &M=CBF+'xMORN '+CDIN+'xDIN/DIN'
    CASE (&B=&D).AND.(&B#&E).AND.(&D#&E)
 &M=CBF+'xMORN/DIN '+CBED+'xDIN'
    ENDCASE
CASE &B>0.AND.&C>0.AND.&D>0.AND.&E>0.AND.MMW='W'
    DO CASE
    CASE (&B=&C).AND.(&B=&D).AND.(&B=&E)
 &M=CBF+' 4xDAILY'
    CASE (&B=&C).AND.(&B=&D).AND.(&B#&E)
 &M=CBF+' 3xDAILY '+CBED+'xBEDTIME'
    CASE (&B=&C).AND.(&B#&D).AND.(&B=&E)
 &M=CBF+'xMORN/LUN/BED '+CDIN+'xDINNER'
    CASE (&B#&C).AND.(&B=&D).AND.(&B=&E)
 &M=CBF+'xMORN/DIN/BED '+CLUN+'xLUNCH'
    CASE (&C#&B).AND.(&C=&D).AND.(&C=&E)
 &M=CBF+'xMORN '+CLUN+'xLUN/DIN/BED'
    CASE (&B=&C).AND.(&B#&D).AND.(&D=&E)
 &M=CBF+'xMORN/LUN '+CDIN+'xDINN/BED'
    CASE (&B#&C).AND.(&B=&D).AND.(&C=&E)
 &M=CBF+'xMORN/DINN '+CLUN+'xLUN/BED'
    CASE (&B#&C).AND.(&B=&E).AND.(&C=&D)
 &M=CBF+'xMORN/BED '+CLUN+'xLUN/DINN'
    CASE (&B=&C).AND.(&B#&D).AND.(&D#&E)
 &M=CBF+'xMORN/LUN '+CDIN+'xDINN '+CBED+ 'xBED'
    CASE (&B#&C).AND.(&B=&D).AND.(&C#&E)
 &M=CBF+'xMORN/DINN '+CLUN+'xLUN '+CBED+'xBED'
    CASE (&B#&C).AND.(&B=&E).AND.(&C#&D)
 &M=CBF+'xMORN/BED '+CLUN+'LUN '+CDIN+ 'DIN'
    CASE (&B#&C).AND.(&B#&D).AND.(&B#&E)
 &M=CBF+'MORN '+CLUN+'LUN '+CDIN+'DIN '+CBED+'BED'
    ENDCASE
CASE &B>0.AND.&C>0.AND.&D>0.AND.&E>0.AND.MMW='B'
    DO CASE
    CASE (&B=&C).AND.(&B=&D).AND.(&B=&E)
 &M=CBF+'xMORN/MORN/DIN/BED'
    CASE (&B=&C).AND.(&B=&D).AND.(&B#&E)
 &M=CBF+' MORN/MORN/DIN '+CBED+'xBED'
    CASE (&B=&C).AND.(&B#&D).AND.(&B=&E)
 &M=CBF+'xMORN/MORN/BED '+CDIN+'xDIN'
    CASE (&B#&C).AND.(&B=&D).AND.(&B=&E)
 &M=CBF+'xMORN/DIN/BED '+CLUN+'xB/FST'
    CASE (&C#&B).AND.(&C=&D).AND.(&C=&E)
 &M=CBF+'xMORN '+CLUN+'xMORN/DIN/BED'
    CASE (&B=&C).AND.(&B#&D).AND.(&D=&E)
 &M=CBF+'xMORN/MORN '+CDIN+'xDINN/BED'
    CASE (&B#&C).AND.(&B=&D).AND.(&C=&E)
 &M=CBF+'xMORN/DIN '+CLUN+'xMORN/BED'
    CASE (&B#&C).AND.(&B=&E).AND.(&C=&D)
 &M=CBF+'xMORN/BED '+CLUN+'xMORN/DIN'
    CASE (&B=&C).AND.(&B#&D).AND.(&D#&E)
 &M=CBF+'xAM/AM '+CDIN+'xDIN '+CBED+ 'xBED'
    CASE (&B#&C).AND.(&B=&D).AND.(&C#&E)
 &M=CBF+'xMORN/DIN '+CLUN+'xAM '+CBED+'xBED'
    CASE (&B#&C).AND.(&B=&E).AND.(&C#&D)
 &M=CBF+'xAM/BED '+CLUN+'AM '+CDIN+ 'DIN'
    CASE (&B#&C).AND.(&B#&D).AND.(&B#&E)
 &M=CBF+'AM '+CLUN+'AM '+CDIN+'DIN '+CBED+'BED'
    ENDCASE
CASE &B>0.AND.&C>0.AND.&D>0.AND.&E>0.AND.MMW='D'
    DO CASE
    CASE (&B=&C).AND.(&B=&D).AND.(&B=&E)
 &M=CBF+'xMORN/LUN/DIN/DIN'
    CASE (&B=&C).AND.(&B=&D).AND.(&B#&E)
 &M=CBF+' 3xDAILY '+CBED+'xDINNER'
    CASE (&B=&C).AND.(&B#&D).AND.(&B=&E)
 &M=CBF+'xMORN/LUN/DIN '+CDIN+'xDINNER'
    CASE (&B#&C).AND.(&B=&D).AND.(&B=&E)
 &M=CBF+'xMORN/DIN/DIN '+CLUN+'xLUNCH'
    CASE (&C#&B).AND.(&C=&D).AND.(&C=&E)
 &M=CBF+'xMORN '+CLUN+'xLUN/DIN/DIN'
    CASE (&B=&C).AND.(&B#&D).AND.(&D=&E)
 &M=CBF+'xMORN/LUN '+CDIN+'xDINN/DIN'
    CASE (&B#&C).AND.(&B=&D).AND.(&C=&E)
 &M=CBF+'xMORN/DIN '+CLUN+'xLUN/DIN'
    CASE (&B#&C).AND.(&B=&E).AND.(&C=&D)
 &M=CBF+'xMORN/DIN '+CLUN+'xLUN/DIN'
    CASE (&B=&C).AND.(&B#&D).AND.(&D#&E)
 &M=CBF+'xMORN/LUN '+CDIN+'xDINN '+CBED+ 'xDIN'
    CASE (&B#&C).AND.(&B=&D).AND.(&C#&E)
 &M=CBF+'xMORN/DINN '+CLUN+'xLUN '+CBED+'xDIN'
    CASE (&B#&C).AND.(&B=&E).AND.(&C#&D)
 &M=CBF+'xMORN/DIN '+CLUN+'LUN '+CDIN+ 'DIN'
    CASE (&B#&C).AND.(&B#&D).AND.(&B#&E)
 &M=CBF+'MORN '+CLUN+'LUN '+CDIN+'DIN '+CBED+'DIN'
    ENDCASE
CASE &B>0.AND.&C>0.AND.&D>0.AND.&E>0.AND.MMW='L'
    DO CASE
    CASE (&B=&C).AND.(&B=&D).AND.(&B=&E)
 &M=CBF+'xMORN/MORN/LUN/BED'
    CASE (&B=&C).AND.(&B=&D).AND.(&B#&E)
 &M=CBF+'xMORN/MORN/LUN '+CBED+'xBED'
    CASE (&B=&C).AND.(&B#&D).AND.(&B=&E)
 &M=CBF+'xMORN/MORN/BED '+CDIN+'xLUN'
    CASE (&B#&C).AND.(&B=&D).AND.(&B=&E)
 &M=CBF+'xMORN/LUN/BED '+CLUN+'xMORN'
    CASE (&C#&B).AND.(&C=&D).AND.(&C=&E)
 &M=CBF+'xMORN '+CLUN+'xMORN/LUN/BED'
    CASE (&B=&C).AND.(&B#&D).AND.(&D=&E)
 &M=CBF+'xMORN/MORN '+CDIN+'xLUN/BED'
    CASE (&B#&C).AND.(&B=&D).AND.(&C=&E)
 &M=CBF+'xMORN/LUN '+CLUN+'xMORN/BED'
    CASE (&B#&C).AND.(&B=&E).AND.(&C=&D)
 &M=CBF+'xMORN/BED '+CLUN+'xMORN/LUN'
    CASE (&B=&C).AND.(&B#&D).AND.(&D#&E)
 &M=CBF+'xMORN/MORN '+CDIN+'xLUN '+CBED+ 'xBED'
    CASE (&B#&C).AND.(&B=&D).AND.(&C#&E)
 &M=CBF+'xMORN/LUN '+CLUN+'xMORN '+CBED+'xBED'
    CASE (&B#&C).AND.(&B=&E).AND.(&C#&D)
 &M=CBF+'xMORN/BED '+CLUN+'MORN '+CDIN+ 'LUN'
    CASE (&B#&C).AND.(&B#&D).AND.(&B#&E)
 &M=CBF+'MORN '+CLUN+'MORN '+CDIN+'LUN '+CBED+'BED'
    ENDCASE
CASE M->MMW='M'
    &M=CBF+'xDAILY - PRN/MDU'
ENDCASE

And then there's "Option Explicit" in VB/VBA/VBScript. I get a bit wound up about that too.

boost
My eyes! Ze goggles, zey do nothing!
cowgod
@boost, you own me some aspirin that gave me a headache.
Unkwntech
LOL! And that's Production code too, part of a larger body of code used every week to generate Webster packs.
boost
this is wrong place to post the code snippet. Kindly submit to http://thedailywtf.com
icelava
And link to it from here?
boost
Ummmm ... like where on WTF?
boost
+10  A: 

I immediately delete code that has been commented out if it has been checked into version/source control.

cowgod
amen to that one brother
Feet
I second the Amen!
Pwninstein
+1; this is one of my biggest pet peeves too.
genehack
+3  A: 

My variables always use CamelCase

example: isTrue, numScore, canConvert

My brace placing is always in this structure:

if (myVar.length < 256) {
// code
}

I can't stand people who code like this:

if (myVar.length < 256)
{ /*code */ }

and my indentation is very articulate.

I cant stand code that's hard to read. Code that is indented well, structured nicely and commented is what keeps people sane. Just think of the person who is going to have to maintain your code. If you take a step back and can't instantly tell what you were thinking in your code, it's best to modify it.

John T
A: 

I'm obsessive about commenting in my code as well as using the indent style (Allman)...

featureBlend
+1  A: 

I really hate magic numbers so I have the unstoppable urge to refactor them into symbolic constants.

The only constants I allow are 0, empty string, empty set and the boolean values. And the +1 or -1 offsets. The rest must be named.

By the way, this action already has solved bugs.

Gamecat