| ▲ | jokoon 9 hours ago |
| it's probably time to call those old retired programmers to ask them how to reduce software memory footprint or to teach that again |
|
| ▲ | josephg 8 hours ago | parent | next [-] |
| Taking a big, complex, already well optimised program like Chrome or the linux kernel and optimising the memory footprint is hard. But 90% of programs are just crappy web apps that nobody has even bothered to optimise at all. (Sometimes wrapped in electron or something.) 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. |
| |
| ▲ | JollySharp0 7 hours ago | parent [-] | | It isn't that they are crappy web devs. It is that often the org paying for the development doesn't care. 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. | | |
| ▲ | josephg 6 hours ago | parent [-] | | > therefore there is zero incentive to even bother. 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. | | |
| ▲ | JollySharp0 6 hours ago | parent [-] | | There is something very wrong now with how companies operate in general. 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. | | |
| ▲ | josephg 5 hours ago | parent | next [-] | | > There is something very wrong now with how companies operate in general. Some companies. A lot of companies, maybe. But far from all of them. I've done a lot of consulting work, which means I've done short stints at a lot of different places over the years. Some were absolute stinkers - like you describe. But I've also worked with some wonderful people and on some great, high performance teams. I understand that its not so easy when you're 43 (and maybe, with kids). But you don't need to stay in a job like this. Its not worth getting ground down like this. Its bad for your health. And its horrible for your career in the long run. Move to a smaller company. Or sniff around and find a better team within your existing org. In the words of my favorite poet: The world is made to be free in. Give up all the other worlds except the one to which you belong. | | |
| ▲ | JollySharp0 5 hours ago | parent [-] | | > Some companies. A lot of companies, maybe. But far from all of them. I honestly think it is most of them. > Some were absolute stinkers - like you describe. But I've also worked with some wonderful people and on some great, high performance teams. I've totally given up on it. People don't value your work. I did a piece for a particular company. It worked perfectly. It was thrown away after a year and half because management decided everything should be rewritten in <new framework> ignoring the fact that what I had written was well documented and worked absolutely fine. Now I shouldn't really care right? I was paid and all. But it pissed me off. What the point in doing a good job if people just throw your work in the bin? I am looking at what my options are going forward. I am honestly considering being a car mechanic (I fix my own vehicles) or work outside for the canal trust. Realistically I suspect I might pivot to QA or doing something security related. > I understand that its not so easy when you're 43 (and maybe, with kids). But you don't need to stay in a job like this. Its not worth getting ground down like this. Its bad for your health. And its horrible for your career in the long run. I've been looking for over 2 years. I want to move to be closer to my family which are 300 miles away (the other side of the UK). So remote is a must. A large number of positions are hybrid, so not an option. Outside of that many of the position in the UK are working Defence, Intelligence or Law Enforcement. All of those I have ethical reasons why I won't work for them. Outside of that there is Gambling, Pay day loans, and spooky stuff like tracking people via facial recognition. > In the words of my favorite poet: The world is made to be free in. Give up all the other worlds except the one to which you belong. I find this condescending. |
| |
| ▲ | nullbyte808 3 hours ago | parent | prev [-] | | Dear god how do I get these jobs? I'm 35 yo and would work with you and accept your work, not jam crap code into things. I'm open minded and realize when someone's idea or code is better than mine. |
|
|
|
|
|
| ▲ | whynotmaybe 8 hours ago | parent | prev | next [-] |
| I can save everyone a few Mb of memory now : 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. |
| |
|
| ▲ | nostrademons 8 hours ago | parent | prev | next [-] |
| This is happening, sort of. All the big tech companies have major initiatives going to reduce RAM usage. The old graybeards who know how to optimize efficiency may not work for them anymore, though. |
|
| ▲ | Waterluvian 7 hours ago | parent | prev | next [-] |
| This feels kind of worn out. Yes we use more memory but we have more to work with. At the very worse you just let your favourite LLM take a pass at improving memory usage. For example, yesterday I was debugging an Electron crypto mining blockchain 2.0 app and the WebWorkers wou—- ?OUT OF MEMORY ERROR IN 0
READY.
>
|
|
| ▲ | autophagian 7 hours ago | parent | prev | next [-] |
| Seems unnecessary. We can simply ask the LLMs to do it after, of course, imploring them to not make any mistakes. |
|
| ▲ | rat9988 9 hours ago | parent | prev | next [-] |
| The art is not lost, just not funded. Feel free to fund the programmers for your own software projects. |
| |
| ▲ | tempest_ 9 hours ago | parent | next [-] | | It isnt lost but it also isnt a common skill set in programmers any more. 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. | | |
| ▲ | zozbot234 8 hours ago | parent | next [-] | | You can still write JS or TypeScript code that tries its best to keep memory use under check. JavaScript was around in the late 90s when the memory footprint of software was at least an order of magnitude lower, so it's absolutely doable. | | |
| ▲ | tempest_ 7 hours ago | parent [-] | | JavaScript in the late 90s was doing a hell of a lot less than it is today. |
| |
| ▲ | Quothling 8 hours ago | parent | prev | next [-] | | You don't have to go that deep. 99% of the time our analytics or risk management teams have some really memory inefficient Python and they want me to write them one of our "magic C things" it turns out to be fixable by replacing their in-memory iterations with a generator. | |
| ▲ | siruwastaken 8 hours ago | parent | prev [-] | | Most people don't have the chance to do that, but hopefully we can see some other languages get first class access on the web. At least there is the whole WASM project. |
| |
| ▲ | kitsune1 9 hours ago | parent | prev [-] | | [dead] |
|
|
| ▲ | reenorap 3 hours ago | parent | prev | next [-] |
| memmaker for the win! |
|
| ▲ | manicennui 8 hours ago | parent | prev | next [-] |
| Why not ask your LLM? |
| |
|
| ▲ | bitwize 5 hours ago | parent | prev | next [-] |
| Nonsense. You prompt an adversarial agent to look for bottlenecks and suggest improvements in what your coding agent wrote, "and don't make mistakes". |
|
| ▲ | benjiro3000 9 hours ago | parent | prev | next [-] |
| [dead] |
|
| ▲ | zozbot234 9 hours ago | parent | prev [-] |
| Just rewrite your biggest memory hogs in Rust, it routinely slashes RAM footprint and demand for RAM throughput. The effect is even bigger than the typical reduction in CPU use. You can even ask AI to help you with the task, it will use a lot less RAM for it than the rewrite will save down the road. |
| |
| ▲ | IncreasePosts 9 hours ago | parent [-] | | Why would we need rust, if the AI can just write really good code in C that doesn't exhibit any of the issues that rust protects you from? | | |
| ▲ | Aurornis 8 hours ago | parent | next [-] | | Rust's compile-time checks are actually a nice set of guardrails for LLMs. Nobody who works with LLM generated code believes that LLMs produce fault-free code. | | |
| ▲ | jesseschalken an hour ago | parent [-] | | Yes, languages with very strong type systems like Rust are incredible when paired with an LLM. Just like chat bots have a calculator as a "tool" because they are not the best at calculation themselves, they need a type system to deterministically validate the safety and cohesion of the code they generate. Its languages like C that you have to watch out for, because the LLM will gladly say "this is safe!" when its not. |
| |
| ▲ | vmg12 4 hours ago | parent | prev | next [-] | | > if the AI can just write really good code in C that doesn't exhibit any of the issues that rust protects you from? "if" If it could you wouldn't need to use Rust. It can't, qed. | |
| ▲ | msy 8 hours ago | parent | prev | next [-] | | 'rewrite in C, make sure there are no memory leaks'. You first. | | |
| ▲ | IncreasePosts 8 hours ago | parent [-] | | Why is that less realistic than saying 'rewrite in rust, make sure there are no memory leaks'? 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? | | |
| ▲ | msy 8 hours ago | parent | next [-] | | You don't have to trust the AI to do it with Rust, you just have to ensure certain conventions are followed and you can formally prove you're 'safe' from certain classes of issue, no AI magic dice-roll. A lot of people are very excited by the idea that now language capabilities (and almost every other technical nuance) somehow don't matter but much like gravity they will continue to assert themselves whether you believe in them or not. So far humans have proven unable to write large apps in C without those issues, given their work is the training basis for LLMs this creates two problems, one being that they don't 'know' what a safe app looks like either and any humans reviewing the outputted code will be unable to validate that either. | |
| ▲ | throwaway173738 8 hours ago | parent | prev [-] | | There are classes of bug that are easy to write in C that are impossible to express in Rust. | | |
| ▲ | davemp 6 hours ago | parent [-] | | let foo = [1, 2, 3];
unsafe {
*foo.get_unchecked_mut(4) = 5;
}
Not sure why Rust evangelists always seem to ignore that unsafe exists. | | |
| ▲ | dendix 5 hours ago | parent | next [-] | | Hmmm... where could the oob access possibly be I can't tell | |
| ▲ | vmg12 4 hours ago | parent | prev [-] | | You can prevent unsafe from being used in a repo with linter rules. |
|
|
|
| |
| ▲ | throwaway85825 8 hours ago | parent | prev | next [-] | | The Rust ecosystem and build tools are much easier to use than C. The value of a language isn't just syntax. | | |
| ▲ | megous 8 hours ago | parent [-] | | LLMs are great at C, probably because C is historically the most popular language in the world, by far. It only declined slightly very recently. But there's insane amount of code written in it. |
| |
| ▲ | pessimizer 8 hours ago | parent | prev | next [-] | | Because it can't? | | |
| ▲ | maplethorpe 8 hours ago | parent | next [-] | | Have you tried asking Claude 4.6 Opus? | |
| ▲ | megous 7 hours ago | parent | prev [-] | | Based on a FIDO2 spec I used it to write a reasonably compliant security token implementation that runs on top of Linux USB gadget subsystem (xcept for attestation, because that's completely useless anyway). It also extracted tests from an messy proprietary electron based compliance testsuite that FIDO alliance uses and rewrote them in clean and much more understandable C without a shitton of dependencies that electron mess uses. Without any dependencies but openssl libcrypto, for that matter. 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. |
| |
| ▲ | post-it 8 hours ago | parent | prev [-] | | It can't, because there is no really good code to train off of. |
|
|