HNHacker News
TopNewBestAskShowJobs

reificator

6,682 karma · joined June 9, 2017

submissionscomments
reificator··on Case against OOP is understated, not overstated (2020)
> This sort of begs the question: where does classical OOP, the one taught to all undergrad CS majors in programs that use Java or C++, really fit in nowadays?

I have no idea. The smalltalk ideal of OOP lives on in all sorts of ways, but the deep inheritance chain version that gets taught in classes? I don't think it has a place apart from maintaining existing code.

reificator··on Case against OOP is understated, not overstated (2020)
> This is why simulations like say someone making a game or simcity with like relatively independent entities that map to something in real life use OOP.

I don't think this is the case, or at least it hasn't been for quite awhile.

Any gamedev I've known in the last decade or so would reach for an ECS[0] if they wanted to clone SimCity, in other words they would design it somewhat like a normalized database.

Each character, building, zone, or whatever in the game would be an Entity, represented by a unique ID.

Then there would be collections of Components, which are basic structs like Position or Sprite. A set of components that are all tied to the same ID would represent a single Entity the same as if it were an instance of an Entity class. These components together hold all of the game data, to the point where a naive save game system could just serialize all the (non-pointer) component data and be done. How these are stored varies by implementation and configuration, but a table in a database is a reasonable mental model to understand the core concept.

The game logic is executed in Systems, which are functions that read and write component data on some schedule. The simplest example is a velocity system, that would find all the entities with both a Position component and a Velocity component and update the Position accordingly.

In the case of a SimCity style game, the ECS approach is much more cache friendly, for both instructions and data, because you're handling all of the same work at the same time, instead of updating each entity one at a time which leads to cache miss after cache miss. This can bump the max number of agents in your simulation by multiple orders of magnitude.

Some other benefits are:

* Empower designers to iterate more quickly by giving them an editor where they can change components out without changing code. Say you have Players and Enemies and they both have Health, and Walls which are simply props with Collision. If you want to try destructible environments you can simply add a Health component to your Walls in the editor rather than try to move Walls into your LivingEntity inheritance chain or modify everywhere that does damage to check for WallEntity in addition to LivingEntity.

* Easier to parallelize. If you're using objects and you want to start multithreading you quickly start feeling like mutexes are the only answer. But with an ECS if your Systems only operate on their arguments, then you can run any systems in parallel that you want, as long as anything you mutate is not referenced in any other currently running systems. For instance every Rust-based ECS I've ever seen does this out of the box, because they can tell what fields are mutable from the function signature.

* Easier to test. If all your movement system cares about are entities with both Position and Velocity, then that's all you need to setup to perform a test. No MockPlayerInput or headless rendering required, except where those are actually the thing under test.

[0]: https://en.wikipedia.org/wiki/Entity_component_system

reificator··on Wordle-solving state of the art: all optimality results so far
> Essentially Wordle is just Hangman with a neat twist.

I'd say the closer comparison is to Mastermind[0].

[0]: https://en.wikipedia.org/wiki/Mastermind_(board_game)

reificator··on The old internet shows signs of quietly coming back
> I don't understand why this view is so prevalent.

Fearmongering from those actually affected by these common sense regulations.

reificator··on Locked out of 'God Mode', runners are hacking their treadmills
They didn't say it was identical, they said it was a much better combo.
reificator··on Best Wordle guessing strategy
Go to the gear in the top right, and enable `Hard Mode - Any revealed hints must be used in subsequent guesses`.
reificator··on Sonic 3D: Director's Cut (2019)
It's distributed as a patch file, and also he founded and currently serves as director of the company that originally developed the game. I think he'll be fine.
reificator··on Leetcode has taught me that I'm a bad engineer
> In interviews I have people program a function to rearrange characters in a string, appropriately named "SimpleProblem", and >50% of candidates with experience can't write a function that compiles and solves the problem.

I would struggle with this problem, because it's difficult to read whether you want me to push back against the requirement itself and try to solve the real problem instead of shuffling chars, or perhaps you want me to talk about the edge cases you're likely to encounter while I write the naïve solution, or maybe you want to pretend it's the 80s and nothing outside your chosen charset could ever exist in real data.

reificator··on United, Spirit offer higher pay to on board staff during January
At the time of the comment it was triple, not double.
reificator··on United, Spirit offer higher pay to on board staff during January
> It's a little bit ridiculous to complain about low wages for a job in a thread about an employer tripling wages to ensure that the job in question is staffed.

It's a little bit ridiculous that their pay is so low that increasing it enough to keep it staffed means triple.

If your employer started getting desperate could they offer 3x your salary? Would they need to come anywhere close?

reificator··on Windows 2000 Modernization Guide
I think what they’re trying to say is something like “If you want to act in protest against bloat and planned obsolescence you can use a Linux desktop other than Ubuntu”
reificator··on The Google home page is 500K
I have two periods in my life. Before password manager and after password manager.

After I made the password manager a part of my routine that I trust absolutely that I never skip, all of that anxiety went away. I still have logins from the before times that I wish I could round up, but for the last ten or so years I can guarantee I know every site that I’ve signed up for.

reificator··on Best practices for writing code comments
What search engine prioritizes links in comments or code blocks as any sort of signal?

I have no particular attachment to SO, especially after the way they handled their public drama recently.

That said I put a link to SO any time I have to look something up there and it’s not immediately obvious from the naming/docs why it does what it does. I also try to sum it up in a sentence or two if I can and if it doesn’t distract from understanding the larger goal of that section of code.

reificator··on Best practices can slow your application down
Stack Overflow predates any of those being open source.
reificator··on Ubisoft's unprecedented “exodus” of developers
> > A great product sells itself.

> This is just not true.

Minecraft is the best selling game of all time[0] and while it's been marketed more since Microsoft purchased it, the first million sales happened within 7 months of charging for the game. Just over a year after commercial release it hit 10 million sales.

This was not a period of Minecraft marketing. Most sales were due to people simply seeing others (friends, YouTubers) playing the game and wanting to try it themselves.

[0]: Wikipedia claims 238 million sales, vs GTA V in second place with 155 million. https://en.wikipedia.org/wiki/List_of_best-selling_video_gam...

reificator··on Against 3x Speed
I've made meaningful progress on things I'm learning by listening to podcasts at 3x speed + "Smart Speed". Could I have made more progress by listening slower? Maybe, though that's debatable. Would I have even started? Absolutely not.

Before I ever found speed controls I'd start listening to podcasts and then just give up because it felt so boring and slow. "Why would I listen to podcasts or audiobooks when I could read them at several times the speed, back up, reread things, copy sections into my notes, and skim past the parts I already know?" is a common thing I used to say. Podcasts don't have an index like a real book, and it's hard to flip back and forth between two sections.

Now, I'm not listening to podcasts related to programming, despite that being my main profession. I'm listening to a podcast about a hobby and one I'd like to improve at, and I'm doing it while I work, drive, or otherwise do things that don't demand that part of my brain. I'm also not afraid to rewind or slow down, particularly if there's a guest on whose voice I'm not familiar with.

There are over 600 episodes (maybe 700 by now?) in the backlog of the main podcast I'm listening to right now, each between 30 minutes and 4 hours, with an average around an hour and a half or so. That's a lot of audio. I've been listening for months and am around 175 or so episodes in. If I was listening at 1x speed then this podcast might be a 5 or more year commitment.

If I was studying for a test, maybe I'd slow it down. Maybe I'd choose a format like text where available. But this particular show is not in lecture format. It's structured as an ongoing discussion between people who want to improve at something very intricate and ever changing. I'm listening to hear how different people approach these situations. So having the speed of the conversation be fast enough that I'm not losing the thread of what's going on is more important than catching every little detail.

I'm listening to hear stories, or for debates between people who look at the problems in different ways and want to find holes in their own approaches. I'm listening for what people's mindsets are like and how their opinions change over time as they gain more experience and revisit topics they've covered in the past.

I also listen with the intent of deliberately practicing the thing they're talking about, and use that to build up my own experience and opinions. For any given topic that comes up on the podcast I can typically tell you the stance of each of the hosts as well as any guests that were on, and I can tell you whether I think their reasoning is sound based on my own attempts. So while my listening is passive I actively engage with the content on a regular schedule.

reificator··on Sonic the Hedgehog for Commodore 64/128 + REU
That actually makes a lot of sense, I've only ever played NTSC Sonic. In that case it probably sounds great at the right speed.

Thanks for the insight!

EDIT: In fact watching the video at 1.25x makes the music sound substantially better. I think that's too fast[0], but either way you've nailed the issue I had with it. I'm eager to hear it "as intended".

[0]: I listen to podcasts at 3x speed so my sense of the "right" timing for audio has definitely weakened.

reificator··on Sonic the Hedgehog for Commodore 64/128 + REU
I didn't know the C64 had blast processing!

The levels and characters look great, the gameplay pieces are mostly there, and the music at least sounds authentic, if not exactly pleasant. Something was definitely lost in translation there but short of writing new music I don't know what else they could have done.

Great work all around.

reificator··on Game “While true: learn()” for free in Epic Store
Having not read them I would be shocked if they differed dramatically from the points Gabe Newell makes about those same stores. At the end of the day both companies are trying to avoid getting squeezed out by a platform-pack-in monopoly.
reificator··on Game “While true: learn()” for free in Epic Store
Do you want to explain where "paying for games that you get to keep" entered this conversation?

The logic the GP was using was that exclusivity deals and "the first hit is free" tactics are not ultimately in the customer's interest.

reificator··on Lazygit: A simple terminal UI for Git commands
I was also in this boat, but vscode has been reliable for me. Maybe I’m not clicking the wrong options, but I used the gut cli exclusively for years so maybe my mental model is in the right place to avoid that.
reificator··on Lazygit: A simple terminal UI for Git commands
> Does any GUI offer `-p` in `git commit` and `git stash`? I literally use it 10s times per day, can't live without it once I started using it.

VSCode’s GUI handles most of what I use -p for, though if I need to use `s` inside -p I drop to the integrated terminal. Not sure if the gui has an equivalent but I haven’t noticed it.

Stash on the other hand isn’t missing anything I care about: the gui lets you name stashes if you want, apply latest, etc…

reificator··on How to build a second brain as a software developer
I started down this path years ago because bookmarks and sites I know used to exist started vanishing faster than I could catch up with my to-read folder.

Link rot is real and sites/information I used to be able to find on google in seconds have been gone for years.

reificator··on How to build a second brain as a software developer
Even on a joke site I can't stand fade-in on scroll.

If you're using scroll events for anything other than loading and unloading content outside the current viewport you're doing it wrong. Please stop.

reificator··on The case of the 500-mile email (2002)
Not if your validation is `/</xml>$/`.
reificator··on Data-Oriented Architecture (2020)
My advice to anyone naming things and trying to evangelize them is to try to find any way the name could be made fun of, any alternate meanings that could be applied, and so on. And do that for the acronym as well.

The article here calls it Data-Oriented Architecture once, and then proceeds straight to DOA. Trying to convince people to switch something as fundamental as their software architecture is difficult enough without calling your idea "Dead On Arrival" from the first paragraph.

reificator··on M1 Pro 14“ MacBook Pro Running KDE Plasma 5 on Arch Linux ARM
> I really hope that all of these efforts end up failing miserably. Their only purpose is to encourage customers to buy from these companies.

Or to enable customers to migrate away bit-by-bit because cold turkey is hard.

I personally am running linux full-time on my personal machines, but I wouldn't have ever made the switch had I not been able to run linux in a VM for a few weeks and then dual boot for a few years and then run windows in a VM for another few years. If people back in the early 2000s had your mindset I'd probably be running a mix of windows and mac today.

reificator··on Man left shocked as his house is 'stolen'
Losing the singular most expensive item you own, that typically contains the rest of your property, with no warning… that tends to end with you on the street which some may feel worse than prison.

I’m not condoning that choice but recognize the consequences are particularly low when you’re already at the bottom.

reificator··on Publish your PWA to the iOS App Store
This seems easy to solve given Apple's rejection of PWA support in Safari, just add a feature that doesn't matter much, like an (opt-in!) notification on updates. Safari (and therefore all browsers) on iOS don't support notifications, so you're doing something you couldn't do from the website.

https://caniuse.com/?search=notifications

reificator··on We are recreating the entire planet in Minecraft
Minecraft data is stored in a mix of JSON and a well documented/understood custom format. It's even documented in the same wiki that players use to learn how to play: https://minecraft.fandom.com/wiki/Anvil_file_format

The world files are saved unencrypted on disk and can be backed up, edited outside the game, and even converted easily to another format if another game somehow dethrones Minecraft in this niche.

There are also a variety of viewers that render Minecraft worlds to map images or interactive maps a-la Google Maps.

Finally the official Minecraft launcher allows players to choose any archived version of the game instead of forcing the latest and greatest. The only missing versions are very early development builds from 2009/2010. This ensures that even if a newer Minecraft version is released that is incompatible with this effort, the last compatible version will always be available. (Players can and do archive these versions themselves as well, this is not reliant on the official servers)

← PreviousPage 2 of 34Next →