Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Can 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.


I'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!


You must be a Lisp programmer then, because across all the many languages I've worked with so far, all but Common Lisp had a bad ratio - way above 50% - of annoying boilerplate and decorations to code that means something (and with Lisp you beat it only when you start using meta-programming facilities extensively, which is frowned upon in projects that have more than 2 people working on them).

You can solve some of the issues with snippets, but once your snippets start looking like tiny scripts it stops being funny.


I am in this use case bucket for things I do not care to frequently use enough to properly learn - e.g. infrastructure tooling (k8s, docker, etc), bash scripts, SPA frameworks, etc. I know the outcome I want, I know where reading the docs has gotten me nowhere, so I just need to hash it out with an oracle that has better memory of these resources.


Usually 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.


Java's DTOs maybe?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: