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 - "rewriting legacy"
-
Manager: IT and I have decided that you will not be doing any rewriting of the legacy code. We paid a lot of money for it and throwing it away would be impossible. Instead you will create a “config file” that will customize the legacy code behaviour to whatever spec we need. IT said this would be possible and would be a very simple way of operating everything going forward. That way no future code needs to be written or maintained, it’s just a matter of changing this “config file” to match our needs.
Dev: Nobody in IT codes though.
Manager: Yes but they work with config files all the time. If you need to be shown how they work just ask them.
Dev: I know how they work it ju—
Manager: Good!! So that should speed things up quite a bit. See this is why developers need managers.18 -
How I spend my days at work working with legacy code:
* Writing tests before I do anything
* Noticing that i cannot write tests because of antipatterns. Lots of them.
* Refactoring to make at least a tiny bit testable.
* Then writing tests.
* More rewriting and refactoring
* Finally adding that one feature my boss asked me for
* Writing tests for that new feature (my do that before implementing)
* Explaining to my boss why it took me so long and agreeing on stopping writing tests.
* 2 days later: explaining why i still broke something.
But in the end my code works just fine.
my colleagues handle things differently. They just ignore problems as long as at least one feature works a bit.13 -
Got one right now, no idea if it’s the “most” unrealistic, because I’ve been doing this for a while now.
Until recently, I was rewriting a very old, very brittle legacy codebase - we’re talking garbage code from two generations of complete dumbfucks, and hands down the most awful codebase I’ve ever seen. The code itself is quite difficult to describe without seeing it for yourself, but it was written over a period of about a decade by a certifiably insane person, and then maintained and arguably made much worse by a try-hard moron whose only success was making things exponentially harder for his successor to comprehend and maintain. No documentation whatsoever either. One small example of just how fucking stupid these guys were - every function is wrapped in a try catch with an empty catch, variables are declared and redeclared ten times, but never used. Hard coded credentials, hard coded widths and sizes, weird shit like the entire application 500ing if you move a button to another part of the page, or change its width by a pixel, unsanitized inputs, you name it, if it’s a textbook fuck up, it’s in there, and then some.
Because the code is so damn old as well (MySQL 8.0, C#4, and ASP.NET 3), and utterly eschews the vaguest tenets of structured, organized programming - I decided after a month of a disproportionate effort:success ratio, to just extract the SQL queries, sanitize them, and create a new back end and front end that would jointly get things where they need to be, and most importantly, make the application secure, stable, and maintainable. I’m the only developer, but one of the senior employees wrote most of the SQL queries, so I asked for his help in extracting them, to save time. He basically refused, and then told me to make my peace with God if I missed that deadline. Very helpful.
I was making really good time on it too, nearly complete after 60 days of working on it, along with supporting and maintaining the dumpster fire that is the legacy application. Suddenly my phone rings, and I’m told that management wants me to implement a payment processing feature on the site, and because I’ve been so effective at fixing problems thus far, they want to see it inside of a week. I am surprised, because I’ve been regularly communicating my progress and immediate focus to management, so I explain that I might be able to ship the feature by end of Q1, because rather than shoehorn the processor onto the decrepit piece of shit legacy app, it would be far better to just include it in the replacement. I add that PCI compliance is another matter that we must account for, and so there’s not a great chance of shipping this in a week. They tell me that I have a month to do it…and then the Marketing person asks to see my progress and ends up bitching about everything, despite the front end being a pixel perfect reproduction. Despite my making everything mobile responsive, iframe free, secure and encrypted, fast, and void of unpredictable behaviors. I tell her that this is what I was asked to do, and that there should have been no surprises at all, especially since I’ve been sending out weekly updates via email. I guess it needed more suck? But either way, fuck me and my two months of hard work. I mean really, no ego, I made a true enterprise grade app for them.
Short version, I stopped working on the rebuild, and I’m nearly done writing the payment processor as a microservice that I’ll just embed as an iframe, since the legacy build is full of those anyway, and I’m being asked to make bricks without straw. I’m probably glossing over a lot of finer points here too, just because it’s been such an epic of disappointment. The deadline is coming up, and I’m definitely going to make it, now that I have accordingly reduced the scope of work, but this whole thing has just totally pissed me off, and left a bad taste about the organization.10 -
In my current role, most of the time i am supporting classic asp legacy apps which i absolutely dislike.
When i started the role i told them we have to rewrite the apps in .Net and they said sure sure.. Its been almost 2 years now yet it doesn't seem we are rewriting any time soon. Even if we did some people in the business want us to use Microsoft CRM dynamics.
Hence i am changing jobs. I am no fan of classic asp or Microsoft dynamics CRM for web application development2 -
After years of back-end development there's a thing which keeps bugging me: how little "interactive" the development process can be.
When I did front-end I took for granted that the application I was developing was easy to run so I could immediately test any little change I do on code but on back-end this is rare to see: you develop with tons of external dependencies (authentications, VPNs, databases...) so getting your application up and running can be an huge hassle and testing API controllers can be slow and frustrating since I have to continuously juggle multiple development environments, manually regenerate tokens, do guesswork to find which parameters you have to use for your API request, maintain my Postman/Insomnia HTTP calls collection to prevent it from turning into an unusable spaghetti mess... lots of repetitive tasks which kills my focus and makes me struggle in getting into a decent flow.
Automated testing has lot of potential in helping with that but its hard to introduce when you're rewriting a legacy sistem and you're already exceeded your budget.
I wonder if I'll keep doing back-end once I'm done with this project.9 -
So this was a conversation.
tl;dr You can't just FUCKING RECOMPILE for an older OpenGL version you dimwit!
Context: Person Y has OpenGL 3.1, my program requires OpenGL 2.1, but refused to launch with "Pixel format not accelerated"
--------
Person X - Today at 9:28 PM
Nope
or optionally compile it for old opengl
Or just use my old junk.
Me - Today at 9:29 PM
No
Person X - Today at 9:29 PM
Why?
Me - Today at 9:29 PM
You don't just "compile it for old opengl"
Person X - Today at 9:29 PM
I can
Btw
Me - Today at 9:29 PM
For one, Person Y has an OGL version new enough so... /shrug
Person X - Today at 9:29 PM
shrug
Me - Today at 9:30 PM
And there is no way I'm ripping the rendering code apart and re-doing everything with glBegin, glVertex, glEnd guff
Person X - Today at 9:30 PM
You don't have to
Me - Today at 9:30 PM
You do
Person X - Today at 9:30 PM
Just use a vbo
Than a vba
Me - Today at 9:30 PM
I ALREADY USE FUCKING VBOS
Person X - Today at 9:30 PM
....
There's two typws
Types
Btw one with indacys and one with out
Ones 3.0 ones 4.0
Me - Today at 9:31 PM
tl;dr. I am not rewriting half of everything for worse performance just for the sake of being compatible with even more legacy OGL, that might not even work anyway for Person Y. idc
Person X - Today at 9:32 PM
Plus if your using glut you can set the version I want to say
Also it's not worse
<Some more conversation>
Person X - Today at 9:33 PM
Btw crafted [Me] taking th lazy way as normal
Btwx500
Me - Today at 9:33 PM
Taking the lazy way eh.
You have no idea do you
Person X - Today at 9:33 PM
Yes you are
I have more of one :p
Than you think2 -
Is there a definition for the feeling of fulfillment and joy that occurs, when reading through a rewrite or something overly complicated and messy legacy into a neat and tidy set of classes?1
-
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 -
Alright, I need an advice.
I have legacy Angular client. It’s impossible to refactor it. The only real option is to rewrite everything from scratch, however, while the team does it, it needs to be accessible to our clients.
The approach I am thinking of is making micro-frontends out of original client and rewriting each of them (in React, Vue, don’t know yet.)
Anyone has experience with that? I would appreciate any advice or suggestion.6 -
Finally working on rewriting the core of our internal platform on CakePHP 3.
It feels so good leaving the legacy codebase behind!4