3 ms·
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
by josephg 7mo ago
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 7mo agoIt 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 7mo ago> 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 7mo agoThere 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 7mo ago> 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.
- 8note 7mo agoThis is a really great case study for why you only optimize when you actually have a problem, and only in the context of a profiler to define what needs optimization. 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?