Live data from Hacker News

How I program with LLMs

crawshaw.io

151–160 of 342 posts

Re: How I program with LLMs

#151
post #2

The first rule of programming with LLMs is don't use them for anything you don't know how to do. If you can look at the solution and immediately know what's wrong with it, they are a time saver otherwise... I find chat for search is really helpful (as the article states)

I'd like to rephrase as, "don't deploy LLM generated code if you don't know how it works (or what it does)" This means, it's okay to use LLM to try something new that you're on the fence about. Learn it and then once you've learned that concept or the idea, you can go ahead to use same code if it's good enough.

"don't deploy ̶L̶L̶M̶ ̶g̶e̶n̶e̶r̶a̶t̶e̶d̶ code if you don't know how it works (or what it does)"

(Which goes for StackOverflow, etc.)

Re: How I program with LLMs

#152

Essentially, an LLM is a compressed database with a universal translator. So what we can get out of it is everything that has been written (and publicly released) before translated to any language it knows about. This has some consequences. 1. Programmers still need to know what algorithms or interfaces or models they want. 2. Programmers do not have to know a language very well anymore, to write code, but the have t…

3. New programming languages will face a big economical hurdle to take off.

I bet the opposite. I’ve written a number of DSLs and tooling around them over the last year as LLMs have allowed me to take on much bigger projects.

I expect we see an explosion of languages over the next decade.

Re: How I program with LLMs

#153

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.

I have found LLMs to be 95% useful on documented software, from everything eg Uniswap smart contracts to plugins in cordova to setting up Mac or Linux administrative tools.

The problem for a regular person is that you have to copypasye from chat. That is “the last mile”. For terminal commands that’s fine but for programming you need a tool to automate this.

Something like refactoring a function, given the entire context, etc. And it happening in the editor and you seeing a diff right away. The rest of the explanatory text should go next to the diff in a separate display.

I bet someone can make a VSCode extension that chats with an LLM and does exactly this. The LLM is told to provide all the sections labeled clearly (code, explanation) and the editor makes the diff.

Having said all that, good libraries that abstract away differences are far superior to writing code with an LLM. The only code that needs to be written is the interface and wiring up between the libraries.

Re: How I program with LLMs

#154

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.

> proprietary code outside the network

Thought exercise: what would seriously happen if you did let some of your proprietary code outside your network? Oddly enough, 75% of the people writing code on HN probably have their companies code stored in GitHub. So there already is an inherent trust factor with GH/MSFT.

As another anecdote - Twitch's source code got leaked a few years back. Did Twitch lose business because of it?

Re: How I program with LLMs

#155
post #97

Earlier quoted context omitted.

I am not a genius but have a couple of decades experience and finally started using LLMs in anger in the last few weeks. I have to admit that when my free quota from GitHub Copilot ran out (I had already run out of Jetbrains AI as well!! Our company will start paying for some service as the trials have been very successful), I had a slight bad feeling as my experience was very similar to OP: it's really useful to get…

Have you tried using Ollama? You can download and run an LLM locally on your machine. You can also pick the right model for the right need and it's free.

I’m using ChatGPT4o to convert a C# project to C++. Any recommendation on what Ollama model I could use instead?

Re: How I program with LLMs

#157
post #97

Earlier quoted context omitted.

I am not a genius but have a couple of decades experience and finally started using LLMs in anger in the last few weeks. I have to admit that when my free quota from GitHub Copilot ran out (I had already run out of Jetbrains AI as well!! Our company will start paying for some service as the trials have been very successful), I had a slight bad feeling as my experience was very similar to OP: it's really useful to get…

Have you tried using Ollama? You can download and run an LLM locally on your machine. You can also pick the right model for the right need and it's free.

Yes. If the AI is not integrated with the IDE, it's not as helpful. If there were an IDE plugin that let you use a local model, perhaps that would be an option, but I haven't seen that (Github Copilot allows selecting different models, but I didn't check more carefully whether that also includes a local one, anyone knows?).

Re: How I program with LLMs

#158
post #155

Earlier quoted context omitted.

Have you tried using Ollama? You can download and run an LLM locally on your machine. You can also pick the right model for the right need and it's free.

I’m using ChatGPT4o to convert a C# project to C++. Any recommendation on what Ollama model I could use instead?

The one that does not convert C# at all and asks you to just optimize it in C# instead (and to use the appropriate build option) :D

Re: How I program with LLMs

#159
post #110
post #97

Earlier quoted context omitted.

I am not a genius but have a couple of decades experience and finally started using LLMs in anger in the last few weeks. I have to admit that when my free quota from GitHub Copilot ran out (I had already run out of Jetbrains AI as well!! Our company will start paying for some service as the trials have been very successful), I had a slight bad feeling as my experience was very similar to OP: it's really useful to get…

I'm genuinely curious but what did you use StackOverflow for before? With a couple of decades in the industry I can't remember when the last time I "Google programmed" anything was. I always go directly to the documentation for whatever it is I'm working for, because where else would I find out how it actually works? It's not like I haven't "Google programmed" when I was younger, but it's just such a slow process bas…

I believe you don't mean to be rude, but you just sound completely naive to me. To think that documentation includes everything is just, like, have you actually been coding anything at all that goes just slightly off the happy path? Example from yesterday: I have a modular JavaFX application (i.e. it uses Java JMS modules, not just Maven/Gradle modules). I introduced a call to `url()` in JavaFX CSS. That works when running using the classpath, but not when using the module path. I spent half an hour reading docs to see what they say about modular applications. They didn't mention anything at all. Specially because in my case, I was not just doing `getClass().getResource`... I was using the CSS directive to load a resource from the jar. This is exactly when I would likely go on SO and ask if anyone had seen this before. It used to be highly likely someone who's an expert on JavaFX would see and answer my question, sometimes even people who directly worked on JavaFX!

StackOverflow was not really meant for juniors, as juniors usually can indeed find answers on documentation, normally. It was, like ExpertsExchange before it, a place for veterans to exchange tribal knowledge like this. If you think only juniors use SO, you seem to have arrived at the scene just yesterday and just don't know what you're talking about.

Re: How I program with LLMs

#160
post #157

Earlier quoted context omitted.

Have you tried using Ollama? You can download and run an LLM locally on your machine. You can also pick the right model for the right need and it's free.

Yes. If the AI is not integrated with the IDE, it's not as helpful. If there were an IDE plugin that let you use a local model, perhaps that would be an option, but I haven't seen that (Github Copilot allows selecting different models, but I didn't check more carefully whether that also includes a local one, anyone knows?).

It’s doable as it’s what I use to experiment.

Ollama + CodeGPT IntelliJ plugin. It allows you to point at a local instance.

Post reply on HN