Live data from Hacker News

Aider: AI pair programming in your terminal

github.com

101–110 of 170 posts

Re: Aider: AI pair programming in your terminal

#101
post #87

I have this 300 line Go application which manages git tags for me. I asked it to implement a -dry-run function. It failed twice. First time it just mangled the file. Second time it just made code that didn't do anything. I asked it to rename a global variable. It broke the application and failed to understand scoping rules. Perhaps it is bad luck, or perhaps my Go code is weird, but I don't understand how y'all wanna…

It must be your app/lang/prompt/grandma/dog/... lol. LLMs are the future, and they will replaces Allllllll the coders in the woooorld (TM), and did you know "it" can create websites??? Wooo, let's go, baby!

Nah these things are all stupid as hell. Any back and forth between a human and an LLM in terms of problem solving coding tasks is an absolute disaster.

People here and certainly in the mainstream population see some knowledge and just naturally expect intelligence to go with it. But it doesn't. Wikipedia has knowledge. Books have knowledge. LLMs are just the latest iteration of how humans store knowledge. That's about it, everything else is a hyped up bubble. There's nothing in physics that stops us from creating an artificial, generally intelligent being, but it's NEVER going to be with auto-regressive next-token prediction.

Re: Aider: AI pair programming in your terminal

#102

With all these AI tools requiring a prompt, does it really simplify/speed up things? From the example: I have to write "add a name param to the 'greeting' function, add all types", then wait for the result to be generated, read it carefully to be sure that it does what I want, probably reiterate if the result does not match the expectation. This seems to me more time consuming than actually do the work myself. Does a…

Personally the use for me has been in writing boilerplate. As an example, one of my ongoing goals has been to port all the view code of a project to another framework, following its idioms. Using an LLM, I can process a file in a couple of seconds, and checking that everything is right takes just a few seconds as well. It’d take me hours to go through every file manually, and it’d be prone to human error. It’s not te…

Call me a caveman but the lack of an option to use AI tools offline is a massive downside to me. I am connected to the internet most of the time but I take comfort in knowing that, for most of my work, I could lose my connection and not even notice

Re: Aider: AI pair programming in your terminal

#103

With all these AI tools requiring a prompt, does it really simplify/speed up things? From the example: I have to write "add a name param to the 'greeting' function, add all types", then wait for the result to be generated, read it carefully to be sure that it does what I want, probably reiterate if the result does not match the expectation. This seems to me more time consuming than actually do the work myself. Does a…

For me a useful coding assistant would be one that looks at what I'm _doing_ and helps me complete the boring parts of the task.

The current wave of coding assistants target junior programmers who don't know how to even start approaching a task. LLMs are quite good at spitting out code that will create a widget or instantiate a client for a given API, figuring out all the parameters and all the incantations that you'd otherwise need to copy paste from a documentation. In a way they are documentation "search and digest" tools.

While that's also useful for senior developers when they need to work outside of their particular focus area, it's not that useful to help you work on a mature codebase where you have your own abstractions and all sorts of custom things that have good reasons to be there but are project specific.

Sure, we could eventually have LLMs that can be fine tuned to your specific projects, company or personal style.

But there is also another area where we can use intelligent assistants: editors.

Right now editors offer powerful tools to move around and replace text, often in ways that respects the syntax of the language. But it's cumbersome to use and learn, relying on key bindings or complicated "refactoring" commands.

I wish there was a way for me to have a smarter editor. Something that understands the syntax and a bit the semantics of the code but also the general intent of the local change in working on and the wider context so it can help me apply the right edits.

For example right now I'm factoring out a part of a larger function into it's own function so it can be called independently.

I know there are editor features that predate AI that can do this work but for various reasons I can't us it. For example, you may have started to do it manually because it seemed simple and then you realize you have to factor out 5 parameters and it becomes a boring exercise of copy paste. Another example is that the function extraction refactoring tool of your IDE just can't handle that case, for example: func A(a Foo) { b := a.GetBar(); Baz(b.X, b.Y, c, d) } you'd want to extract a function func _A(b Bar) { Baz(b.X.... and have A call that. In some simple cases the IDE can do that. In other you need to do it manually.

I want an editor extension that can help me with the boring parts of shuffling parameters around, moving them in structures etc etc all the while I'm in control of the shape of the code but I don't have to remember the advanced editor commands but instead augment my actions with some natural language comments (written or even spoken!)

Re: Aider: AI pair programming in your terminal

#104

Earlier quoted context omitted.

Personally the use for me has been in writing boilerplate. As an example, one of my ongoing goals has been to port all the view code of a project to another framework, following its idioms. Using an LLM, I can process a file in a couple of seconds, and checking that everything is right takes just a few seconds as well. It’d take me hours to go through every file manually, and it’d be prone to human error. It’s not te…

I don't have the impression I'm writing too much boilerplate, but I am curious about this as I have heard it multiple times: are there more examples of boiler plate that an LLM is better/faster at generating than a couple of copy/paste? If it's more than a couple than copy/paste and it's time for a rewrite, do you leverage AI for this? how do you usually introduce the abstraction?

One example of boilerplate that I've been automating is when you're creating model code for your ORM.

I paste the table definition into a comment, and let the LLM generate the model (if the ORM doesn't automate it), the list of validation rules, custom type casts, whatever specifics your project has. None of it is new or technically challenging, it's just autocompleting stuff I was going to write anyway.

It's not that you're writing "too much" boilerplate; this is a tiny part of my work as well. This is just the one part where I've actually found an LLM useful. Any time I feel like "yeah this doesn't require thought, just needs doing", I chuck it over to an LLM to do.

Re: Aider: AI pair programming in your terminal

#105
post #4

Earlier quoted context omitted.

To be fair in a world of good LSP impls, grep/find are really primative tools to be using. Not saying this isn't better then a more sophisicated editor setup, just that grep and find are a _really_ low bar

When we reach that world, let me know. I'm still tripping over a "python-lsp-server was simply not implemented async so sometimes when you combine it with emacs lsp-mode it eats 100% CPU and locks your console" issue.

If emacs hard blocks on LSP requests, that may be on emacs as well. I recomemd you try ruff-lsp, although it does not iver everything and is more for linting, it's higb quality

Re: Aider: AI pair programming in your terminal

#106
These tools have the same problem as image or video generative AI does - it can maybe render individual parts accurately, but what is basically autocomplete cannot reason about the bigger picture. You glance at it, and it looks ok, but then you look closer, and it's riddled with issues.

Statistical prediction has its limitations - who knew.

Re: Aider: AI pair programming in your terminal

#107
post #97

Earlier quoted context omitted.

Personally the use for me has been in writing boilerplate. As an example, one of my ongoing goals has been to port all the view code of a project to another framework, following its idioms. Using an LLM, I can process a file in a couple of seconds, and checking that everything is right takes just a few seconds as well. It’d take me hours to go through every file manually, and it’d be prone to human error. It’s not te…

> Personally the use for me has been in writing boilerplate. We live in a world with everything from macro systems and code generation to higher-order functions and types... if you find yourself writing the same "boilerplate" enough times that you find it annoying, just automate it, the same way you can automate anything else we do using software. I have found myself writing very little "boilerplate" in my decades of…

I'd say that using LLMs to write boilerplate falls under "automation"

Re: Aider: AI pair programming in your terminal

#108

With all these AI tools requiring a prompt, does it really simplify/speed up things? From the example: I have to write "add a name param to the 'greeting' function, add all types", then wait for the result to be generated, read it carefully to be sure that it does what I want, probably reiterate if the result does not match the expectation. This seems to me more time consuming than actually do the work myself. Does a…

Generally, I agree. I have found it useful for writing SQL, mapping structs, converting from JSON to CSV, etc. i.e. repetitive stuff.

Re: Aider: AI pair programming in your terminal

#109

With all these AI tools requiring a prompt, does it really simplify/speed up things? From the example: I have to write "add a name param to the 'greeting' function, add all types", then wait for the result to be generated, read it carefully to be sure that it does what I want, probably reiterate if the result does not match the expectation. This seems to me more time consuming than actually do the work myself. Does a…

I use it as a glorified search engine and to read through bad documentation (arhm, AWS). but this only works for well documented solutions.

core programming hasn't really changed over the past years with good reason: you need. to. understand what you do. this is the bottleneck. not writing it.

Re: Aider: AI pair programming in your terminal

#110
post #102

Earlier quoted context omitted.

Personally the use for me has been in writing boilerplate. As an example, one of my ongoing goals has been to port all the view code of a project to another framework, following its idioms. Using an LLM, I can process a file in a couple of seconds, and checking that everything is right takes just a few seconds as well. It’d take me hours to go through every file manually, and it’d be prone to human error. It’s not te…

Call me a caveman but the lack of an option to use AI tools offline is a massive downside to me. I am connected to the internet most of the time but I take comfort in knowing that, for most of my work, I could lose my connection and not even notice

That's just not the reality anymore. You can run a decent open source coding language model on local hardware. Just needs a bit of work and it's not quite as seamless.
Post reply on HN