the beautiful code
the beautiful code
the beautiful code
The image is taken from Zhihu, a Chinese Quora-like site.
The prompt is talking about give a design of a certain app, and the response seems to talk about some suggested pages. So it doesn't seem to reflect the text.
But this in general aligns with my experience coding with llm. I was trying to upgrade my eslint from 8 to 9, and ask chatgpt to convert my eslint file, and it proceed to spit out complete garbage.
I thought this would be a good task for llm because eslint config is very common and well-documented, and the transformation is very mechanical, but it just cannot do it. So I proceed to read the documents and finished the migration in a couple hour...
I asked ChatGPT with help about bare metal 32-bit ARM (For the Pi Zero W) C/ASM, emulated in QEMU for testing, and after the third iteration of "use printf for output" -> "there's no printf with bare metal as target" -> "use solution X" -> "doesn't work" -> "ude printf for output" ... I had enough.
Sounds like it's perfectly replicated the help forums it was trained on.
I used ChatGPT to help me make a package with SUSE's Open Build Service. It was actually quite good. Was pulling my hair out for a while until I noticed that the project I wanted to build had changes URLs and I was using an outdated one.
In the end I just had to get one last detail right. And then my ChatGPT 4 allowance dried up and they dropped me back down to 3 and it couldn't do anything. So I had to use my own brain, ugh.
Yeah you can tell it just ratholes on trying to force one concept to work rather than realizing it's not the correct concept to begin with
Did it at least try puts?
QEMU makes it pretty painless to hook up gdb just FYI; you should look into that. I think you can also have it provide a memory mapped UART for I/O which you can use with newlib to get printf debugging
That's what tends to happen
It's pretty random in terms of what is or isn't doable.
For me it's a big performance booster because I genuinely suck at coding and don't do too much complex stuff. As a "clean up my syntax" and a "what am I missing here" tool it helps, or at least helps in figuring out what I'm doing wrong so I can look in the right place for the correct answer on something that seemed inscrutable at a glance. I certainly can do some things with a local LLM I couldn't do without one (or at least without getting berated by some online dick who doesn't think he has time to give you an answer but sure has time to set you on a path towards self-discovery).
How much of a benefit it's for a professional I couldn't tell. I mean, definitely not a replacement. Maybe helping read something old or poorly commented fast? Redundant tasks on very commonplace mainstream languages and tasks?
I don't think it's useless, but if you ask it to do something by itself you can't trust that it'll work without singificant additional effort.
A lot of words to just say vibe coding
It catches things like spelling errors in variable names, does good autocomplete, and it’s useful to have it look through a file before committing it and creating a pull request.
It’s very useful for throwaway work like writing scripts and automations.
It’s useful not but a 10x multiplier like all the CEOs claim it is.
It's not much use with a professional codebase as of now, and I say this as a big proponent of learning FOSS AI to stay ahead of the corpocunts
I use it sometimes, usually just to create boilerplate. Actual functionality it's hit or miss, and often it ends up taking more time to fix than to write myself.
I wouldn't say it's accurate that this was a "mechanical" upgrade, having done it a few times. They even have a migration tool which you'd think could fully do the upgrade but out of the probably 4-5 projects I've upgraded, the migration tool always produced a config that errored and needed several obscure manual changes to get working. All that to say it seems like a particularly bad candidate for llms
Then I am quite confused what LLM is supposed to help me with. I am not a programmer, and I am certainly not a TypeScript programmer. This is why I postponed my eslint upgrade for half a year, since I don't have a lot of experience in TypeScript, besides one project in my college webdev class.
So if I can sit down for a couple hour to port my rather simple eslint config, which arguably is the most mechanical task I have seen in my limited programming experience, and LLM produce anything close to correct. Then I am rather confused what "real programmers" would use it for...
People here say boilerplate code, but honestly I don't quite recall the last time I need to write a lot of boilerplate code.
I have also tried to use llm to debug SELinux and docker container on my homelab; unfortunately, it is absolutely useless in that as well.
No, still "perfect" for llms. There's nuance, seeing patterns being used, it should be able to handle it perfectly. Enough people on stack overflow asked enough questions, if AI is like Google and Microsoft claim it is, it should have handled it
I used Claude 3.7 to upgrade my eslint configs to flat and upgrade from v7 to v9 with Roo Code and it did it perfectly
Ai code is specifically annoying because it looks like it would work, but its just plausible bullshit.
And that's what happens when you spend a trillion dollars on an autocomplete: amazing at making things look like whatever it's imitating, but with zero understanding of why the original looked that way.
I mean, there's about a billion ways it's been shown to have actual coherent originality at this point, and so it must have understanding of some kind. That's how I know I and other humans have understanding, after all.
What it's not is aligned to care about anything other than making plausible-looking text.
Well I've got the name for my autobiography now.
"Specifically Annoying" or "Plausible Bullshit"? I'd buy the latter.
This is where I got the term from: https://craphound.com/news/2023/09/17/plausible-sentence-generators/
It needs good feedback. Agentic systems like Roo Code and Claude Code run compilers and tests until it works (just gotta make sure to tell it to leave the tests alone)
All programs can be written with on less line of code. All programs have at least one bug.
By the logical consequences of these axioms every program can be reduced to one line of code - that doesn't work.
One day AI will get there.
The ideal code is no code at all
All programs can be written with on less line of code. All programs have at least one bug.
The humble "Hello world" would like a word.
Just to boast my old timer credentials.
There is an utility program in IBM’s mainframe operating system, z/OS, that has been there since the 60s.
It has just one assembly code instruction: a BR 14, which means basically ‘return’.
The first version was bugged and IBM had to issue a PTF (patch) to fix it.
You can fit an awful lot of Perl into one line too if you minimize it. It'll be completely unreadable to most anyone, but it'll run
Welp. Its actually very in line with the late stage capitalist system. All polish, no innovation.
Awwwww snap look at this limp dick future we got going on here.
Big Beautiful Code
My uncle. Very smart very neuronal. He knows the entire Internet, can you imagine? the entire internet. Like the mails of Crooked Hillary Clinton, that crook. You know what stands in that Mails? my uncle knows. He makes the best code. The most beautiful code. No one has ever seen code like it, but for him, he's a genius, like i am, i have inherited all his genius genes. It is very easy. He makes the best code. Sometimes he calls me and asks me: you are even smarter than i am. Can you look at my code?
All people say it. Tremendous code. All the experts said "No, generating formatted random text is not working code" but we did it.
Thanks, I hate it.
To be fair, if I wrote 3000 new lines of code in one shot, it probably wouldn’t run either.
LLMs are good for simple bits of logic under around 200 lines of code, or things that are strictly boilerplate. People who are trying to force it to do things beyond that are just being silly.
Perhaps 5 LOC. Maybe 3. And even then I'll analyze every single character in wrote. And then I will in fact find bugs. Most often it hallucinates some functions that would be fantastic to use - if they existed.
My guess is what's going on is there's tons of psuedo code out there that looks like it's a real language but has functions that don't exist as placeholders and the LLM noticed the pattern to the point where it just makes up functions, not realizing they need to be implemented (because LLMs don't realize things but just pattern match very complex patterns).
I am on you with this one. It is also very helpful in argument heavy libraries like plotly. If I ask a simple question like "in plotly how do I do this and that to the xaxis" etc it generally gives correct answers, saving me having to do internet research for 5-10 minutes or read documentations for functions with 1000 inputs. I even managed to get it to render a simple scene of cloud of points with some interactivity in 3js after about 30 minutes of back and forth. Not knowing much javascript, that would take me at least a couple hours. So yeah it can be useful as an assistant to someone who already knows coding (so the person can vet and debug the code).
Though if you weigh pros and cons of how LLMs are used (tons of fake internet garbage, tons of energy used, very convincing disinformation bots), I am not convinced benefits are worth the damages.
I’ve heard that a Claude 4 model generating code for an infinite amount of time will eventually simulate a monkey typing out Shakespeare
It will have consumed the GigaWattHours capacity of a few suns and all the moisture in our solar system, but by Jeeves, we'll get there!
...but it won't be that impressive once we remember concepts like "monkey, typing, Shakespeare" were already embedded in the training data.
This has beeny experience as well. It keeps emphasizing "beauty" and keeps missing "correctness"
llms are systems that output human-readable natural language answers, not true answers
And a good part of the time, the answers can often have a… subtly loose relationship with truth
It generates an answer that looks correct. Actual correctness is accidental. That's how you wind up with documents with references that don't exist, it just knows what references look like.
So its 50% better than my code?
If the code cannot uphold correctness, it is 0% better than your code.
Ctrl+A + Del.
So clean.
This weekend I successfully used Claude to add three features in a Rust utility I had wanted for a couple years. I had opened issue requests, but no else volunteered. I had tried learning Rust, Wayland and GTK to do it myself, but the docs at the time weren’t great and the learning curve was steep. But Claude figured it all out pretty quick.
Did the generated code get merged? I'd be curious to see the PRs
The lead dev is not available this summer to review, but you can review here: https://github.com/edzdez/sway-easyfocus/pull/22
It's not great that four changes are rolled into a single PR, but that's my issue not Claude's because they were related and I wanted to test them all at once.
Try to get one of these LLMs to update a package.json.
Define "update"
ones that can run cli tools do great, they just use npm
I'm pretty sure that is how we got CORBA
now just make it construct UML models and then abandon this and move onto version 2
Hello, fellow old person 🤝
cant wait to see "we use AI agents to generate well structured non-functioning code" with off centered everything and non working embeds on the website
Honest question: I haven't used AI much. Are there any AIs or IDEs that can reliably rename a variable across all instances in a medium sized Python project? I don't mean easy stuff that an editor can do (e.g. rename QQQ in all instances and get lucky that there are no conflicts). I mean be able to differentiate between local and/or library variables so it doesn't change them, only the correct versions.
Not reliably, no. Python is too dynamic to do that kind of thing without solving general program equivalence which is undecidable.
Use a static language, problem solved.
I'm going to laugh in Java, where this has always been possible and reliable. Not like ai reliable, but expert reliable. Because of static types.
For the most part "Rename symbol" in VSCode will work well. But it's limited by scope.
Yeah, I'm looking for something that would understand the operation (? insert correct term here) of the language well enough to rename intelligently.
I use pycharm for this and in general it does a great job. At work we've got some massive repos and it'll handle it fine.
The "find" tab shows where it'll make changes and you can click "don't change anything in this directory"
IntelliJ IDEA, if it knows it is the same variable, it will rename it. Usually works in a non fucked up codebase that uses eval
or some obscure constructs like saving a variable name into a variable as a string and dynamically invoking it.
Itellij is actually pretty good at this. Besides that, cursor or windsurf should be able to. I was using cursor for a while and when I needed to reactor something, it was pretty good at picking that up. It kept crashing on me though, so I am now trying windsurf and some other options. I am missing the auto complete features in cursor though as I would use this all the time to fill out boilerplate stuff as I write.
The one key difference in cursor and windsurf when compared to other products is that it will look at the entire context again for any changes or at least a little bit of it. You make a change, it looks if it needs to make changes elsewhere.
I still don't trust AI to do much though, but it's an excellent helper
Find and Replace?
that will catch too many false positives
Okay, I realize I'm that person, but for those interested:
tree
, cat
and sed
get the job done nicely.
And... it's my nap time, now. Please keep the Internet working, while I'm napping. I have grown fond of parts of it. Goodnight.
most IDEs are pretty decent at it if you configure them correctly. I used intelliJ and it knows the difference. use the refactor feature and it'll crawl references, not just rename all instances.
Did it try to blackmail him if he didn't use the new code?
On Error Resume Next
well, it only took 2 years to go from the cursed will smith eating spaghetti video to veo3 which can make completely lifelike videos with audio. so who knows what the future holds
Hot take, today’s AI videos are cursed. Bring back will smith spaghetti. Those were the good old days
The cursed Will Smith eating spaghetti wasn't the best video AI model available at the time, just what was available for consumers to run on their own hardware at the time. So while the rate of improvement in AI image/video generation is incredible, it's not quite as incredible as that viral video would suggest
cursed will smith eating spaghetti video
I've used it extensively, almost $100 in credits, and generally it could one shot everything I threw at it. However: I gave it architectural instructions and told it to use test driven development and what test suite to use. Without the tests yeah it wouldn't work, and a decent amount of the time is cleaning up mistakes the tests caught. The same can be said for humans, though.
How can it pass if it hasn't had lessons.. Well said. Ooh I wonder if lecture footage would be able to teach AI, or audio in from tutors..
Laugh it up while you can.
We're in the "haha it can't draw hands!" phase of coding.
This is just your ego talking. You can't stand the idea that a computer could be better than you at something you devoted your life to. You're not special. Coding is not special. It happened to artists, chess players, etc. It'll happen to us too.
I'll listen to experts who study the topic over an internet rando. AI model capabilities as yet show no signs of slowing their exponential growth.
AI bad. But also, video AI started with will Will Smith eating spaghetti just a couple years ago.
We keep talking about AI doing complex tasks right now and it's limitations, then extrapolating its development linearly. It's not linear and it's not in one direction. It's a exponential and rhizomatic process. Humans always over-estimate (ignoring hard limits) and under-estimate (thinking linearly) how these things go. With rocketships, with internet/social media, and now with AI.
Code that does not work is just text.
I’ve never thought of it that way. I’m going to add copy writer to my resume.
Maybe fiction writer as well
This made me laugh so hard one of the dogs came to check in on me.
No the spell just fizzled. In my experience it happens far less often if you start with an Abra kabara and end it with an Alakazam!
Zojak Quapaj!
Conversely, code that works is also text
But working code can be made into numbers.
But not just text
Also that's not converse to what the parent comment said
Code that works is also just text.
It is text, but not just text