5 ms·
I think there is a 3rd mode "I know exactly what I want, I just need this thing to autocomplete 90%+ of it in one shot so I don't have to type it all". Like whe
by zamadatix 2y ago
I think there is a 3rd mode "I know exactly what I want, I just need this thing to autocomplete 90%+ of it in one shot so I don't have to type it all". Like when you're building out a class and you know it needs to have certain variations of constructor, certain types, certain public and private methods, certain ways to iterated and deep copy, certain ways to pretty print and build up the plumbing to tie those to the default printing methods of the language, and so on.
It's not really the "I don't care" mode as you care very much it matches specifically what you want to build out rather than "something which seems to work as a class if I paste it in". It's also not really "I want to learn something here" as you already know exactly what you want and you're not looking for it to deviate, you're just looking to have it appear a couple times faster than if you typed it out. This is, more or less, "I want faster autocomplete for this task" usage.
- OccamsMirror 2y agoI do this a lot for React components. I could type it all out myself but that would essentially be busy work. Nothing is being solved by the AI other than me having to do less typing. Once you start hoping the AI is going to solve your problems that is when you're asking for trouble.
- bluefirebrand 2y agoHow is describing it to the AI in detail any faster than writing it yourself, or copy + pasting from a template?
- mathieuh 2y agoIf you use something like Copilot a lot of the time you don’t explicitly have to tell it to do anything, you just start typing the signature and it autocompletes it. In my use I almost never use the conversation feature of Copilot, I’m just typing e.g. function signatures or the start of a for loop or switch statement etc.
- mercer 2y agotbh I can see even some benefit from just the need to think ahead and put it into 'regular' words, and then not having to type all the non-ergonomic markup-soup that isn't entirely avoidable. EDIT: On the least-spectacular end of things, I guess it would just be a template with enough magic to not need the inevitable adjustments.
- kazinator 2y agoBecause you have to first find the template, possibly not even knowing whether one exists. Turns out three exist: which one do you pick? Okay that one. What do we have to change in it? Oops something doesn't work: it seems to be out of date. Whom do I ask? AI combines the search for information with massaging it into the right form. Or sometimes just almost the right form, which is good enough. You just talk to it and it'll make a template for anything. Page templates with cascading style sheet? OK. Kernel driver? OK. Dockerfile? No problem. You literally you don't have to leave the same chat window.
- 3vidence 2y agoThis is how I use it for work and so far it's the main way I have found AI to actually improve productivity.
- torlok 2y agoCan you give an example? I never produced or worked on code that required me to routinely write boilerplate like this. The whole situation feels wrong.
- scotty79 2y agoJava's DTOs maybe?
- nicbou 2y agoUsually code that is straightforward but requires you to look up a few things in the standard library docs. For example error handling with fetch in JavaScript.
- joenot443 2y agoI'm waiting for one to compile as I type this comment. I'm working on a C++/ImGui/OpenGL FOSS application with lots of user-configurable state. I wanted to add to my existing top menubar a new dropdown which allow for managing options which are already defined in AudioSourceService and LayoutStateService. It took me about 10s to type out the prompt, much longer than it's taken me to type this comment. For posterity, the prompt was - "Add a new menu dropdown for Audio which has options for Start/Stop Analysis, a selector for Audio Source, and a toggle for Enable Ableton Link" Automatically included in the prompt were the entire bodies of the relevant .cpp files, maybe ~2000 lines in total. Produced were 25 lines of code which otherwise would have probably taken me ~2-5min to type. The code is effectively deterministic, I knew exactly what I wanted but decided to apply my finite mental battery in writing a prompt instead of those 25 lines. The code was instantly inserted into the file I already had open and has since built and run, doing exactly what I wanted. -- I think tools like Cursor are best employed for devs working on solo projects or for projects for which they already have a good mental model of the entire system and can ask for code which they're immediately able to validate the correctness of. I understand that many devs, perhaps yourself included, don't work on projects in which that'd be the case, so I definitely understand when one wouldn't find these tools useful. I also think they're best employed by people who find writing English very effortless. It's unusual for me to write code which I wouldn't faster be able to describe out loud to someone, I appreciate this isn't a trait all devs are blessed with. I've worked with plenty who would take longer writing a detailed description for a ticket than they would coding the PR itself. As with nearly every software tool, YMMV. Hope this has been helpful!
- wruza 2y agoThe fact that most of you didn’t have that before AI is, idk, crazy? There are shortcuts, snippets, :!ipc, ahk, etc. It took 25 years of the internet and a whole multi-trillion bubble to provide a boilerplate completion? Seriously? Editing 101. And then you hear “I don’t need Vim/Emacs/etc, I just use zero-config VSCode”. I guess that’s what one gets by not programming their programming environment. Imagine being a programmer and not automating your job for years. Digital Amish style.
- williamcotton 2y agoDo your snippets write this kind of boilerplate? https://github.com/williamcotton/webdsl/commit/34862739f6fe9866d0fe215768c23ef24a543c74 https://github.com/williamcotton/webdsl/commit/34862739f6fe9... I may have tweaked a couple of things in that (and refactored a hell of a lot since) but here's a Python script that I definitely did not write a single line of code: https://github.com/williamcotton/webdsl/blob/main/tools/generate_embedded_scripts.py https://github.com/williamcotton/webdsl/blob/main/tools/gene... Embedding things into C is nothing new of course but I spent about 45 seconds getting the solution I needed: https://github.com/williamcotton/webdsl/blob/main/src/server/generated_scripts.c https://github.com/williamcotton/webdsl/blob/main/src/server... All of this is just boilerplate. I spent most of my mental energies with this project on the grammar, the memory architecture, and fitting all of the pieces together. Cursor and Claude did most of the typing. Keep in mind I'm iterating over the grammar and making rather large changes in the runtime all the while: https://github.com/williamcotton/webdsl/commit/54efbb50c2e9549150a2b8aaa2d2743a41d225aa https://github.com/williamcotton/webdsl/commit/54efbb50c2e95... FWIW, pipelines ended up being implemented like this: https://github.com/williamcotton/webdsl/blob/main/src/server/pipeline_executor.c https://github.com/williamcotton/webdsl/blob/main/src/server... And used in this very simple example like: website { port 3445 database "postgresql://localhost/express-test" api { route "/api/v1/team" method "GET" pipeline { jq { { sqlParams: [.query.id] } } sql { SELECT * FROM teams WHERE id = $1 } jq { { data: (.data[0].rows | map({id: .id, name: .name})) } } } } }
- wruza 2y ago
- sandruso 2y agoI agree that there are moments where the AI "read your mind". Where everything aligns perfectly. I had couple of these and that was magical.