|
Because we're always so careful on the big stuff. It's tricky to begin with so more care is taken. But the small stuff, it's so simple. What can go wrong?
I once made an oh so minor 2 character change to a simple program. It was so simple and so obviously correct that I just dropped it back into production. And thus tipped over an entire healthcare claims reporting system. Oops!
|
|
|
|
|
My favorite was, in my C++ days, putting a ; at the end of a for statement and then spending several hours in the debugger wondering why the code in the for loop executed only once!
|
|
|
|
|
I create my own function when dealing with these types of statements. For any number of reasons. It just compares objects.
bool ok = MyFunc.IsInList( s.key, "data_packet", "etc" );
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
|
|
|
|
|
return 0++
|
|
|
|
|
I have had such weird code snags in C.
Had one that two of us could not see the error.
We laughed when we solved it. So simple.
Wish I had saved the code, but good riddance.
"A little time, a little trouble, your better day"
Badfinger
|
|
|
|
|
Sometimes overthinking/overengineering something has this effect.
Recently came across a piece of code which went something like this during one my code review sessions.
bool condition;
viewmodel.AllowSomething = !condition == true ? false : true;
We laughed for about 30 minutes, including the guy who wrote this.
|
|
|
|
|
It looks like that code evolved to be that, rather than written that way to begin with. At least I hope.
I've been there. In fact, I've had code I wouldn't touch because it was like that, took forever to get right, and it worked, including handling difficult corner cases.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
honey the codewitch wrote: At least I hope.
It was written that way. We laughed at it as it meant that we assign true when the condition is true and false when it's false. Just the way to go about it was really through Caradhras mountains and then through the mines of Moria.
honey the codewitch wrote: took forever to get right
At first glance my thought was also to replace with !condition. As I missed the first ! to begin with.
modified 23-Feb-24 7:54am.
|
|
|
|
|
It is a funny bit of code.
love it
"A little time, a little trouble, your better day"
Badfinger
|
|
|
|
|
Hi All,
The project I am working on is a trifle how is the best way of saying this 'problematic'. It has been running for a long period of time, management and accounts concerned, chewed through staff members none of the original design team are here now. That is the problem, we are now playing 'wack a mole' with bugs, there is an issue underlying I am sure of it. As it has changed designers so many times I think the phrase "It almost works, it nearly done" to be "It doesn't work right, I am leaving It's someone else's problem". Stuff has been built on a Shakey foundation
and is now teetering on collapse, but I am not allowed to go looking into stuff that works to try to find the issues as it has been signed off.
|
|
|
|
|
Been there, done that, got told to "do what we tell you".
Good luck.
|
|
|
|
|
If anyone ever said that to me you wouldn't see me for dust
In a closed society where everybody's guilty, the only crime is getting caught. In a world of thieves, the only final sin is stupidity. - Hunter S Thompson - RIP
|
|
|
|
|
Not saying I took much notice ...
|
|
|
|
|
How could you
In a closed society where everybody's guilty, the only crime is getting caught. In a world of thieves, the only final sin is stupidity. - Hunter S Thompson - RIP
|
|
|
|
|
|
Update the resume and start discreetly looking?
You know who will get the blame when it all falls apart ...
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
|
Run Forrest, run!
"In testa che avete, Signor di Ceprano?"
-- Rigoletto
|
|
|
|
|
My "issues" can usually be traced to lack of visibility; putting off that dashboard or "log" I know the app needs. Like driving with an oil light only. (And the bulb may be burned out.)
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
|
|
|
|
|
Like when you get that "engine" light on the dashboard, but just ignore it....
|
|
|
|
|
That sounds so much like the situation where I am working... And no one wants to dig into this archeological dig of a mess to find the underlying causes...
modified 21-Feb-24 21:52pm.
|
|
|
|
|
Long ago I rather enjoyed fixing bugs in other people's code. Send the code to me. Maybe I'm still good at it.
|
|
|
|
|
This is also called the project death march. You need an enemy to make hard decisions. No one wants to own up to the mess.
My very first contract job was with a DMV processing company. I got settled in, did my work, poked around and came across a couple of boxes of Project Zeus. Going through it, it was high level OO design out the wazoo to replace a functioning system. After reading a bit, I asked the VP who ran my group about Project Zeus. He got a very concerned look on his face....
The story goes on from there.
This project went through a full year of design. Mind you design. Not at one time did the whiz kids ask the grunts who knew the working system how things worked. Slip after slip, finally the head VP said, when am I going to have a working system? The week before that date, the entire team quit.
Five years later, I come along. This place did have one nice feature - it had a cafeteria and cooks that could cook. Excellent blueberry pancakes. So, I'm sitting there eating my breakfast and the VP comes up, sits down just to chat.
He says, "you know, we're thinking about shutting this product down...."
me: "Why?"
Him: "Well it's not new tech."
me <thinking this="" system="" sits="" in="" the="" corner="" and="" makes="" 25="" million="" a="" year...="">me: "I'll buy it."
Him: "what?"
me: "you heard me. What's your price?"
Him: "haha, you're joking.."
me: "nope, point me in the right direction."
last I heard it's still running in the corner making millions.
Charlie Gilley
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
Has never been more appropriate.
|
|
|
|
|
I totally agree with @OriginalGriff, time to quietly move on.
But, just for laughs, this situation always reminds me of this: Abbott & Costello - YouTube[^]
Graeme
"I fear not the man who has practiced ten thousand kicks one time, but I fear the man that has practiced one kick ten thousand times!" - Bruce Lee
|
|
|
|
|
"It's nearly done" has been the mantra of most programming teams since I have been in the business (1994).
What happens is that teams always do the easy stuff first. Naturally and with management's glowing approval and encouragement.
So of course the "almost done" parts are the parts that noone has yet figured out how to do.
This scenario will not change until programming managers wise up, and insist that teams COMPLETE THE HARD PARTS FIRST.
And LOL, good luck with that...
|
|
|
|