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
Search - "legacy code"
-
When your boss asks you to debug some crappy legacy code and you need to bring in the heavy artillery7
-
I've learned that trying to jump into a project without properly understanding everything it will entail is bad.
I recently worked on a project that involved modernizing a legacy system and no one on the team (including me) fully understood how the legacy system worked. This led to us missing a lot of edge cases and attacking the project in a way that really wasn't beneficial overall.
If we had thought about the entire system beforehand and mapped out the legacy system, the project would've turned out much better.10 -
Found this 2 years old beauty today:
public boolean hasPermission(User user, Permission permission){
// TODO
return true;
}
The author quit last year.7 -
Immortalised this actual legacy code for our Senior Devs leaving present (we all inherited this) with his last task being to refactor it, may he never have to work with code like this again.14
-
Reading through legacy code, only to discover the comment:
/*
* to the poor guy who has to fix this
* ...
* I'm sorry
*/3 -
I got a work on legacy code. The app really depends on a library that was last updated on 2009. The website docs also missing
RIP18 -
After opening the legacy code and finding out that the entire shit has 15000+ LOC and without proper commentsundefined devrant please help fbi fucking comment the code properly comments thensa legacy code notnsa devil wk58 god3
-
Who needs Legacy Code to f*ck up your day when you can't understand the code you wrote 2 weeks ago3
-
If you thought your legacy code was bad, this is what I'm dealing with. The below SQL is stored in a cookie on login and executed to on every further request to determine the user / privileges.15
-
I've written a lot of bad code, seen a lot, but attached is the most recent 'worst' I've seen.
What makes the situation worse/funny is:
1. The developer's code comment.
2. Check-in passed a code review.
3. The 'legacy code' was written last week.29 -
First rant here!
So i just inherited this legacy application in my new job.
I started looking at the code and it just doesnt make sense!
What the fucking fuck!!16 -
I'm your CEO
This is our monolithic full stack JavaScript Saas
This is our legacy code
And Welcome to jackass.1 -
Business: How long will it take to add that feature to the legacy system?
Programmer: When will the new system be implemented?
Business: 6 months
Programmer: The new feature will take 7 months3 -
Just found this precious gem in the legacy code I am maintaining! How do you check if a string is empty :-D ?5
-
Refactored a legacy source file and reduced it from 2.8k lines to 300 lines.
Mixed feelings: happy that it is much simpler now and sad that my current project team members never go back to delete unused code.
Testing pending though 😜7 -
Fucking hell, the devs before write a query that pulls 30ish column for a report. When I break it down MANUALLY, since it’s a spaghetti on top of another spaghetti, you only need 6. Fuck you, did you dropped your head when you was a kid? Fuck sake, and every query is written in stored procedure even though you’re using an entity libraries19
-
I don't know why my position has to be labeled "developer", when in reality I ain't develop shit, all I do day after day is fixing legacy code7
-
Debugging vb code written by someone else, on a lagging remote desktop connection
I guess this is the peak of legacy code8 -
Looking at code in our workplace.. I realized one thing. Like Devops, legacy code is actually a mindset.
So here goes my thought:
A piece of code is not legacy because it was written ten years ago.
A piece of code is legacy because it looks like a piece of legacy code.
With the legacy code mindset, you end up writing legacy code no matter where you are, when you wrote it.
I was looking at some part of our code which we written in just the last few months, and I can’t help but think that they were legacy, so it really doesn’t matter when it was written!
It is more about how you write your code that determines whether it is legacy :)
Hopefully this was not crazily confusing anyone. Have a good day guys & gals!7 -
Found this in a legacy codebase at work. Can't imagine what the coder was thinking. "Just in case"?5
-
That creeping realization how the legacy code works.
The "it's not possible. They couldn't have... yes. Yes they did."
It should have a name3 -
When you realize the legacy PHP code you're working in has a class you're extending with over 2000 lines and you think, "Nope, this isn't a class, it's a university."2
-
"Our last lead-developer was a real smart guy, he modernized the legacy code and we all learned a lot from him"
I need a beer, and a shotgun.10 -
Me at QA, talking about a nasty bug I found in legacy code.
QA: what was the root cause?
Me: pos code.
QA: pos?!
Me: piece o' shit.
QA: ...1 -
Once i found a legacy code where the old dev avoided the execution of some lines by wrapping them with a
if (1 == 0) {...}6 -
That moment when you resign from a place filled with politics and legacy code and unqualified people ...
feeling peaceful4 -
Spend several days decoding API legacy code from the guy who got paid shitload of money and then stumble on the piece of code that shows he isn't even aware there is a count function in SQL (or rowCount in PDO)
:)))))4 -
Legacy code.
Honestly though, this is some of the better legacy code I've worked with at this company. It's a nifty alert system wherein you can trigger sending messages to subscribers of that alert via whatever means (phone/email) they've entered.
I'll save you the technical analysis of its internals, but suffice to say it's actually pretty nice, with good separation of concerns, internal logic hidden away, dead-simple public interface, etc. documentation is kinda crap, but it exists (!), so that's a nice change.
but.
For some unknown and bloody bizarre reason, the thing breaks when a user wants both sms AND email notifications. Either by themselves work totally fine, but both together? nonono. Email alerts give ArgumentErrors, so something internal isn't correct, and SMS alerts complain about uninitialized Twilio::Error constants.
but.
they both work fine otherwise?
also, the two notification preferences aren't stored on the same object anywhere. if a user wants both, the user creates two AlertContact objects with different info, and when performed, the Alert basically iterates over these and does its thing for each, so there is no knowledge shared between them. totally should work the same regardless.
idfgi.
ALSO.
AND THIS PART REALLY PISSES ME OFF.
WHEN THERE'S AN ERROR, THIS THING DOESN'T LOG IT. IT STRINGIFIES THE ERROR OBJECT (basically just extracting the message) AND INSERTS THAT INTO THE DATABASE INSTEAD. WHAT THE CRAP.
So, I don't get a stack trace, line number, or anything. just the basic error message. instead of my alert text. because of course that makes sense and totally helps debugging.
aklsjfak;sldfj.
legacy code.5 -
"Holy shit that was fucking traumatic to look at" you whisper under your breath
That moment you get the satisfaction of deleting 2468 lines of legacy code.5 -
Today at work while reading legacy code:
do {
...
} while(false)
Wanna cry and laugh at the same time22 -
ever got a task to modify legacy code and when you looked at it you were like... burning it with fire is the only way!1
-
When the last dev wrote code and you dared to read it....switch on a Boolean, what even is your life legacy dev?2
-
Let an expert consultant write your code, they say. It will be all right, they say.
Found this today in a legacy codebase.3 -
Found this gem in some old piece of code:
public static void printStackTrace(Exception e){
e.printStackTrace();
}3 -
I've found this beauty in our company's legacy code.
The main doubt is: is that possible have the required strength to refactoring this 💩?22 -
Found a "great" variable name while maintaining legacy code:
{
...
Report goodbye = Report::first($id);
goodbye->delete();
...
}
Goodbye report! 😂😂😂 -
While trying to learn a legacy codebase, I realize one library supports almost everything. I decide to look it up.
Last updated: 19962 -
All fun and games until you inherit a legacy c project with 30k+ lines of code and a habit of leaking memory and segfaulting intermittently.
That's my worst nightmare at least.3 -
How much legacy code do I need to understand and fix before I add Software Archeologist to my LinkedIn?6
-
So, apparently the legacy code I'm told to maintain at work requires me to add a windows user via control panel to my PC for SQL database to work.
-
My own personal hell was a html page that had a script tag that called a rest endpoint that sent back a text block of JavaScript that was then dynamically executed to redirect the user to a php 3 page that was the exact same thing as the original page but with an extra bit of css to make the buttons blue and slightly rounded
You can’t make this shit up6 -
:/
Project i got to work couldn't get worse
1)Legacy code
2)mathematical model based emulation
3)no proper comments
4)deadline approaching4 -
My manager thinks I am Superman! and he is so confident that can do any shit he wants me to do.
Yesterday he asked me to merge an ancient code hotfix (literally ancient) with latest branch of changes.
1. Hotfix is really old, most of the things are hardcoded, very specific to a stone age client.
2. Code documentation does not exist.
3. Developers of that code are probably dead.
4. Many Libraries which code uses are deprecated.
5. It's a legacy code, so no one has fucking idea what a particular clumsy block of code do, or what will happen if you remove it.
'if it runs don't touch it' policy by management.
Despite all this shit I successfully merged the the hotfix, refactored outdated code so as to run the application.
Showed this to my manager in full swag!
He was surprised at first, and asked me to show the code changes.
'Code review' was done by comparing files 😅
Manager: Dude, you have changed these lines, why? Explain.😧
Me: those lines won't work with new build, with new libs.☺️
Manager: then why can't you do old build with new changes?🙄
Me: umm.. wait... what???🤔
Manager: the code was working previously, it must be working even today without these changes.😡
Me: it was not working hence I made changes and now it's working fine see! ☺️
Manager: you have removed this, this and this!!! 😡
Me: but I also added that, that and that!😔
Manager: "don't touch it' if it works!"😡
Me: ... Idk what to say!
(In the back of my mind: "Don't touch it even it doesn't works!")😌8 -
My worst "legacy code" experience was when the company I work at couldn't get their heads out of their asses and stubbornly continued to write legacy code. As of this day they are still doing everything according to what was hip around 2004. And they even force me to write new legacy code.
New legacy code: it sounds like a paradox, but this company makes it happen.6 -
Everytime I'm digging into some random legacy code where no one knows its original intention I'm seeing "Software Archeologist" as a well-paid job sooner or later...
Fucking undocumented legacy code...1 -
Gotta love moments when you find legacy code like this :)
P.S. Yeah, that was the whole script, written by just one guy.3 -
i once ran into this:
// magic part starts here, do not touch
and this:
// i know, and i'm sorry
in legacy code. needless to say, i prefer undocumented, well-written code to all that followed1 -
Recently for a project I needed to read/write ID3 tags from MP3 files. And after a long search, I found this bloated, monolithic but quite stable library, "getID3".
So, I was looking through the code-base and I found this. This guy literally storing the key value based data embedded as comments within the class file. Then wrote a method to parse the data and even used caching to ensure maximum speed! And such usage is repeated all over the code-base.
So, this is what people used do before arrays were invented :314 -
My company con not find any other developer than me.
I could not understand.
We use only up to date libraries in our projects.
Please note the comment private properties...12 -
Mystery of the day: why some developers can't decide on a code style. Let's count:
- two types of brace placements
- three types of assignment spacing (with, without spaces, and aligned with extra space)
- two types of clause spacing
- mixed case in the first char of a variable for no apparent reason(?)
- bonus: unneeded parentheses
At least in ONE thing the person was consistent: no space between parameters!
WHY GOD.13 -
My worst devExperience since there are dev evperiences for me, was when I had to rewrite a pretty important tool to the new onlineshop we created.
See https://devrant.com/rants/1016596/...
My best devExperience in 2017 was going live with one of our biggest web projects I had to develop all alone and hearing only great feedback. My boss told me there were more than 30'000 visitors one day after going live.
It was and still is quite satisfying. 😎1 -
First rant (well, first on devRant anyway)! So, I'm working on a project to refactor a decade old codebase so that all references to ip addresses are in config. It sucks. But I did find an ascii art fish in an old cron script, so that's something.9
-
Overwhelmed by a shitty codebase? Use the boy scout rule and leave the code you're editing a little better than you found it.
Worked wonders for me when I realized I could spend literal months refactoring and desperately needed a systematic approach.
Little by little that rotting house of cards will turn into something okay. It's a nice feeling looking back after a couple of months and see what you've done to make things better.
Also, make sure to remember the cost of wrestling with hurried legacy solutions in your estimates as well. Just adjust the level of bluntness depending on your work environment: admitting that things can/need to be improved can be unpleasant for some to hear even though it's true.5 -
After finishing a long and arduous refactoring I got to delete some hundreds of lines of really horrible, unmaintainable and broken legacy code. Feels absolutely great.
I love the smell of deleted code in the morning. -
Worst legacy experience is when you go back to a project you were working on when you first started learning. My own code disgusts me the most.2
-
Legacy projects are cancers of this profession. I would not wish maintenance of legacy code(written by someone else) on my worst enemy.14
-
Legacy code written under the pressure oft a deadline by people not knowing the capabilities of the framework they use.
I am doomed...2 -
!rant
Is anyone familiar with source trail?
https://www.sourcetrail.com/
Wanted to get some info before I drop it into a legacy code base 🤭1 -
So basically, we're all just constantly writing legacy code of the future. RIP programmer kids of today.4
-
(As a freelancer I was asked to do a couple of tasks on legacy code)
Let’s check this code, how bad can it be?
- all of the following: unreadable mess, no auto linting
- tests: some are there cause there’s not enough automation, others are poorly named
- frontend: somehow a genius made a react component for every variable in the store which only passes the variable to the child (wtf)
- backend: death by best practices
- ci/cd: “we have it but it’s broken”
Let’s fucking goooo 😎
Diagnosis: my therapist is getting rich
Chances to not cry tonight: close to zero
At least they pay well 🤷♂️5 -
That fealing when someone that picked from the graves an old project that you've started when you were just a noob developer... and then you look at the code... and then the shame.2
-
The feeling when you realize some people on the project are writing legacy code from scratch. Apparently it seems they've never heard of any coding standards, they think clean code and style guidelines are for the weak and single responsibility means one single method is responsible for a bunch of unbelievably diverse things. They are like the Gumbys of the dev realm but it's my brain that hurts every time I have to deal with their code.4
-
Damn I'm pretty hard hitting my limits here
My company asked me if I would like to work some extra hours because otherwise they don't make all the deadlines
But damnit asking 10+ hours a day from a junior web developer is quite a lot
😒 Especially if it's an old legacy project where I have to work on...8 -
Sometimes my boss wants me to fire a bullet without a gun, they want me to throw the bullet so hard that it feels like it was shot via a gun.
Maintaining a legacy app sucks so bad when you don't even have the full codebase and some douche bag decided to just randomly throw the codebase on the fucking SVN. 😠1 -
Looking at some legacy code and I was like wtf, later read the author name and it was me.
How people were tolerating me than! Man😂 -
The ability to look at uncommented legacy code and read the thoughts of the developer when he wrote it
(seriously, comment your shit!) -
The legacy codebase, episode 94385948:
How to neatly organize your code in the age pre-docblocks.
Bonus: could this function be renamed to colectomy? Or maybe de-punctuation?
(yep, probably a bad joke with a "typo", sorry)
Bonus 2: seriously? A function for that?13 -
Quitting job because of Java and legacy corporate OSGI codebase. Being junior developer I'm just done with no documentation, terrible team support and non existent code review. After 18 months I can't justify staying any longer. Never had luck with Java and I guess some things just stay the same.
Joined only because of Javascript part, just to be thrown into fullstack position. Stayed way longer because of COVID. Good old simple PHP I loved and foolishly left because of money.4 -
Have you ever been at at that magical point where you have to decide if it's worth putting the effort in to understand the legacy code, or just delete it all and start again?2
-
Everyday is my worst legacy code experience...... I go into work, open up anything written less than a year ago, and another part of me dies.
-
Fixed a bug in a code wrote 11 years ago.
It took 11 years for a user to find a bug.
The user must have a prize: a Bug Bounty.
My Boss does not like Bug Bountis4 -
Imagine updating a legacy web app and the code is so bad it physically makes you sick every time you look at it. Tables with over 400 columns, . And don't even get me started on the security issues. Apparently writing "Confidential" on the top of the page is enough security. And that's just the tip of the iceberg. People should get licenced before being allowed to code.2
-
How to deal with legacy code when you see such thing:
if function() == !!!false
1. Ctrl+A
2. Del
3. rm -rfv /3 -
The worst part of being a senior software engineer for a team is that the legacy code of the company is not clear, and there's no documentation.9
-
Legacy code is like overgrown bangs 😋 It's very hard to decide if you have to let it grow out or trim it.8
-
My last company had a code base originating in the 90's and they still write most parts of the GUI with a library that is a thin layer on top of Win32 API, with a self-rolled "ORM" for DB access (with LOTS of enums) and all that with >2million lines of C++ code. The code includes at least two implementations of std vector and std:list. One of which is even *named* std::vector. Feels good remembering that I have left that behind2
-
I just found a 980 line long method in one of our legacy code bases.... And I need to add to it. There are no unit tests and I desperately want to refactor that shit....4
-
When the legacy code has a misspelled CSS class selector but it'd break more than it'd fix... And forced to use the mispelled word. Omfg people.1
-
When you're the only one in the office that codes in C++ and you get this email -- legacy project code here we come.1
-
Going through legacy or other developers code which don't have documentation or even comments. Plus the author of the code is not working in same organisation anymore to consult. We have to understand the code like deciphering any ancient language. 😥2
-
I am both happy and sad looking at the code I wrote some time back. It makes me realize how much I have learned and at the same time how stupid I was.1
-
Who has the craziest (not largest per se) Production stack?
I just found out we have tomcat webapps, calling Angular, which is calling Java to call a Perl script.4 -
Finding comments in legacy code like "too tired, fuck you" or "this implementation is dirtyyyyyy" makes me wanna punch a dev.5
-
Just got an internship in a big company. Related to web development but they want me to use/maintain legacy jsp, servlet code. Should I take it? There are other departments too but I have been put in this shitty one.4
-
Started to write a blues song about this depressing legacy code base, but then it turned into an emo song, and now it's very heavy metal.1
-
So in two days I'm inheriting a project that's older than I am... This ought to be interesting.
I'm glad the other guy is going though4 -
If you think your legacy code is bad - this is what I came across in a system I'm refactoring this morning... and this isn't even the bug I was looking for.1
-
Needing to teach myself M$ InfoPath because of legacy business code. What better way to learn than getting the feet a little wet first!
-
236 lines of code in main doing like 400 things that should each be their own function DX
Fucking legacy projects
This is why I drink on the weekends4 -
There is a commercially sold ERP solution that has it's DB schema in excel and Other documentations in MS Word. And its not even properly structured, no schema diagrams, last updated for a 4 year old major release 😒😫.
I have to develop a custom module for it and that requires building an ActivexDLL Project in VB fucking 6 😭😭 .
VB6
Unstructured Documentation
Legacy code
Incomplete documentation
FML
Tell me if you want ss in comments.5 -
Updating a legacy written by the ceo from swift 1.2 to swift 3.1
No storyboard, main controller with 2200+ lines of code and viewDidLoad method with 500+ lines of code.
Almost no comments and code is illisible.
Weeeee8 -
So I am managing some legacy code and I found quite the gem last week.
The code went something like this :
IF(methodA()&&methodB())
However, methodB returned ! methodA...2 -
So, a spaghetti legacy code, written by some dude that obviously hates his job, needs update and we argue about spaces vs tabs....4
-
I hate legacy code.
Introduced some new changes to our application and voila! A bug in the legacy system surfaces. It was just hiding in there, waiting to ruin my weekend.2 -
One day, I have debugged some nasty legacy code and all of the sudden I wonder...
If Jesus walked on the water, can he swim on land?7 -
I hate my current work with this piece of bad written legacy $hit. As 2 year old 'junior' without any code review and mentor I feel depressed. I should improve my skills at home and run away from it.
F#$ck you, corpo.3 -
I'm learning Vue.js at home but I'm forced to learn Knockout.js at work because of legacy code. Makes me want to jump out a window.1
-
I really do wish that there are parallel universes. So, there might be a universe where I am not maintaining legacy code.1
-
Today, i discovered thus beauty within our legacy code:
// TODO: this is probably the most dirty thing in our product. It needs a model more than anything else
This captions a crappy part of controller code for several years :/ -
Ugggh. Has anyone else on here worked with MFC?
I've been updating some legacy software and it's been like wading through a swap that was caused by a malfunctioning trailer park septic system: no map, and mostly shit with the occasional nasty surprise. -
A legacy custom made WordPress Theme.
Old developer made main styling sheet with 8000+ lines of code with no component separation. -
When refactoring legacy code and your colleague committed this a week ago... As punishment we made him listen to "You're too fat to fly" all day long.
-
Gotta love those moments when you expand your code and the legacy part magically works just fine. Congrats, past me, for writing a stable core.1
-
It is fascinating to see how my motivation and productivity decreases while working on legacy code.2
-
We have a an existing legacy project full of sh*t. I am developing now an additional feature. What will you do if the one who will review your code is the one who developed this legacy project in the first place? @@#&#-$
-
Working for one of our oldest customer, in some serious old, ugly and outdated code(web service).
The dev db doesn't contain any relevant data.
The QA service points to production, so can't use it for any tests.
My contact, at the customer, is going on vacation tomorrow.
Their pm is going on vacation next Friday.
No time for refactoring, db data updates or otherwise do important and much needed updates.
They want it to be done yesterday.
FML. -
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! 🤯6
-
I know that if something looks stupid but it works, it ain't stupid... but this is just plain borderline.
Basically, a cast from int to String to int to String from some legacy code I'm working with7 -
Found a comment from a coworker in legacy Code starting with: "For those who are brave enough ..." ⚔️🛡️2
-
Finally leaving a job that I've been working at. All we did was maintain a codebase that was originally built as a prototype by an intern, with no hopes of getting a green light on refactoring or rewriting. So glad I'm no longer part of that mess. Don't know why I'm writing this but it's just like a weight has lifted off my shoulders.2
-
Working on a big project with lots of legacy code and terrible code. Full of jewels like this:
$('.form-item-to input').parent().removeClass('isOpen');
Man... .form-item-to IS the immediate, direct and only parent of the only input child!!! -
By Thor (not the god, the dragon), Belial and Thor (the god, this time)...
Just got the sources for the software that runs on the SDR for my project. I think I just found the mother of all legacy code:
The whole behaviour is described in a single, 4000 lines C file. Most of the code is in a giant switch with cases selected from an enumeration with names that don't match their function. All varnames are overly long, yet hopelessly unhelpful. And why three fuck would you use pointer[0].data instead of (*pointer).data or pointer->data like a sane person would !? pointer isn't even an array, so why would you use []?1 -
So I've been hired as a senior software developer with all the tags included (mentoring, innovating, pushing forward changes) for a company that is trying to move away from waterfall development (yup, it's 2019 and this exists) to a more iterative workflow.
I was initially hired and sent out to do some "field work" abroad for 3 months and then worked "remotely" from the local office with our field partners.
During all this time it seemed that my ideas go through smoothly, there was a lot of chatter about how things are moving forward, how new projects, innovations and new methodologies are implemented.
And yet, after my "remote" work has finished and I have to do things locally more, all of the skeletons fell out. It's just talk, nothing seems to be changing at all and yet any attempts to talk with the brass is like hitting a brick wall.
Not only that, I've been handed a 12 year old project with no possibility to refactor, no technical documentation, very few comments and in a terrible style.
The atmosphere in the company is odd as hell. People are either not very initiative, nor they seem to really care about all of the "changes" that "should be happening".
It almost feels that I've arrived in a company that still lives in 2007 more or less.
Should I quit, or perhaps it's a little "too soon" (have spent 7 months in the place already)? What I don't want is to get in the same train again (work for a company for 8 - 12 months, feel burned out because of the divergence between actual things done and "plans" and then change the job).5 -
So after the team have been digging through to work out why the app is spitting out errors it turns out that turning off developer mode clears the issue up.
This thing has been spitting out errors since its release in 2012 but the engine was handling it internally 🤣2 -
My second worst experience with legacy code:
JSP with inline java to create JavaScript which creates HTML on every fucking page load.
Luckily I leave that company too.4 -
So, if you were supposed to work on a website that is already pretty shitty coded, shitty styled and outdated... Would you go on coding like shit for the sake of consistency or would you embed a new mini-system in it trying to pay some fucking respect to everything you have learned?
Edit: in this scenario, you can actually make a choice haha7 -
Client: "I've started as a software developer too" *chuckling* "so I understand EXACTLY what you say... But could you just explain me what do you mean with 'legacy code' ?"
Me: :|2 -
Man... I hate refactoring. After I had finished up an issue this morning, I had to refactor old sql queries and the parsing to the views.
I've worked on it all day and I still haven't finished! Still loving my job, tasks like these are unavoidable but they drain the life out of me.3 -
Oh, god...why? (my reaction reading my code from 5 years ago, when I got my first programming job)
I still work there and I love it. I learned a lot in these years... -
You know I really hate uncommented legacy code especially when it was written by the PM himself years before and will never admit fault with this God awful unholy hell spawn
-
The moment when your code is like,
Yeah I'm working, not throwing errors, but not doing anything closely related to the things I should do.
Fuck this construct, I'll recode the whole thing and stop using any two-year old legacy code, for this project -
Three months ago I called function smartToggle(). And now I don't understand what this very smart shit is doing2
-
Feels like every damn day I'm learning about another language feature that we CAN'T use... So much legacy code everywhere.
C# is more like C-blunt at this point.2 -
That feel when you retire 152 files worth of dead code...
The diff was so big, it crashed our review tool! -
Agreeing to work on supporting someone else's legacy code instead of insisting on razing it and rebuilding.
-
You know the PHP legacy code base is complete garbage when it requires a script memory limit of 1.5GB.9
-
Do you ever look at old code from years ago a think “god that was bad”? I’m so embarrassed by something I wrote on 2010, it’s shockingly bad!
I actually feel a little low and think maybe I’m not very good! Of course now my code is so much better but think to myself, is what I’m writing now gonna be the same down the line?2 -
!Rant
Why in hell did we try to get smart with this shit!? As simple as storing 2 values and reading them... But no... Someone wanted to get pretty with it, stored the two values but just read one because the other can be calculated...
Makes sense (btw it's [field] in minutes and [field] in seconds)... Some problems:
1. Why? Oh because someone designed it as int...
2. Why not just in seconds? Fuck you that's why...
3. Who the fuck thought that getting seconds from minutes is better then getting minutes from seconds when we only store integer values?
Thank you... I feel better4 -
Took over a project where a dev created a table with no primary key and enforce a unique constraint in code. Wtf? He also always selected top 1 so if you added a record directly in the table it completely fucked the expected data.
So, when I took this piece of shit over I didn't realize what the table was and when I tried to convert it to EF it barfed since there was no PK. Was a complete PITA and had to create all new tables.
Some people shouldn't develop software!!!!!!!!! -
I have a really hard time staying focused reading through legacy code. As a result, I often miss many subtle details about how a given system is currently functioning.
-
Today I had to spend the whole day fixing a stupid bug in a legacy application in a completely different tech stack than I'm used to...
At my company we have an Internet application running where we can upload a word document and using some mailmerge variables magic, can set those vars and receive the personalised word doc back...
Now this is great, when it's working, and is used in various projects we have up and running... Suddenly the application decides to crap out for no apparent reason and guess who drew the short straw....
Anyhow I ask our sys admin for the password to the server, I remote desktop to it, turns out its a fucking Windows 2008 server...
But wait it gets better, the application, a shoddy mess of c# code, is not under any sort of version control, has to be developed on that same server and to top it all of, I have to follow some obscure barely documented deployment precedure to get my changes live....
So after a lot of cursing on the dev (not working at the company any more) who did the original setup, and hours of painstakingly piecing together how it works and what went wrong and how to fix it, I finally managed to get it working....
After this rant, I'm mailing my technical lead about this in the hopes we can get someone to do it right (yes, I'm that naive)1 -
Legacy code was so bad that it created the existence of my team to do a refactor and rewrite.
(Outsource to in house) -
When I want to travel back in time I take a look into the legacy code I've wrote more than a 10 years ago.
-
Helping to fix legacy code on a staging server. No version control (at least not that I am aware of). Besides rare code comments, no way to see the author, time, or even purpose of customizations that have been made. No fun!1
-
How can code refactor be so stressfull that even doin' it on YOUR OWN CODE looks like taking a slow walk over broken glass? More than never: GOD BLESS THOSE WHO DAILY DEAL WITH LEGACY CODE
-
Maintaining shitty code is a lot like playing whack a mole. Fix one thing, something else breaks. I wish they'd just let me replace this garbage already. Could've been done by now.2
-
The feeling after you refactor 4000+ lines of ugly legacy code into 2000 lines of code placed in a framework ...these 4000 lines also all one document
-
The worst kind of legacy code is the one in which a function body run miles climbing if-else ladders until nobody knows where the sky hits the floor, and returns when nobody is looking.
The best kind of legacy code is the one which is fully commented out! -
Working on a piece of code, first created in 1994 and has had constant changes and modifications till 2014
I need to take it and turn it into a procedure library and new methods and classes and I have 3 weeks to do it.
Worst off I'm a junior programmer and I only have 9 months experience with the language5 -
My company never used unit tests. And i would love to educate but i do not know how to unit test properly. I always en up with: if i want to properly test all ins and outs of this class's + operator. I need to add checks for positive number, negative numbers, nan, infinites, nulls etc. Etc. It needs so many tests for something so stupidly simple, that i don't see a way to motivate people to use it.
Am i missing something? Is there a guideline for "ok coverage"? Is testing just that much work and is that why nobody cares until it is too late?
I have been reading a book about working with legacy code. But still i got no answers. Halp!7 -
Does anyone watch the movie The Mack (1973)?
Today I am working with some legacy code written by a shitty developer who isn't with us anymore. Every time I make a change the code screams at me with problems.
Every error makes me feel like saying this quote from Goldie the pimp...
"List to me and listen good. I don't give a shit what happened to you!.......get back out there and get me my money!" -
I so hate working with legacy db code! I wish I could migrate all to entity framework but the migration is a pain in the ass and would take hours which the client wouldn't like.1
-
"Delete all code!" That should be the mantra!
Was watching some stuff from destroyallsoftware.com. Not entirely convinced. So I should cook up my own shit.
So here is how the argument goes:
There's quite some negativity in the term "legacy" software. Partly it may be the envy to software that runs on actual machines and is not that phantasm, that perfect first lines on a greenfield project until it gets messed up as it has to put up with all the real world messiness. But the negativity it deserves is actually for the code that we cannot get rid of. This ugly class or function that soaked all the complexity and functionality so it defies any positive change. And always when it appears on your screen, it irks you, enrages you, makes you punch the screen, because you can almost feel the distaste physically. - *That* is the definition of "legacy" in its true negativity. No software should be like that. On the contrary. Every line should be replaceable, dispensable, disposable. At the verge to deletable. Because you know: the best code is no code.
This is where my hatred of code could get productive: Delete all the wretched, loathsome stuff and replace it, with something that just sucks less and can be thrown away any time. Don't expect beauty or perfect design. It'll never finish.3 -
Just read Uncle Bobs book series:
Working with Legacy Code,
Clean Coder,
Clean Code,
Clean Architecture
Read it in this exact order and each book was better than the one before.
What did you think of them and what other books do you recommend reading?
(Coding books of course)3 -
Project Lead in the morning: This one story needs to be finished till 2pm for the QA department.
Me: No problem, everything is finished and there is only one test case open. It should be finished in no time.
Also me: Spends 7 hours of intensive lagacy code debugging to find out why this shit isn't working sometimes. Try to fix it, broke some other things. Retested all cases and found 3 other minor bugs. End of the day, story is still not finished.
Now: Project Lead is mad, QA guy is mad, I am mad.
Conclusion: I hate debugging legacy code and I never again trust the last open test case!!2 -
one of the most annoying things about our system at work is that we're constantly updating broken links because we're in the process of updating a lot of legacy code. there's this one service to retrieve links for a module, but half the links in the legacy code are hard-coded strings anyway, so the whole thing is just a huge maintainability disaster. anyone ever come up with any interesting solutions for managing links between modules?1
-
I am losing my mind trying to create a new feature to a 2013 code base.
This project uses Zend Framework 1.12 and jQuery 1.4, so I added Vue and things went better but I have some tests to do.2 -
Second Monday rant...
F%$@ YOU Visual Basic 6, your STOOOOOOOOPID SSTab control bullshit and the fact that I can't remove a tab by simply clicking a "Delete" button! -
Finish this one project which already takes way too long and like an onion there always appear new layers of fucked-up once I get through one of them.
-
!rant
When you get the go ahead to scrap the old legacy code and design it from the ground up
feels_good.jpg -
This comment is why iis is an abomination for allowing multiple languages
/*Didn't know how to do this in php so wrote in asp just call it do do the task*/ -
Unbelievable. 14 out of 16 runs of integration tests errors unexpectedly with no error message, port was already used (not released from last cycle) or timed-out in the before all hook. Well done whoever wrote this suite!
-
I don't think I'll ever understand how someone can complain about a legacy code base in one breath, and then justify a bad design with "that's how the system does it everywhere else" in the next.1
-
FOR FUCKING FUCK SAKE
I have a shit ton work to do. Just finished (hopefully) all of my exams, came back to work and got tasked with simultaneously developing a new app (Android), adjusting some of my own code to work with client's specific requirements in completely different project (C#) and also I have to fix a legacy app (Android) because UE comitee will be visiting us on wendesday.
I've never seen this code earlier. I've never seen this WHOLE SHITTY PROJECT. Guy that was developing this left few years back.
It's a complete spaghetti. 550 FUCKING LINES OF CODE for a one class, most of the methods are deprecated and won't even try to work on Android > 4.0. No documentation. Nothing works. Whole code is ridden with bugs, warnings and looks like it's glued together with duct tape. I even had to migrate from fucking Maven to Gradle it's that old. -
What is worse than editing legacy CSS code? Trying to style a page using only no-code / low-code tools. Simplest things like a border only on one side seems nearly impossible or requires hours of trial-and-error with drag-and-drop-modules and their arcane option dialogs.7
-
<previous_developer>'s_file_of_shame.me a log of hideous code base I've inherited. is growing and growing. The more I write the more I wish I would be rid of it.1
-
I had a discussion with my colleagues about my bachelor thesis.
Together we created within the last 18 month a REST-API where we use LDAP/LMDB as database (tree structured storage). Of course our data is relational and of course we have a high redundancy there. It's a 170 call API and I highly doubt that it's actually conforming REST.
Ensuring DB integrity is done in the backend and coding style there is "If we change it at one place, let's make sure to also change it everywhere else", so you get a good impression how much of spaghetti code we have there.
Now I proposed to code a solution in my bachelor thesis where we use a relational database (we even have an administrated Oracle DB with high availability) and have a write-only layer to also store the data in LDAP but my colleagues said that "it would add too much complexity to the system".
Instead I should write the relational layer myself and fetch the data somehow from the existing LDAP tree.
What the actual fuck, spaghetti code is what makes the system really unnecessarily complex so that no one will understand that code in 2 years.
Congratulations, you just created legacy code that went into production in 2018 while not accepting the opportunity to let that legacy code get eliminated.
Now good luck with running and maintaining that system and it's inconsistencies.1 -
So i recently inherited some legacy code.
Its actually not to bad. Just a few thousand locs which are mostly stretched across a handfull of functions lmao (800lines per function yay).
So the main thing i wana ask. Does someone here know of good techniques to gradually reimplement all of this.
Since im not gonna apply bandaids to this mess anymore than is needed.
Unfortunately this is a very important system and it only runs on production xD.
Idealy i would somehow be able to duplicate the tcp traffic to the reimplementation but that doesnt seem feasible.
Also what the individual modules classes and so on do wa snever documented and no one even knows how or why certain things even exist.
If anyone has any idea of what i can do. Apart from hoping to god i dont miss any weird quirky edge cases. Do let me know7 -
Is it unreasonable to refuse the tickets and to demand that the dev who came up with the God awful solution should make it work?1
-
Dreading the end of this bank holiday weekend, tomorrow I must wake up and return to working with legacy code.
-
I started a months ago in a new company and I grab a horrible legacy system and what makes me more angry is they know the code isn't code and isn't fit our new reality but they don't want to refactor the same.
So which more features we produce more bugs comes along because the legacy code bugs still on there.4 -
Did it ever happen to you that you were needed to map a mental and overly complex for no reason db schema to a simple json, and you hate yourself more every key you press because rewriting it more efficiently and simply is never an option?
How do you cope with managers and legacy code?
If it works does not necessarily mean that we should keep it, jesus christ.2 -
It’s another rubber duck story. I had trouble working with company’s legacy framework and had the senior developer (who is busy AF and practically lives at his work desk) come over to help me out like 10 times a day and 98% of the times I figured the problem out while explaining it to him. WTF can’t I pay more attention??
-
When you feel that only you and maybe one other guy from the team care about product and do effort to actually refactor legacy spaghetti code while others just patch it up or even build changes on top of legacy spaghetti!2
-
Made a rant about working with shitty legacy code and still doing that. So making something new would be nice.
-
Inherited a project with random include '*.php' and mysql_* functions littered everywhere, this will be fun 😀😂😐😔😞😭
-
I have been working on a really interesting project for the last 6 months, now they put it on hold because another department wants something else done.
Now I have to go back and work with shitty tech and horrible legacy code.
They said is only for a month or so, but I can feel that it will be more, way more.
I feel like it is bothering me more than it should, probably because the other project was mine since day one and was way more enjoyable to work with.
Part of me wants to quit because of this, part of me tells me that I need to wait and I will get the other project back.
What would you do? How can I shut up my internal quitter voice? -
My code check-in today contains comments like "Last resort methods, never use except explicitly ordered by lead".
Gotta love legacy code hacks... -
Got to do some security audit of legacy ABAP code for SAP systems. Do people still use it? If yes, why.3
-
I'm in need of advice. I reckon this is no stack overflow but that's probably for the best as I wouldn't feel as comfortable posting there as I am doing it here. So, back to the question: I'm currently working with legacy code, written in .NET 2.0. This code is responsible for calling upon PEC services in order to finally create personal smart cards. I was tasked with the job of creating a repository system that would allow the program to call on the old legacy services or the new ones without any distinction. We are talking about SOAP services in both cases. The issues is: the new service definition is comprised of soap policies. This wouldn't be a problem per se, with more modern version of the framework, but with .NET 2.0? Yes, it is. It doesn't support policies and signing the body with a certificate right out of the box. How can I manage this? I feel like the only way would be letting the proxy class do its thing up until the very last moment: intercept the SOAP request before its sent and modify it according to the specifications. But I reckon this is very bad practice. Is there any other way out of this?
Thanks for anyone that would like to help. 🙂6 -
When they introduce you to an older project and before opening it up they say “well we got much better since then and do much better coding now..”
This is the moment when you know you’re f*cked -
I hate react-redux boilerplate code and NgRx boilerplate codes too. How to avoid boilerplate code or minimize it?
I've heard about zustand but it is quite new. Legacy apps mostly use react-redux with lots of boilerplate codes.5 -
Legacy code in java :
boolean recursiveMethod(args){
Int i= 0;
Boolean doublon = false;
For(--whatever the loop--){
If(condition1 && condition2){
If(i++ > 0){
doublon=true;
Return doublon;
}
}
}
[...]
}5 -
Reworking old java apps. Holy shit im gratefull i can use spring boot.
But this code is handsdown awfull. Every file contains more ifs than other words. upto 6 layers deep. Thank god its at least properly commented.
But seriously how did this shit ever pass any QA. All legacy apps around here are a massive pile of if statements.1 -
Saw this in some legacy code today at work:
Long sid = object.getSid();
Long returnValue = (Long) sid.longValue();
Never can be too careful I guess...
/s -
I have just witnessed hell given shape.
Imagine having react + redux
And finding component which just pass an argument to the children.
‘’’(children, param) => children(param)’’’ An argument which is stored in the store. Without even changing it. And it’s a standard around the codebase.
This is why we don’t deserve nice things. -
This article about the types of legacy code bases you will have to deal with just made my day!
Not only do I have every one it describes but somehow it even made me laugh at thought of each of the std riddled petri dishes of code that I reluctantly maintain... My "Happy Place" is a folder dedicated to reliquary projects I like to look at when I feel sad to lift my spirits and restore hope that one day things will be better.
Do you have any definitions to add or know where to find more? I'm hooked.
Link: https://medium.com/@dylanbeattie/...
Excerpt:
The Reliquary
The reliquary is that one repository full of really good ideas. Clean code. Brilliant algorithms. The OpenID implementation that you optimised until it shone. Classes so beautifully designed and perfectly documented that they’d make a senior architect weep.
You remember the big rewrite? The project that was going to fix everything, only you never worked out how to actually launch the thing, or get any revenue from it? The reliquary is where you’ve preserved it, pickled in revision control like a fabulous museum specimen. A treasury of good code and good ideas; maybe even an entire codebase that was “a couple of weeks” away from shipping before somebody finally looked at the number of critical features the team had somehow forgotten to include and discovered — to everybody’s surprise — that validated XHTML, normalised data models and 95% test coverage are not actually features any of your end users cared about.
Like Buran or the Spruce Goose, the surviving artefacts stand as a testament to the quality of your engineering… and a poignant reminder of just how much fun engineers can have building high-quality stuff that nobody actually wants to use. -
Built my first MVC application today. Building proof of concepts to hopefully modernize my workplace!1
-
Rails views are not meant to have a ton of logic, local variables and 3 or 4 levels of if/else nesting. That's what presenters, view models and assorted other patterns are for. Or helpers, if you really have to.
Yes, this codebase is so packed with legacy it still runs Rails 2.3, and there's no plans to upgrade it, but that's no excuse to keep writing code like it's 2008. MVC does not mean all code must fit in a model, a view or a controller, ffs.1 -
Nice to meet you, where you've been? I can show you legacy code.
C, Python, Ruby and Node.
OMG, look at this line, pretty sure it isn't mine -
Who knew FE development could be so much fun (working on FE tasks after months of shitty legacy BE code).
-
I'd like to be able to travel back in time to ask the writer of legacy code whether they were taking drugs when they wrote it... #WouldExplainWhy
-
Legacy code horror story.
I had to work on code designed to identify dogs... didn't go well:
https://i.imgur.com/32IXo6Y.gifv
(Credit to reddit: https://co.reddit.com/r/...) -
There's nothing worst than legacy code without documentation. That means I have to spend more time understanding the legacy code than actually coding.4
-
Nothing can take the joy out of programming more, than having to redo and implement new features in uncommented legacy code, that takes 2x as long to understand than to actually code.
- Gonna be a long ass week. -
Working on legacy code with Ant/CVS setup. I tried for a day but easily gave up and abandoned the idea of running locally using maven
-
Began working on an old project at work today. It has been about 6 months since I last touched it and 10 months since I began working here. No one that works here knew how to get the project running on anything other than one specific computer in the office...i work remotely. So instead of remoting in I finally figured out how to run it on my computer!
*crash*
Turns out it only runs on vista.... -
Have some thoughts about the origin of the word. Probably the whole thing is some badly written legacy code?
-
You'd think something so watered down by compromise would be easier to build but of course all the legacy code makes it impossible to.
-
Since the COVID19 outbreak when i'm about to work on some legacy code i always use a mask, since this type of code is in the risk group.
and flies away..... 😂 -
Ok so slowly learning C also figuring out how to get a few Legacy Opengl code examples to compile. (yeah yeah it's old yada yada) maybe I should try finding unconventional ways to help aid with my learning.
-
foreach(var strTable in strTableNames)
{
DjingisKhanWantsMyDataEverywhere()
}
...I am not fond of legacy code -
When legacy jquery code is so jumbled that you have to carry that code to your home as well to work it out
-
Today I spend more time writing spaces after commas and between operators while working with legacy code than actually adding new features and fixing Bugs.
-
Code comment in legacy codebase that says "Mr.Foo Bar doesnt understand why this is required but removing it may result in spontaneous combustion"