• 12 Posts
  • 1.66K Comments
Joined 2 years ago
cake
Cake day: March 23rd, 2025

help-circle


  • Super Mario Bros shipped in 40KB. A bare React app ships more before you write a line of your own. What did they know that we forgot?

    Stupidly easy answer: compatibility and visuals.

    I recently did just that: I made a handheld physiotherapy game console base. The prototype ran on an Arduino Nano I had laying around. 32KB flash and 2KB RAM. That makes the 192kb ROM and 10kb RAM that Super Mario Bros has to work with look luxurous.

    You fight for every bit on a platform like that but at the same time it’s also really easy to do so. With that little available resources you can optimize almost perfectly because there is so little code.

    That doesn’t explain why a bare React app is larger than a finished Super Mario Bros. The answer is compatibility. SMB needs to run on exactly one platform with exactly one CPU, so it ships compiled.

    React needs to run on a multitude of different browsers, so not only does it ship in source, but it also needs to ship hundreds of polyfils to work with different browsers. Not only that though, it needs to ship tons of features that any given app might need.

    Which brings us to the next issue: content and visuals.

    OOPs blog post formatted in ASCII contains 14.8kb in pure blog post text. At the level of performance these old games had, text was really expensive, which is why even RPGs of that time had very limited dialogue.

    The NES had a resolution of 256x240px, or 637 kilopixel with less than 4bit color depth, which means a full screen image would take around 30kB (uncompressed). A full HD screen has 2 megapixel at 24-42bit color depth, so 6MB-10MB per full-screen image (uncompressed).

    The 30kB would have been far to expensive on a NES, so in practice graphics were limited to a handful of small sprites moving over a background filled with repeating tiles. On the other hand it’s very common to have large, high-quality images on a website.

    Sure, you can still make websites with the same graphics as a NES game, but then it also will look like a NES game.

    And we aren’t even talking about animations, videos or anything like that at all.

    TLDR: Yes, it’s still possible to program like on NES. The catch is quite plainly visible to anyone who has spent more than 3 minutes programming:

    • It will look like a NES game
    • It will take inordinate amounts of time to optimize
    • It will run on exatly the one machine you build it for

    OP’s point is… very uninformed.



  • Oh, of course. It’s always been the case that being poor is more expensive. Or to put it differently, if you can afford higher up-front costs you end up saving in the long run.

    But even then: right now you e.g. mostly only get affordable ICE cars. But if the people who can afford it now mostly buy electric, that will have an effect on the used cars market in a few years.

    Again, I’m not talking about socioeconomic fairness. Higher fuel prices hurt, and they hurt the poor more than the rich. I’m talking purely on the effects on the climate, and these are undeniably there.


  • You can change a ton. Especially in an urban sprawl environment.

    Urban sprawl means it’s comparatively easy for people to get PV, heat pumps for heating/cooling and EV chargers at home.

    With that, you make yourself completely independent of high gas prices.

    Yes, it has high up-front costs, but the long-term benefits are massive. And with enough pain comes political momentum, which can be used to get state subsidies for that kind of stuff and that way you and your country can become independent of importing fossil fuels while at the same time reducing harm to the climate.

    And yes, it needs to hurt quite bad first to cause such a big systematic change.


  • Poor people are a tiny fraction compared to billionaires per capita.

    But not in total. There are much more poor people than billionaires, and even if each billionaire produces 50 000x the emmisions that a poor person does, all in all the emmissions of poor people are quite relevant too.

    (From an equality standpoint obviously billionaires should be emmission-capped or taxed to the point that they aren’t billionaires anymore, there’s no question about that. But poor people’s emmissions are still significant and more than relevant to the climate.)


  • Gas use is pretty elastic, even in Indiana.

    If gas is expensive, people tend to buy more fuel-efficient cars (or even electric cars). They drive slower and more fuel efficient. They consider whether a trip is actually worth it and bundle trips. So e.g. instead of driving to the shop for a handful items every day they instead do a weekly shopping trip where they get everything they need for the week.

    Just with changing your driving style you can often save a ton of fuel.

    The increased prices also mean that shopping in general goes down. If you don’t have money for unnecessary garbage you buy less unnecessary garbage, thus again helping the economy.

    So yes, even in Indiana where you have to drive to your job, higher fuel prices will lead to benefits for the environment.



  • Arduino is a toy/prototyping platform that you really shouldn’t use for productive solutions (it’s got terribly bad code quality, bugs that have been open for over a decade, it’s basically unmaintained by now).

    1k lines is a micro project. It’s really small.

    All that’s on a level where if this is just an internal solution that isn’t sold to customers it’s ok if the code is shit as long as it works.

    If you are actually selling it to customers or you rely on it performing a critical function, you should urgently move away from Arduino anyway.

    Remember: code quality is not an end to itself, but instead a means to an end. It gives you a more maintainable, less buggy project. If you don’t care about maintainability and stability, it really isn’t worth the time to optimize code quality here.


  • This here. It makes a huge differenche which AI you use and what you do with it.

    “Free ChatGPT, make me an app” is going to result in pretty bad code.

    “Claude Opus 5.5, here’s a project with a well-defined agents.md, coding guidelines, tests, …, please analyze this well-defined ticket and grill it. Together we knock out the remaining kinks in the ticket. Then put the analysis into .md files, and I review that you actually understood what you are supposed to do. Then in a new session read the .md files and start the implementation, always stopping and asking if something’s unclear. Then in a new session let’s review the result together, before I send it on to the next developer to do a pull request review.”

    This results in actually pretty good code that often catches issues that a human dev alone wouldn’t.