Live data from Hacker News

How I program with LLMs

crawshaw.io

61–70 of 342 posts

Re: How I program with LLMs

#61
post #27

I no longer work in tech, but I still write simple applications to make my work life easier. I frequently use what OP refers to as chat-driven programming, and I find it incredibly useful. My process starts by explaining a minimum viable product to the chat, which then generates the code for me. Sometimes, the code requires a bit of manual tweaking, but it’s usually a solid starting point. From there, I describe each…

I have a similar approach, but the mess can be contained by asking for optimizations and refactors very frequently and only asking for very granular features.

Re: How I program with LLMs

#62
post #29
post #27

I no longer work in tech, but I still write simple applications to make my work life easier. I frequently use what OP refers to as chat-driven programming, and I find it incredibly useful. My process starts by explaining a minimum viable product to the chat, which then generates the code for me. Sometimes, the code requires a bit of manual tweaking, but it’s usually a solid starting point. From there, I describe each…

Is there a model you prefer to use?

Not wdutch but Claude Sonnet is one of the best models out there for programming, o1 is sometimes better but costs more

Re: How I program with LLMs

#63
post #58

Our company has a no AI use policy. The assumption is zero trust. We simply can’t know whether a model or its framework could or would send proprietary code outside the network. So it’s best to assume all LLMs/AI is or will send code or fragments of code. While I applaud the incredible work by their creators, I’m not sure how a responsible enterprise class company could rely on “trust us bro” EULAs or repo readmes.

The vast majority of fortune 500’s have legal frameworks up for dealing with internal AI use already because the reality is employees are going to use it regardless of internal policy. Assuming every employee will act in good faith just because a blanket AI ban is in place is extremely optimistic at best, and isn’t a good substitute for actual understanding.

Internal policies at these companies are rarely subject to a level of faith that you're implying. Instead external access to systems is logged, internal systems are often sandboxed or otherwise constrained in how you interact with them, and anything that looks like exfiltration sets off enough alarms to have your manager talking to you that same day, if not that same hour.

Re: How I program with LLMs

#64
post #18
post #5

LLMs are, at their core, search tools. Training is indexing and prompting is querying that index. The granularity being at the n-gram rather than the document level is a huge deal though. Properly using them requires understanding that. And just like we understand every query won’t find what we want, neither will every prompt. Iterative refinement is virtually required for nontrivial cases. Automating that process, l…

I'm losing track of the number of different things the Hacker News commenters claim LLMs are "at their core".

Isn't this answer obvious/facile but also true? They're next token predictors.

Re: How I program with LLMs

#65

Our company has a no AI use policy. The assumption is zero trust. We simply can’t know whether a model or its framework could or would send proprietary code outside the network. So it’s best to assume all LLMs/AI is or will send code or fragments of code. While I applaud the incredible work by their creators, I’m not sure how a responsible enterprise class company could rely on “trust us bro” EULAs or repo readmes.

Just curious, how does your company host its email? Documents? Files?

Re: How I program with LLMs

#66
post #15

Earlier quoted context omitted.

Your company could locally host LLMs; you wont get chatGPT or Claude quality, but you can get something that would have been SOTA a year ago. You can vet the public inference codebases (they are only of moderate complexity), and you control your own firewalls.

You can run Claude on both AWS and Google Cloud. I’m fairly certain they don’t share data, but would need to verify to be sure.

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.

Re: How I program with LLMs

#67
post #20

The killer feature about LLMs with programming in my opinion is autocomplete (the simple copilot feature). I can probably be 2-3x more productive as I'm not typing (or thinking much). It does a fairly good job pulling in nearby context to help it. And that's even without a language server. Using it to generate blocks of code in a chat like manner in my opinion just never works well enough in the domains I use it on.…

The autocomplete is mostly a nusance and maybe low percentage of the time it does right.

The biggest nuisance aspect for me is when it is trying to do things that the LSP can do 100% correctly. Almost surely it is my tooling setup and the LLM is squashing LSP stuff. Seeing Copilot (or even Cursor) suggesting methods or parameters that don't exist is really annoying. Just stand down and let the LSP answer those basic questions, TYVM.

Re: How I program with LLMs

#68
post #52

One interesting bit of context is that the author of this post is a legit world-class software engineer already (though probably too modest to admit it). Former staff engineer at Google and co-founder / CTO of Tailscale. He doesn't need LLMs. That he says LLMs make him more productive at all as a hands-on developer, especially around first drafts on a new idea, means a lot to me personally. His post reminds me of an…

I knew he was a world-class engineer the moment I saw that his site didn't bother with CSS stylesheets, ads, pictures, or anything beyond a rudimentary layout.

The whole article page reads like a site from the '90s, written from scratch in HTML.

That's when I knew the article would go hard.

Substantive pieces don't need fluffy UIs - the idea takes the stage, not the window dressing.

Re: How I program with LLMs

#69
post #57
post #27

I no longer work in tech, but I still write simple applications to make my work life easier. I frequently use what OP refers to as chat-driven programming, and I find it incredibly useful. My process starts by explaining a minimum viable product to the chat, which then generates the code for me. Sometimes, the code requires a bit of manual tweaking, but it’s usually a solid starting point. From there, I describe each…

> The code can get messy quickly. There's often a lot of redundancy and after a few iterations it can be quite daunting to modify. i forsee in the future an LLM that has sufficient context length for (automatic) refactoring and tech debt removal, by pasting large portions of these existing code in.

Even without LLMs, at least with statically type languages like C#, ReSharper can do solution wide refactoring that are guaranteed correct as long as you don’t use reflection.

https://www.jetbrains.com/help/resharper/Refactorings__Index...

I don’t see any reason it couldn’t do more aggressive refactors with LLMs and either correct itself or don’t do the refactor if it fails static code checking. Visual Studio can already do real time type checking for compile time errors

Re: How I program with LLMs

#70
I disagree about search. While LLM can give you an answer faster, good doc (eg. MDN article in CSS example) will :

- be way more reliable

- probably be up to date on how you should solve it in latest/recommend approach

- put you in a place where you can search for adjecent tech

LLM with search has potential but I'd like if current tools are more oriented on source material rather than AI paraphrasing.

Post reply on HN