Live data from Hacker News

How I program with LLMs

crawshaw.io

301–310 of 342 posts

Re: How I program with LLMs

#301

Earlier quoted context omitted.

Yeah, it sucks. LLMs are not great with a big context yet. I hope that is being worked on. I need the LLM to read my whole project AND optimally all related slack conversations, the wiki and related libraries.

Then what will you do?

I can for example tell it to refactor things. It would have to write files of course. E.g. "Add retries with exponential backoffs to all calls to service X"

Re: How I program with LLMs

#302

Earlier quoted context omitted.

I have also many years of programming experience and find myself strongly "accelerated" by LLMs when writing code. But, if you think at it, it makes sense that many seasoned programmers are using LLMs better. LLMs are a helpful tool, but also a hard-to-use tool, and in general it's fair to think that better programmers can do a better use of some assistant (human or otherwise): better understanding its strengths, ide…

> "seasoned programmers are using LLMs better". I do not remember a single instance when code provided to me by an LLM worked at all. Even if I ask something small that cand be done in 4-5 lines of code is always broken. From a fellow "seasoned" programmer to another: how the hell do you write the prompts to get back correct working code?

I write the prompt as if I’m writing an email to a subordinate that clearly specifies what the code needs to do.

If what I’m requesting an improvement to an existing code, I paste the whole code if practical, or if not, as much of the code as possible, as context before making request for additional functionality.

Often these days I add something like “preserve all currently existing functionality.” Weirdly, as the models have gotten smarter, they have also gotten more prone to delete stuff they view as unnecessary to the task at hand.

If what I’m doing is complex (a subjective judgement) I ask it to lay out a plan for the intended code before starting, giving me a chance to give it a thumbs up or clarify its understanding of what I’m asking for if it’s plan is off base.

Re: How I program with LLMs

#303
post #165

Earlier quoted context omitted.

If you don't understand what the generic is doing, there might be edge-cases you don't appreciate. I think Typescript types are fairly non-essential so it doesn't really matter, but for more important business logic it definitely can make a difference.

I understand what it's doing, and could easily set out the cases I needed.

If you understand what it is doing, you could do it yourself, surely?

Re: How I program with LLMs

#304
post #89

Earlier quoted context omitted.

You can also run Llama 405B and the latest (huge) DeepSeek on your own hardware and get LLMs that trade blows with Claude and ChatGPT, while being fully isolated and offline if needed.

With Amazon Bedrock you can get an isolated serverless Claude or llama with a few clicks

True, but if your org is super paranoid about data exfiltration you're probably not sending it to AWS either.

Re: How I program with LLMs

#305

Earlier quoted context omitted.

I believe it’s more that people hate trying new tools because they’ve already made their choice and made it their identity. However, there are also people who love everything new and jump onto the latest hype too. They try new things but then immediately advocate it without merit. Where are the sane people in the middle?

As an experienced software developer, I paid for ChatGPT for a couple of months, I trialed Gemini Pro for a couple of months, and I've used the current version of Claude. I'd be happy if LLMs could produce working code as often and as quickly as the evangelist claim, but whenever I try to use LLM to work on my day to day tasks, I almost always walk away frustrated and disappointed - and most of my work is boring on t…

Totally respect your position, given that you actually tried the tool and found it didn't work for you. That said, one valid explanation is that the tool isn't good for what you're trying to achieve. But an alternative explanation is that you haven't learned how to use the tool effectively.

You seem open to this possibility, since you ask:

> I've never actually seen any LLM-driven developers work in real time. Are there any live coding channels that could convince the skeptics what we're missing out on something revolutionary?

I don't know many yet, but Steve Yegge, a fairly famous developer in his own right, has been talking about this for the last few months, and has walked a few people through his "Chat Oriented Programming" (CHOP) ideas. I believe if you search for that phrase, you'll find a few videos, some from him and some from others. Can't guarantee they're all quality videos, though anything Steve himself does is interesting, IMO.

Re: How I program with LLMs

#306
post #198

Earlier quoted context omitted.

Those are risks both for the individual and for the company when there are contracts in place with third parties involving code sharing. Other risks include leaking industrial secrets that may significantly damage company business or benefit competitors.

Please acknowledge that your situation is pretty unique. Just take a look at the comments: how many people say, or outright presume, that their company's code is already on GitHub? I'd wager that your org doesn't keep code at a 3rd party provider, right? Then, you're in a minority. I don't mean to dismiss your concerns - in your situation, they are probably warranted - I just wanted to say that they are unique and no…

This subthread started with someone from a no AI policy company, people are dismissing it with snarky comments, along the line of your code is not as important as you believe. I'm just trying to show a different picture, we work in a pretty vast field and people commenting here don't necessarily represent a valid sample.

Re: How I program with LLMs

#307

Earlier quoted context omitted.

>every type of information you want is in them Actually, I'm afraid that no. It won't give us the step by step scalable processes to make humanity as a whole enter in a loop of indefinitely long period of world peace, with each of us enjoying life in its own thriving manner. That would be great information to broadcast, though. Also it equally has ability to produce large pile of completely delusional answers, that m…

After a small prompt engineering: https://0bin.net/paste/zolMrjVz#dgZrZzKU-PlxdkJTdG0pZU9bsCM3...

Interesting, thanks for sharing. Could you also give some insights on the process you followed?

Re: How I program with LLMs

#308
post #306

Earlier quoted context omitted.

Please acknowledge that your situation is pretty unique. Just take a look at the comments: how many people say, or outright presume, that their company's code is already on GitHub? I'd wager that your org doesn't keep code at a 3rd party provider, right? Then, you're in a minority. I don't mean to dismiss your concerns - in your situation, they are probably warranted - I just wanted to say that they are unique and no…

This subthread started with someone from a no AI policy company, people are dismissing it with snarky comments, along the line of your code is not as important as you believe. I'm just trying to show a different picture, we work in a pretty vast field and people commenting here don't necessarily represent a valid sample.

> people are dismissing it with snarky comments, along the line of your code is not as important as you believe.

That says more about those people than about your/OP's code :)

Personally, I had a few collisions with regulation and compliance over the years, so I can appreciate the completely different mindset you need when working with them. On the other hand, at my current position, not only do we have everything on Github, but there were also instances where I was tasked with mirroring everything to bitbucket! (For code escrow... i.e., if we go out of business, our customer will get access to the mirrored code.)

> people commenting here don't necessarily represent a valid sample.

Right. I should have said that you're in the minority here. I'm not sure what's the ratio of dumb CRUD apps to "serious business" kind of development in the wild. I know there are whole programming subfields where your kinds of concerns are typical. They might just be underrepresented here.

Re: How I program with LLMs

#309
post #306

Earlier quoted context omitted.

This subthread started with someone from a no AI policy company, people are dismissing it with snarky comments, along the line of your code is not as important as you believe. I'm just trying to show a different picture, we work in a pretty vast field and people commenting here don't necessarily represent a valid sample.

> people are dismissing it with snarky comments, along the line of your code is not as important as you believe. That says more about those people than about your/OP's code :) Personally, I had a few collisions with regulation and compliance over the years, so I can appreciate the completely different mindset you need when working with them. On the other hand, at my current position, not only do we have everything on…

Yes I've had plenty of experiences with orgs that self host everything, I don't think it's a minority it's just a different cluster than the one most represented here.

Still I believe hosting is somewhat different, if anything because it's something established, known players, trusted practices. AI is new, contracts are still getting refined, players are still making their name, companies are moving fast and I doubt data protection is their priority.

I may be wrong but I think it's reasonable for IT departments to be at least prudent towards these frameworks. Search is ok, chat is okish, crawling whole projects for autocompletion I'd be more careful.

Re: How I program with LLMs

#310

I still find most LLMS to be extremely poor programmers . Claude will often generate tons and tons of useless code quickly using up it's limit. I often find myself yelling at it to stop. I was just working with it last night. "Hi Claude, can you add tabs here.": Claude will then start generating MainContent. DeepSeek, despite being free does a much better job than Claude. I don't know if it's smarter, but whatever in…

Assuming I know roughly what it will generate, I usually prepend my chats with previsions against this kind of thing

"Add tabs here, assume the rest of the page will work with no futher modification, limit your changes so that any existing code keeps working"

I also do stuff like "Project is using {X} libraries, keep dependencies minimal

Generate a method takes {Z} parameters, return {Y}, using {A}, {B} and {C} do {thing}"

I'll add stuff like Language version, frameworks or specific requests based on this, but then I just reuse the setup , So I like to keep the first message with as much context as possible, ideally separating project context from specific request

Post reply on HN