HNHacker News
TopNewBestAskShowJobs

DecoPerson

1,371 karma · joined June 28, 2013

Ex-game designer
submissionscomments
DecoPerson··on Ask HN: Is there a developer laptop that does not suck and is not a Mac in 2022?
Concur. My 2020 ThinkPad Carbon X1 is so well designed and is of excellent build quality. In terms of laptops, I love it so much, even more than my 2011 MacBook Air. The keyboard is great, the screen is great, the Lenovo software is un-instrusive, the battery lasts quite a while, the charging port is durable, the body is durable, the dock drivers actually work, it feels nice to hold, … I could go on.

I’ve done quite a bit of developing and field-debugging with it. Haven’t had any complaints, beyond the unavoidable “My neck hurts.” and “Why is Windows choosing now to prompt me to use OneDrive, scan for viruses, update its search index, and install some mystery .NET runtime updates!? I only have 30% battery left!!”

DecoPerson··on Show HN: A piano chord reference tool
This makes me so happy. I’ve been looking for a tool like this for so long. Thanks for making and sharing!

Bug report: Trying to play sounds on iOS just results in clicking noises.

DecoPerson··on An odd discovery on Spotify
In the “Release Radar” generated for me last week, there was a 40 second song consisting of rhythmic mechanical noises with a strange title and album art of an alien head. I didn’t like it at all. I think it was recommended to me because the publisher listed its artist as “Fanny Mendelssohn” — a classical composer whose work I definitely enjoy and have probably pressed “Like” a few times on — even though the song had nothing to do with her.

You’d think, she shouldn’t be releasing any new works, you know, on account of being long-deceased and all. Therefore Spotify could block releases claiming her as an artist. Unfortunately, there are new renditions of her work being performed, recorded and published regularly, by many different groups. All of them have the right (perhaps even an ethical duty) to put Fanny Mendelssohn as one of the artists. These are works I’d like to hear, so Spotify’s recommendation algorithms are on the right track.

How on earth can Spotify distinguish real Fanny from fake Fanny?

DecoPerson··on Show HN: Kvass, a personal key-value store
If the CRDT part is done correctly, then replaying a message that sets a key will not change anything, ever.

If the message is:

Key: Foo

Reference CRDT node ID: 7654321 (the last node that the clients knows of that updated the value of ‘Foo’)

Operation: Update

Value: Bar

The ID of this new node: 1122112211

(Omitted for simplicity: Timestamps, hashes, …)

Replaying that message won’t do anything if the target already knows about the existence of that new node.

If the target didn’t know about the node, then I guess you’re helping them sync their own data? Maybe they owe you a thanks? If you knew what each encrypted message contained, you might be able to do some split-state shenanigans; for example: replay the message that sets a “PasswordAuthEnabled” key to “Yes” but deliberately omit the message that changes the “Password” key from its default of “password” to a genuine password. It’s very hard to imagine an actual situation like this occurring, but I guess that’s what makes crypto (and designing secure systems in general) so damn tricky. That and the math. And end users. And…

DecoPerson··on School’s out for summer and many teachers are calling it quits
Growing up in Australia, calling a teacher by their first name as a student was incredibly disrespectful and worthy of being sent to the principal if done repeatedly. This often resulted in students never learning their teachers’ given names. Generally, adults—teachers or otherwise—expected to be called by their title and surname, and would likely correct a kid if addressed wrongly.

I rarely see kids out and about at all these days, and if they are, I never see them interacting with adults other than buying take-away. It’s a bit concerning, really.

DecoPerson··on How do video games stay in sync?
Physics on the server? Nearly every shooter game. Server-authoritative is the way. As per the article, the clients only predict some physics objects (requires simulation) and interpolates & extrapolates others (does not require simulation). The clients have no first authority over the server’s simulation, other than their own player inputs.
DecoPerson··on A whole website in a single JavaScript file
“Modern” also means the solution may benefit from reflection on past solutions.

The accounting software I use, written in 2004, evolved over the decades starting from 1980s software. It all works (hence, I’m using it now), but comparing the user experience and source code of various features developed at various times reveals a lot about what “modern” means.

Here’s a few things:

Standardisation: Modern software tends to use proven designs, such as SQL over a bespoke query language.

Performance: The strictness of ABIs and APIs makes it difficult to restructure for the sake of optimisation without introducing undesirable breaking changes. Old codebases may be essentially “frozen” and stuck on old versions of libraries. Fresh software can use the latest versions of libraries, with their new APIs & ABIs and whatever optimisations come along.

Fundamental coding improvements: Old languages don’t have ergonomic, performant closures (see lambda functions in Python). New languages do (see arrow functions in ES6). Replace “closures” with any core language feature, like null coalescing, match statements, object & array destructing (or even better: pattern matching assignment), or hygienic macros. (Let’s not discuss async/await as that doesn’t lie in the “unquestionably better” column.)

Better error messages & debugging: Over time, we collectively as developers have figured out what helps and what hinders when trying to track down troubles.

——

I also build stuff that solves real world problems. I once used Python and Django for everything. Now, I’ve moved to Node.js, TypeScript, React, and generally that ecosystem. It works far better than Python+Django. My development speed is blazingly fast in comparison, and the results stand up — they’re shippable.

Once I was familiar with Python & Django, they got the job done.

Now, I’m familiar with TypeScript & Node, they get the job done better.

Familiarity is that invisible force that, in its absence, prevents us from distinguishing things that don’t work from things that do work but are just different from what we know.

DecoPerson··on Wordle Now Redirects to NYT
FIBRE is spelt FIBER in American English.

AGORA is a rarely-used word and is probably not in the dictionary referenced by The NY Times for their word puzzles.

PUPAL may be mis-perceived as a misspelling of PUPIL and frustrate players. I don’t know… I’m guessing!

DecoPerson··on Phone is still the best way to order pizza
Fraud & pranksters. That’s why you need to create an account & pre-pay when ordering online.

You can reduce fraud a few ways.

One is friction:

- Calling takes time. It can’t be automated.

- The pizza shop can blacklist a phone number. Acquiring new ones to keep defrauding is difficult.

- Creating an account and solving a captcha can be automated, but the barrier for entry is higher.

- Requiring pre-payment is a big one… it costs you money! If you actually pay with your own card, it’s not really even fraud anymore. If you pay with stolen details, then you had to acquire those which is really difficult.

- Emails can be blacklisted. Re-usable email domains (such as Mailinator) can be blacklisted. Creating a new email on most sites is a bit of effort.

Another is traceability (make the fraudster scared):

- Most countries require a real identity to be linked to phone numbers. Hence phone orders are a worthy gamble to accept without requiring a voice captcha, pre-payment, an email, etc.

- Pre-payment requires a real card. If it’s yours and you do a chargeback, you can be traced. Cards can be blacklisted. If you’re using stolen details, then the store can get the police involved.

The best way is detection:

- Even if you can automate phone calls, the employees taking the orders would notice patterns eventually, even in the short conversations where you give only first name, number, and the order. People are really good at detecting patterns (though it might take a few successful fraud attempts before they become aware).

- As accounts & emails get blacklisted, the online site can employee expensive third-party fraud detection software, which does work AFAIK. It looks at thing like data entry speed, IP addresses, order size, issuing card bank, etc. If fraud is suspected, it usually results in an additional soft barrier, such as SMS verification, rather than a hard block. This brings it back to phone numbers & their need for real identity verification — increasing friction & traceability.

This should explain nearly all the things mentioned by the OP. Anything else, like needing to enter your age or whatever, can be explained by some marketing executive desperately trying to hit their KPIs.

DecoPerson··on Google is wrong. Apple’s iMessage is a failure
This can help a lot with adoption by “lame-sensitive” users. Snapchat’s confusing and unintuitive design kept “lame” parents, teachers, managers, etc off the platform and helped maintain a kind of exclusivity.

Discord still has that. Instagram is currently losing it. Skype once had it, but has long since lost it.

A platform that figures out how to be cool and stay cool will reap many benefits.

DecoPerson··on We check our node_modules folder into source control
I might be misremembering but at runtime, the Node process loads .pnp.js, which is a kind of monolithic “compiled” modules file containing all the modules installed. No reading of the .zip files occurs at runtime. (Again, I might be misremembering or have misunderstood. Please confirm/deny this if you know.)
DecoPerson··on Some new BMWs won't have touchscreens thanks to chip shortage
The control dial on BMWs is incredible. Having used both extensively, for both in-car entertainment systems and CarPlay, I far prefer to use the control dial. Even if it didn’t have the safety advantage, I would still use it — it’s just so easy.
DecoPerson··on Empty storefronts are killing neighbourhoods
In Australia, property valuation is a regulated profession. We have state-run land registry departments that tell the tax office what value to assume for each piece of land for tax purposes. If you disagree with the valuation, you can pay for your own private one (from a registered valuer).

Local government taxes (“shire rates”) are indirectly based on “Gross Rental Value” (that is, if the rented out the property at market value, how much would you expect to receive per year?).

There is also land tax, which is based on undeveloped property value.

Most commercial leases have the tenant pay the rates & taxes. If you own a property with 10 equally-sized shops, and one of them is empty, then you by law must pay 1/10 of the rates & taxes (and any other outgoings, like repairs). You cannot split the outgoings nine ways. This acts as a vacancy disincentive.

DecoPerson··on Electron vs. Qt for a new open-source project? Looking for advice
> 1. GUI vs. CLI - I want to support both. But should it be a CLI first application that's then wrapped with GUI? Or perhaps it's better to build it as a GUI first application, and add a CLI interface to it? Or just have a core library, and use it in independent CLI and GUI tools? I never wrote a cross-platform tool, so I am not sure what's the best approach.

Don’t be GUI-first or CLI-first; be API-first. You can get started by writing a test target. As soon as you need more than “edit tests, recompile, run, examine debug prints”, you can start on both the GUI and the CLI together.

Focusing on keeping a solid API makes things much simpler. And if you ever regret choosing Electron over Qt or vice-versa, having all the juicy parts behind an API makes it much easier to switch.

For examples, look at Git, the TypeScript compiler, and Everything [0] (closed source unfortunately).

There was a quick-search app for macOS that used V8-to-Rust asynchronous procedure calls as the API. It would make a great example, but I can’t remember it’s name.

(Love the app idea btw! I look forward to trying it on my mess of files for my small business.)

[0] https://www.voidtools.com/support/everything/sdk/

DecoPerson··on Rotations with quaternions
I was hoping your article would example how gimbal lock can occur with quaternions, but from a quick skim I can’t see any such paragraph.

Would you mind elaborating?

DecoPerson··on Evolving beyond 100B recommendations a day at Reddit
I once looked at the little notification tray on the new Reddit UI and saw a recommendation for a post. It piqued my interest, so I clicked it. It took me to the subreddit, not the specific post. I tried clicking different parts of the notification, same result every time. I tried scrolling down on the subreddit (in the new UI, ugh) and did not the find the post after thirty posts or so. I tried to copy the title from the notification, so I could paste it into Google, but user text selection was disabled by the CSS. I used “Inspect Element” to get a copy of the text, and put it into Google, which finally took me to the post.

All that engineering work to produce 100B recommendations, and it’s not even been put to good use.

DecoPerson··on A SpaceX booster now trails only 4 space shuttles in flight experience
If a large meteor hits Earth, the humanity organism will be glad it spread itself to Mars.
DecoPerson··on Moderna mRNA sequence released to GitHub [pdf]
Check out this video by The Thought Emporium to see how far we’ve come in these matters:

https://youtu.be/J3FcbFqSoQY

This should hopefully provide you with some useful perspective.

DecoPerson··on Dependency Confusion: How I Hacked Into Apple, Microsoft and Other Companies
Imagine we navigated the web using a command line tool called “goto” which works exactly like a package manager. If I want to open my bank’s site, I type “goto mybank” .

I could easily find myself in trouble, because:

- There’s no autocomplete or bookmarks, so typos are easy.

- If “mybank” is a name provided by my company’s name server, I could find myself redirected to the public “mybank” entry because Mr. Not-A-Hacker says his name entry is more up to date (or because I forgot to tell ‘goto’ to check the company name server.)

- There’s no “green padlock” to check while I’m actively using the destination site. (Though at this point it’s too late because a few moments after I hit enter the destination site had the same access to my machine & network that I do from my current terminal.)

- A trusted site may later become malicious, which is bad due to the level of unrestricted and unmonitored access to my PC the site can have.

- Using scripting tricks, regular sandboxed browser websites can manipulate my clipboard so I paste something into ‘goto’ that I didn’t realize would be in my clipboard, making me navigate to some malicious site and giving it full access to my machine (if ‘sudo’ as added to the front).

This is just a few cases off the top of my head. If ‘goto’ was a real thing, we’d laugh it into being replaced by something more trustable.

How have current package managers not had these vulnerabilities fixed yet? I don’t understand.

DecoPerson··on School or Prison
Floor fitout is typically left to the tenant, not the landlord. Building skyscrapers with empty floors gives flexibility to future tenants, increasing the rental/purchase value.

Tall office buildings may often have open plan, but this should be attributed to the fitout builder’s client (e.g. SomeCrazySoftwateCompany as the incoming tenant), not the building builder’s client (e.g. SomeGroupInvestmentCompany the owner of the building)

DecoPerson··on Ask HN: What are you surprised isn’t being worked on more?
Protocells.

Self-replicating cells that can be programmed to perform specific tasks.

The first protocells will be bacteria with heavily modified DNA. Eventually, we’ll be able to build fully-artificial self-replicating protocells (more “artificial cell” than “small robot”). Being fully-artificial will help us integrate new tech that nature hasn’t quite discovered/made-full-use-of yet — like different battery techs, RF communication, transistors, etc.

Here’s a good paper exploring the topic: https://www.mdpi.com/2075-1729/5/2/1019/htm

Imagine a blob that could wash along the floor, clearing 100% of detritus and intelligently depositing it — or perhaps even recycling it.

Imagine being able to repair a worn hip joint by injecting then commanding these protocells — no surgery required.

Imagine them self-assembling into structures to transport, deposit and combine material like an advanced 3D printer, building objects to incredible detail, or massive structures quickly, or both: massive structures with incredible detail.

Imagine programming them to kill all COVID-19 virions!

DecoPerson··on Ethereum 2.0 launches
This also applies to storing value.

See what happened to Greece in 2010, where many individuals lost large amounts of cash stored in their bank accounts. This would not happen with Ethereum. If you hold 10 ETH, you’ll continue to hold 10 ETH until it’s transferred elsewhere (or you lose your keys).

DecoPerson··on Ethereum 2.0 launches
In person, I can exchange information with someone without anyone interfering.

In person, I can exchange value (e.g.: chocolate for firewood) without anyone interfering.

Online, I can exchange information without anyone interfering (using encryption).

Online, I cannot exchange value without anyone interfering.

Exchanging value at a distance is complicated, because there’s so many different laws, bank APIs, apps, regulations, etc etc. We use middle-man services to simplify these problems for us — but they charge hefty fees. There’s delays, and arbitrary restrictions. All these complications also introduce additional risk (compared to exchanging the value in person).

A single, perfect global bank, or a perfect standard for all banks to follow, would allow me to exchange value online without anyone interfering. However, such a thing isn’t likely to happen.

Cryptocurrencies, if executed well, offer a real pathway to “I can exchange value online without anyone interfering.”

DecoPerson··on Brain DNA Refolds Itself to Aid Memory Recall
It’s not black or white. How we behave is obviously heavily influenced by our initial DNA but there’s clearly a heavy influence on “mind” from external factors. It has been shown (proven?) that we can grow beyond things like “identity politics.”
DecoPerson··on One pollster’s explanation for why the polls got it wrong
“The kind of people who answer polls are really weird, and it’s ruining polling.”

This is true everywhere. I’ve been involved polling in for a popular AAA game, a small retail business, school events, online forums, and more; they all fail to account for the “who chooses to answer” bias (is there a name for this?).

I speculate that the “average 4.7 million viewers“ rating Firefly received when it aired was totally off. The Fox executives (who clearly didn’t care for the show, if you read the full story) used this as ammunition to have it cancelled. (see https://en.m.wikipedia.org/wiki/Nielsen_ratings for criticisms of the rating system used at the time).

The people who would take the time to answer a poll (or connect a device to their TV for some cash) are a small subset of people who will skew your data in unintuitive ways. If more business people understood this, our world would be a better place.

DecoPerson··on An open letter to India’s youth: Get off that smartphone. It can destroy you
This is a logical fallacy. If you increase the dosage of mercury, it'll eventually be deadly. In the same vein, smart phones, social media, etc are entirely different beasts to books, radio and even television.
DecoPerson··on JuliaMono – a monospaced font for scientific and technical computing
This font is beautiful and exactly what I was looking for.

I’ve used Courier as my coding and console font for a long time, as it had the right character design and stroke width choices to make reading really easy, even at small font sizes.

A lot of modern coding fonts are taller and thinner. I’ve tried Fira Code, Source Code Pro, Consolas, and others each for a week or so, and found myself struggling to read identifiers and punctuation as well as before.

This font however hits all the same points and is instantly readable for me. Thanks for sharing!

DecoPerson··on Dynamic Scoping in C++
I don’t see how this is functionally different to passing an object that contains references to the relate to variables; which I’ll call a context object.

Practically, dynamic scoping is more confusing than context objects.

    void main() {
        int x = 2;
        fn();
    }
Does fn access or change x? You need to inspect the body of fn to know.

I would call dynamic scoping a poor form of coupling. Instead of bundling your coupling wires in a neat little set of in/out arguments and a return value (the format of which only needs the function’s declaration, not its definition), you are instead reaching out of and into the function’s body, like sprawling tendrils, as your function has free pickings of your variables.

It also strangely couples the names together. The outer function and the inner function may see the variable in completely different lights, yet dynamic scoping requires the outer use the name prescribed by the inner.

Optimization would be hard without WPO. You’d essentially need to keep a run-time “scope” object for every function. Though, the author’s proposed design for dynamic scoping in C++ means you don’t need it for every function; however that design has its own issues: how would you optimize such a design? It would a puzzling challenge.

DecoPerson··on rg3d: Rust 3D game engine with an FPS demo game and scene editor
ECS is not OOP.

In ECS, one system can touch the innards of multiple kinds of components directly, and one kind of component can be touched by multiple systems. Components only hold data and no logic, so in most ECS designs systems will know about the internals of components intimately. This shows a design can ECS-compliant while violating a key part of OOP methodology: encapsulation.

You can use ECS and OOP in tandem by re-introducing encapsulation, as well as any other parts of OOP lost, but you need to be careful not to violate key parts of ECS, such as component not being allowed to have any “logic” (I out logic in quotes because it’s not well-defined: does logic mean ANY code or just... non-boilerplate code?)

One must consider how a codebase will evolve over time, which requires putting yourself in the shoes of those who will be working on the codebase. What benefits does strictly confirming to both ECS and OOP bring? Does the introduction of ECS bring enough structure that the codebase can remain clean, performant, maintainable, portable, etc even without OOP? Is there some kind of hybrid of ECS and OOP where the rules of each are relaxed to create an even better structure? How do all of these potential designs actually look in practice, and is there clear mappings from problems in the problem domain to the philosophical structure being imposed?

In games, it’s hard to map some of the problems to OOP structures (while remaining conformant, clean, performant, maintainable, portable). ECS isn’t perfect, but it’s much better.

I find using C-style, OOP, Actor model, and ECS structuring for different bits of code the best solution. There isn’t a one-size-fits-all when it comes to those things, unfortunately. Though I believe there will be one day (that is: a language arrives which has a model that everything maps to nicely and we’re all happy using and we all say “Wow everything’s so simple now”)

DecoPerson··on Goodhart's Law and how systems are shaped by the metrics you chase
Everything can be measured. We just don’t have the tech yet.

A better phrasing of the problem is: the world is immensely complicated and our individual and collective intelligences have only just begun to scratch the surface of this complexity.

Once an individual understands this, they realize that almost everything in life cannot be measured or predicted, and that subjectivity is still very important and a completely valid way to navigate life.

← PreviousPage 3 of 5Next →