Click here to Skip to main content
15,887,214 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: Isn't it fun when you write something and look back months later and wonder how you did it? Pin
rnbergren19-Sep-20 11:08
rnbergren19-Sep-20 11:08 
GeneralRe: Isn't it fun when you write something and look back months later and wonder how you did it? Pin
Gerry Schmitz17-Sep-20 11:31
mveGerry Schmitz17-Sep-20 11:31 
GeneralRe: Isn't it fun when you write something and look back months later and wonder how you did it? Pin
Daniel Pfeffer17-Sep-20 11:38
professionalDaniel Pfeffer17-Sep-20 11:38 
GeneralRe: Isn't it fun when you write something and look back months later and wonder how you did it? Pin
Gary R. Wheeler17-Sep-20 15:22
Gary R. Wheeler17-Sep-20 15:22 
GeneralRe: Isn't it fun when you write something and look back months later and wonder how you did it? Pin
honey the codewitch17-Sep-20 15:33
mvahoney the codewitch17-Sep-20 15:33 
GeneralRe: Isn't it fun when you write something and look back months later and wonder how you did it? Pin
Gary R. Wheeler17-Sep-20 17:06
Gary R. Wheeler17-Sep-20 17:06 
GeneralRe: Isn't it fun when you write something and look back months later and wonder how you did it? Pin
honey the codewitch17-Sep-20 18:31
mvahoney the codewitch17-Sep-20 18:31 
GeneralRe: Isn't it fun when you write something and look back months later and wonder how you did it? Pin
Gary R. Wheeler20-Sep-20 7:30
Gary R. Wheeler20-Sep-20 7:30 
honey the codewitch wrote:
I think it's weird that you consider my code more CS than engineering
My bad. I'm stereotyping your code based on the subject matter: parsers and the surrounding ecosystem. That area of expertise has always seemed to be dominated by academics, in my experience.

I occasionally do work on the side from my M-F/8-4 job. One job was for a university professor who used graduate students as slave labor. They needed a multithreaded app to setup and control some hardware they were developing for sale outside the university. There was quite the culture shock when I started submitting code to them. They were used to using and writing code that started with the bare minimum necessary to perform some function, and then layered error handling and UI on top. The notion of architecting a solution in advance that kept these considerations in mind was utterly foreign to them.

The more noteworthy job was software to run a prototype machine. An intern at the company had written hardware control primitives that were quite good. A scientist wrote code that performed the detailed mathematics required to execute the machine's actual function. The scientist was a good mathematician, but a terrible programmer. I was hired to write a test bed application to let the company demonstrate the hardware to their customer. I wrote UI and integrated the intern's hardware primitives in short order. Integrating the mathematics was a disaster. I routinely set the warning level on my compilers at maximum just ensure that the stupid mistakes are caught. The scientist's code wouldn't compile clean, even at warning level zero. Lots of ill-advised pointer arithmetic, a global misunderstanding of type casting, random switching between float vs. double, a firm belief that array indices in C started at 1 (see the pointer arithmetic), and so on. I tried to work around the problems for a while, but finally gave up.

The scientist wouldn't give me a copy of his design notes for the mathematics, so I finally went to the head of the project for them. Between those notes and reverse-engineering his code, I was able to replace the mad scientist code with something a lot more robust. Interestingly this was one time in my career where my courses in numerical methods in college really came in handy. I replaced some of the scientist's integration and differentiation code with other algorithms to address precision issues. I even found some operational errors in the design as I coded the replacement. Since this was a prototype and a demonstrator, it wasn't too hard to make the code switchable to demonstrate the original mathematics versus mine. Since the original math crashed the app well over half the time, or took minutes to produce a result, and my code took a couple of seconds and never crashed, it made an impression.

The funny part of the whole thing was that I didn't know anything about the problem domain that the math was being used in. I just knew when the syntax of the operations being performed didn't make sense (multiplying a 5x7 matrix by a 4x3, for example), or that the order of operations was likely to cause an overflow or underflow, or that units conversions were not being handled correctly.
Software Zen: delete this;

GeneralRe: Isn't it fun when you write something and look back months later and wonder how you did it? Pin
honey the codewitch20-Sep-20 8:12
mvahoney the codewitch20-Sep-20 8:12 
GeneralRe: Isn't it fun when you write something and look back months later and wonder how you did it? Pin
Rage17-Sep-20 19:56
professionalRage17-Sep-20 19:56 
GeneralRe: Isn't it fun when you write something and look back months later and wonder how you did it? Pin
honey the codewitch17-Sep-20 20:06
mvahoney the codewitch17-Sep-20 20:06 
GeneralRe: Isn't it fun when you write something and look back months later and wonder how you did it? Pin
Peter_in_278017-Sep-20 22:17
professionalPeter_in_278017-Sep-20 22:17 
GeneralRe: Isn't it fun when you write something and look back months later and wonder how you did it? Pin
honey the codewitch18-Sep-20 1:32
mvahoney the codewitch18-Sep-20 1:32 
GeneralRe: Isn't it fun when you write something and look back months later and wonder how you did it? Pin
Member 1368006017-Sep-20 22:05
Member 1368006017-Sep-20 22:05 
GeneralRe: Isn't it fun when you write something and look back months later and wonder how you did it? Pin
CPallini17-Sep-20 22:53
mveCPallini17-Sep-20 22:53 
GeneralRe: Isn't it fun when you write something and look back months later and wonder how you did it? Pin
Keefer S18-Sep-20 2:02
Keefer S18-Sep-20 2:02 
GeneralRe: Isn't it fun when you write something and look back months later and wonder how you did it? Pin
MKJCP18-Sep-20 2:50
MKJCP18-Sep-20 2:50 
GeneralRe: Isn't it fun when you write something and look back months later and wonder how you did it? Pin
Mark Starr18-Sep-20 3:28
professionalMark Starr18-Sep-20 3:28 
GeneralRe: Isn't it fun when you write something and look back months later and wonder how you did it? Pin
Stefan_Lang18-Sep-20 4:05
Stefan_Lang18-Sep-20 4:05 
GeneralRe: Isn't it fun when you write something and look back months later and wonder how you did it? Pin
honey the codewitch18-Sep-20 6:35
mvahoney the codewitch18-Sep-20 6:35 
GeneralRe: Isn't it fun when you write something and look back months later and wonder how you did it? Pin
Matt McGuire18-Sep-20 5:19
professionalMatt McGuire18-Sep-20 5:19 
GeneralRe: Isn't it fun when you write something and look back months later and wonder how you did it? Pin
JP Reyes18-Sep-20 7:09
JP Reyes18-Sep-20 7:09 
GeneralThought of the Day Pin
OriginalGriff17-Sep-20 4:31
mveOriginalGriff17-Sep-20 4:31 
GeneralRe: Thought of the Day Pin
jeron117-Sep-20 4:39
jeron117-Sep-20 4:39 
GeneralRe: Thought of the Day Pin
PIEBALDconsult17-Sep-20 4:53
mvePIEBALDconsult17-Sep-20 4:53 

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.