• 2 Posts
  • 1.47K 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.








  • I won’t be making ships a certain shape to make them easier to know which way they’re pointed. Because space has no air, no need for aerodynamics.

    True, but even in space it makes sense to put all your hot and dangerous engines and fuel systems on end of the vessel and all the crew and life support stuff on the other hand.

    Since the ship can be turned around in any direction it really doesn’t make much sense to put anything but small maneuvering/rotation thrusters at the front, since if you want to thrust in the other direction you can just spin the ship around.

    For comparison look at the Rocinante from The Expanse. That thing isn’t meant for athmospheric flight or aerodynamics, but it still has a giant engine on one end and windscreens on the other.

    In the first scenes of the first episode of the show they even make it a point to show how a cargo ship flips around at the centerpoint of the journey to switch from acceleration to deceleration.

    There’s an entire replay system where you can see all other player’s runs, easily by clicking the leaderboard runs, or going to a user’s profile history. If you’re playing the easy map and it’s too easy, and you’re sitting waiting for 2-3 minutes, check out the fastest run which are around 25 seconds on both Prime and Reach.

    Yeah, of course, but when I’m doing my first run in the game on the first map of the game I’m not going to fly optimally. Even with a basic understanding of orbital mechanics.

    I just think it would be good if even the “tutorial” maps are somewhat enjoyable.

    The later maps are really cool!


  • UI scaling via the settings saved this on the phone. With 130% UI scaling and 100% for the rest it’s playable. TBH, I didn’t find the settings before you pointed out they exist. 50% scaling is probably not a good default. What’s also a bit of an issue is that I can’t get to the settings with a game running. It seems like I first have to exit the current game to get to the settings. That’s a bit annoying if I want to e.g. adjust in-game scaling, because I have to completely exit the game, adjust, and to see if the setting is ok, I have to start a game and repeat the cycle.

    I wonder if it might be worth it to make the ship sprite more conical instead of rectangular. Like, make the front pointy.

    I keep forgetting whether she ship is pointed up or down. I always have to try if forward or backward gives me the effect I need.

    The more difficult levels are pretty playable. The easy ones I think don’t represent the game well. I first tried the top easy level and it was 2-3 minutes of waiting. I’m happy I tried trefoil next, because that level was much more fun.


  • I really like the idea. I played a bit and got feedback.

    • First I opened it in Firefox on Android. It almost worked. Keyboard bindings worked, but scaling is messed up. It’s all super tiny. I then continued on PC.
    • I miss a “advance time” feature. Especially on the easier maps you just don’t get a lot of momentum and being able to fast forward would be nice.
    • R is too close to keys you need to play the game. More than once I accidentally touched R when I wanted E and it messed up a promising run.
    • The ship is sooo tiny. It also looks the same in all directions, so it’s often really hard to see where it’s pointing.
    • I wonder if instead of rotation+thrust it would be better to just WASD to accelerate the ship in screen direction. So W would always propell the ship towards the top of the screen. That way it also wouldn’t matter that the ship is so tiny.

    Other than that, it’s a pretty cool idea, I like it. Spaceflight Simulator meets The Expanse-style slingshot racing.




  • Compare AI to clothing. Clothing did this shift decades ago. It actually did it twice.

    My grandma once put it like this: “In the 60s, no TV presenter would be ok with showing up with an ill-fitting suit. Nowadays that’s normal.”

    We collectively descided to move away from perfectly-fitting tailored clothes to ill-fitting mass-produced off-the-shelf clothing because it’s way cheaper.

    And then there was the second shift from off-the-shelf clothing using quality materials to off-the-shelf clothing using shit materials, and as a society we too accepted that. More trash for badly-fitting fast fashion.

    I fear AI will do much of the same. We already saw AI translation, and its predecessor algorithmic translation, replace human translators in areas where it doesn’t matter that much. Amazon listings in non-English languages have been an utter mess for a long time, but now we are getting the same translation mess on the home pages of major brands (e.g. Samsung or Google). It’s “good enough” to not harm sales, so we now have auto-translation instead of a quality human translation.

    The same is happening right now with music, apps, games, websites, Youtube videos and so on.

    Is any of that on-par with quality content created by quality professionals? No, by far not. But it’s “good enough” for most people.

    I think a good example of this happened at my kid’s school’s summer party. They always have a segment there where they let the kids sing and/or dance to a bunch of songs. Usually it’s some pop music.

    This time they had one AI generated song that was about the last school year of the departing class. It mentioned people and activities that were relevant to the kids. It talked about the school camp they had that year and about going skiing together.

    Was it good music? Hell no. It kept mixing styles switching between hard rock, reggae, movie trailer and a few other undefinable styles every few lines, it didn’t manage to keep a consistent tone or anything. Musically, it was certainly the worst song of the day and certainly not something that anyone with some understanding of music would want to listen to again. Any decent musician would have been able to create something much better.

    But the school doesn’t have the budget to hire a musician for something as irrelevant as a song for the school’s summer party, so this was the best song specifically composed for this school ever. It was the only one so far. And the kids really liked having their experiences memoralized in a song, no matter how bad it was.

    I’m kinda ambivalent on AI. I hate it when it degrades the quality of something that we should have gotten in better quality anyway. I hate it when it’s used to fire people who could have done a better job.

    I don’t think it’s all that bad when it enables people who could have never created what they wanted without it, and who would have never hired someone to do it for them anyway. Without AI, the school would have just not done that song.


  • squaresinger@lemmy.worldtoTechnology@lemmy.world•*Permanently Deleted*
    link
    fedilink
    English
    arrow-up
    6
    arrow-down
    1
    ·
    3 months ago

    Even 80-85% sounds like too much.

    Compare the legs of a slim person with the legs of a severely overweight person. It’s like adding shake weights onto the legs that do the pedalling.

    And overweight people have different weight distributions, some have the weight on the legs some in the belly. Depending on where the weight is, that’s a massive difference.

    Watts input and watts output is massively different with every machine (compare e.g. an electric engine with 90+% efficiency to a combustion engine with maybe 20-30% efficiency), and humans are no different.


  • One option would have been to write a nice email to the owner of the gym. Not guaranteed to work, but also not illegal.

    I don’t know what the exact prompt was. If it was “Hack the website to advance me”, I’d totally agree with you. There’s conspiracy there, no question about that.

    If the prompt was “Is there a way to advance me in the queue?” that’s a different story. Here the model could have answered “No”. Or it could have tried the email thing. Or it could have searched whether there’s some lesser known priority booking option which you get for paying the VIP price or something. In that case I don’t see grounds for any criminal charges.

    Have you read the post mortem of the HuggingFace hack? The task given to the agents had nothing to do with HuggingFace, but the agents determined that HuggingFace had the results of what they needed for their actual task at hand. So they decided that instead of solving their task themselves they’d rather break into HuggingFace to steal the result.

    It’s like ordering food at McDonalds, but instead of cooking the food for you, the cook breaks into the Burgerking on the other side of the road and steals the fries for you from there.

    The way it’s currently going it’s not only possible but actually somewhat common that a totally innocent prompt can lead to criminal outcomes.