| ▲ | AI changes the economics of software rewrites(thetruthasiseeitnow.com) |
| 40 points by cinooo 8 hours ago | 60 comments |
| |
|
| ▲ | akssri 6 hours ago | parent | next [-] |
| Au contraire - LLMs are quite bad at large scale pattern fidelity. They'll even forget key details and constraints unless told over and over again. That's why AI-written code has the quality of a patch-on-patch-on-patch. |
| |
| ▲ | fxtentacle 6 hours ago | parent | next [-] | | Fully agree. I tried to refactor parts of a large code base with Fable+ultracode and it just keeps accidentally merging distinct concepts and making up explanations/reasonings that the code base did not contain. For example, the code base contains a physical controller. It’s closed loop in that it can react in realtime to changes. But it’s a slightly untypical implementation because this one can even look into the future through simulations. But Fable does not understand that. Instead, I need to remind it every 30 minutes that this is closed loop. It keeps wrongly claiming that the controller was open loop and then based upon that it will make up constraints that don’t actually exist. | | |
| ▲ | rapidaneurism 6 hours ago | parent [-] | | Would putting that in black and white in the comments around then controller help? | | |
| ▲ | bulbar 5 hours ago | parent [-] | | I feel like there are a lot "you are holding it wrong" arguments flying around. Like, when somebody says that AI wasn't able to accomplish something, people tend to assume it's an User problem. Meanwhile, I have a hard time to believe people don't encounter problems with AI solutions on a regular basis (I do). |
|
| |
| ▲ | ed_elliott_asc 6 hours ago | parent | prev | next [-] | | The patch-on-patch-on-patch is exactly right, nice way to describe it. It feels like, and I think is, optimized to find the quickest answer not necessarily the right answer. | |
| ▲ | gofreddygo 6 hours ago | parent | prev | next [-] | | [dead] | |
| ▲ | AndrewThrowaway 6 hours ago | parent | prev | next [-] | | "It is not LLMs fault but you not knowing how to write a prompt". I know I know. But just giving all codebase and saying "rewrite it" is a no go. If e.g. going one class after class LLM will be exceptionally good at keeping the patterns and logics. I mean it is a tool and you need to understand how the tool works. When there is too little context, where there is so much context so that you are poisoning it, when you are allowing the tool to do patch-on-patch and etc. | |
| ▲ | karlkloss 6 hours ago | parent | prev [-] | | That's also true for humans. | | |
| ▲ | fxtentacle 6 hours ago | parent | next [-] | | Humans will typically learn after you have forced them to apologise for the same mistake for 20 times in a row. AI won’t. | | |
| ▲ | vogelke 4 hours ago | parent | next [-] | | I love this. Straight into my quotes file. | |
| ▲ | AndrewThrowaway 6 hours ago | parent | prev [-] | | If you gave some junior dev a large codebase and just told to "refactor it" you would get a terrible result. If you gave junior dev exact tasks what to do where you will get better results. Just like with LLM. | | |
| ▲ | al_borland 6 hours ago | parent [-] | | That’s why junior devs generally aren’t give the responsibility of architecting a large scale refactor. Yet people seem to be trying to had these types of tasks over to LLMs. | | |
| ▲ | AndrewThrowaway 6 hours ago | parent | next [-] | | Exactly. Is it LLMs fault or yours to believing in it so much. | | |
| ▲ | al_borland 6 hours ago | parent | next [-] | | It is the fault of the salesmen and evangelists. I’ve been hearing for quite some time now that I should be using an LLM to plan before the build. This is treating the LLM as the architect, not as a junior being handed small tasks here and there. I haven’t bought into it, so don’t use it this way, but an army of people online and in the media are pushing the fomo hard and telling people this is how it should be used. If the LLM isn’t doing what we want, it simply means we need to use the LLM even more. That’s the prevailing message from the industry. | |
| ▲ | LtWorf 6 hours ago | parent | prev [-] | | "Coding is solved" | | |
| ▲ | AndrewThrowaway 6 hours ago | parent [-] | | Coding, programming and engineering are all a bit different concepts. Coding as in typing in the code might be solved. Engineering? Doubt. What is definitely not solved is knowing what you want and what user wants and what the end result is supposed to be. To write the code you need the specs and to write the specs you need to know what you want. And that can only be answered by years of therapy. | | |
| ▲ | LtWorf 4 hours ago | parent [-] | | You can't be mad at people for buying a product from the LLM salespeople and expect the product to comply to the specs they sold you. Be mad at the salespeople scamming customers. |
|
|
| |
| ▲ | esseph 4 hours ago | parent | prev [-] | | https://news.ycombinator.com/item?id=48841676 | | |
| ▲ | al_borland 4 hours ago | parent [-] | | From the author: > It's not used in production. Sounds like it’s a tech demo as of now. |
|
|
|
| |
| ▲ | dnikolovv 6 hours ago | parent | prev [-] | | Reductio ad absurdum. |
|
|
|
| ▲ | matsemann 6 hours ago | parent | prev | next [-] |
| What's the point of the rewrite if it doesn't fix the underlying issues, though? A rewrite being a good idea often hinges on the ability to simplify. After a decade or more, it's now apparent what the application should and shouldn't do, so one can build it with those learnings and shed all tech debt from how it grew organically. Aka preserving all behavior is not what I would want from a rewrite. The point would be to make decisions on what behavior should be kept and what complexity can be removed. An AI can't do that. It can help with execution if the decisions are made, but they're made by being very intimate with the codebase and floating all cases and then talking with stakeholders. |
| |
| ▲ | Semaphor 6 hours ago | parent | next [-] | | I work on a codebase from the early 2000s, a lot of it using webforms, a long abandoned .NET technology. A rewrite preserving all behavior and making no observable changes whatsoever would be amazing. But it’s also tested exactly as well as you’d expect from something like that so I’d rather not let AI go wild. | | |
| ▲ | fhd2 6 hours ago | parent | next [-] | | Good example. Transitioning from an outdated framework to a modern (or sometimes "slightly less outdated") one is probably one of the few situations where you do not want to change semantics at all. And in my experience, these are _dangerous_. People go into "while we're at it..." mode, and it quickly turns into a big 2.0 kind of thing that takes forever. I would argue that LLMs can speed this kind of thing up, but not by an order of magnitude or anything, just a bit. Unless there's high risk appetite. | |
| ▲ | trollbridge 6 hours ago | parent | prev [-] | | LLMs/agents are a great way to create a test harness for something like that. | | |
| ▲ | Semaphor 4 hours ago | parent [-] | | I plan to eventually get there, just need to find the time. It’s a lot of code, and a lot of it is not set up for testability. |
|
| |
| ▲ | a96 6 hours ago | parent | prev | next [-] | | One obvious target might be rewriting from an unsupported, broken, and/or obsolete target to something that still works. Or moving a project from a platform that no other system in the company uses to the same setup that all the others use. Of course it won't quite work, but I can definitely see why some people would want that. | |
| ▲ | nomel 6 hours ago | parent | prev [-] | | Say I rewrite a large codebase from python to C++, preserving all behavior. That's up to a 50x speed up. | | |
| ▲ | CraigJPerry 6 hours ago | parent [-] | | Not a good example i'd say given Python's position as pretty much the ultimate glue language :) You'd more likely keep the python shell (and faster developer iteration speed) and push measured hotspots down into c++/rust/c/whatever. Incidentally, Whenever i've done this in the past it's had a pleasant side effect of improving architecture. You end up forcing something akin to "push for's down and pull if's up" because crossing the ffi boundary is not free. It can be quite magical, as in leading to comically unbelievably speed ups when you also take advantage of vector intrinsics. |
|
|
|
| ▲ | nottorp 7 hours ago | parent | prev | next [-] |
| Does it really change the whys of rewriting? https://www.joelonsoftware.com/2000/04/06/things-you-should-... Maybe the LLM will catch and reproduce all corner cases... maybe not... |
| |
| ▲ | Quarrelsome 7 hours ago | parent [-] | | Joel is right, but he's also wrong. I've been on the other side of a timid engineering culture that commerical rides roughshod over and its this depressing immeasurable decline. The company stagnates and slowly tailspins around an unmaintainable product until a competitor steals their lunch in a way that that further obscures cause and effect. Estimates are considerably longer, QA is much harder, integration is full of buckets and rakes, some "senior" devs are afraid to touch stale core code, innovation is stifled, devs are frustrated, hiring is harder, attrition bites. The most frustrating thing is that its very hard to communicate the issues as everyone experiences a fragment of the pain and none of it lines up in a spreadsheet for anyone to appreciate the whole cost. Everything just sucks. LLMs changing the economy of this sounds great, especially if removes the essential issue with the ground up rewrite, which is the "ground up" part. | | |
| ▲ | bojan 6 hours ago | parent | next [-] | | The LLM might change the economy of this, but I doubt it. I tend to believe that the engineering culture you describe will end up producing similar or, as Joel postulates, an even worse result, just dressed up in a modern stack. If the technical leadership remains the very same one that enabled such a culture, I don't see them being able to suddenly produce a genuinely better software product only because an LLM is in a picture - especially considering how easy it is to convince an LLM that your idea is the best one. | |
| ▲ | cjfd 5 hours ago | parent | prev | next [-] | | Well, Joel is not saying not to refactor anything. In fact he is advocating improving the code quality in small steps. What is missing there is that in practice improving code quality in small steps requires automated tests . But I guess he can be forgiven given when he wrote the article. | |
| ▲ | DubiousPusher 6 hours ago | parent | prev [-] | | I think the important lesson is to use clear eyes to evaluate what the rewrite buys you. I was on a team that rewrote a native code app in C#. We also had access to early cloud tech in the Azure stack, what is called queue now and then was called service bus. These two technologies combined greatly simplified this specific product making it far easier to maintain. Performance on these services was not important so native code was carrying a lot of penalties without the benefits. Having a well documented messenger like service bus with great SLAs removed several tools we had needed in the old implementation. We were able to leverage the tests form the original product to define success and tmthus were able to solve a lot of the edge cases in the new code w before we even shipped. However, the old code was perfectly fine code. If new technologies had not provided significant simplification of the service architecture, a rewrite would've been foolish. And without the very good previously existing tests, we would've run into a lot of issues as we released. |
|
|
|
| ▲ | SunlightEdge 6 hours ago | parent | prev | next [-] |
| In my experience, LLM's can be both impressive and also totally wrong in their reasoning when doing a code re-write. I was involved in an api migration a while back and while at times the llms were able to re-write the code - they also had instances where their totally misunderstood the platform and their recommendations for solving the issue was almost dangerously wrong. an over reliance on them can also make people lazy at what are quite simple programming issues (but they can code things up a hell of a lot faster) - its a tool and the outputs need to be carefully reviewed (with a dose of critique when its an uncertain area). |
|
| ▲ | socketcluster 5 hours ago | parent | prev | next [-] |
| I agree that AI does well when the patterns in the code are predictable and consistent. That said it can work surprisingly well with custom frameworks and tools provided that they are predictable and consistent. For example, I created a platform with custom Web Components. Agents do a great job at using the components by reading the docs. I find it a lot easier and more succinct than React. I think it's because AI isn't as good with high level patterns when there are too many pieces involved and too many sub-patterns to apply, it gets so caught up in the details that it misses the forest for the trees. My SDK abstracts away a lot of low-level complexity so that agents are able to focus on higher-level architectural patterns. Also, it's very succinct so agents can fit a lot of context/functionality into its context window. It gets faster and better as the codebase grows. Here's the link if anyone wants to try: https://saasufy.com/ |
|
| ▲ | bad_username 7 hours ago | parent | prev | next [-] |
| It also changes the economics of buy vs build. |
| |
| ▲ | jillesvangurp 6 hours ago | parent | next [-] | | That's very true. People put up with the many limitations of off the shelf software because it's cheaper, not because it's better. Developing bespoke software solutions is now a lot cheaper than it used to be. So, there are a lot of cases where that now becomes the better option. Doing in days what used to take months, is a bit of a game changer. Like with past cost reductions, people will underestimate the work and get it wrong. It helps if you know what you are doing rather than just vibe coding things. But for rewrites, the sunk cost fallacy becomes a lot cheaper. So, that changes how you deal with stuff that clearly isn't living up to expectations. Unceremoniously replacing what wasn't that expensive to begin with might be the cheaper option relative to fixing it. | | |
| ▲ | TheOtherHobbes 6 hours ago | parent [-] | | They also do it because there's someone to blame, and - more importantly - because they know the people who are selling it from their golf dates. |
| |
| ▲ | bonzini 7 hours ago | parent | prev [-] | | Much less if you consider buy vs build+maintain. |
|
|
| ▲ | lazy_dev_1_to_9 7 hours ago | parent | prev | next [-] |
| This certainly does. If we think from this angle, it really begs the question of what language/tech stack to use if a company wants to start a new project. On one hand, if company uses a very well tech stack, development and rewrites will be faster due to AI having way more examples to draw from. In certain cases, AI will handle some edge cases which are difficult to come by/replicate under strictest test procedures. Overall, that results in faster workflow. On the other hand, if this company choose a newer stack which may be better better than older popular frameworks, development time will increase (along with rewrite time)but the product might be better. we have to see how companies handle this in the future, given this is also affected by how cheap/expensive token consumption becomes. Using something pretrained vs training and then using an AI has cost implications when done in a large scale. It will be interesting to see what directions companies go to, faster workflows and delivery using AI or potentially a better product using more manually written proprietary code with lesser AI involvement. |
| |
| ▲ | apsurd 6 hours ago | parent | next [-] | | I don't think that holds. Internal docs for bespoke frameworks, with examples, are effective at steering AI. The main thing is that both the API and the docs are well written. Easier said than done, but you can ask AI how to write effective documentation for AI. | |
| ▲ | protocolture 7 hours ago | parent | prev [-] | | >if company uses a very well tech stack, development and rewrites will be faster due to AI having way more examples to draw from. Eh maybe not. Stuff that has a lot of deprecated features is honestly burdensome on AI. It keeps rediscovering the deprecated features as the understanding that they are deprecated fall outside of the context window. What you need is something that either never deprecates syntax, or is <10 years old with minimal changes over that time. |
|
|
| ▲ | apsurd 7 hours ago | parent | prev | next [-] |
| again with these linkedin "articles". ·
every sentence stands on its own because it's the most insightful soundbite of wisdom every constructed. ·
Aphorisms for the collective upgrade of consciousness. ·
delivered one tweet at a time. ·
(this comment adds to the discussion ironically by demonstrating how ridiculous it is to have to derive signal from this format. Please do what you need on Linkedin but take some semblance of effort to honor this community. Or don't. sigh) |
| |
|
| ▲ | 2001zhaozhao 7 hours ago | parent | prev | next [-] |
| Somehow this article doesn't even mention the fact that AI makes software rewrites much, much faster than before and with higher confidence of backwards compatibility. Nowadays, a good AI harness can fairly reliably rewrite a medium complexity piece of software to an appropriate modern tech stack with pretty strong confidence of exactly preserving its behavior. The AI can pick up legacy details and keep them exactly the same as before in ways that a human rewriter would usually not bother with. After rewriting each feature it can then exhaustively smoke test all the happy paths and edge cases and ensure the code behaves exactly the same as before, which is another thing that human rewrites basically never do. |
| |
| ▲ | 6 hours ago | parent | next [-] | | [deleted] | |
| ▲ | oblio 6 hours ago | parent | prev [-] | | AI <<can>> do a lot of things, but does it actually do that without an exhaustive test suite (which legacy software generally doesn't have, and it can never be 100%, anyway)? Between context collapse and hallucinations, how likely is it that the end result isn't slightly polished slop that misses lots of crucial details? |
|
|
| ▲ | light_hue_1 7 hours ago | parent | prev | next [-] |
| This kind of data-free opining reminds me of the Mythical Man-Month. Yeah, in theory adding more people to a project will speed it up. And all people are replaceable so I can hire 100 bodies for cheap and we'll be done with this project ASAP. Sounds great! Have you tried this? Did you see what went wrong? Otherwise this is just the same nonsense as always. |
|
| ▲ | feverzsj 7 hours ago | parent | prev | next [-] |
| The problem is always maintainability. Who's gonna fix new bugs? Who's gonna add new features? |
| |
|
| ▲ | est 6 hours ago | parent | prev | next [-] |
| But can AI rewrite better over AI clop made by itself? |
|
| ▲ | crnkofe 5 hours ago | parent | prev | next [-] |
| I had an itch to rewrite every project after it got large enough and have rewritten some of them. The tragedy of rewriting stuff is that it often ends up becoming more of a duplicate than an improved original. Its hard to see all the edge cases when skimming codebase from afar. Maybe for prototyped code it could work. Not sure if feeding prototype AI slop into AI will produce results though. GIGO. Rewriting code is anyhow not the critical aspect. Its testing and QAing the result and legacy edge cases that's the most time consuming part and that isn't really covered by writing more code. |
|
| ▲ | retinaros 6 hours ago | parent | prev | next [-] |
| First three paragraphs and I can tell its opus 4.8 |
| |
| ▲ | trollbridge 6 hours ago | parent [-] | | You are a man of taste and refinement; I could tell it was an LLM, but didn't recognise it was Opus and certainly had no idea which version. (At least the author sprang for a $20 a month subscription.) |
|
|
| ▲ | jdw64 6 hours ago | parent | prev | next [-] |
| The point where I truly feel that AI is a game changer is that these kinds of posts keep appearing. Tautological outcries keep going on both sides, pro and con, endlessly repeating circular logic. There's no real substance or evidence, and rather than discussing how things were actually applied, it's just an echo chamber for whatever group you belong to. In that sense, my homepage (https://www.makonea.com/en-US) doesn't even make it to the HN front page—it's mostly in SHOWDEAD. Does that mean it has less value than this post? I'm feeling a sense of doubt about myself. |
| |
| ▲ | apsurd 6 hours ago | parent [-] | | this post is no good. It's a continual rehash of what's going on in the industry. That's how all social media is, it's entirely time sensitive, keep saying the the same things and be the one to say it so the discussion happens on your "content". OP is playing the game. The post literally says "from LinkedIn" so if you look, he has 500+ connections and 1400 followers. That's not nothing. Good for him, all advice points to this new attention economy we live in. I'm a bit aged out of all this. And I rode the 2010s wave so I can't give any advice in good conscience. I can only say that I see you and there's a whole world of silent majorities out there with no follow count and no broetry with our name on it. (search for that word in this thread, just learned it, it's great!) | | |
| ▲ | jdw64 5 hours ago | parent [-] | | Thank you. I'll do my best too. I appreciate your encouragement |
|
|
|
| ▲ | DubiousPusher 7 hours ago | parent | prev | next [-] |
| What do your tests look like. Because rewriting by hand and rewriting via AI have the same load bearing on whether or not your tests cover your scenarios and your integrations well. |
|
| ▲ | reinitctxoffset 7 hours ago | parent | prev [-] |
| The amount of armchair quarterback commentary in the software business as concerns people waxing eloquent a out difficult things safe atop a perch of the same easy things achieved multiple times has always been obnoxious, offensive to the thermodynamics of the situation as situated by Landauer. But this new "you're holding it wrong" series by people whose grasp of the system gets fuzzy somewhere in the v8 headers is a new land speed record for being vacuously correct and still an attractive nuisance for profit. Yes, the trend towards encoding hard-won domain knowledge as property and fuzz testing and sometimes even proof system was underway before ChatGPT, and yes, the economics of this approach bend sharply under a post terrawright world. But no, you haven't added anything except tinsel and chaff and some green css on mixpanel. Just stop with this shit. If you knew shit about AI you'd be too busy printing cash to teach the rest of us about it. |
| |
| ▲ | Quothling 6 hours ago | parent [-] | | I'm not sure there is any value in knowing shit about AI. I know quite a lot about enterprise organisation level AI, but really, you could just ask an AI and it'd guide you through the processes. Knowledge in general is going to become real cheap in the age of AI. I've been a data archtiect in the past, so I used Opus 4.8 as I would've used a consultant agency on how to do our data architecture for multiple standard systems which can't directly share data with eachother. After a couple of hours with it as a sparring partner, I had some pretty awesome powerpoint decision making slides, one for c-levels and one for it-management. Since our owners also own an IT consultant agency, I ran the same process through with one of our regular consultants who is an actual awesome data architect. The output was strikingly similar, well except that I/we didn't need to make the slides. I then had him run over the actual slides, and all we changed was adding a { between some arrows to make the source of the arrows more clear. We're still going to use real human consultants in the loop because they are readily and freely available, and because this is still new. I doubt we'd want to spend 100 consultant hours on something like this in 5 years though. I mean, we'd still do it for decisions where we'd want someone to blame. |
|