frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Most rewrites serve the engineer, not the business

https://anatoliybabushka.com/blog/when-to-rewrite-working-code.html
38•bbsnly•3h ago

Comments

watwut•2h ago
> For a few weeks one summer I woke at 4am to rewrite code my employer had already paid someone to write.

I mean, if you do it at 4am, you are sleep deprived by the day two and thus unable to stop yourself from something stupid.

bbsnly•1h ago
Only if you do not get 7-8 hours of sleep ;)
breakds•1h ago
Engineer: but business is not my problem.
LoganDark•1h ago
The business is certainly one of the most important constraints as an engineer.
yallpendantools•42m ago
Software engineering is much easier if you assume you have no users. Except for the part where you have to make money, that is.
wmeredith•38m ago
Unemployed engineer: business is my problem.
hellisothers•1h ago
Is this news to anybody? Feels like I should just point AI and several “foundations of software engineering” and have it churn out blog posts for each chapter.
bbsnly•27m ago
Despite it not being news for lots of people, I am always surprised how many actually still fall into the trap. Somehow, software engineers are very opinionated people, and opinions are often a reason to begin such a journey of rewriting a piece of software that needs no rewrite.
jacinda•7m ago
Obligatory xkcd: https://xkcd.com/1053/

Churning out the blog posts isn't a bad idea if it's true. Repetition isn't inherently bad.

blinkbat•1h ago
serving the engineer _does_ serve the business, ultimately.
honeycrispy•1h ago
Right? A codebase nobody wants to work on results in a crappy, broken product.
mark-r•1h ago
Given enough time, that describes every codebase that exists.
CognitiveLens•1h ago
This is my thinking as well. Although the 'never do full rewrites' rule is canon for most of the software world, I have led rewrites of two large front-end applications to great success - replacing an app that 'worked' but took an order of magnitude more time to iterate on than the codebase that replaced it.

That said, it's probably more dependent on what a 'full' rewrite actually is - I would be much more reluctant for a full-stack rewrite, particularly of a mature codebase with a lot of accumulated business logic. At least on the front end you can always push to move business logic upstream where it belongs.

jghn•46m ago
Iff the engineer's incentives are aligned with the businesses. Which is far from always true.
vjvjvjvjghv•45m ago
Not necessarily. I have seen it plenty of times where a new contributor/manager comes in, declares all existing code is crap and needs to be rewritten to their favorite language/framework/cloud provider.

A lot of rewrites could be avoided if people spent some time to actually understand what was done before. It’s a pretty safe assumption that the people who worked on the codebase before were as smart as you.

brucejackson•1h ago
This rings so very true. Have been in the software business for too many decades and having inherited other people's code many many times, there is always the decision about what to do going forward. Leave it running, refactor it gently or rip and replace. Each has it's own set of traps that need to be carefully considered.
_doctor_love•1h ago
A perennial insight which has been articulated many times before. This feels like one of those stages all engineers pass through at some point in their growth journey. Chesterton's Fence and all that (or Joel Spolsky's "never do full rewrites" advice).
mark-r•1h ago
I love Chesterton's Fence and haul it out whenever I can. Even though it's about 100 years old and the context is barely relevant anymore.
dijksterhuis•1h ago
good rewrites are good. bad rewrites are bad.

you’ll only find out which kind of rewrite you’re doing once you start it.

dkarl•1h ago
The "When touching it is the right call" is the tricky part, because it contains this very subjective exception: "Every new feature costs three times what it should because of the design, and you can show the trend."

I've been in situations where I was sure this was true. I've also been in situations where the person claiming it simply refused to become competent in the language, framework, or persistence technology that the system was built on.

Also subjective: "The business needs a capability the current code was never shaped to grow into." Most of the times I've heard this brought up, it's not that you need a re-write, but you need a re-architecture. Often the existing system can continue to do its job as it always has, but in a new architectural context. Or 90% of the code can stay the same, while the application it runs in is changed, for example from a web service to a Kakfa consumer. (This is why it's so important to avoid languages and frameworks that are tightly bound to an architectural choice.)

bbsnly•16m ago
I really like your comment about "re-architecture". I 100% agree with you.
argee•1h ago
> I barely knew CakePHP, so every file looked wrong to me. I knew Laravel, and I loved working in it. So on my own time, unasked, I ported the thing piece by piece, swapping in Illuminate packages until the old framework was gone.

Title is somewhat clickbaity, because these actions are not what people are going to think of when they think of a rewrite in a corporate environment.

By the way, I was an early employee at Amazon.com and the website’s rendering engine was rewritten three times, each time unlocking a new level of productivity without which the site (as well as the velocity of teams) would have slowed to a crawl, and the company would have probably died.

bbsnly•5m ago
The Rust community would disagree with you.
darth_avocado•20m ago
Very rarely have I heard an engineer look at a functioning piece of software and go “let me rewrite this because it’s not a language or framework I am familiar with and fond of”. If that does happen, it’s usually inexperienced (or bad) engineers.

Rewrites usually start with a gap in what is available and what is needed: missing functionality, existing frameworks getting obsolete, difficultly maintaining code because of the existing implementation complexity, costs, scalability issues, compliance challenges, etc. Most of these things serve the business more than the engineers.

bbsnly•11m ago
> If that does happen, it’s usually inexperienced (or bad) engineers.

I agree with you. And that is where I was at that time. I did not have enough experience as a Software Engineer, nor with CakePHP — hence decided to rewrite. Mistakes were made.

dude250711•15m ago
If you commit to being around for all the support calls, then do any rewrites you want. But the rewriters unfortunately tend to use it to pad out CVs and move on.
bbsnly•24m ago
A friend of mine is migrating the company's IaC to TS as we speak because a new manager who recently joined the company decided to do it with no good reason.
yallpendantools•18m ago
> It’s a pretty safe assumption that the people who worked on the codebase before were as smart as you.

Amen! Code is never written in a vacuum. Code is never shaped only by engineering but by business and organizational compromises as well. I hate those guys who declare we absolutely must do sweeping changes to the codebase/architecture so that we are in line with the latest best practices after spending an hour with the codebase. As if the guys who spent the last 3+ years staring and building on said codebase didn't know any better (unless of course you were hired specifically because you ought to know better!).

sandeepkd•13m ago
> It’s a pretty safe assumption that the people who worked on the codebase before were as smart as you.

The motivations and goals back then could have been different, specially in the case of MVPs

sandeepkd•15m ago
I think this is the key here. Most engineers go through some gradual phases from what I have learnt, initial, when they are confident of being able to accomplish everything, second when they feel they now understand how things work and third when they know that there is a lot more to it.

This essay sounds more like a second phase. Rewriting something that you do not understand makes sense if most people on team do not understand it well, and are supposed to actively contribute to it OR you are at an inflection point where the choice of architectural or foundational decisions made back then become a bottleneck in every day performance or feature development.

Business is looking it from the cost benefit perspective and they would not approve it at the cost of company time and money if it doesnt makes sense to them. Your ability to fool them for your motivations may be a different angle, still they are the ones making the call.

For first time, a cell built from scratch grows and divides

https://www.quantamagazine.org/for-the-first-time-a-cell-built-from-scratch-grows-and-divides-202...
624•defrost•7h ago•213 comments

Show HN: Searchable directory of 22k+ products from worker-owned co-ops

https://www.workerowned.info/
41•IESAI_ski•1h ago•9 comments

What to learn to be a graphics programmer

https://blog.demofox.org/2026/07/01/what-to-learn-to-be-a-graphics-programmer/
166•atan2•4h ago•72 comments

FFmpeg 9.1's new AAC encoder

https://hydrogenaudio.org/index.php/topic,129691.0.html
211•ledoge•7h ago•75 comments

Physical disc production ending in Jan 2028 for new games on PlayStation

https://blog.playstation.com/2026/07/01/physical-disc-production-ending-in-january-2028-for-new-g...
483•Tiberium•9h ago•547 comments

ZCode: Claude Code from the Makers of GLM

https://zcode.z.ai/en
262•handfuloflight•2h ago•142 comments

Box3D, an open source 3D physics engine

https://box2d.org/posts/2026/06/announcing-box3d/
364•makepanic•9h ago•81 comments

Proliferate (YC S25) Is Hiring

https://www.ycombinator.com/companies/proliferate/jobs/mMHvKR9-founding-product-engineer
1•pablo24602•1h ago

Ask HN: Who is hiring? (July 2026)

128•whoishiring•7h ago•143 comments

Internal Combustion Engine (2021)

https://ciechanow.ski/internal-combustion-engine/
246•StefanBatory•8h ago•55 comments

Fable 5 Is Back

https://twitter.com/claudeai/status/2072402636813607381
207•mfiguiere•2h ago•177 comments

Monetization Gateway: Charge for any resource behind Cloudflare via x402

https://blog.cloudflare.com/monetization-gateway/
212•soheilpro•8h ago•125 comments

How We Made IPFS Content Publishing 10x Faster

https://probelab.io/blog/optimistic-provide/
121•dennis-tra•6h ago•35 comments

Launch HN: Parsewise (YC P25) – Reason Across Documents with an API

43•gergelycsegzi•8h ago•42 comments

One KW wind turbine without civil engineering

https://www.windtowatt.com/index-en.html
25•skywal_l•1h ago•19 comments

Ask HN: Who wants to be hired? (July 2026)

91•whoishiring•7h ago•210 comments

The Apple Disk II Controller Card

https://www.bigmessowires.com/2021/11/12/the-amazing-disk-ii-controller-card/
13•stmw•2d ago•1 comments

Mortality associated with non-optimal ambient temperatures from 2000 to 2019

https://www.researchgate.net/publication/353058947_Global_regional_and_national_burden_of_mortali...
39•simonebrunozzi•4h ago•9 comments

Most rewrites serve the engineer, not the business

https://anatoliybabushka.com/blog/when-to-rewrite-working-code.html
38•bbsnly•3h ago•30 comments

Weave Robotics launches Isaac 1, a $7,999 home robot with Fall 2026 deliveries

https://www.weaverobotics.com/isaac-1
32•ryanmerket•3h ago•55 comments

Hanami 3.0: In Full Bloom

https://hanakai.org/blog/2026/06/30/hanami-3-0-in-full-bloom
51•PuercoPop•4h ago•11 comments

I Left Harry's All-Night Hamburgers

https://escapepod.org/2013/09/14/ep413-why-i-left-harrys-all-night-hamburgers/
11•rbanffy•47m ago•2 comments

1-Bit Pixel Art Emojis

https://hypertalking.com/2023/05/15/1-bit-pixel-art-emojis/
124•surprisetalk•6d ago•18 comments

A complete ClickHouse OLAP engine, compiled to WebAssembly

https://wasm.chdb.io/
46•porridgeraisin•4h ago•6 comments

Show HN: GolemUI – Declarative Form Engine

https://golemui.com
30•wtfdeveloper•6h ago•49 comments

Fable open sourced NanoClaw's agent factory. It cost $800

https://twitter.com/Gavriel_Cohen/status/2072432348805669139
12•benocodes•21m ago•3 comments

Japan has 41% of the 100-year companies – secrets of 1,447-year survival

https://www.j-times.org/en/media/articles/japan-shinise-1400-years-2026/
3•indynz•37m ago•0 comments

Generating Images with a 2025 Android

https://www.duration.ai/blog/generating-images-with-a-2025-android
16•sudb•1d ago•0 comments

Sony Deletes 551 Movies PlayStation Owners Paid For

https://reclaimthenet.org/sony-deletes-551-studiocanal-movies-playstation-owners-paid-for
455•bilsbie•7h ago•203 comments

Building Gin: Simple over Easy

https://manualmeida.dev/articles/gin-simple-over-easy/
53•manucorporat•4h ago•18 comments