Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Sounds like part of my job. Except that there are 300 line long (a single one has 300 lines) switch case statement spaghetti (used like emulated goto).
-
nebula18132yi do not know why, but while reading your rant i was thinking about something like this:
"somehow the cooling system in our pyramid does not work anymore. can you fix that? it's all documented with a lot of pictures" -
@YADU
#define EMULATED_GOTO(t) position=t; break;
position=0;
while(1)
{
switch(position)
{
case 0:
...
if(foo) { EMULATED_GOTO(3); }
EMULATED_GOTO(2);
case 1:
...
if(!foo) { EMULATED_GOTO(2); }
...
EMULATED_GOTO(0);
case 2:
....
}
}
Not exactly like this, a bit more hidden and with names. But still very hard to read.
Related Rants
Trying to refactor legacy code can be a real adventure. It's like exploring an ancient ruin, except instead of hidden treasures, you're uncovering cryptic code and dead ends. But the real plot twist comes when you realize there are no unit tests to guide you. It's like trying to navigate a maze blindfolded - you never know when you're going to hit a dead end and end up with a headache! 🤯
rant
project
legacy
unit
code
test