Live data from Hacker News

Tips for programmers to stay ahead of generative AI

spectrum.ieee.org

151–160 of 319 posts

Re: Tips for programmers to stay ahead of generative AI

#153
post #17

Earlier quoted context omitted.

These things are a matter of writing a correct prompt. Like "use this and that naming convention for variables and keep this and that style". You can also ask it to write tests for the code so you can verify it is working or add your own additional tests. Even if the produced code is wrong, it usually takes a few steps to correct it and still saves time. It is an amazing tool and time saver if you know what you are d…

The question is, do you actually save time by coaxing the language model into an answer or would you just save time by writing it yourself? I have this friend who gets obsessed with things very easily and ChatGPT got to him quite a bit. He spent about two months perfecting his AI persona and starts every chat with several hundred words of directions before asking any questions. I find that this also produces the wron…

For me it saves time by keeping my momentum up. I don’t lean on it when I’m in a flow state and cruising through the code I’m writing but as soon as I hit a wall I jump over to chat and start working on a solution with it. This saves a huge amount of time that would otherwise be spent banging my head against the keyboard or googling or reading random SO posts and dev blogs and documentation or even just the time wasted when I get frustrated enough to stop working on the problem and wind up browsing hn.

Re: Tips for programmers to stay ahead of generative AI

#154

Is programming even the hard part about programming? In all seriousness, what we would really need from an AI to start really saving me time would be for it to interview all the customers/partners involved on the project, determine the scope of function needed, boil all that down to a set of sensible domain models that make sense to everyone, identify where/when messages need to be passed, determine which things can…

i'm honestly not worried at all about LLMs because most of my jobs have consisted of fixing problems in other peoples' code, and i haven't seen any evidence that an LLM will be capable of doing that on a non-trivial program any time in the near future. I have, however, seen evidence that chatgpt will create many more problems and make my job harder.

> i haven't seen any evidence that an LLM will be capable of doing that on a non-trivial program any time in the near future

Or ever, given that the level of abstraction LLMs work at is completely wrong. They can approximate the syntax of things in their training corpus, but logic? The lights are off and nobody's home.

Re: Tips for programmers to stay ahead of generative AI

#155

Earlier quoted context omitted.

>Craftmanship is a virtue, not a vice. Exactly, ultimately we are craftsmen , not artisans. They are two very distinct things. The difference being that the value of our output is directly tied to its' functional utility, not any sense of aesthetic or artistic expression. You can take pride in the means used to achieve an end, but they ultimately must be superseded by more efficient techniques or you just become an a…

Craftsmen are individual contributors. When you coordinate others, you're no longer an IC, you're a foreman, a boss. Coding with LLMs is about managing the contributions of other ICs. It's no different from coordinating low-level human coders who simply implement the design that was given them. If that's the kind of 'craftsmanship' you enjoy, great. To me, this new model of 'bionic coding' feels a lot like factory wo…

Not everyone can be a software architect or technical lead, though. Is the pyramid going to grow as AI pushes the base abstraction of work higher?

Re: Tips for programmers to stay ahead of generative AI

#156
post #143

Earlier quoted context omitted.

This is what makes me nervous. Is it not bad to be generating stuff you don’t understand that _might_ work?

Most of the complex regexes I write fall into the category of stuff I don’t understand that might work. I’m no slouch at regexes either but when you start trying to do weird data processing stuff that handles all kinds of edge cases the wheels really come off quick.

...and that's where you stop using regexes exclusively and start using better parsing techniques.

Re: Tips for programmers to stay ahead of generative AI

#157
post #15

I use LLM-based autocomplete in my IDE, and it’s not taking away my job unless/until it improves by multiple orders of magnitude. It’s good at filling in boilerplate, but even for that I have to carefully check its output because it can make little errors even when I feel like what I want should be obvious. The article is absolutely correct in saying you have to be critical of its output. I would say it improves my p…

I agree with 5%. That said, I've found rubber duck debugging to be an exceptionally effective use case for ChatGPT. Often it will surprise me by pinpointing the solution outright, but I'll always be making progress by clarifying my own thinking.

Fascinating! Can I ask how you use ChatGPT for debugging? are the bugs you've used it with more high level, "this is what's happening" kind of things? Or could you give an example?

Re: Tips for programmers to stay ahead of generative AI

#158

Earlier quoted context omitted.

The thing is the hallucinations, I also wasted few hours trying to work on solutions with GPT where it just kept making up parameters and random functions.

It referenced a made up a function I needed (that should probably exist lol) in BrightScript, the letdown after realizing as much was painful.

This has happened to me with Django/DRF twice. I've just accepted that it's more efficient to read and internalize the documentation.

Re: Tips for programmers to stay ahead of generative AI

#159
post #95
post #84

Earlier quoted context omitted.

The hype around AI coding assistants has recently inspired me to improve my efficiency in writing code. I started using NeoVim instead of vim to get access to LSP, for autocomplete. I’ve found it actually slows me down because I can type nearly anything faster than the LSP can synthesize a response and I’m able to visually process the options, select one, and input it into the computer. I’ve never compared against an…

An AI coding assistant is different, it will write an entire loop, including the body, with proper guards, and so on, in 1-2 seconds.

Maybe... or maybe it's got the same off-by-one error from the StackOverflow answer it's parrotting?

Re: Tips for programmers to stay ahead of generative AI

#160

Is programming even the hard part about programming? In all seriousness, what we would really need from an AI to start really saving me time would be for it to interview all the customers/partners involved on the project, determine the scope of function needed, boil all that down to a set of sensible domain models that make sense to everyone, identify where/when messages need to be passed, determine which things can…

> the code can almost write itself

My 2c: I've been an eng for around 15 yrs. I semi-recently had a brain injury so haven't been able to dedicate anywhere near as much mental cognition to programming recently. That's why I've been unable to maintain full-time work.

I started using chatgpt around 3 months ago. Initially skeptical, I started giving it fun and weird logical/semantic puzzles to satisfyingly "prove" my intuition that it was insufficient to solve any true problems (and that we humans are still needed!). However, I soon became humbled to its capabilities. There are many many things it cannot do, but I've been amazed at the things it can do if given nuanced and detailed enough prompts. I've realised that, if I prompt it well enough, and use my existing knowledge from those accrued 15yrs, I can get awesome results. I'm working on a small project right now and it's written about ~70% of the code. I've had to make various corrections along the way, but I've found that I can focus on content and larger 'macro' domain logic than annoying (tho intriguing) procedural coding.

It's been so incredibly empowering and freeing to be able to dedicate more brain to _what_ I want to build instead of _how_ I want to build it. My normal build process is now something like this:

- state problem and what you desire, with good specificity

- [optional] give it your current working code, specifying frameworks, rough file structure

- confirm it understands and clarify/correct it if necessary

- [important] ask it to ask _you_ questions for clarification

- ask it for an overview of how it would solve the problem

- (for big tasks, expect a macro rundown)

- (for small tasks, expect or ask for the actual code)

- [important] make specific requests about lang/module/algorithms

- [important] ask it to write test suites to prove its code works and paste in any errors or assertion failures you encounter. It'll surprise you with its advice.

It doesn't replace my need to code, but OMG it makes it so much less burdensome and I'm learning a tonne as well : )

Post reply on HN