by jokoon · 7mo ago · 0 comments
or to teach that again
If you go look, you often discover that 90% of the requests are useless, or at least could be combined. That 60% of bandwidth is used up by 3 high res images which get displayed at 30x30 pixels. That CPU performance is dominated by some rubbish code that populates an array of a million items every call, then looks up 1 element then throws the whole thing away, only to regenerate the exact same list again a few microseconds later.
We have plenty of RAM. In absolute terms, 8gb of ram in the macbook neo is 8 billion bytes. 64 billion ones and zeros. You don't need rocket science to make a CRUD app that runs well with that much ram.
Computers don't get slower over time. If we were merely as lazy with computing resources as programmers 10 years ago, most programs would scream on modern hardware.
I am a web developer of over 20 years. I can create insanely optimised pages using nothing other than vanilla CSS and JS.
I have been paid exactly once to do this. There is a site I built in 2023 that has a JS and CSS footprint of less than 100KB after GZip (large site). We even had the Go templates compiled when the web app initialised so the server responded as fast as possible.
Guess what happened when it went live? The content team use 8mb images for everything and every single optimisation I did at CSS/JS was totally useless.
Devs don't care because the people above them don't care and therefore there is zero incentive to even bother.
the engineering and leadership failure was at requirements time. why on earth would somebody pay for all that optimization without knowing about whats gonna be on the page first?
I hear you, and this is a real problem. But it's kind of depressing to need incentives to care about the quality of your work.
You get beaten down eventually. Late last year. I spent like an hour going through why a PR (and this developer's work) in general wasn't acceptable to my superior. He said to me that he was perfectly fine with someone not understanding basic language features (after 6 months using the langauge). He then merged it.
It didn't work (as I had warned) and created a situation where I had to turn off tests in some projects as it totally broke them. I've spent months fixing his crap and still haven't recovered from one bad PR. Now add two other employees that are like this and my manager does nothing about it. I bought a AI package from Jetbrains and now have it do almost all the work. I normally spend some time cleaning it up. Management have made it clear to me that they don't care about quality, they won't hold anyone accountable and won't even fire people that clearly cannot program.
I am 43 years old this year. I just can't be bothered trying to be a hero anymore.
Similarly, my father who retired last week was a joiner/carpenter and would be considered a master boat builder. When my sister was little my dad made her new bed with hearts and flowers carved in the headboard.
He described how adversarial he was too his employer before he retired. He was engaging in Malicious compliance (he is a layman and didn't know it was called that) because management was making his life miserable by employing the same sort of the stand-up meeting ceremony nonsense in carpentry.
They managed to make someone with that level of skill hate their job because of process.
1. Check that you really need a SaaS SPA to solve the communication issues between your team members.
2. HTML and css should be enough for 99% of corporate websites.
3. Resize the images on your websites, they're too big.
4. Use teams in the browser, not as stand-alone app.
Most programmers are JS web devs writing client side code or server side CRUD.
I would guess < 10% of programmers writing code today get perf / valgrind out on the regular. I know I dont.
The old graybeards who know how to optimize efficiency may not work for them anymore, though.
?OUT OF MEMORY ERROR IN 0
READY.
>Nobody who works with LLM generated code believes that LLMs produce fault-free code.
Its languages like C that you have to watch out for, because the LLM will gladly say "this is safe!" when its not.
My point, which I should have been clearer with, is that we aren't at a state where you can just one shot a rewrite of a complex application into another language and expect some sort of free savings. Once we are at that state, and it's good enough to pull it off, why wouldn't the AI be able to pull it off in C as well?
"if"
If it could you wouldn't need to use Rust. It can't, qed.
I would not describe median quality C code as free from these issues
Rust gives you a lot of pain (= useful signals), before damage occurs.
Now imagine you build a reinforcement learning harness around Rust and C. Which is better for reinforcement learning? Impossible to detect failures in the final product or loud and annoying compiler errors that force you to address them?
In like 4 hours. (and most of that was me copy pasting things around to feed it reasonable chunks of information, feature by feature)
It also wrote a real-time passive DTLS-SRTP decryptor in C in like 1 hour total based on just the DTLS-SRTP RFC and a sample code of how I write suckless things in C.
I mean people can believe whatever they want. But I believe LLMs can write a reasonably fine C.
I believe that coding LLMs are particularly nice for people who are into C and suckless.