Hacker News new | ask | show | jobs
by hawk_ 277 days ago
This is the gap that LLMs have been filling quite well now in my experience. There are these little isolated tasks that are described easily in natural language for which the idiomatic code snippet can be created and importantly modified by LLMs as needed. No need to pull in pesky dependencies. Though when to switch over to a full blown dependency is still a judgement call.
1 comments

This is such a weird comment to me. These are trivial functions that could be faster to code than describe. I’d hope people aren’t relying on AI for functions as simple as clamp.

I mean, people have been writing these simple functions over and over for decades when they just needed one or two things that importing a library wasn’t needed. I wasn’t aware there was a gap to be filled.

Clamp is a simple enough function that if you simply typed its name and arguments, copilot would autocomplete its body. No prompting needed, in that case.
Man, people are prompting and copying LLM output for min/max functions. I saw my junior do this in a meeting - it was apparently too much work to lookup the standard library. When most people work with a LLM, the thinking part of their brain gets switched off for some reason.
Not clamp per se, but there are enough tiny snippets which can have off by one or other issues not relevant to when you think about the problem description.
I agree:

Senior engineer: "you shouldn't have to use llm to do simple things" Their boss: "hey I need you to write this thing in Go for performance reasons" Senior engineer: "you shouldn't make me learn new languages, js is plenty performant for this task just install a new server. why are they making us use all these new tools? everything is new again, blah blah excuses excuses"

vs.

Boss: "hey can you write this in go" Vibe Coder: "write this loop to ignore the first semicolon in this response", and then proceeds to move on with life.

It seems like when people evaluate the merits of what a code generation ai agent should and shouldn't do, they leave out a lot of their implicit assumptions about how project should work and their own theory of mind around coding.

Sure. Then all the common tools that you need should be bundled into a library. I should not be importing 1000 string manipulation libs with a single function each.
Like lodash?