14 comments

  • dkarl1 hour ago
    The &quot;When touching it is the right call&quot; is the tricky part, because it contains this <i>very</i> subjective exception: &quot;Every new feature costs three times what it should because of the design, and you can show the trend.&quot;<p>I&#x27;ve been in situations where I was sure this was true. I&#x27;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.<p>Also subjective: &quot;The business needs a capability the current code was never shaped to grow into.&quot; Most of the times I&#x27;ve heard this brought up, it&#x27;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&#x27;s so important to avoid languages and frameworks that are tightly bound to an architectural choice.)
    • bbsnly38 minutes ago
      I really like your comment about &quot;re-architecture&quot;. I 100% agree with you.
      • atq21193 minutes ago
        To expand on this, I&#x27;ve found that often, the best way to make a change is in two steps: First, make the change easy (the re-architecture). Second, make the change that is now easy.<p>My best software development experiences have been in cultures where this way of working was common.<p>It is a shame that these cultures are not more widely spread; and I mostly blame GitHub: the lack of good support for stacked PRs or patch series or whatever you want to call it makes it harder than it should be to work in this way.
  • felooboolooomba20 minutes ago
    With a title like that you have to back it up. It&#x27;s a shallow article.<p>&gt; why it was worth doing, because it wasn&#x27;t, at least not to the business. The application did the same job for the same users at the same speed as before.<p>Application have many other properties then &quot;doing their job&quot;. Running cost, maintainability, ... it&#x27;s endless. Any of them going seriously wrong can tank the company owning it.<p>But I agree, rewrites are very often bad. I&#x27;ve been the customer of two banks that spent years to rewrite their online bank. It was crap and missing features! But maybe they got something out of it.
  • _doctor_love1 hour 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&#x27;s Fence and all that (or Joel Spolsky&#x27;s &quot;never do full rewrites&quot; advice).
    • mark-r1 hour ago
      I love Chesterton&#x27;s Fence and haul it out whenever I can. Even though it&#x27;s about 100 years old and the context is barely relevant anymore.
  • argee1 hour ago
    &gt; 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.<p>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.<p>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.
    • bbsnly27 minutes ago
      The Rust community would disagree with you.
  • dijksterhuis1 hour ago
    good rewrites are good. bad rewrites are bad.<p>you’ll only find out which kind of rewrite you’re doing once you start it.
    • marcosdumay16 minutes ago
      There are good heuristics to guess which kind is yours.<p>But they need expertize in software development and knowledge of the software&#x27;s context to evaluate.
  • hellisothers2 hours 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.
    • bbsnly49 minutes 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.
    • jacinda29 minutes ago
      Obligatory xkcd: <a href="https:&#x2F;&#x2F;xkcd.com&#x2F;1053&#x2F;" rel="nofollow">https:&#x2F;&#x2F;xkcd.com&#x2F;1053&#x2F;</a><p>Churning out the blog posts isn&#x27;t a bad idea if it&#x27;s true. Repetition isn&#x27;t inherently bad.
  • brucejackson1 hour ago
    This rings so very true. Have been in the software business for too many decades and having inherited other people&#x27;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&#x27;s own set of traps that need to be carefully considered.
  • blinkbat1 hour ago
    serving the engineer _does_ serve the business, ultimately.
    • sandeepkd37 minutes 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.<p>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.<p>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.
    • CognitiveLens1 hour ago
      This is my thinking as well. Although the &#x27;never do full rewrites&#x27; 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 &#x27;worked&#x27; but took an order of magnitude more time to iterate on than the codebase that replaced it.<p>That said, it&#x27;s probably more dependent on what a &#x27;full&#x27; 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.
    • vjvjvjvjghv1 hour ago
      Not necessarily. I have seen it plenty of times where a new contributor&#x2F;manager comes in, declares all existing code is crap and needs to be rewritten to their favorite language&#x2F;framework&#x2F;cloud provider.<p>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.
      • yallpendantools39 minutes ago
        &gt; It’s a pretty safe assumption that the people who worked on the codebase before were as smart as you.<p>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&#x2F;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&#x27;t know any better (unless of course you were hired specifically because you ought to know better!).
      • sandeepkd35 minutes ago
        &gt; It’s a pretty safe assumption that the people who worked on the codebase before were as smart as you.<p>The motivations and goals back then could have been different, specially in the case of MVPs
      • bbsnly46 minutes ago
        A friend of mine is migrating the company&#x27;s IaC to TS as we speak because a new manager who recently joined the company decided to do it with no good reason.
    • jghn1 hour ago
      Iff the engineer&#x27;s incentives are aligned with the businesses. Which is far from always true.
      • bluefirebrand18 minutes ago
        If so this is a problem on the business side, they&#x27;re the one controlling a big part of the engineer&#x27;s incentives
    • honeycrispy1 hour ago
      Right? A codebase nobody wants to work on results in a crappy, broken product.
      • mark-r1 hour ago
        Given enough time, that describes every codebase that exists.
  • dude25071137 minutes 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.
  • breakds2 hours ago
    Engineer: but business is not my problem.
    • yallpendantools1 hour 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.
    • wmeredith1 hour ago
      Unemployed engineer: business is my problem.
    • LoganDark1 hour ago
      The business is certainly one of the most important constraints as an engineer.
  • watwut2 hours ago
    &gt; For a few weeks one summer I woke at 4am to rewrite code my employer had already paid someone to write.<p>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.
    • bbsnly2 hours ago
      Only if you do not get 7-8 hours of sleep ;)
  • joejoegobot7 minutes ago
    [flagged]
  • darth_avocado42 minutes 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.<p>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.
    • wl13 minutes ago
      The big exception to this I&#x27;ve seen: The functioning bit of software was written in an oddball language that was already niche decades ago and the pool of developers who are competent to work on such a codebase is exceedingly small.
    • bbsnly33 minutes ago
      &gt; If that does happen, it’s usually inexperienced (or bad) engineers.<p>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.