by fishtoaster · 6y ago · 0 comments
We'd been slowly migrating from Angular 1.X to React (internally: the Angularpocalypse) for a few years and we'd finally migrated over our last few pages. The result was about 100k lines of JS and Rails code that could be safely deleted in a single PR. It had been such a long slog, though, that we felt the team deserved some catharsis.
We took a team-offsite day to gather on a nearby beach and burn the deleted code. In the interest of not wasting that much paper, we burnt a complete list of the deleted files in super-tiny font on a couple pages. We also each grabbed our least-favorite areas of the codebase to print out, including several dramatic readings. My selection was a section of code from about 4 years prior with a comment like //TODO: replace this asap.
I highly recommend it to anyone facing a long, clearly-delineated migration. Gift your old, shameful code to the flame.
I hope React is better for you and you don't need to burn again in 5 years! Luckily hooks and non-hooks code works together nicely enough.
See https://www.channelnewsasia.com/news/cnainsider/how-china-fr... for one write-up.
> Teetering on the brink of collapse, the collective enterprise had gone through three managing directors in 1984 when Mr Zhang, a 35-year-old city manager, was appointed as the fourth.
> No one expected much of him, since a revolving door of directors had failed to stop the rot. He put it thus:
> People didn’t have faith in the factory.
> But he grabbed the national headlines a year later, upon discovering from a check on the inventory that a fifth of the fridges were faulty.
> Each fridge was worth two years of a worker’s pay, but Mr Zhang ordered the workers to destroy those 76 fridges – with a sledgehammer.
The CEO joined in the smashing as well for extra symbolism.
> (The young manager) made it China’s version of the American appliance giant (General Electric)
Wow
At least that's what I tend to see in the field.
I did my best to clean up the code so it was at least somewhat maintainable, but there were sections (the most important ones, of course) that I just wouldn't touch because it was impossible to tell what they did -- oh yeah, I forgot to mention the global variables, didn't I?
So happy that app is dead and buried.
Whut? That seems a complete non sequitur, am I missing something, or are you replying to the wrong thread?
- 2008 to 2012: Jquery
- 2012 to 2014: Backbone
- 2014 to 2016: Angular
- 2016 to present: React
And although there are serious contenders, React still seems like it has a solid lead over all others. If it lasts another couple years, it's been the dominant tool for longer than most.
* Based entirely on "what I was hearing the most about at that time," not on any rigorous methodology. There was still plenty of Jquery code being written last year and there are large, mature codebases out there in Backbone and Angular.
When it comes to large long-historied Angular codebases, I prefer the term "metastasized" over "mature," though now that we're in the 2020s we can almost use "legacy."
That was really a thing I thought, I posted it too and people were like "hmm yes good point."
I know I've been wrong before and since but for whatever reason that one stuck with me as a humbling moment, I had it all backwards.
Backbone was the first time there was framing at all. So long ago & so not that long ago!
I remember having similar complains in the smaller rails world about a decade ago: every 6-12 months there'd be a new community-favorite gem to accomplish X, where X is any number of common needs: file upload, auth, json serialization, background jobs, etc etc. It was damn frustrating. I had the early-rails equivalent of js framework fatigue! But after a while it quieted down. I wouldn't call it stagnancy and ossification - I'd call it maturity and stabilization. :)
:shudder:
(I did make a bunch of money with that one project that went live for about 8 days before the company we did it for sold out and the new owners shut it down immediately. _So_ glad I was never on the hook for production support on that...)
Pretty cool.
Did anyone beat the printer to death with a baseball bat?
If I did get emotional it'd only be due to some sort of bikeshedding (style complaints) that I would have forgotten about by the next morning anyways.
Their app had some Norse name (something like Ragnarok or Valhalla etc) so the put it on an RC boat and torched it on a lake :-)