10 ms·
> Companies with relatively young, high-quality codebases benefit the most from generative AI tools, while companies with gnarly, legacy codebases will struggle
by perrygeo 2y ago
> Companies with relatively young, high-quality codebases benefit the most from generative AI tools, while companies with gnarly, legacy codebases will struggle to adopt them. In other words, the penalty for having a ‘high-debt’ codebase is now larger than ever.
This mirrors my experience using LLMs on personal projects. They can provide good advice only to the extent that your project stays within the bounds of well-known patterns. As soon as your codebase gets a little bit "weird" (ie trying to do anything novel and interesting), the model chokes, starts hallucinating, and makes your job considerably harder.
Put another way, LLMs make the easy stuff easier, but royally screws up the hard stuff. The gap does appear to be widening, not shrinking. They work best where we need them the least.
- RangerScience 2y agoEh, it’s been kinda nice to just hit tab-to-complete on things like formulaic (but comprehensive) test suites, etc. I never wanted the LLM to take over the (fun) part - thinking through the hard/unusual parts of the problem - but you’re also not wrong that they’re needed the least for the boilerplate. It’s still nice :)
- hyccupi 2y ago> It’s still nice :) This is the thing about the kind of free advertising so many on this site provide for these llm corpos. I’ve seen so many comparisons between “ai” and “stack overflow” that mirror this sentiment of “it’s still nice :)”. Who’s laying off and replacing thousands of working staff for “still nice :)” or because of “stack overflow”? Who’s hiring former alphabet agency heads to their board for “still nice :)”? Who’s forcing these services into everything for “still nice :)”? Who’s raising billions for “still nice :)”? So while developers argue tooth and nail for these tools that they seemingly think everyone only sees through their personal lens of a “still nice :)” developer tool, the companies are leveraging that effort to oversell their product beyond the scope of “still nice :)”.
- perrygeo 2y agoTrue, if you're using LLMs as a completion engine or to generate scaffolding it's still very useful! But we have to acknowledge that's by far the easiest part of programming. IDEs and deterministic dev tools have done that (very well) for decades. The LLM gains are in efficiency for rote tasks, not solving the other hard problems that make up 98% of the day. The idea that LLMs are going to advance software in any substantial way seems implausible to me - It's an efficiency tool in the same category as other IDE features, an autocomplete search engine on steroids, not even remotely approaching AGI (yet).
- valenterry 2y ago> The idea that LLMs are going to advance software in any substantial way seems implausible to me I disagree. They won't do that for existing developers. But they will make it so that tech-savy people will be able to do much more. And they might even make it so that one-off customization per person will become feasable. Imagine you want to sort hackernews comments by number of character inline in your browser. Tell the AI to add this feature and maybe it will work (just for you). That's some ways I can see substantial changes happen in the future.
- dcchambers 2y agoLike most of us it appears LLMs really only want to work on greenfield projects.
- hyccupi 2y agoGood joke, but the reality is they falter even more on truly greenfield projects. See: https://news.ycombinator.com/item?id=42134602 https://news.ycombinator.com/item?id=42134602
- MrMcCall 2y agoThat is because, by definition, their models are based upon the past. And woe unto thee if that training data was not pristine. Error propagation is a feature; it's a part of the design, unless one is suuuuper careful. As some have said, "Fools rush in."
- Terr_ 2y agoOr, in comic form: https://www.smbc-comics.com/comic/rise-of-the-machines https://www.smbc-comics.com/comic/rise-of-the-machines
- anthonyskipper 2y agoI agree with this. But the reason is that AI does better the more constrained it is, and existing codebases come with constraints. That said, if you are using Gen AI without a advanced rag system feeding it lots of constraints and patterns/templates I wish you luck.
- benatkin 2y agoThe site also suggests LLMs care a great deal one way or another. "Unlock a codebase that your engineers and AI love." https://www.gauge.sh/ https://www.gauge.sh/ I think they do often act opinionated and show some decision-making ability, so AI alignment really is important.
- 2y ago
- deleted 2y ago[deleted]
- TOGoS 2y ago> They work best where we need them the least. Just like most of the web frameworks and ORMs I've been forced to use over the years.
- comboy 2y agoSame experience, but I think it's going to change. As models get better, their context window keeps growing while mine stays the same. To be clear, our context window can be really huge if you are living the project. But not if you are new to it or even getting back to it after a few years.
- MrMcCall 2y agoHere's the secret to grokking a software project: a given codebase is not understandable without understanding how and why it was built; i.e. if you didn't build it, you're not going to understand why it is the way it is. In theory, the codebase should be, as it is, understandable (and it is, with a great deal of rigorous study). In reality, that's simply not the case, not for any non-trivial software system.
- thfuran 2y agoSo your secret to understanding code is: Abandon hope all ye who enter here?
- marcosdumay 2y agoOh, you will understand why things were built. It's inevitable. And all of that understanding will come from people complaining about you fixing a bug.
- MrMcCall 2y agoHard work is no secret, it's just avoided by slackers at all costs :-) What I'm really saying is that our software development software is missing a very important dimension.
- gwervc 2y agoToo bad most projects don't document any of those decisions.
- xnx 2y agoLLMs might be a good argument for documenting more of the "why" in code comments.
- graycat 2y agoI suspected some of that, and your explanation looks more general and good. Or, for a joke, LLMs plagiarize!
- irrational 2y agoI was recently assigned to work on a huge legacy ColdFusion backend service. I was very surprised at how useful AI was with code. It was even better, in my experience, than I've seen with python, java, or typescript. The only explanation I can come up with is there is so much legacy ColdFusion code out there that was used to train Copilot and whatever AI jetbrains uses for code completion that this is one of the languages they are most suited to assist with.
- randomdata 2y agoPerhaps it is the reverse: That ColdFusion training sources are limited, so it is more likely to converge on a homogenization? While, causally, we usually think of a programming language as being one thing, but in reality a programming language generally only specifies a syntax. All of the other features of a language emerge from the people using them. And because of that, two different people can end up speaking two completely different languages even when sharing the same syntax. This is especially apparent when you witness someone who is familiar with programming in language X, who then starts learning language Y. You'll notice, at least at first, they will still try to write their programs in language X using Y syntax, instead of embracing language Y in all its glory. Now, multiply that by the millions of developers who will touch code in a popular language like Python, Java, or Typescript and things end up all over the place. So while you might have a lot more code to train on overall, you need a lot more code for the LLM to be able to discern the different dialects that emerge out of the additional variety. Quantity doesn't imply quality.
- slt2021 2y agomaybe its a signal that you software should be restructured into modules that fit well-established patterns. its like you are building website thats not using MVC and complain that LLM advice is garbage...
- marcosdumay 2y agoNo, you shouldn't restructure your software into highly-repetitive noise so that a dumb computer can guess what comes next.
- slt2021 2y agoI am proponent of Clean and Simple architecture that follows standard patterns. because they are easier to maintain, there should be no clever tricks or arch. all software arch should be boring and simple, with as few tricks as possible, unless it is absolutely warranted
- skydhash 2y agoSimplicity is hard. And difficulty is what almost everyone using LLMs is trying to avoid. More code breed complexity. I read somewhere that 1/6 of the time should be allocated to refactoring (every 6th cycle). I wonder how that should be done with LLMs.
- valenterry 2y agoExactly that. LLMs generate a lot of simple and dumb code fast. Then you need to refactor it and you can't because LLMs are still very bad at that. They can only refactor locally with a very limited scope, not globally. Good luck to anyone having to maintain legacy LLM-generated codebases in the future, I won't.
- dartos 2y agoI’ve noticed LLMs quickly turn to pulling in dependencies and making complicated code
- anthonyskipper 2y agoThis is only partly true. AI works really well on very legacy codebases like cobol and mainframe, and it's very good at converting that to modern languages and architectures. It's all the stuff from like 2001-2015 that it gets weird on.
- dartos 2y ago> AI works really well on very legacy codebases like cobol and mainframe Any sources? Seems unlikely that LLMs would be good at something with so little training data in the widely available internet.
- true_religion 2y agoLLMs are good at taking the underlying structure of one medium and repeating it using another medium.
- dartos 2y agoAssuming both mediums are reasonably well represented in the dataset, which brings me back to my comment
- jamil7 2y ago> This mirrors my experience using LLMs on personal projects. They can provide good advice only to the extent that your project stays within the bounds of well-known patterns. I agree but I find its still a great productivity boost for certain tasks, cutting through the hype and figuring out tasks that are well suited to these tools and prompting optimially has taken me a long time.
- pydry 2y agoI hear people say this a lot but invariably the tasks end up being "things you shouldnt be doing". E.g. pointing the AI at your code and getting it to write unit tests or writing more boilerplate, faster.
- cheald 2y agoThe niche I've found for LLMs is for implementing individual functions and unit tests. I'll define an interface and a return (or a test name and expectation) and say "this is what I want this to do", and let the LLM take the first crack at it. Limiting the bounds of the problem to be solved does a pretty good job of at least scaffolding something out that I can then take to completion. I almost never end up taking the LLM's autocompletion at face value, but having it written out to review and tweak does save substantial amounts of time. The other use case is targeted code review/improvement. "Suggest how I could improve this" fills a niche which is currently filled by linters, but can be more flexible and robust. It has its place. The fundamental problem with LLMs is that they follow patterns, rather than doing any actual reasoning. This is essentially the observation made by the article; AI coding tools do a great job of following examples, but their usefulness is limited to the degree to which the problem to be solved maps to a followable example.
- MarcelOlsz 2y agoCan't tell you how much I love it for testing, it's basically the only thing I use it for. I now have a test suite that can rebuild my entire app from the ground up locally, and works in the cloud as well. It's a huge motivator actually to write a piece of code with the reward being the ability to send it to the LLM to create some tests and then seeing a nice stream of green checkmarks.
- sarchertech 2y ago[flagged]
- PaulHoule 2y agoI had Codeium add something to a function that added a new data value to an object. Unbidden it wrote three new tests, good tests. I wrote my own test by cutting and pasting a test it wrote with a modification, it pointed out that I didn’t edit the comment so I told it to do so. It also screwed up the imports of my tests pretty bad, some imports that worked before got changed for no good reason. It replaced the JetBrains NotNull annotation with a totally different annotation. It was able to figure out how to update a DAO object when I added a new field. It got the type of the field wrong when updating the object corresponding to a row in that database column even though it wrote the liquibase migration and should have known the type —- we had chatted plenty about that migration. It got many things right but I had to fix a lot of mistakes. It is not clear that it really saves time.
- cloverich 2y agoFor me same experience but opposite conclusion. LLM saves me time by being excellent at yak shaving, letting me focus on the things that truly need my attention. It would be great if they were good at the hard stuff too, but if I had to pick, the basics is where i want them the most. My brain just really dislikes that stuff, and i find it challenging to stay focused and motivated on those things.
- davidsainez 2y agoYep, I'm building a dev tool that is based on this principle. Let me focus on the hard stuff, and offload the details to an AI in a principled manner. The current crop of AI dev tools seem to fall outside of this sweet spot: either they try to do everything, or act as a smarter code completion. Ideally I will spend more time domain modeling and less time "coding".
- imiric 2y ago> LLM saves me time by being excellent at yak shaving, letting me focus on the things that truly need my attention. But these tools often don't generate working, let alone bug-free, code. Even for simple things, you still need to review and fix it, or waste time re-prompting them. All this takes time and effort, so I wonder how much time you're actually saving in the long run.
- munk-a 2y ago> Put another way, LLMs make the easy stuff easier, but royally screws up the hard stuff. This is my experience with generation as well - but I still don't trust it for the easy stuff and thus the model ends up being a hindrance in all scenarios. It is much easier for me to comprehend something I'm actively writing so making sure a generative AI isn't hallucinating costs more than me just writing it myself in the first place.
- zer8k 2y ago> the model chokes, starts hallucinating, and makes your job considerably harder. Coincidentally this also happens with developers in unfamiliar territory.
- perrygeo 2y agoI often think of LLMs as a really smart junior developer - full of answers, half correct, with zero wisdom but 100% confidence I'd like to think most developers know how to say "I don't know, let's do some research" but in reality, many probably just take a similar approach to the LLM - feign competence and just hack out whatever is needed for today's goal, don't worry about tomorrow.
- namaria 2y agoNah LLMs are nothing like really smart junior developers. Really smart junior developers actually have a shot at learning better and moving on from this stage.
- glouwbug 2y agoIronically enough I’ve always found LLMs work best when I don’t know what I’m doing
- mindok 2y agoIs that because you can’t judge the quality of the output?
- glouwbug 2y agoExactly
- hambandit 2y agoI find this perspective both scary and exciting. I'm curious, how do you validate the LLM's output? If you have a way to do this, and it's working. Then that's amazing. If you don't, how are you gauging "work best"?
- glouwbug 2y agoI gauge what work's best if I can already do what I am asking it to do, and that comes from years of studying and trial and error experience without LLMs. I have no way of verifying what's a hallucination unless I am an expert
- yieldcrv 2y agoas the context windows get larger and the UX for analyzing multiple files gets better, I’ve found them to be pretty good But they still fail at devops because so many config scripts are at never versions than the training set
- deleted 2y ago[deleted]
- archy_ 2y agoIve noticed the same and wonder if this is the natural result of public codebases on average being simpler since small projects will always outnumber bigger ones (at least if you ignore forks with zero new commits) If high quality closed off codebases were used in training, would we see an improvement in LLM quality for more complex use cases?
- yodsanklai 2y agoI use ChatGPT the most when I need to make a small change in a language I'm not fluent in, but I have a clear understanding of the project and what I'm trying to do. Example: "write a function that does this and this in Javascript". It's essentially a replacement of stack overflow. I never use it for something that really requires knowledge of the code base, so the quality of the code base doesn't really matter. Also, I don't think it has ever provided me something I wouldn't have been able to do myself pretty quickly.
- fny 2y ago> They work best where we need them the least. Au contraire. I hate writing boilerplate. I hate digging through APIs. I hate typing the same damn thing over and over again. The easy stuff is mind numbing. The hard stuff is fun.
- kemiller 2y agoThis is true, but I look at it differently. It makes it easier to automate the boring or annoying. Gotta throw up an admin interface? Need to write more unit tests? Need a one-off but complicated SQL query? They tend to excel at these things, and it makes me more likely to do them, while keeping my best attention for the things that really need me.
- LargeWu 2y agoOne description of the class of problems LLM's are a good fit for is anything at which you could throw an army of interns. And this seems consistent with that.
- antonvs 2y ago> They work best where we need them the least. I disagree, but it’s largely a matter of expectations. I don’t expect them to solve hard problems for me. That’s currently still my job. But when I’m writing new code, even for a legacy system, they can save a lot of time in getting the initial coding done, helping write comments, unit tests, and so on. It’s not doing difficult work, but it saves a lot of toil.
- hunterbrooks 2y agoLLM's get relatively better at read-heavy operations (ex: code review) than write-heavy operations (ex: code generation) as codebases become less idiomatic. I'm a cofounder at www.ellipsis.dev - we tried to build code generation for a LONG time before we realized that AI Code Review is way more doable with SOTA