Hacker News new | ask | show | jobs
by dingnuts 507 days ago
as a heavy user of vim motions and macros I'm thinking this is one reason I've not found AI code generation terribly useful.

Yes, it's good at boilerplate. But I've spent a long time getting good at vim macros and I'm also very good at generating boilerplate with a tiny number of keystrokes, quickly and without leaving my editor

...

or I could type a paragraph to an LLM and copy paste and then edit the parts it gets wrong? also I have to pay per token to do that?

no..

1 comments

> or I could type a paragraph to an LLM and copy paste and then edit the parts it gets wrong?

I think there's something you're missing in their description. They're not asking a model to do anything, it's automatically running and then suggests what should come next.

Also in editors like cursor I can ask for a change directly in the editor and be presented with an inline diff to accept/reject.

I don’t know if you’re a vim user, but what makes people like vim is that once you master it, it’s not about typing and deleting characters. It’s about text manipulation, but live instead of typing an awk or sed script. It’s like when driving a car, you don’t think about each steps like watching the speedometer, verifying the exact pressure on the gas and brakes, and the angle of the steering wheel. You just have a global awareness and just drive it where you want to go.

It’s the same with Vim. I want something done and it is. I can barely remind how I did it, because it does not matter. Something like duplicate the current function, change the name of the parameter and update the query as well as some symbols, can be done quickly as soon as the plan to do so appears. And it’s mostly in automatic mode.

Yes, and this isn't the same.

It's a tradition to torture car analogies so let me do so, this is more like when you start to say goodbye to people at a party your car identifies the pattern and warms up, opens the door as you walk to it and then drives you home. If you sit and take the wheel to drive towards a hotel you booked nearby it spots that and starts doing that for you.

> Something like duplicate the current function, change the name of the parameter and update the query as well as some symbols, can be done quickly as soon as the plan to do so appears. And it’s mostly in automatic mode.

And with these things I might move the cursor to where I want to put the new function, and then it's just immediately suggested for me. One key press and it's done. Then it suggests the other two based on the type definition somewhere else.

Obviously this is the happy path.

Let's continue torturing the poor car. It'd be great if it works that way, but what I fears is when the AI chauffeur decide on a route that appears to go where I want, but instead it's a dead end, and you don't know the exact intersection for the correct path. Or it take a long sinuous dirt road ignoring the highway. Or it sends me off a cliff because it assumes it's piloting a plane. To manage those risks, you have to keep your hand on the steering wheel and know the route beforehand. In this case, I would prefer a GPS map and have something that is a bit less fragile.

I don't mind writing code, and if it become boilerplatey, it's a good time to rethink those abstractions or write a few functions. And there's snippets for shorter sections.