• 0 Posts
  • 14 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.


  • 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.






  • That’s OOP: https://xkcd.com/927/

    If I understand OOP correctly, the NT compatibility promise is the idea that not only the kernel but also the userspace is standardized, backwards compatible and stable.

    OOP really doesn’t seem to understand how Linux works under the hood and what the issue is.

    The main problem is not that e.g. installed libraries are in different paths under different distros, but that installing libraries is different between different distros, and that different versions are available.

    A library package might be called libXYZ-dev in one distro and libXYZ-devel in another, and in the third distro it’s not even available or available in the wrong versions. That’s the real problem, and OOPs approach of splitting package distribution from the stability of the user space is completely contrary to their proposed solution.

    They just assumed two contradicting goals would somehow make a coherent whole.

    That author just saw Windows and didn’t understand why that system works, saw Linux and didn’t understand why there’s fragmentation problems there and thought that applying the Windows model to Linux somehow magically works.

    Edit: I just noticed that the OP and the author of the blog post have the same user name and thus likely are the same person.





  • When I approached the head of the team that constructed the tool after the meeting and shared the inaccuracies and my concerns, he told me that he’d rather have more data fluency through the ease of the tool and that inaccuracies were acceptable because of the convenience and widespread usage.

    “I prefer more data that’s completely made up over less data that is actually accurate.”

    This tells you everything you need to know about your company’s marketing and data analysis department and the whole corporate leadership.

    Potemkin leadership.


  • Sounds like the network people at my company. They are asking us to spend more time in the office, but they don’t provide enough desks, they don’t provide working wired LAN and they only provide semi-working Wifi. All with proxies that don’t work and filters that don’t let me access the webapp I am supposed to maintain, which is blocked for “being a commercial website”. Thanks, I know, I have to program that crap.