Live data from Hacker News

NULL license plate not such a bright idea

knrs.iheart.com

471–480 of 484 posts

Re: NULL license plate not such a bright idea

#471
This wouldn't be a problem if people wrote programs in languages that have proper type systems that can correctly classify failure.

I'm thinking of types such as Maybe/Option or Either.

I hate it for example when a C/C++ function has to return a -1 in case of failure.

Re: NULL license plate not such a bright idea

#473
post #417
post #346

Earlier quoted context omitted.

It does make sense, because the keepass entropy estimate presumably (like the excellent zxcvbn) tries to approximate the empirical distribution, not the theoretical uniform one. In theory, "68703649" and "12345678" are equally likely to be pulled from the hat, but in practice one is a much better password than the other. You can reduce the search space by trying the passwords with higher (empirical) probability first…

> the keepass entropy estimate presumably […] tries KeePass sources are available [0], you can see the specific algorithms it uses in [1]. [0]: https://sourceforge.net/projects/keepass/files/KeePass%202.x... [1]: https://fossies.org/windows/misc/KeePass-2.42.1-Source.zip/K...

Thanks. I've looked at the code, and it does not seem to try to estimate the empirical distribution (doesn't appear to be using dictionaries, for examples).

Then the discrepancy maybe comes from the number of glyphs within certain categories, or their repetition?

Re: NULL license plate not such a bright idea

#474

Tangentially related somewhat-common bug: YAML files will interpret the literal 'no' as boolean false if it's not quoted, instead of as a string. Many developers have wondered why, when they stuck country-specific configurations in a YAML file, that things suddenly stopped working when they expanded support for Norway.

I always felt Yaml is far too complicated of a format for storing hierarchical data. JSON is too simple (no comments; hard to store multi-line strings). HCL, the hierarchical data storage language used by Terraform, is the closest thing I’ve seen to a happy medium between JSON and Yaml. Another option, if the string values are not multi-line, is CommentJSON (use the Python module or write 10 lines of code that strips…

    {"comment": "JSON supports comments just fine. :-)"}

Re: NULL license plate not such a bright idea

#475
post #56

Earlier quoted context omitted.

Maybe it could be added to the list of falsehoods programmers believe about names: https://shinesolutions.com/2018/01/08/falsehoods-programmers...

I think this example falls under falsehood 31, where None would be considered a "bad word" that can't appear in names.

That describes making some "bad" values illegal, where I believe the problem here was that they didn't expect the value.

Re: NULL license plate not such a bright idea

#476
post #469
post #439

Earlier quoted context omitted.

I was already on the Brooklyn side. But the issue was literally that he had no idea what the Brooklyn Bridge was, not the precise drop-off location. (We just wanted to look around Dumbo for a bit.)

Wow! Hard to think of a more iconic landmark in that case.

Someone else is probably out there complaining a cab driver wouldn't give them a ride to the Statue of Liberty.

Re: NULL license plate not such a bright idea

#477

I own a rare collector car with a three-digit VIN. This has caused endless hassles at the DMV as well as the insurance office. Sometimes we find success by prepending the necessary number of zeros, before the VIN. Other instances in the same system require appending zeros after the VIN. The true VIN has a hyphen but that never makes it into the DMV's system. One time I got stuck in a particularly nasty loop where the…

>I own a rare collector car with a three-digit VIN. This has caused endless hassles at the DMV as well as the insurance office. I have a similar problem with my own identity. I was born in Canada's smallest province, PEI, and now live in its largest, Ontario. Some Ontario government software seems to have problems recognizing the relatively low numbers on PEI birth certificates.

Which numbers?

Re: NULL license plate not such a bright idea

#478
post #445

Earlier quoted context omitted.

Much-needed Outline.com of the wired.com article: https://outline.com/WMzjYK

It seems meaningful to me that the wired website works (sort of; the left margin is 1/3 of my screen) with JavaScript disabled, and outline doesn't work at all.

If there were a better alternative I'd gladly use it.

Re: NULL license plate not such a bright idea

#479
post #282

Earlier quoted context omitted.

I remember a different story where the guy had to fight every ticket in court

On the plus side, he could also contest legitimate tickets unless they recorded other information.

Like Make, Model, Color, and VIN? The last time I got a parking ticket it certainly included those details in the citation. I can imagine being able to contest and win any citations issued to the same plate but with otherwise non-matching supporting information. But in the case where someone else has the same make, model, and color car, you might be out of luck if the VIN gets recorded as "CANNOT READ" or is left blank.

Re: NULL license plate not such a bright idea

#480
post #189

Earlier quoted context omitted.

Relevant xkcd comic https://xkcd.com/1105/

I actually saw a car with a license plate like this last week. Some combination of I's and 1's. White Ford Mustang driving around Santa Clara.

In UK number plates I and 1 are the same character, as are O and 0:

https://www.dafont.com/uk-number-plate.font?text=O0I1l

Number plates existed for decades before ASCII was invented. Before computers, people often used mechanical typewriters which didn't have keys for 0 and 1: you typed 0 as O and 1 as l. I threw away one such typewriter recently. It was in good working condition, with its instruction manual. It had been made in a country that no longer exists. You may imagine how sad and nostalgic I felt.

Post reply on HN