Don’t be afraid to reevaluate decisions during development. Sometimes, the “best route” becomes clear after taking the first step in any direction.
We’ve all been there: staring down a piece of outdated code that desperately needs an upgrade.
Last week, our team faced the same situation when dealing with a Webpack plugin that optimizes SVGs.
While functional, the plugin was several versions behind the latest release.
The decision seemed straightforward: update the plugin and benefit from a newer optimization technique and cleaner API.
Before we continue, a huge shoutout to the 60 new subscribers who started supporting my writing this last week. YOU are awesome!
If you haven’t subscribed yet, you know what to do👇
However, things took a turn when we delved into the upgrade details. The new major version shipped a completely different API, making our current configuration unusable.
This presented a dilemma: should we invest time and resources in understanding the new API for an uncertain upgrade or remove the plugin altogether?
Data Drives Decisions
Before diving into either option, we decided to gather some data.
We evaluated the current plugin’s impact by comparing the elements with and without optimization.
Things got interesting here.
The plugin saved a whopping 90kB of downloaded SVG data.
In our context—a software primarily used in internal networks and exclusively from the desktop—0.09 MB isn’t a lot of data anymore.
And this number was crucial.
While upgrading to a new API might have offered additional benefits, the time investment seemed disproportionate compared to the existing savings.
Adaptability Wins
While upgrading wasn’t the final call, it was valuable. It:
Prompted re-evaluation: We questioned the current solution and explored improvements.
Delivered key data: We learned the exact impact of the plugin – which was negligible.
Software development is all about being flexible.
Take calculated risks, but be ready to adjust course if needed.
Don’t be afraid to reevaluate—the best solution might be hiding around the corner, and even detours can lead to gold!
Also, who doesn’t love deleting code?
📰 Weekly shoutout
An engineer’s guide to unlimited motivation in a corporate job from
How LinkedIn Authorizes 10 Million API Calls Per Second from
What Game Theory Reveals About Life, The Universe, and Everything from Veritasium on YouTube
📣 Share
There’s no easier way to help this newsletter grow than by sharing it with the world. If you liked it, found something helpful, or you know someone who knows someone to whom this could be helpful, share it:
🏆 Subscribe
Actually, there’s one easier thing you can do to grow and help grow: subscribe to this newsletter. I’ll keep putting in the work and distilling what I learn/learned as a software engineer/consultant. Simply sign up here:
Another interesting post Akos. And certainly a real scenario.
From my experience of seeing such situations, it's often a case where teams invest time into such upgrades without proper fact-checking or data analysis. Once they realize this, they get caught up in the "sunk-cost fallacy". It's like throwing good money after bad hoping that the net result is profit.
Thanks for the mention as well!
I enjoyed the article Akos :)
Very often in such cases people jump into the upgrade, and then feel too invested to reevaluate that decision later on.