Live data from Hacker News

How I program with LLMs

crawshaw.io

291–300 of 342 posts

Re: How I program with LLMs

#292

I’m a hobby programmer who never worked a programming job. Last week I was bored, I asked o1 to help me to write a Solitaire card game using React because I’m very rusty with web development. The first few steps were great. Guided me to install things and setup a project structure. The model even generated codes for a few files. Then something went wrong, the model kept telling me what to do in vague, but didn’t outp…

LLMs contexts are fast to overload, as the article states. That's why he writes smaller, specific packages, one at a time, and uses a web UI instead of something like cursor.

I had the same issue as you a few days ago. By separating the problem in smaller parts and addressing each parts one by one it got easier.

In your specific case I would try to fully complete the business logic one side. Reset the context. Then provide the logic to a new context and ask for an interface. Difficulty will arise when discovering that the logic is wrong or not suited to the UI, but i would keep using the same process to edit the code. Maybe two different contexts, one for logic, one for UI?

How did you do?

Re: How I program with LLMs

#293

Earlier quoted context omitted.

Middle Ground Fallacy

The middle ground between hyping the new tech and being completely skeptical about it is usually right. New tech is usually not everything it's hyped up to be, but also usually not completely useless or bad for society. It's likely we're not about to usher in the singularity or doom society, but LLMs are useful enough to stick around in various tools. Also it's probably the case that a percentage of they hype is driv…

> New tech is usually not everything it's hyped up to be, but also usually not completely useless or bad for society.

Except for cryptocurrencies (at least their ratio of investments to output) :-p

Re: How I program with LLMs

#294

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.

Yes - the number of languages will grow, however, their adoption will be much slower and harder to enact than now (and it's already incredibly difficult).

You might have written the DSLs, but the LLMs are unaware of this and will offer hallucinations when asked to generate code using that DSL.

For the past few weeks I've been slowly getting back to Common Lisp. Even though there's plenty of CL code on the net, its volume is dwarfed by Python or JS. In effect, both Github Copilot and ChatGPT (4o) have an accuracy of 5%. I'm not kidding: they're unable to generate even very simple snippets correctly, hallucinating packages and functions.

It's of course (I think?) possible to make a GPT specialized for Lisp, but if the generic model performs poorly, it'll probably make people wary and stay away from the language. So, unless you're ready to fine-tune a model for your language and somehow distribute it to your users, you'll see adoption rates dropping (from already minuscule ones!)

Re: How I program with LLMs

#295
I think the author is really on the right path with his vision for LLMs as tool for software development. Last week I tried probably all of them with something like a code challenge.

I have to say that I am impressed with sketch.dev, it got me a working example from the first try and it looked cleaner form all the others, similar but cleaner somehow in terms of styling.

The whole time I was using those tools I was thinking that I want exactly this a LLM trained specifically on the Go official documentation, or whatever your favourite language is, ideally fined tuned by the maintainers of the language.

I want the LLM to show me an idiomatic way to write an API using the standard library I don't necessarily want it to do it instead of me, or to be trained on all of the scrapped data they could scrape. Show me a couple of examples maybe explain a concept, give me steps by step guidance.

I also share his frustrations with the chat based approach what annoys me personally the most is the anthropomorphization of the LLMs, yesterday Gemini was even patronizing me...

Re: How I program with LLMs

#296
post #198
post #197

Earlier quoted context omitted.

Huh? No, i'm saying, what potential damage does an organization have? Not the individual who may leak data outside your network.

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 not necessarily shared by people who don't share your circumstances.

Re: How I program with LLMs

#297

I’m a hobby programmer who never worked a programming job. Last week I was bored, I asked o1 to help me to write a Solitaire card game using React because I’m very rusty with web development. The first few steps were great. Guided me to install things and setup a project structure. The model even generated codes for a few files. Then something went wrong, the model kept telling me what to do in vague, but didn’t outp…

Yeah, you wanna use Claude for code. That's the problem. Try Cursor or Bolt.

Re: How I program with LLMs

#298

Earlier quoted context omitted.

Not OP but Aider provides a repo map to the LLM as context, which consists of the directory tree, filenames, and important symbols in each file. It can use the popular LLMs as well as Ollama. https://aider.chat/docs/repomap.html Aider hosts a leaderboard that rates LLMs on performance, including a section on refactoring. https://aider.chat/docs/leaderboards/refactor.html

AI generated images can be good, and even reasonable to use for branding. Slapping an image right at the top of the page that says "Abstract Synxex Tree" with a meaningless graph and an absolutely expressionless and useless humanoid robot is a great way to immediately lose my interest in anything they have to say though. The homepage would be more interesting as a wall of text.

Agreed, mostly, but this is not a homepage. On the homepage, there's a video demo and a wall of text (https://aider.chat/). Still, that Synxex Tree should disappear :)

Re: How I program with LLMs

#299

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?

> Where are the sane people in the middle? They are the quiet ones.

Yup! I don't have a lot to say about LLMs for coding. There are places where I'm certain they're useful and that's where I use them. I don't think "generate a react app from scratch" helps me, but things like "take a CPU profile and write it to /tmp/pprof.out" have worked well. I know how to do the latter, but would need to look at the docs for the exact function name to call, and the LLM just knows and checks the error on opening the file and all that tedium. It's helpful.

At my last job I spent a lot of time on cleanups and refactoring and never got the LLM to help me in any way. This is the thing that I try every few months and see what's changed, because one day it will be able to do the tedious things I need to get done and spare me the tedium.

Something I should try again is having the LLM follow a spec and see how it does. A long time ago I wrote some code to handle HTTP conditional requests. I pasted the standard into my code, and wrote each chunk of code in the same order as the spec. I bet the LLM could just do that for me; not a lot of knowledge of code outside that file was required, so you don't need many tokens of context to get a good result. But alas the code is already written and works. Maybe if I tried doing that today the LLM would just paste in the code I already wrote and it was trained on ;)

Re: How I program with LLMs

#300

Funny, he starts of dismissing an AI IDE to end with building an AI IDE :D (Smells a little bit like not invented here syndrom) Otherwise fascinating article!

I joke about once per month here that half of hn is basically "not invented here syndrome". And generally poor reimplementations of existing erlang features ;)
Post reply on HN