Live data from Hacker News

How I write software with LLMs

stavros.io

81–90 of 544 posts

Re: How I write software with LLMs

#81

Earlier quoted context omitted.

Because some people like to be polite? Is it this hard to understand? Your hand-written prompts are unlikely to take significant chunk of context window anyway.

Polite to whom?

I think it is easier to be polite always and not switch between polite and non-polite mode depending on who you are talking to.

Re: How I write software with LLMs

#82

In the plethora of all these articles that explain the process of building projects with LLMs, one thing I never understood it why the authors seem to write the prompts as if talking to a human that cares how good their grammar or syntax is, e.g.: > I'd like to add email support to this bot. Let's think through how we would do this. and I'm not not even talking about the usage of "please" or "thanks" (which this part…

I prompt politely for two reasons: I suspect it makes the model less likely to spiral (but have no hard evidence either way), and I think it's just good to keep up the habit for when I talk to real people.

Re: How I write software with LLMs

#83

In the plethora of all these articles that explain the process of building projects with LLMs, one thing I never understood it why the authors seem to write the prompts as if talking to a human that cares how good their grammar or syntax is, e.g.: > I'd like to add email support to this bot. Let's think through how we would do this. and I'm not not even talking about the usage of "please" or "thanks" (which this part…

The reasoning is by being polite the LLM is more likely to stay on a professional path: at its core a LLM try to make your prompt coherent with its training set, and a polite prompt + its answer will score higher (gives better result) than a prompt that is out of place with the answer. I understand to some people it could feel like anthropomorphising and could turn them off but to me it's purely about engineering.

Edit: wording

Re: How I write software with LLMs

#84
post #81

Earlier quoted context omitted.

Polite to whom?

I think it is easier to be polite always and not switch between polite and non-polite mode depending on who you are talking to.

I get what you're saying, but I'm not talking about swearing at the model or anything, I'm only implying that investing energy in formulating a syntactically nice sentence doesn't or shouldn't bring any value, and that I don't care if I hurt the model's feelings (it doesn't have any).

Note, why would the author write "Email will arrive from a webhook, yes." instead of "yy webhook"? In the second case I wouldn't be impolite either, I might reply like this in an IM to a colleague I work with every day.

Re: How I write software with LLMs

#85
post #81

Earlier quoted context omitted.

Polite to whom?

I think it is easier to be polite always and not switch between polite and non-polite mode depending on who you are talking to.

I believe it's less about politeness and more about pronouns. You used `who`, whereas I would use `what` in that sentence.

In my world view, a LLM is far closer to a fridge than the androids of the movies, let alone human beings. So it's about as pointless being polite to it as is greeting your fridge when you walk into the kitchen.

But I know that others feel different, treating the ability to generate coherent responses as indication of the "divine spark".

Re: How I write software with LLMs

#86
> Before that, code would quickly devolve into unmaintainability after two or three days of programming, but now I’ve been working on a few projects for weeks non-stop, growing to tens of thousands of useful lines of code, with each change being as reliable as the first one.

I'm glad it works for the author, I just don't believe that "each change being as reliable as the first one" is true.

> I no longer need to know how to write code correctly at all, but it’s now massively more important to understand how to architect a system correctly, and how to make the right choices to make something usable.

I agree that knowing the syntax is less important now, but I don't see how the latter claim has changed with the advent of LLMs at all?

> On projects where I have no understanding of the underlying technology (e.g. mobile apps), the code still quickly becomes a mess of bad choices. However, on projects where I know the technologies used well (e.g. backend apps, though not necessarily in Python), this hasn’t happened yet, even at tens of thousands of SLoC. Most of that must be because the models are getting better, but I think that a lot of it is also because I’ve improved my way of working with the models.

I think the author is contradicting himself here. Programs written by an LLM in a domain he is not knowledgable about are a mess. Programs written by an LLM in a domain he is knowledgeable about are not a mess. He claims the latter is mostly true because LLMs are so good???

My take after spending ~2 weeks working with Claude full time writing Rust:

- Very good for language level concepts: syntax, how features work, how features compose, what the limitations are, correcting my wrong usage of all of the above, educating me on these things

- Very good as an assistant to talk things through, point out gaps in the design, suggest different ways to architect a solution, suggest libraries etc.

- Good at generating code, that looks great at the first glance, but has many unexplained assumptions and gaps

- Despite lack of access to the compiler (Opus 4.6 via Web), most of the time code compiles or there are trivially fixable issues before it gets to compile

- Has a hard to explain fixation on doing things a certain way, e.g. always wants to use panics on errors (panic!, unreachable!, .expect etc) or wants to do type erasure with Box as if that was the most idiomatic and desirable way of doing things

- I ended up getting some stuff done, but it was very frustrating and intellectually draining

- The only way I see to get things done to a good standard is to continuously push the model to go deeper and deeper regarding very specific things. "Get x done" and variations of that idea will inevitably lead to stuff that looks nice, but doesn't work.

So... imo it is a new generation compiler + code gen tool, that understands human language. It's pretty great and at the same time it tires me in ways I find hard to explain. If professional programming going forward would mean just talking to a model all day every day, I probably would look for other career options.

Re: How I write software with LLMs

#87

In the plethora of all these articles that explain the process of building projects with LLMs, one thing I never understood it why the authors seem to write the prompts as if talking to a human that cares how good their grammar or syntax is, e.g.: > I'd like to add email support to this bot. Let's think through how we would do this. and I'm not not even talking about the usage of "please" or "thanks" (which this part…

Some people are just polite by nature & habits are hard to break

Re: How I write software with LLMs

#88

In the plethora of all these articles that explain the process of building projects with LLMs, one thing I never understood it why the authors seem to write the prompts as if talking to a human that cares how good their grammar or syntax is, e.g.: > I'd like to add email support to this bot. Let's think through how we would do this. and I'm not not even talking about the usage of "please" or "thanks" (which this part…

The reasoning is by being polite the LLM is more likely to stay on a professional path: at its core a LLM try to make your prompt coherent with its training set, and a polite prompt + its answer will score higher (gives better result) than a prompt that is out of place with the answer. I understand to some people it could feel like anthropomorphising and could turn them off but to me it's purely about engineering. Ed…

> If the result of your prompt + its answer it's more likely to score higher i.e. gives better result that a prompt that feels out of place with the answer

Sure seems like this could be the case with the structure of the prompt, but what about capitalizing the first letter of sentence, or adding commas, tag questions etc? They seem like semantics that will not play any role at the end

Re: How I write software with LLMs

#89

In the plethora of all these articles that explain the process of building projects with LLMs, one thing I never understood it why the authors seem to write the prompts as if talking to a human that cares how good their grammar or syntax is, e.g.: > I'd like to add email support to this bot. Let's think through how we would do this. and I'm not not even talking about the usage of "please" or "thanks" (which this part…

The reasoning is by being polite the LLM is more likely to stay on a professional path: at its core a LLM try to make your prompt coherent with its training set, and a polite prompt + its answer will score higher (gives better result) than a prompt that is out of place with the answer. I understand to some people it could feel like anthropomorphising and could turn them off but to me it's purely about engineering. Ed…

I remember studies that showed that being mean with the LLM got better answers, but by the other hand I also remember an study showing that maximizing bug-related parameters ended up with meaner/malignant LLMs.

Re: How I write software with LLMs

#90

In the plethora of all these articles that explain the process of building projects with LLMs, one thing I never understood it why the authors seem to write the prompts as if talking to a human that cares how good their grammar or syntax is, e.g.: > I'd like to add email support to this bot. Let's think through how we would do this. and I'm not not even talking about the usage of "please" or "thanks" (which this part…

agree, prompting a token predictor like you’re talking to a person is counterproductive and I too wish it would stop

the models consistently spew slop when one does it, I have no idea where positive reinforcement for that behavior is coming from

Post reply on HN