the beautiful code
the beautiful code
the beautiful code
On Error Resume Next
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)
Watching the serious people trying to use AI to code gives me the same feeling as the cybertruck people exploring the limits of their car. XD
"It's terrible and I should hate it, but gosh it it isn't just so cool"
I wish i could get so excited over disappointing garbage
You definitely could use AI to code, the catch is you need to know how to code first.
I use AI to write code for mundane tasks all the time. I also review and integrate the code myself.
The AI code my “expert in a related but otherwise not helpful field” coworker writes helps me have a lot of extra work to do!
It's useful if you just don't do....That. it's just a new fancy search engin, it's a bit better than going to stack overflow, it can do good stuff if you go small.
Just don't do whatever this post suggested of doing...
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
On one line of code you say?
search & replaces all line breaks with spaces
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
Code that does not work is just text.
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!
Yeah, the Abra kabara init and Alakazam cleanup are an important part, specially until you have become good enough to configure your own init.
There is an alternative init, Abra Kadabra, which automatically adds a cleanup and some general fixes when it detects the end of the spell.
Zojak Quapaj!
All non-code-text is just code for a yet undiscovered programming language
Code that works is also just text.
It is text, but not just text
Text that's not code might also work.
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.
Can't you just send prints to serial?
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
That's what tends to happen
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
Did it at least try puts?
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 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
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
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
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.
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.
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.
You managed to get an ai to do 200 lines of code and it actually compiled?
Uh yeah, like all the time. Anyone who says otherwise really hasn’t tried recently. I know it’s a meme that AI can’t code (and still in many cases that’s true, eg. I don’t have the AI do anything with OpenCV or complex math) but it’s very routine these days for common use cases like web development.
4o has been able to do this for months.
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.
Practically all LLMs aren't good for any logic. Try to play ASCII tic tac toe against it. All GPT models lost against my four year old niece and I wouldn't trust her writing production code 🤣
Once a single model (doesn't have to be a LLM) can beat Stockfish in chess, AlphaGo in Go, my niece in tic tac toe and can one-shot (on the surface, scratch-pad allowed) a Rust program that compiles and works, than we can start thinking about replacing engineers.
Just take a look at the dotnet runtime source code where Microsoft employees currently try to work with copilot, which writes PRs with errors like forgetting to add files to projects. Write code that doesn't compile, fix symptoms instead of underlying problems, etc. (just take a look yourself).
I don't say that AI (especially AGI) can't replace humans. It definitely can and will, it's just a matter of time, but state of the Art LLMs are basically just extremely good "search engines" or interactive versions of "stack overflow" but not good enough to do real "thinking tasks".
extremely good "search engines" or interactive versions of "stack overflow"
Which is such a decent use of them! I've used it on my own hardware a few times just to say "Hey give me a comparison of these things", or "How would I write a function that does this?" Or "Please explain this more simply...more simply....more simply..."
I see it as a search engine that connects nodes of concepts together, basically.
And it's great for that. And it's impressive!
But all the hype monkeys out there are trying to pedestal it like some kind of techno-super-intelligence, completely ignoring what it is good for in favor of "It'll replace all human coders" fever dreams.
Cherry picking the things it doesn’t do well is fine, but you shouldn’t ignore the fact that it DOES do some things easily also.
Like all tools, use them for what they’re good at.
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’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.
If we just asked Jeeves in the first place we wouldn't be in this mess.
Its like having a junior developer with a world of confidence just change shit and spend hours breaking things and trying to fix them, while we pay big tech for the privilege of watching the chaos.
I asked chat gpt to give me a simple squid proxy config today that blocks everything except https. It confidently gave me one but of course it didnt work. It let through http and despite many attempts to get a working config that did that, it just failed.
So yeah in the end i have to learn squid syntax anyway, which i guess is fine, but I spent hours trying to get a working config because we pay for chat gpt to do exactly that....
It confidently gave me one
IMO, that's one of the biggest "sins" of the current LLMs, they're trained to generate words that make them sound confident.
They aren’t explicitly trained to sound confident, that’s just how users tend to talk. You don’t often see “I don’t know but you can give this a shot” on Stack Overflow, for instance. Even the incorrect answers coming from users are presented confidently.
Funnily enough, lack of confidence in response is something I don’t think LLMs are currently capable of, since it would require contextual understanding of both the question, and the answer being given.
Sycophants.
I have a friend who swears by llms, he sais it helps him a lot. I once watched him do it, and the experience was exactly the same you described. He wasted couple of hours fighting with bullshit generator just to do everything himself anyway. I asked him wouldn't it be better to not waste the time, but he didn't really saw the problem, he gaslit himself that fighting with the idiot machine helped.
Man, I can't wait to try out generative AI to generate config files for mission critical stuff! Imagine paying all of us devops wankers when my idiot boss can just ask Chat GPT to sort all this legacy mess we're juggling with on the daily!
Ctrl+A + Del.
So clean.
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.
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.
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.
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 🤝
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.
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.
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.
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.
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"
Find and Replace?
that will catch too many false positives
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
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.
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.
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
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
Did it try to blackmail him if he didn't use the new code?
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..
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
cursed will smith eating spaghetti video
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
But wouldn't you point still be true today that the best AI video models today would be the onces that are not available for consumers?
There actually isn't really any doubt that AI (especially AGI) will surpass humans on all thinking tasks unless we have a mass extinction event first. But current LLMs are nowhere close to actual human intelligence.
Laugh it up while you can.
We're in the "haha it can't draw hands!" phase of coding.
someone drank the koolaid.
LLMs will never code for two reasons.
one, because they only regurgitate facsimiles of code. this is because the models are trained to ingest content and provide an interpretation of the collection of their content.
software development is more than that and requires strategic thought and conceptualization, both of which are decades away from AI at best.
two, because the prevalence of LLM generated code is destroying the training data used to build models. think of it like making a copy of a copy of a copy, et cetera.
the more popular it becomes the worse the training data becomes. the worse the training data becomes the weaker the model. the weaker the model, the less likely it will see any real use.
so yeah. we're about 100 years from the whole "it can't draw its hands" stage because it doesn't even know what hands are.
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.