9 ms·
I'm sure there are plenty of examples like this, but one thing that I find really hard to deal with is to integrate such tools into existing codebase -- you can
by rty32 2y ago
I'm sure there are plenty of examples like this, but one thing that I find really hard to deal with is to integrate such tools into existing codebase -- you can make all these things as standalone pages, but for a professional developer, you have certain standards and conventions, and often it takes a lot of work to review/revise the code to make it work with existing codebase, so much that you end up using inline completion just to help with obvious stuff or boilerplate. I woule rather spend 20% extra amount of time to write the code myself yet have confidence, than spend time tweaking the prompt or giving follow up instructions.
- salviati 2y agoHave you tried https://aider.chat https://aider.chat ?
- kridsdale3 2y agoCan those kinds of things work in monorepos with 50 million files?
- salviati 2y agoI believe they can as long as you're able to identify a contained task that touches no more than a handful of files. Still very useful to automate some tedious work or refactoring if you ask me.
- deleted 2y ago[deleted]
- jprete 2y agoThat's effectively an answer of "no".
- sthatipamala 2y agoI used to work in a monorepo of that size. All of the PRs I ever submitted touched a handful of files in my project’s subdirectory.
- raincole 2y agoThat's effectively an answer of "yes". Or what "yes" looks like to you? It can do all the work itself, for a 50m-file monorepo, without a human guiding it which files to look at? If it were true then human programmers would have been considered obsoleted today. There would be exactly zero human programmers who make any money in 2025.
- ctoth 2y agoCan you work in a repo with fifty million files? Can Git? I just checked on my Windows machine using Everything and there are 15,960,619 files total including every executable, image, datafile, &c. Out of curiosity what does your IDE do when you do a global symbol rename in a repository with fifty million files? I'm absolutely a real human, and I think this just might be too much context for me! Perhaps I am not general enough.
- dexwiz 2y agoHaving worked on a codebase like that, you need to use some extra plugins to get git to work. And even then, it’s very slow. Like 15-30 seconds for a git status to run even with caching. Global renames with an IDE are impossible but tools like sed and grep still work well. Usually there is a module system that maps to the org structure and you don’t venture outside of your modules or dependency modules very often.
- achierius 2y agoI thought this was common knowledge but I guess not: Google's monopoly famously has over a billion files. No, Git cannot handle it. Their whole software stack is developed around this from the ground up. But they are one of the largest software employers in the world, so quite a few engineers evidently do make do with 200x more than 50 million files.
- nasmorn 2y agoMonopoly <> Monorepo This is the funniest typo possible in the context of google
- syntaxing 2y agoThey use this thing called repo map[1]. I only used it for personal projects and it’s been great. You need to add the files you care about yourself, it’ll do its best and add additional files from the repo map if needed. Since it’s git based, it makes it very easy to keep track of the LLMs output. The agents is really well done too. I like to skip auto commit so I can “git reset —hard HEAD^1” if needed but aider has built in “undo” command too. [1] https://aider.chat/docs/repomap.html https://aider.chat/docs/repomap.html
- rorytbyrne 2y agoIt doesn't take the whole repo as context, it tries to guess which files to look at. So if you prompt with that in mind, it works well. Haven't tried it on a very large codebase though. You can also explicitly add files, if you know where work should be done.
- adamtaylor_13 2y agoNo and neither can you. Like you, it works best with small, focused context. These tools aren’t magic. But they do certain tasks remarkably well.
- dartos 2y ago> No and neither can you. People do work on monorepos with 50 million+ files, though…
- paradite 2y agoI made a tool that allows you to use LLMs on large codebases. You can select which files are relevant and embed them into the prompt: https://prompt.16x.engineer/ https://prompt.16x.engineer/ Based on my personal experience it works well as long as each file is not too long.
- ziggyzecat 2y agoyou can make it work. just think of the many approaches and you'll see that there are actually quite many viable ways to work around pseudo-infinite context.
- freediver 2y agoI am a big fan!
- vbezhenar 2y agoI tried it yesterday and wasn't successful. I spent like 30 minutes trying to explain to it to make a simple change. Every time it made this change and several others as well which I didn't ask for. I asked to undo those several other changes and it undoes everything or does other unrelated things. It works good until it doesn't. It's definitely a useful tool and I'll continue to learn to use it. However it is absolutely stupid at times. I feel there's very high bar to use it, much higher than traditional IDEs.
- ripley12 2y agoWhich LLM were you using? I’ve had a great experience with Aider and Claude Sonnet 3.5 (which is not coincidentally at the top of the Aider leaderboard).
- esperent 2y agoI've been using Claude dev VSCode extension (which just got renamed but I forget the new name), I think it's similar to Aider except that it works via a gui. I do find it very useful, but I agree that one of the main issues is preventing it from making unnecessary changes. For example, this morning I asked it to help me fix a single specific type error, and it did so (on the third attempt, but to be fair it was a tricky error). However, it persistently deleted all of the comments, including the standard licensing info and explanation at the top of the file, even when I end my instructions with "DO NOT DELETE MY COMMENTS!!".
- kbaker 2y agoYou may want to peek at the system prompts Aider uses. I think this is part of the secret sauce that makes it so good. https://github.com/Aider-AI/aider/blob/main/aider/coders/editblock_prompts.py https://github.com/Aider-AI/aider/blob/main/aider/coders/edi... excerpt: """ Act as an expert software developer. Always use best practices when coding. Respect and use existing conventions, libraries, etc that are already present in the code base. {lazy_prompt} Take requests for changes to the supplied code. If the request is ambiguous, ask questions. Always reply to the user in the same language they are using. Once you understand the request you MUST: """ ... etc...
- codingwagie 2y agocursor.sh, add context to the prompt
- rty32 2y agoI haven't spent enough time with cursor specifically, but with other similar coding assistants, adding context can take some time. And often, even if it does save time, the action of "adding context" itself gets tiring and tedious so that you don't want to bother but instead just write the code yourself. It's about mental affordability.
- cube2222 2y agoWith something like the AI assistant in Zed you’d generally provide a few files the assistant can use as a reference. I’ve had good luck in having it follow the codebase’s style and standards this way.
- benwilber0 2y ago+1 to the completions/inferences in Zed. It's the first editor that I feel (mostly) confident about just tabbing-through the AI completions with minimal prompting/re-editing.
- richardw 2y agoDrag in a couple files and say “make a class that does X but use this format”. I absolutely don’t rely on it for lots of things but it’s absolutely capable of working with existing code. Claude is far better than OpenAI when dealing with sets of existing files. I also like that it’s outside of my IDE so I make the final changes. LLM’s love to just write tokens so I keep a fairly short leash.
- Buttons840 2y agoWith a sufficiently advanced type system, you could lay out high level building blocks, such as function definitions, and let the LLM go wild, and then if things compile there's a high chance it's correct. Or maybe even a formal proof things are correct. I was blown away when I realized some Haskell functions have only one possible definition, for example. I think most people haven't worked with type systems like this, and there are type systems far more powerful than Haskell's, such as dependant types. There's not much reason to worry about low level quality standards so long as you know it's correct from a high level. I don't think we've seen what a deep integration between a LLM and a programming language can do, where the type system helps validate the LLM output, and the LLM has a type checker integrated into its training process.
- fhdsgbbcaA 2y agoThings I never want to hear about flight control systems before I board a plane: “if things compile there's a high chance it's correct”
- literalAardvark 2y agoVery odd comment, since that's exactly what you do want to hear
- xmprt 2y agoThere's a lot of code that compiles but isn't correct.
- literalAardvark 2y agoBecause we're using languages with flexibility but no correctness, but the vast performance advantage AI programming has over us could be used to manage the formal proofs for a verified toolchain. We're not quite there yet, but while regular programming is quite tough for AI due to how fuzzy it is, formal proofs are something AI is already very good at.
- 2y ago
- fny 2y agoI find it helps if you treat the code generated as a third-party package with a well defined API. Then your role becomes gluing things together. It’s an approach similar to how I’ve dealt with junior devs in the past. You specify an interface for a class, provide examples as a spec, and you get what you want without colliding with the main project. For sanity’s sake, I keep these AI generated modules in single files just so it’s an easy copy and paste into ChatGPT.
- tharant 2y ago> It’s an approach similar to how I’ve dealt with junior devs in the past. Your experience with and approach to juniors is different than my own. I don’t ask juniors to write a single class file; I give them a design document, an API spec, and documentation for standard practices, then I work as closely with them as needed to get the results I need and the experience they need. This approach works well for me and the vast majority of juniors with whom I’ve worked because we can pretty quickly identify gaps in their knowledge so we can then provide experience and education that benefits both parties. The same approach has failed miserably for me when pairing with an LLM for anything other than trivial code-generation tasks. The models don’t learn (sure, some providers offer “memory” but the limits of those features are pretty obvious once you try to use ‘em in practice for anything other than “don’t forget that I like tacos, the color blue, and sci-fi”) > For sanity’s sake, I keep these AI generated modules in single files just so it’s an easy copy and paste into ChatGPT. That’s not acceptable for production-quality code—at least not in my environment.
- fny 2y agoI ask juniors to do just as you do. There's a contract specified in the API spec and relevant documents. In kind, I build up an "AI" package one module at a time by specifying contracts for each module. The principle remains the same but at a smaller scale because, as you say, LLMs don't learn. I know the organizational style doesn't fit a typical "production" set up, but the reality is the code produced is very good. I only set it up this way so I guarantee I can continue iterating on a module without too much pain. Also, who cares if I have a way more files if I'm still building features for my customers?
- Atotalnoob 2y agoJust tell it those conventions or standards. Using GitHub copilot, I just tell it to style its code like an example and it gets pretty close.
- paradite 2y agoI built a tool specifically for integrating LLMs like Claude into existing codebase and daily coding workflow: https://prompt.16x.engineer/ https://prompt.16x.engineer/
- beefnugs 2y agoThis isn't for professional software developers. This is for managers, so they can shit out a one week test and then feel superior enough to pay software engineers less for the "easy" job they do.
- Volrath89 2y agoYou are right, except on the part about tweaking the prompt to get your desired code styling. The easier way to integrate into an existing code base is just to refactor the code yourself. AI gives a working version, you refactor and move on. For me this has been a huge productivity boost from writing everything from scratch
- bboygravity 2y agoYou can feed it a bunch of your code style as part of a project and it will just adhere to that.
- hackernewds 2y agoYou spend 40-100 hours/wk at work. Ok to spend 2 hours to give Claude the info around those conventions. It should then save you 20-40 hours/wk
- inciampati 2y agoExactly. Use aider to do this. Tell claude or your favorite LLM to write a full plan to implement what you need in such a way that your coworker can implement it. Copy the result into aider, and check the results!