HNHacker News
TopNewBestAskShowJobs

LeonB

3,243 karma · joined May 23, 2010

Old Timey Blogger from https://secretGeek.net
submissionscomments
LeonB··on Serialization for C# Games
In my personal projects I’ve been using variations on the same simple code for saving/loadings objects for a decade or so, and have very few problems. The heart of the code is this interface -

    public interface IStashy<K>
    {
        void Save<T>(T t, K id);
        T Load<T>(K id);
        IEnumerable<T> LoadAll<T>();
        void Delete<T>(K id);
        K GetNewId<T>();
    }
And implementations of that are very stable over time. Objects get serialized as json and stored in a folder named after their type.

There’s a small number of gotchas, for which I have well known work arounds:

- I generally won’t remove a property, but mark it as obsolete and stop using it.

- If I’ve added a new Boolean property, I’d tend to name it such that it defaults to false, or if it must default to true, have it stored in a nullable boolean, and if it loads as null (from an older instance of the type), set it to the default.

- some convenient types I want to use (as properties) are not serializable, so before saving I’ll copy their data into a serializable type, like an array of key values, then on loading rehydrate that to a dictionary. (I guess this is a harsh performance penalty if you’re doing a lot of it in a game)

LeonB··on Japan enacts law to promote competition in smartphone app stores
Not Louisiana!
LeonB··on Japan enacts law to promote competition in smartphone app stores
Yup. Regulators would rather sue Apple than the end users for the same reason John Dillinger chose to rob banks - “that’s where the money is.”
LeonB··on Japan enacts law to promote competition in smartphone app stores
If Johnny Nobucks makes an illegal broadcast using an Apple device - or rather if Johnny Nobucks makes an app for the express purpose of doing the illegal broadcast, and distributes it to 1 million other users on Apple devices — the FCC equivalent would faaaar prefer to sue 1 rich person (Apple) - with a chance of getting big bucks — than 1 million and 1 poor people — (Johnny no bucks and his users). But I’m pretty sure Apple would be able to put together a license model that makes them safe in this case, long before they were put in any legal danger.

Anyone who claims it’s an intractable is using it for a different purpose -/ either trying to keep their sweet monopoly - or wishing they could sue apple.

LeonB··on Self-Serve Dashboards
I know a CEO who “can” do sql - and better than most of the people in the business who do sql — but they refuse to do it, because they understand basic economics. If they spend half a day doing a job someone else can do — even if it takes the other person 3 days — that’s half a day when they’re not doing the stuff that they alone can do.

Similarly a competent CxO knows that the real time is spent on getting the details absolutely correct - null handling quirks, date handling, mismatched coalescing — even though sql is “high level” it still takes time and dedication to get a trustworthy answer - if there’s people who available who specialise in that, let them do that.

LeonB··on Self-Serve Dashboards
I love discovering the people inside enterprises who don’t realise how awesome they are at coding. They might be a “personal assistant” or something but they hack on sharepoint forms or access or excel and make it sing - acknowledging their clever skills and giving them more powerful tools is awesome. Then they leave for a better job… brilliant!
LeonB··on Claude's Character
Welp.

I’m not even slightly surprised, but i fact checked this anyway. Here’s the article — and it’s even more alarming when you read the details.

https://www.schneier.com/blog/archives/2016/04/people_trust_...

Thanks for the interesting example / terrifying insight into human nature.

LeonB··on Claude's Character
This is a great idea for an experiment.

I’m not sure how it would go.

Some people would refuse to give info to both the simple form and the personality rich chat bot. Some would give info to both. But how big is the middle area?

One thing is certain though — whatever format is more successful at getting peoples info — that’s the one that you’d see more and more of over time.

LeonB··on Tiny fern has the largest genome of any organism on Earth
A lot of research is performed on “axenic” mice — mice without any biome.
LeonB··on Replit used legal threats to kill my open-source project (2021)
Thanks for the explanation. I kind of get it now.

They made a sock puppet account, in order to make an accusation at someone - and deliberately obscured the name of the person they were insulting. That’s a kind of “dog-whistle” technique.

Either they are genuinely scared of speaking out against this sillysaurusx person, or they know it’s an unfair accusation and they wouldn’t say it openly.

It just struck me as a really out of place comment, a very odd way to act. And embedding dang’s username in their sock puppet account name?

I get bad vibes from this one.

LeonB··on Replit used legal threats to kill my open-source project (2021)
Who is “psychosaurusx”?
LeonB··on Replit used legal threats to kill my open-source project (2021)
Replit didn’t make any specific claims about IP rights or non-compete (and if they did, the onus would be on them). When their behaviour was made public they immediately backed down and didn’t proceed with any legal fight.
LeonB··on Kiosk mode bypass for an Ariane Allegro Scenario Player based hotel check-in te
In 2017 Apple had a vulnerability in Mac OS Sierra that allowed anyone to unlock a computer using the user name “root” and no password.

In 2018 Apple became the first company to reach a market capitalisation of one trillion dollars.

So — in answer to “How the heck does a bug with a single quote make it past QA, let alone crash an app?”

Humans aren’t really as clever or discerning as we claim to be.

LeonB··on Sam Altman is showing us who he really is
In back to the future II, Crispin Glover didn’t sign up to be George McFly so they used facial prosthetics and impersonation to continue the George McFly character.

He sued Universal, and reportedly settled for $760,000.

Example article on the topic - https://www.hollywoodreporter.com/business/business-news/bac...

LeonB··on Many Searchers Want to Turn Off Google AI Overviews
They’re like a V1 product in a category where we won’t start to be happy until about version 8 or 9. This is a bad experience for us today, but like people using cars just before the Henry Ford Era, we’re making a sacrifice, taking the hit for their benefit.

Problem is — from now until the time when it hits v10 — it’ll remain locked up by billionaires. Google Apple Amazon Netflix Spotify - each industry has one “natural”* monopolist. Amazon, for example, is not the “best” of all possible online stores. It didn’t invent the category, it has no exclusive right to flood the town square and should be snapped into ten separate companies hit with compulsory unionism, a kind of x^5 drag coefficient tax on total revenue. That would unlock so much more creative output in the market place. Or I’ll accept a bribe big enough to live off the interest of the interest of the interest.

LeonB··on Why Surrealism Matters: Book review
Surrealist humor isn’t everyone’s cup of fur.
LeonB··on Billions in Dirty Money Flies Under the Radar at Busiest Airports
Yup. They don’t officially look for cash — just means they don’t “officially” find any cash.

Airport security, the world over, is a magnet for criminals to self-organise, or be replaced by those who do.

LeonB··on Megaconstellations like SpaceX's could weaken Earth's magnetic field, atmosphere
It’s an exemplar of “whistling past the grave yard” dark humour.
LeonB··on Why is simple decoration so rare in recent work?
I think this is a good point.

The complementary expression being: part of the ornamentation of the past was in reaction to the pervasive under stimulation of people in urban areas 150+ years ago.

There was less going on - less connectedness — and discussing the design and position and prestige of the new street lamps might’ve been the most interesting development in a town all month.

The gigantic population shift from rural to urban settings caused all sorts of strange effects, existential angsts, new art forms, massive complexification of everything… and much much more.

And it’s a bi-directional event-horizon:

We live in an era they could never imagine. And we, now, can never truly appreciate how they lived then.

LeonB··on I made an open source Windows app to rewind and search everything on screen
There are specific situations where the classic version doesn’t display the correct aspect ratio — it might be when zooming a multi monitor display projected onto a single screen dialog that has been resized. We didn’t take the time to debug that on classic, but we did on the professional.
LeonB··on Google made me ruin a perfectly good website (2023)
Google paid them for making the changes.
LeonB··on I made an open source Windows app to rewind and search everything on screen
Probably the first first time — but I don’t want to make a claim that’s untrue so I weakened the claim and broke the logic on the process, yeh.
LeonB··on I made an open source Windows app to rewind and search everything on screen
Cheers — Merle Travis after whom “Travis picking” is named!

If you’ve ever attempted Travis picking, and you haven’t spent a heck of a lot of time practicing it, you may recoil in horror at the name.

Looking deeper into it - “Travis” picking really goes back to Arnold Schultz (https://en.m.wikipedia.org/wiki/Arnold_Shultz) — who is practically lost to history, having never been recorded.

LeonB··on I made an open source Windows app to rewind and search everything on screen
Wow, Justin, cheers.

It looks like the first version was available ~ mid November 2005 (via https://secretgeek.net/snapper_wins) and available from the TimeSnapper.com domain from ~ November 28 2005. (https://secretgeek.net/TimeSnapper_ready_at_last)

So you got in very early!

The professional version was a year or two later.

cheers

LeonB··on I made an open source Windows app to rewind and search everything on screen
Thanks again. Btw, I certainly didn't code it and maintain it single-handed -- my co-founder Atli Björgvin Oddsson deserves the credit for all the good bits.

I have to say -- I'd rather you worked sane hours, and pushed back a bit. You only get one life, and giving too much of your time to (for example -- as I've spent years in that industry too) the oil and gas industry isn't everything in life.

"You work sixteen hours and what do you get? Another day older and deeper in debt" --some old blues legend probably

LeonB··on I made an open source Windows app to rewind and search everything on screen
Wow! Thanks for sharing this!
LeonB··on I made an open source Windows app to rewind and search everything on screen
Neither, lol. Just happened across the comment within five minutes of it being posted. I think it was one of the first times I visited HN today.
LeonB··on Hardest problem in computer science: centering things
Ok. The original joke is —

~~~~~~~~~~

There are only two hard things in Computer Science: cache invalidation and naming things.

~~~~~~~~~~

Let’s analyse how the joke words.

A quick warning though -

Explaining a joke is like dissecting a frog. You understand it better but the frog dies in the process. - E.B. White

First the Setup —

“There are only two hard things in Computer Science:“

We’ve established there are two things and they are hard, and they belong to computer science. This immediately begins to establish an expectation of technically difficult topics.

“Cache invalidation” is the first example and this is a pair of words that look technical and difficult, even if you don’t know what they are.

This completely reinforces the expectation that the next thing will be even more bewildering.

Punchline:

“And naming things.”

In the third part of the joke - we subvert expectations. “Naming things” is a very down to earth concept, anyone can immediately understand. And anyone can readily appreciate the truthiness — naming things is hard.

This subverted expectation is what makes it a joke.

If the two things were listed in the opposite order, it would still be true and still be insightful - but it wouldn’t be a joke.

The popular addition:

“And off-by-one errors” works even though it is “putting a hat on a hat” because the very first expectation was

“Two things”

… and now we’ve subverted that expectation. And in a paradoxical manner we’ve retained the truthiness present in the first two examples.

So the short answer is - don’t start with the punchline.

LeonB··on I made an open source Windows app to rewind and search everything on screen
Cheers, yeh, I am here a bit.
LeonB··on Hardest problem in computer science: centering things
“Naming things” can’t be listed first, the joke doesn’t work if you put naming things first.
← PreviousPage 5 of 34Next →