Live data from Hacker News

An example of LLM prompting for programming

martinfowler.com

251–260 of 297 posts

Re: An example of LLM prompting for programming

#251
post #202

Earlier quoted context omitted.

I am supposedly on GPT4 via GPT+. I try using it for boilerplatey things, like terraform, and the results are simply incorrect. It seems more helpful in providing examples, even for some far more complex tech - like rust code.

Does it say GPT-4 at the top of the screen?

It does. One example of incorrect TF got produced is splitting the dynamo table, and it's gsi into two distinct resources

Re: An example of LLM prompting for programming

#252
post #37

Earlier quoted context omitted.

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/

I still think the basic idea of Cucumber and similar tools is sound. It just doesn't match how 99% of companies operate. On the other hand, many developers write shitty tests where it's absolutely unclear what the test is even trying to achieve, so trying to find some sort of framework which tries to forcibly decouple the what of the test from the how maybe isn't the worst idea.

That's exactly what I tried to do with this framework:

https://github.com/hitchdev/examples

Rather than trying to force your testers and stakeholders to adapt to the DSL, the templated story->documentation generation lets the dev or tester adapt the DSL to whatever the stakeholders want to see while keeping the story strictly about behavior.

Re: An example of LLM prompting for programming

#253
post #198
post #79

Earlier quoted context omitted.

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 the…

Industrialization has made farming tools incredibly complex, so I believe the statement "farmers' jobs were safe because farmers can use farming tools" is correct. You still need a farmer to farm, but you now need less manpower to farm. The specialist is secure while the untrained laborer is at risk.

And yet, despite there being more complex machinery in farming there is also much more untrained labor. People just don’t notice it because the untrained labor (millions of people) that plant and harvest are an underclass that does not speak their language or associate with them.

Re: An example of LLM prompting for programming

#254

Earlier quoted context omitted.

The problem is that it's not quite code. It's almost code, but without the precision, which puts it into a sort of Uncanny Valley of code-ness. It's detailed instructions for someone to write code, but the someone in this case is an alien or insane or on drugs so they might interpret it the way you meant it or they might go off on some weird tangent. You never know, and that means you'll need to check it with almost…

I think often of the adage "it's harder to read code than write it". GPT gives you a lot to read. definitely a better consultant than coder imo. I've also had GPT write entirely false things, then I say "isn't that false?" and it says, "yes sorry about that" . very uncanny

And the code that GPT does write, if it is even close to correct, must be code that exists in many places already, and usually (like the case of so much react code) doesn’t need to exist at all.

Re: An example of LLM prompting for programming

#255

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…

Yeah, I think there's a "stone soup" effect going on with AI. It's the same sort of thing you see happening with the customers of psychics. People often have poor awareness of how much they're putting in to a conversation. Or it's a bit like the way Tom Sawyer tricks other kids into painting the fence for him. For me a lot of the magic here is in knowing what questions to ask and when the answers aren't right. If you…

One strange coincidence with the emergence of ChatGPT is that at almost the exact same time, Google became practically unusable as a search engine. Like at least an order of magnitude worse.

People used to use Google the same way they use ChatGPT. They would ask a question in plain English, and get sent back a list of relevant links to blog posts, articles, stack overflow, or whatever that had answers to their questions, including example code.

Sometimes that code or information was outdated or completely wrong and sometimes it was too basic to be useful, or just the code-generated docs.

Google has been getting gradually worse over the years due to spam, algorithm gaming, and ads, but circa late November 2022 it became practically worthless.

Re: An example of LLM prompting for programming

#256
If you look at what the prompter had to know in order to get a useful output you can see how far away we are from replacing that individual with a business stakeholder.

That’s why I view these tools as “productivity enhancements” rather than a straight replacement of a job. In some cases maybe, but not for coders just yet…

I think the most underrated and useful parts of this process is the ability to get going.

For me the starting energy of a project is the thing that blocks me. With chatgpt, it’s a simple prompt to get the conversation going. Once in motion I can put the puzzle pieces together while chatgpt can help me keep momentum

Re: An example of LLM prompting for programming

#257

Earlier quoted context omitted.

To answer your question with a question if I may -- when did productivity increase in software ever result in headcount reduction? The competition also will have similar productivity gain.

There used to be a profession called "typist" where a skilled person would type up your dictation quickly and without wasting sheets of paper from typewriter error. Now it's all software There used to be mailrooms filled with people sorting and delivering physical envelopes. Now it's all software.

You are right. Sorry, i meant headcount of software staff.

Re: An example of LLM prompting for programming

#258

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.

I think English as a spec actually makes the barrier of entry higher, not lower. Code itself is far easier to understand than an English description of the code. To understand an English description of code you already have to have a deeper understanding of what the code is doing. For code itself you can reference the syntax to understand what's going on. The prompt in this case is using very technical language that…

Exactly. So much that often with a tricky problem or discussion, I ask the person to sit down with me and just code the most relevant parts without implementation, just the type signatures.

That is so much more productive because it immediately removes or highlights all the ambiguity which you can sugar coat with English but not in a programming language.

Re: An example of LLM prompting for programming

#260
post #237

Earlier quoted context omitted.

The difference is that folks had an incentive to make their pages easily indexable: drive page views. With becoming training data the incentive to the creators is a little less clear

Yea right now sure. Later, there will be a clear incentive. Or not, if AI fails to become useful.

look the condition of artists, haha :(
Post reply on HN