Live data from Hacker News

How I program with LLMs

crawshaw.io

161–170 of 342 posts

Re: How I program with LLMs

#161
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 industry standard was 40% accepted the last time I checked. Correct could be a bit lower, so maybe 1/3?

It’s like having to delete the auto-closed parenthesis more often than not.

Re: How I program with LLMs

#162

Earlier quoted context omitted.

Being a dev at a large company is usually the sign that you're not very good though. And anyone can start a company with the right connections.

That's a terrible blanket statement, very US-centric. Not everyone wants to start a company and you can't just reduce ones motivations to your measure of success.

God knows many of the best devs I've known would be an absolute nightmare on the business side, they'd rather have a capable business person if they could avoid it

Re: How I program with LLMs

#163
post #146
post #14

Earlier quoted context omitted.

That seems like a wild restriction. You can give them more latitude for things you know how to check . I didn't know how to setup the right gnarly typescript generic type to solve my problem but I could easily verify it's correct.

If you merely know how to check, would you also know how to fix it after you find that it's wrong? If you are lucky to have the LLM fix it for you, great. If you don't know how to fix it yourself and the LLM doesn't either, you've just wasted a lot of time.

It did fix it, I iterated passing in the type and linter errors until it passed all the requirements I had.

> If you merely know how to check, would you also know how to fix it after you find that it's wrong?

Probably? I'm capable of reading documentation, learning and asking others.

> If you don't know how to fix it yourself and the LLM doesn't either, you've just wasted a lot of time.

You may be surprised by how little time, but regardless it would have taken more time to hit that point without the tool.

Also sometimes things don't work out, that's OK. As long as overall it improves work, that's all we need.

Re: How I program with LLMs

#164
I've been doing that for a while as well and mostly agree. Although one thing that I find useful is to build the local infrastructure to be able to collect useful prompts and the ability to work with files and urls. Web interface is limiting alone.

I like gptresearcher and all of the glue put in place to be able to extend prompts and agents etc. Not to mention the ability to fetch resources from the web and do research type summaries on it.

All in all it reminds me the work of security researchers, pentesters and analysts. Throughout the career they would build a set of tools and scripts to solve various problems. LLMs kind of force the devs to create/select tools for themselves to ease the burden of their specific line of work as well. You could work without LLMs but maybe it will be a bit more difficult to stand out in the future.

Re: How I program with LLMs

#165
post #14

Earlier quoted context omitted.

That seems like a wild restriction. You can give them more latitude for things you know how to check . I didn't know how to setup the right gnarly typescript generic type to solve my problem but I could easily verify it's correct.

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.

Re: How I program with LLMs

#166
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 have been using LLM to generate functional code from *pseudo-code* with excellent results. I am starting to experiment with UML diagrams, both with LLM and computer vision to actually generate code from UML diagrams; for example a simple activity diagram could be the prompt on LLM 's, and might look like:

Start -> Enter Credentials -> Validate -> [Valid] -> Welcome Message -> [Invalid] -> Error Message

Corresponding Code (Python Example):

class LoginSystem:

    def validate_credentials(self, username, password):
        if username == "admin" and password == "password":
            return True
        return False

    def login(self, username, password):
        if self.validate_credentials(username, password):
            return "Welcome!"
        else:
            return "Invalid credentials, please try again."
*Edited for clarity

Re: How I program with LLMs

#167

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.

> I’m not sure how a responsible enterprise class company could rely on “trust us bro” EULAs or repo readmes.

Isn't that what we do with operating systems, internet providers, &c. ?

Re: How I program with LLMs

#168

I've been coding professionally for 30 years. I'm probably in the same place as the author, using Chat-GPT to create functions etc, then cut and pasting that into VSCode. I've started using cline which allows me to code using prompts inside VSCode. i.e. Create a new page so that users can add tasks to a tasks table. I'm getting mixed results, but it is very promising. I create a clinerules file which gets added to th…

Love the token joke!

Re: How I program with LLMs

#169

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.

You can get models that run offline. The other risk is copyright/licensing exposure; e.g. the AI regurgitates a recognisably large chunk of GPL code, and suddenly you have a legal landmine in your project waiting to be discovered. There's no sane way for a reviewer to spot this situation in general.

You can ask a human to not do that, and there are various risks to them personally if they do so regardless. I'd like to see the AI providers take on some similar risks instead of disclaiming them in their EULAs before I trust them the way I might a human.

Re: How I program with LLMs

#170

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.

> I’m not sure how a responsible enterprise class company could rely on “trust us bro” EULAs or repo readmes. Isn't that what we do with operating systems, internet providers, &c. ?

How is that related? we're talking of continuously sending proprietary code and related IP to a third party, seems a pretty valid concern to me.

I, for one, work every day with plenty of proprietary vendor code under very restrictive NDAs. I don't think they would be very happy knowing I let AIs crawl our whole code base and send it to remote language models just to have fancy autocompletion.

Post reply on HN