Live data from Hacker News

Reverse Engineering MacOS High Sierra Supplemental Update

cocoaengineering.com

61–70 of 135 posts

Re: Reverse Engineering MacOS High Sierra Supplemental Update

#61

the good thing is, you know that when they break something, it'll probably stay broken for a couple more releases and a few years. Like how my mouse Y axis is reversed when I restart... for about 2 years now

That sounds like a really interesting bug, but also like your mouse is going far beyond standard USB HID in some very unnecessary way.

Re: Reverse Engineering MacOS High Sierra Supplemental Update

#62
I don't like the old style NSDictionary way of packing information that so many API's use. First of all they're lacking an enforcement for the type of the value they're expecting (sometimes leading to crashes if you get them wrong) and the discoverability of possibilities is less easy than with a struct or object.

Still, passing in password twice would still be a possible mistake. The only thing that would help in my opinion would be types that can be applied to primitives, a bit like F# does. So you can declare certain Doubles to be Miles, Kilometers, Meters and so on. Or a certain type of string can be of type DatabaseID or a Password.

Re: Reverse Engineering MacOS High Sierra Supplemental Update

#63

Installing a new Mac OS on a machine you care for has become an absolute no-go area. I wait for at least half a year and then only install in a place that I can trash in case I still see problems.

I'm not sure why you say "has become". In the circles I've been it has been common practice to wait for the .2(but minimum .1) release before it goes onto real work machines. The early Mac OS X releases were even worse. Even if for some reason the OS itself was fine by itself, they almost always broke compat with a bunch of 3rd party applications. EDIT: typo

Exactly. "Never buy the first version of any new Apple product", whether hardware or OS, has been well-known for at least 10 years: https://www.engadget.com/2006/06/03/why-first-generation-app...

(That said, I've found my first-gen Apple Watch to be a great product. First-gen iPad is a paperweight though...)

Re: Reverse Engineering MacOS High Sierra Supplemental Update

#65
post #44

Earlier quoted context omitted.

Yes, with 'example based testing' this is hard to come up with. With property based testing, it's not so hard to test this kind of UI things: You test a UI by basically throwing sequences of interactions at it. Some of the properties you'd want to assert: * Given two interaction sequences that only differ in what they do to the password hint field in the UI, the result should only differ differ in the returned passwo…

Thanks for the detailed answer and coming up with a property-based test that is not a "1+1=2" example :)

I think I might have stumbled upon a new category of common properties here. (At least new to me.) Basically, test that some subset of your output variables is a function of a specific subset of your input variables. And conversely, test that some subset of your output variables is independent (under some conditions) of some subset of your input variables.

My go-to example for property based testing isn't addition, but idempotence. Idempotence is a concept well known from REST apis to the general programming public, and also in sorting or clean up data. And it's easy to state in code, eg: sorted(sorted(x)) == sorted(x).

Re: Reverse Engineering MacOS High Sierra Supplemental Update

#66
post #40

Earlier quoted context omitted.

Provable code would solve the root cause, yes. :) However, even with provable code, the proof actually has to be both correct and performed. There are too many competing factors that won't allow idris, for example, to actually work. The result is that, as an industry, the Internet and the world's business are held together by twine, twist ties, and spaghetti code. Even this very webpage is just enough to work for mos…

so... I guess strong-AI-based coding is the only 100% sure way to go (but... I'd be jobless if that were to happen :(

Strong AI wouldn't be enough, if by strong AI you mean "enough to pass the Turing test". Humans pass the Turing test all the time, but still produce buggy software.

Re: Reverse Engineering MacOS High Sierra Supplemental Update

#67
post #24

Earlier quoted context omitted.

> whose marketing pitch is making high-quality products "It just works" was retired some time ago. "Think different" is the modern day mantra. It's less of an open-ended commitment.

I remember the Think different posters from when I was a kid. As far as I can tell "It just works" is from the PC vs Mac tv ads from about ten years ago.

Perhaps you're right, but the comparative prevalence of these phrases does seem to correspond to largely different customer experiences.

Re: Reverse Engineering MacOS High Sierra Supplemental Update

#68

the good thing is, you know that when they break something, it'll probably stay broken for a couple more releases and a few years. Like how my mouse Y axis is reversed when I restart... for about 2 years now

I had a mouse that did just that. Nothing I tried could fix it.

I gave up and took the batteries out, and forgot about it for a few weeks.

When I tried it again it worked, and works fine ever since.

Re: Reverse Engineering MacOS High Sierra Supplemental Update

#69
post #16

It's pretty insane this sort of bug either passed or didn't even go through code review and testing at Apple, a company which has approximately infinite resources and whose marketing pitch is making high-quality products. I loved Apple products and still do, but as both a user of and a developer for their systems, I feel the quality has been steadily going downhill the last few years.

The problem with testing is that it has the potential to gobble up infinite resources without actually adding much value. Just because you tested something, doesn't mean it will work reliably. It's that simple.

Re: Reverse Engineering MacOS High Sierra Supplemental Update

#70

> Apparently, Disk Utility and command line diskutil use different code paths. StorageKit does not appear as a direct dependency of diskutil. [snip] This duplication in what’s more or less the same functionality, while sometimes justified, certainly increases the opportunity for bugs. To me this is the more problematic part - good design would use same code paths as much as possible for the GUI app and the command li…

Yeah it seems bonkers to me that an OS would ship with two sets of disk management libraries. At worst, at least try to make one depend on the other.
Post reply on HN