Click here to Skip to main content
15,895,746 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralUnreadable, ineffable, and irresistible Pin
honey the codewitch25-May-21 11:10
mvahoney the codewitch25-May-21 11:10 
GeneralRe: Unreadable, ineffable, and irresistible Pin
Greg Utas25-May-21 11:33
professionalGreg Utas25-May-21 11:33 
GeneralRe: Unreadable, ineffable, and irresistible Pin
Rick York25-May-21 12:57
mveRick York25-May-21 12:57 
GeneralRe: Unreadable, ineffable, and irresistible Pin
honey the codewitch25-May-21 13:05
mvahoney the codewitch25-May-21 13:05 
GeneralRe: Unreadable, ineffable, and irresistible Pin
  Forogar  26-May-21 2:29
professional  Forogar  26-May-21 2:29 
GeneralRe: Unreadable, ineffable, and irresistible Pin
jsc4226-May-21 2:41
professionaljsc4226-May-21 2:41 
GeneralRe: Unreadable, ineffable, and irresistible Pin
  Forogar  26-May-21 2:58
professional  Forogar  26-May-21 2:58 
GeneralRe: Unreadable, ineffable, and irresistible Pin
Gary Wheeler26-May-21 7:31
Gary Wheeler26-May-21 7:31 
<OldFartWarStory>

I have inherited a body of code from a guy who retired about 10 years ago and then died. He was a grade A a-hole to work with while he was here. After he left his code bounced from person to person, with none of them making any changes, until it arrived on my desk. I have spent a couple hundred hours over the last year just looking at it in the course of diagnosing issues. I am currently about to make my first change in it due to a hardware obsolescence problem.

This is all C, running on Windows as a command-line app. The code was deliberately written so that A-hole was the only person who could maintain it. Identifiers are of minimal length. There are global values with single lower-case character names. While there are dozens of .C source files, none of them have matching .H files. All external references are explicitly specified everywhere. Function prototypes are not used - anywhere. Magic numbers abound. Pointer arithmetic is used unnecessarily and unwisely. There's more, but I don't want to frighten you children.

He cultivated a mythos surrounding his code, claiming that it was difficult and performance-intensive, and that was why other people couldn't handle it. His management believed it.

I have spent the last two weeks figuring out how to address this obsolescence issue. When I'm done, I will have replaced <100 lines of code with around 40.

</OldFartWarStory>

Writing unreadable code is inexcusable and should be grounds for termination with utmost prejudice.
Software Zen: delete this;

GeneralRe: Unreadable, ineffable, and irresistible Pin
honey the codewitch26-May-21 10:08
mvahoney the codewitch26-May-21 10:08 
GeneralOgres, Onions, APIs, and Possibly Cakes Pin
honey the codewitch25-May-21 6:44
mvahoney the codewitch25-May-21 6:44 
GeneralRe: Ogres, Onions, APIs, and Possibly Cakes Pin
Greg Utas25-May-21 6:53
professionalGreg Utas25-May-21 6:53 
GeneralRe: Ogres, Onions, APIs, and Possibly Cakes Pin
honey the codewitch25-May-21 7:01
mvahoney the codewitch25-May-21 7:01 
GeneralRe: Ogres, Onions, APIs, and Possibly Cakes Pin
Mike Hankey25-May-21 7:54
mveMike Hankey25-May-21 7:54 
GeneralRe: Ogres, Onions, APIs, and Possibly Cakes Pin
honey the codewitch25-May-21 8:04
mvahoney the codewitch25-May-21 8:04 
GeneralRe: Ogres, Onions, APIs, and Possibly Cakes Pin
Slacker00725-May-21 8:15
professionalSlacker00725-May-21 8:15 
GeneralRe: Ogres, Onions, APIs, and Possibly Cakes Pin
Daniel Pfeffer25-May-21 10:28
professionalDaniel Pfeffer25-May-21 10:28 
GeneralRe: Ogres, Onions, APIs, and Possibly Cakes Pin
Marc Clifton25-May-21 12:38
mvaMarc Clifton25-May-21 12:38 
GeneralRe: Ogres, Onions, APIs, and Possibly Cakes Pin
Jalapeno Bob26-May-21 10:33
professionalJalapeno Bob26-May-21 10:33 
GeneralThought of the Day Pin
OriginalGriff25-May-21 4:57
mveOriginalGriff25-May-21 4:57 
GeneralRe: Thought of the Day Pin
jsc4225-May-21 5:02
professionaljsc4225-May-21 5:02 
GeneralRe: Thought of the Day Pin
Daniel Pfeffer25-May-21 5:48
professionalDaniel Pfeffer25-May-21 5:48 
GeneralRe: Thought of the Day Pin
Mike Hankey25-May-21 6:03
mveMike Hankey25-May-21 6:03 
GeneralRe: Thought of the Day Pin
W Balboos, GHB25-May-21 9:39
W Balboos, GHB25-May-21 9:39 
GeneralRe: Thought of the Day Pin
Daniel Pfeffer25-May-21 10:25
professionalDaniel Pfeffer25-May-21 10:25 
GeneralRe: Thought of the Day Pin
PIEBALDconsult25-May-21 10:40
mvePIEBALDconsult25-May-21 10:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.