Click here to Skip to main content
15,887,027 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.

 
GeneralRe: *cries in C++* Pin
honey the codewitch16-Feb-22 7:49
mvahoney the codewitch16-Feb-22 7:49 
GeneralRe: *cries in C++* Pin
David O'Neil16-Feb-22 13:56
professionalDavid O'Neil16-Feb-22 13:56 
GeneralRe: *cries in C++* Pin
englebart16-Feb-22 14:43
professionalenglebart16-Feb-22 14:43 
GeneralRe: *cries in C++* Pin
Memtha16-Feb-22 15:33
Memtha16-Feb-22 15:33 
GeneralRe: *cries in C++* Pin
jschell17-Feb-22 12:04
jschell17-Feb-22 12:04 
GeneralRe: *cries in C++* Pin
Memtha17-Feb-22 12:49
Memtha17-Feb-22 12:49 
GeneralRe: *cries in C++* Pin
jschell30-Mar-22 5:22
jschell30-Mar-22 5:22 
GeneralRe: *cries in C++* Pin
Gary R. Wheeler16-Feb-22 15:53
Gary R. Wheeler16-Feb-22 15:53 
honey the codewitch wrote:
The code is evil. It's absolutely terrible to read, almost as if they were *trying* to hide intent.
I am now responsible for a piece of code that's been part of our business for over thirty years. This software handles rendering our proprietary printer language into bitmaps, and then shipping those bitmaps out to be printed. It was originally written by a guy who I'll call BK. BK worked on this one code base for 25 years. It had been 'stable' (bugs are features at that point) for quite a while, and they tried to reassign BK to another project. After six months of doing absolutely nothing he decided to retire when he was confronted.

When this landed in my lap, we had not even recompiled this stuff in over ten years. I looked through the source code a few times to answer questions, but hadn't needed to really understand it. Last fall we had a piece of customer-specific hardware go obsolete so we needed to design a replacement. I started looking through the code to see what would need changed.

Good Elephant | [mastadon] ing grief. This code was written explicitly so that only a single person could maintain it. It was in C. Function prototypes weren't used. Header files didn't define the functions or data in the corresponding .C source file. There were numerous global structs, variables, and #define's with 3, 2, and yes even 1! character names. I think the best bit of numbElephant | [mastadon] ery was a group of #define's he'd added before #include <windows.h> which changed the definition of a number of values in the Windows headers which his comment (one of the few) claimed "Microsoft got wrong".

I spent over 100 manhours identifying precisely the changes I needed to make and where. My replacement took less than a day from the time I started writing it to when it was compiled, tested, and ready for a trial on customer equipment.

This code is [in]famous for something else. I'm a vulgar man, and I swear a lot in casual conversation with people I know, including my coworkers. That said, I've never cussed or used foul language in my source code. It just didn't seem professional. Until. This. Crap. There is now a comment block in this code following my modifications which looks something like this:
C
// ====================================================================
// USELESS SHIT LEFT OVER FROM THE ORIGINAL IMPLEMENTATION
// ====================================================================

Software Zen: delete this;

GeneralRe: *cries in C++* Pin
jschell17-Feb-22 12:14
jschell17-Feb-22 12:14 
GeneralRe: *cries in C++* Pin
Gary R. Wheeler18-Feb-22 11:27
Gary R. Wheeler18-Feb-22 11:27 
GeneralRe: *cries in C++* Pin
Member 916705716-Feb-22 20:23
Member 916705716-Feb-22 20:23 
GeneralRe: *cries in C++* Pin
honey the codewitch16-Feb-22 22:24
mvahoney the codewitch16-Feb-22 22:24 
GeneralRe: *cries in C++* Pin
Member 1330167916-Feb-22 21:52
Member 1330167916-Feb-22 21:52 
GeneralRe: *cries in C++* Pin
honey the codewitch16-Feb-22 22:23
mvahoney the codewitch16-Feb-22 22:23 
GeneralRe: *cries in C++* Pin
charlieg17-Feb-22 11:34
charlieg17-Feb-22 11:34 
GeneralRe: *cries in C++* Pin
honey the codewitch17-Feb-22 11:58
mvahoney the codewitch17-Feb-22 11:58 
GeneralRe: *cries in C++* Pin
jschell17-Feb-22 12:20
jschell17-Feb-22 12:20 
GeneralRe: *cries in C++* Pin
charlieg18-Feb-22 0:11
charlieg18-Feb-22 0:11 
GeneralRe: *cries in C++* Pin
Cpichols17-Feb-22 1:29
Cpichols17-Feb-22 1:29 
GeneralRe: *cries in C++* Pin
JP Reyes17-Feb-22 6:12
JP Reyes17-Feb-22 6:12 
GeneralRe: *cries in C++* Pin
honey the codewitch17-Feb-22 6:30
mvahoney the codewitch17-Feb-22 6:30 
GeneralRe: *cries in C++* Pin
JP Reyes17-Feb-22 6:43
JP Reyes17-Feb-22 6:43 
GeneralRe: *cries in C++* Pin
honey the codewitch17-Feb-22 11:45
mvahoney the codewitch17-Feb-22 11:45 
GeneralRe: *cries in C++* Pin
charlieg17-Feb-22 11:38
charlieg17-Feb-22 11:38 
GeneralRe: *cries in C++* Pin
honey the codewitch17-Feb-22 11:42
mvahoney the codewitch17-Feb-22 11:42 

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.