Login
You're viewing the functional.cafe public feed.
  • Jul 5, 2026, 7:54 AM

    this is the attitude that causes people to rely so much on LLMs, but it is also the attitude that causes people to decide that a codebase needs a complete re-write from scratch. it's sometimes hubris, but most of the time it's fear. if you can't cope with the scary thing by understanding it, the next best thing is to kill it

    💬 2🔄 1⭐ 0

Replies

  • Jul 5, 2026, 7:58 AM

    I get that sometimes old code is crufty and has a bad design. but really, is the edit-distance between a good design and a bad design so large that it necessitates deleting the whole thing and starting again? what makes you think you'll remember all the lessons that the original code had to learn the hard way?

    💬 3🔄 4⭐ 1
  • Jul 5, 2026, 8:00 AM

    nearly every single c++ build system has had a bug where, if a UTF-encoded file has a byte-order-mark, then any #include on the first line is ignored and so the generated dependency graph is incorrect. this is a lesson that is only ever learned the hard way.

    💬 2🔄 3⭐ 0
  • Jul 5, 2026, 8:02 AM

    though to be fair, this happens when your line reader doesn't strip the BOM from a file. but it's a useful example. it seems like it'd be fine to just load a file into memory and split it on newlines, but the world has always been more complicated than that.

    💬 1🔄 0⭐ 0
  • Jul 5, 2026, 8:35 AM

    @suricrasia this is very striking, i'm definitely very scared of code that isn't my own but i had never thought of it that way. i'll try to give it a chance next time

    💬 0🔄 0⭐ 2
  • Jul 5, 2026, 5:05 PM

    @suricrasia @rrika I wonder how many projects have been saved by a rote, possibly out-of-date copyright notice mandatorily included at the top of each file.

    💬 0🔄 0⭐ 0
  • 💬 0🔄 0⭐ 1
  • Jul 5, 2026, 1:57 PM

    @suricrasia usually my motivation for this is not the edit distance. it is that incrementally going from A to B would take several more times the effort of going from 0 to B. which is only possible after extensive study of A

    sometimes it works out, sometimes not. i'm not usually afraid of my own code and i rewrite that a lot too

    💬 1🔄 0⭐ 0
  • Jul 5, 2026, 2:03 PM

    @suricrasia a big part of what could make the effort so immense is that it's not just the old system having issues, it's the entire implicit chain of dependents having similar issues by virtue of being designed against that system. if you try to maintain full compatibility you're doomed to not make any real progress because people rarely want to put in any long term work besides complaining when something broke their use case personally. better not to try if the alternative is burnout

    💬 0🔄 0⭐ 0
  • Jul 5, 2026, 11:04 AM

    @suricrasia It's Chesterton's fence, right? Got to understand the intent and thinking that went into the old system before you've got the intellectual authority to radically alter it or build something better, or you'll just make the old mistakes again.

    💬 0🔄 0⭐ 0