Live data from Hacker News

An example of LLM prompting for programming

martinfowler.com

71–80 of 297 posts

Re: An example of LLM prompting for programming

#71
post #37
post #33

Earlier quoted context omitted.

> It's almost like a refined version of cucumber with syntax that is slightly more forgiving. I don't know if "cucumber" is autocorrupt or an actual non-vegetable thing; can you clarify?

Not a typo.[0] In the 00s/early 10s, software went through a fad phase where people earnestly thought that by implementing Gherkin frameworks like Cucumber, you'd be able to hand off writing tests to "business people" in "plain English." It went about as well as you'd expect. [0] https://cucumber.io/docs/gherkin/

Thanks!

Despite that period being when I finished my Software Engineering degree, got my first job, and then attempted self-employment, I'd never heard of it before.

Looking at the book titles — "Cucumber Recipes" in particular — even if I had encountered it, I might have assumed the whole thing was a joke.

Re: An example of LLM prompting for programming

#72
post #64

If somebody thinks an LLM is coming for everybody's coding job, I'd say this article is a great counterpoint just for existing. You could tell someone from decades ago that we now use a very high level language for complex tasks in complex code ecosystems, never even mention AI, explain that the parser is really generalist-biased, and this article would make perfect sense as an example of exemplary code by a modern c…

‘Artists' jobs are safe because AI is bad at hands.’

Artists' jobs are safe in part because they can also use AI, and most already use relevant ecosystems that now incorporate AI.

Consumers who can operate AI for clip art purposes are simply still part of the same non-artist-paying demographic they always were.

Same with code

Re: An example of LLM prompting for programming

#73
post #56

Earlier quoted context omitted.

> Copilot is much better for someone actually writing code I haven't used copilot yet, but I'm using occasionally chatgpt with prompts such as "write a bash/python script take takes these parameters and perform this tasks". Then I iterate if needed, and usually, i can get what i want faster than without using chatgpt. It's not a game changer, but it's a performance boost. How natural language is a distraction here? a…

Try not using natural language and just type what you'd type into Google. You'll get the same results and realize that all of the natural language fluff is totally unnecessary. I just typed in "bash script recursive chmod 777 all files" (as a dumb toy example) and got a resulting script back. It was surrounded by two natural language GPT comments: > It's generally not recommended to give all files and directories the…

you can always include the instruction to only return the code and no other text

Re: An example of LLM prompting for programming

#74
post #55

Earlier quoted context omitted.

I've noticed that after using copilot on a code base for a while, you can effectively prompt the AI just by creating a descriptive comment. // This function ends the call by sending a disconnection message to all connected peers Bam, copilot will recommend at least the first line, with subsequent lines usually being pretty good, and more and more frequently, it will recommend the whole function. I still use GPT-4 a l…

Copilot is a game-changer and very underrated IMO. GPT4 is smart but not really used in production yet. Copilot is reportedly generating 50% of new code and I can't imagine going without it.

Where do you get that 50% number? Do you mean 50% of all new code in the industry? That seems beyond extremely unlikely.

Re: An example of LLM prompting for programming

#75
This got me wondering about best techniques for integrating LLM code assistants into day-to-day software development, and hence Ask HN: What is your GitHub Copilot (code LLM assistant) workflow?

Please share your experience here: https://news.ycombinator.com/item?id=35613576

I'd like to learn what is working and useful.

Re: An example of LLM prompting for programming

#76
post #56

Earlier quoted context omitted.

Try not using natural language and just type what you'd type into Google. You'll get the same results and realize that all of the natural language fluff is totally unnecessary. I just typed in "bash script recursive chmod 777 all files" (as a dumb toy example) and got a resulting script back. It was surrounded by two natural language GPT comments: > It's generally not recommended to give all files and directories the…

you can always include the instruction to only return the code and no other text

Sure, but I want a system built for coding that does that by default... like Copilot.

Re: An example of LLM prompting for programming

#77

Earlier quoted context omitted.

Copilot is a game-changer and very underrated IMO. GPT4 is smart but not really used in production yet. Copilot is reportedly generating 50% of new code and I can't imagine going without it.

Where do you get that 50% number? Do you mean 50% of all new code in the industry? That seems beyond extremely unlikely.

(I read it as 50% of their code)

Re: An example of LLM prompting for programming

#79
post #64

Earlier quoted context omitted.

‘Artists' jobs are safe because AI is bad at hands.’

Artists' jobs are safe in part because they can also use AI, and most already use relevant ecosystems that now incorporate AI. Consumers who can operate AI for clip art purposes are simply still part of the same non-artist-paying demographic they always were. Same with code

As farmers' jobs were safe because farmers can use farming tools.

These arguments don't track even vaguely. You are doing the equivalent of analyzing the future of solar power by assuming solar will cost the same in 10 years as it does today, and that each new watt of solar is matched 1:1 with new units of demand. Neither of these are sensible.

It may be that ML code tools never displace many people, or even that they supercharge demand, but you don't get to justified conclusions by assuming the future is just the present but with a bigger UNIX timestamp.

Re: An example of LLM prompting for programming

#80

Earlier quoted context omitted.

The opposite might be true, and here’s why - 1) by using English as spec, the barrier of entry has gone lower, 2) LLMs can also write prompts and self introspect to debug.

> LLMs can also write prompts and self introspect to debug. Why should we assume that won't lead to a rabbit hole of misunderstanding or outright hallucination? If it doesn't know what "correct" really is, even infinite levels of supervision and reinforcement might still be toward an incorrect goal.

It’s like when you continually refine a Midjourney image. At first refining it gets better results, but if you keep going the pictures start coming out…really weird. It’s up to the human to figure out when to stop using some sort of external measure of aesthetics.
Post reply on HN