News for hackers. Stuff that matters.
Re:If macOS High Sierra shows your password instead of the p... by Osmium on Thursday October 05, 2017 @02:40PM (#15411538)
There have been a few cases like this. Presumably the original was created/maintained by just one person, they move on, and then when the next person comes along they decide it's easier to re-write than modify the old code. But they don't have sufficient time and the new version is inferior to the old.

Bear in mind the old version did need to be updated (new CoreStorage features, has to handle Fusion drives, now APFS).

I get the sense there's a lot of shuffling between teams in Apple, and teams are a lot smaller than you'd expect, and this is the inevitable result. The advantage (I'm guessing) is that they get to move quickly, and it reduces bureaucracy/politics, but ... yeah, this isn't great.

At least diskutil is still there, and is as powerful as ever.

Re:If macOS High Sierra shows your password instead of the p... by davidkuhta on Thursday October 05, 2017 @04:11PM (#15412227)
I was just reading about something similar in the "Ask HN: What essay/blogpost do you keep going back to reread?" post

Joel Spolsky's point: They did it by making the single worst strategic mistake that any software company can make: They decided to rewrite the code from scratch.

https://news.ycombinator.com/item?id=15407114

Re:If macOS High Sierra shows your password instead of the p... by borplk on Friday October 06, 2017 @04:08AM (#15415158)
> They did it by making the single worst strategic mistake that any software company can make: They decided to rewrite the code from scratch.

Statements like that, while powerful are dangerous as they turn into baseball bats for people to hit each other with.

And they become an excuse for ignoring things and becoming an absolutist religious zealot.

There are legitimate cases where rewriting the code from scratch can be the single BEST strategic decision.

(And of course, vice versa)

If I have strong rational reasons to believe that a rewrite is warranted quoting Joel Spolsky or anyone else is not going to change my mind.

Re:If macOS High Sierra shows your password instead of the p... by maltalex on Friday October 06, 2017 @01:42PM (#15418689)
> Statements like that, while powerful are dangerous as they turn into baseball bats for people to hit each other with.

I love that analogy.

I see it again and again with so many of the "classics" - phrases like "premature optimization is the root of all evil" and "adding manpower to a late software project only makes it later". Sure, these statements are right more often than not, but the zealousness with which they are often applied leads to an enormous amount of mistakes.

There ARE cases in which optimizations aren't premature. System architecture is all about designing a system for optimal performance in some area or another. And in some cases, bringing in more people to a late project can speed things up.

Re:If macOS High Sierra shows your password instead of the p... by diegoperini on Friday October 06, 2017 @09:21AM (#15416555)
>...as they turn into baseball bats for people to hit each other with

I will quote you a lot from this time on. It is such a true and widely applicable judgement.

Re:If macOS High Sierra shows your password instead of the p... by Dylan16807 on Thursday October 05, 2017 @05:39PM (#15412772)
I reject that comparison. This is not rewriting a core product with tens of millions of lines of code. This is a small utility program. It's very often no problem to just make a new utility program. Especially one that's in the single digits on how many coder-months it costs.
Re:If macOS High Sierra shows your password instead of the p... by Osmium on Thursday October 05, 2017 @06:30PM (#15413058)
Yeah, I can see how a rewrite makes sense. It's not rewriting diskutil itself, it's adding a new UI, that presumably uses newer APIs that will be easier to maintain in the future.

The problem really is that the new Disk Utility is a minimal viable product, rather than an app that can actually do everything the diskutil command line utility can do.

And then you have terrible bugs like this, which is presumably a non-security engineer writing a bit of UI code that they shouldn't be. I doubt this bug actually came from the APFS encryption itself.

Re:If macOS High Sierra shows your password instead of the p... by DonHopkins on Thursday October 05, 2017 @06:33PM (#15413069)
Yeah, I think the problem is that they rewrote everything but the disk utility.
Re:If macOS High Sierra shows your password instead of the p... by eradicatethots on Thursday October 05, 2017 @06:22PM (#15413011)
There are no rules in soft dev
Re:If macOS High Sierra shows your password instead of the p... by j45 on Friday October 06, 2017 @12:20AM (#15414392)
I don't know if a rewrite is about whether it's large or small, it's about the years of hardening many scenarios.
Re:If macOS High Sierra shows your password instead of the p... by Dylan16807 on Friday October 06, 2017 @12:54AM (#15414518)
A simple utility doesn't need that much hardening against corner cases, and in this instance the bug is a main use case.
Re:If macOS High Sierra shows your password instead of the p... by dilap on Thursday October 05, 2017 @03:04PM (#15411739)
1. dont have the same depth of dev talent they used to 2. mgmt that isnt as sensitive-to and focussed-on quality.

(this is 75% speculation on my part and 25% confirmed by conversations with 2 ex-apple engineers.)

Re:If macOS High Sierra shows your password instead of the p... by atdt on Thursday October 05, 2017 @07:54PM (#15413484)
You'll find that ex-anything engineers tend to find their former workplace degraded in quality and talent.
Re:If macOS High Sierra shows your password instead of the p... by rconti on Thursday October 05, 2017 @05:57PM (#15412871)
From the people I know at Apple, there are lots of HUGELY talented people there. That said, they're bigger than ever, and I'm sure there are plenty who are just hiding out trying to while away their career. And some teams are much, much better and more highly responded than others.
Re:If macOS High Sierra shows your password instead of the p... by abakker on Thursday October 05, 2017 @03:42PM (#15412010)
I wonder if they just don't have enough power users of the OS left that aren't also just developers using CLI? ANY power user of the OS itself has seen a ton of head-scratching changes over the years, and I figure that the product managers just don't know who the features were for or what they're used for.
Re:If macOS High Sierra shows your password instead of the p... by derefr on Thursday October 05, 2017 @04:03PM (#15412168)
Is there a reason that the macOS CLI can't be intended as a general power-user feature, not just a developer feature?

Consider: Terminal.app comes with macOS, not with Xcode. If the BSD environment was just there for developers, would this be true?

Today's Microsoft seems to increasingly think sysadmins would rather use PowerShell than MMC snap-ins; I'm inclined to think that today's Apple is similar. And there's nothing inherently hard about CLI interfaces; "regular people" used MS-DOS PCs for ~two decades.

I would bet Apple just thinks the CLI is the optimal Human-Computer Interface for doing some things.

Re:If macOS High Sierra shows your password instead of the p... by PhasmaFelis on Thursday October 05, 2017 @06:27PM (#15413038)
> And there's nothing inherently hard about CLI interfaces; "regular people" used MS-DOS PCs for ~two decades.

CLIs are opaque by definition. With a GUI you can click around menus until you find what you're looking for; with a CLI you can't even begin unless you already know what you're doing. Man pages are no help to newbies; they're either uselessly terse, impenetrably jargon-packed, or both.

It's probably possible to make a CLI that's relatively easy-to-use and newbie-friendly, but I've never seen anyone attempt it. People used MS-DOS for years because it was the only way to access the large majority of software, and abandoned it as soon as there was a viable alternative (Win9x).

Re:If macOS High Sierra shows your password instead of the p... by davrosthedalek on Thursday October 05, 2017 @07:20PM (#15413306)
I would argue that small command-line tools "the unix way" combined with a competently written -h help page is quite discoverable. Maybe not for a general computer newbie, but certainly for people used to /other/ cli tools.
Re:If macOS High Sierra shows your password instead of the p... by crispinb on Thursday October 05, 2017 @07:32PM (#15413368)
This only seems to work in practise for tools that are very small, otherwise exceptional writing is required (which, by definition, will rarely occur). I can't imagine (to pick a particularly extreme example) that anyone has ever learned to use git by reading the man pages.

In contrast, even features in pretty poor GUI apps are by default generally discoverable.

Re:If macOS High Sierra shows your password instead of the p... by kemitche on Thursday October 05, 2017 @08:40PM (#15413648)
I shudder to think how hard it would be - likely impossible - to use a bad git GUI if I didn't already know many of the git CLI commands.

Even just, say, MS Word. If I don't know a feature exists, clicking around through dozens of menus isn't going to get me anywhere. For both CLI and GUI, Google or official docs are the only reasonable way to discover.

Re:If macOS High Sierra shows your password instead of the p... by PhasmaFelis on Thursday October 05, 2017 @09:59PM (#15413914)
> If I don't know a feature exists, clicking around through dozens of menus isn't going to get me anywhere.

I find that clicking around through menus often teaches me about great features I didn't even know I wanted.

Regardless of the cause, in practice, I find that it's much easier to get basic functionality out of a new-to-me GUI app than a CLI app. That may not be a fundamental properly of CLI, but it certainly is how all significant CLIs are written.

Re:If macOS High Sierra shows your password instead of the p... by monkmartinez on Friday October 06, 2017 @03:30AM (#15415022)
So absolutely with you on this. Exploring visually is best for me as well.
Re:If macOS High Sierra shows your password instead of the p... by abakker on Friday October 06, 2017 @02:11PM (#15418952)
Yep! I have nothing against CLIs, but imagine starting with the CLI in something like CAD. Sure, they have CLIs, but wow would that be hard.

Without google, I'd have never learned any CLI stuff, and even as it is, I have no idea why the flags can't just be words instead of letters.

Re:If macOS High Sierra shows your password instead of the p... by thaumasiotes on Thursday October 05, 2017 @09:32PM (#15413837)
The ssh man page is truly awful. I managed to read through it multiple times without finding the functionality I wanted, even devoting special attention to a section that turned out, later, to be purportedly "documenting" exactly that functionality.
Re:If macOS High Sierra shows your password instead of the p... by TheKarateKid on Thursday October 05, 2017 @10:21PM (#15414005)
This is why I usually only use man pages to reference a command-line option or as a quick reference. If you're new to a tool, a quick web search finds a much more informative tutorial which saves you time, despite being more verbose.
Re:If macOS High Sierra shows your password instead of the p... by crispinb on Thursday October 05, 2017 @10:40PM (#15414072)
Quite. And surely this is how pretty much everyone gets started with things like git?

Conversely, novice use of even complex GUI apps rarely requires looking up a tutorial first, because you generally can just click or tap around and at least figure out minimally how to use it.

Inexpert users (ie. nearly everyone) stop there. Obviously further reading is needed to make more extensive and/or efficient use of any tool. But at that point in my opinion we're beyond the reasonable boundaries of 'discoverability'

Re:If macOS High Sierra shows your password instead of the p... by wruza on Thursday October 05, 2017 @11:22PM (#15414196)
For svn and specifically git GUIs with lots of options and insane defaults, I usually do not have a fcuking clue what exact command will yet another cool wrapper execute and how it will report back. Too many times I fought the result of people clicking around and completely messing the repo with no idea what they’ve exactly done. So, our company has a simple but strict rule: you’re allowed to update/pull/commit/push via gui, but nothing more and never touch any checkboxes in there.

If you can’t spend time on one of your main tools docs to grasp what “merge -r 403:480 -c -473 ^/branches/rt0” does and how to command it, then sit there and code, folks will do maintenance for you.

Re:If macOS High Sierra shows your password instead of the p... by crispinb on Thursday October 05, 2017 @11:50PM (#15414292)
The parent was about discoverability -- you've argued that discoverability isn't necessarily useful for tools where people need to have some idea of what the tool is doing. There are many tasks where the user needs to have an accurate mental model and a grasp of the details. I completely agree with that.

Still, GUI programs are very clearly more discoverable than cli ones. How far and where discoverability is the best approach to educating a user is a separate question.

Re:If macOS High Sierra shows your password instead of the p... by wruza on Friday October 06, 2017 @12:22AM (#15414401)
>where people need to have some idea of what the tool is doing

Not exactly. Wrappers can (and tend to) “enhance” and hide details from those who actually have idea. This kind of breaks discoverability into confusion, that’s what my rant was about.

Re:If macOS High Sierra shows your password instead of the p... by phaemon on Friday October 06, 2017 @06:02AM (#15415606)
>I can't imagine...that anyone has ever learned to use git by reading the man pages.

Perhaps not, but they easily could. The Description section at the start of the man page says:

"See gittutorial(7) to get started, then see giteveryday(7) for a useful minimum set of commands."

And if you do `man gittutorial` it has, as you might expect, a tutorial on how to get started with git.

Re:If macOS High Sierra shows your password instead of the p... by PhasmaFelis on Thursday October 05, 2017 @09:56PM (#15413906)
In theory, sure, but I've never seen a competently written -h page.
Re:If macOS High Sierra shows your password instead of the p... by Lio on Friday October 06, 2017 @05:36AM (#15415499)
When MSDOS was in active use computers in general were used by a much smaller section of the population. That could well be because many people didn't get on with a CLI and Macs, at the time, were really expensive.

To counter that with an example of what I consider really good man pages look git.

I've learnt loads about rebasing, etc. from the examples in the git man pages.

Personally I've always loved a good CLI.

Re:If macOS High Sierra shows your password instead of the p... by derefr on Thursday October 05, 2017 @03:56PM (#15412118)
I've always thought of Apple as one of those black holes that absorbs devs: people land there, and then—if they can hack the culture—tend to stay for their careers.

Is this not true any more? Where does ex-Apple dev talent tend to go? (Microsoft? Indie app development?)

Re:If macOS High Sierra shows your password instead of the p... by threeseed on Thursday October 05, 2017 @07:33PM (#15413378)
I worked at Apple as a developer. I just went to another company just like everyone else does.

I know lots of people who have spent their entire careers there because the work is challenging and interesting. I also know teams that handle anonymous backend infrastructure e.g. AppleID or ADC where there was higher turnover.

No different to any other company.

Re:If macOS High Sierra shows your password instead of the p... by BlindMidget on Thursday October 05, 2017 @04:10PM (#15412220)
Honestly all the great apple devs from the early 2ks have either moved into consulting or entrepreneurial activity or, more likely and worryingly, they've been promoted into management roles at apple where they're managing a team of engineers not quite as good as they were. You see this everywhere, at every company. That's my guess.
Re:If macOS High Sierra shows your password instead of the p... by girvo on Thursday October 05, 2017 @11:36PM (#15414243)
Are you seriously arguing that engineers were better “back in the day” and engineers now are not as good? Surely I must be misunderstanding you.
Re:If macOS High Sierra shows your password instead of the p... by not_kurt_godel on Friday October 06, 2017 @02:52AM (#15414907)
The talent pool of engineers capable of propelling a company technologically forward the way Apple was "back in the day" is by definition very shallow. He's not saying engineers are better, it's just a selection bias.
Re:If macOS High Sierra shows your password instead of the p... by dilap on Thursday October 05, 2017 @04:47PM (#15412467)
Dunno, but it would make sense. Huge apple success post iPhone + exploding tech scene provide a ton of opportunity/temptation to leave.

Anecdotally, Chris Lattner is a high-profile recent departure. :-)

Re:If macOS High Sierra shows your password instead of the p... by threeseed on Thursday October 05, 2017 @07:31PM (#15413362)
3. It's just a bug.

You know the sort of thing that happens to developers: Every. Single. Day.

Re:If macOS High Sierra shows your password instead of the p... by brians on Thursday October 05, 2017 @09:04PM (#15413751)
Nah. It’s a bug in a critical security system that made it to release. It should have been caught by automated testing—can you grep for the password, or decrypted volume encryption key, in an encrypted filesystem? When you change the password, does anything change other than the encrypted VEK? It shouldn’t!

These are in the first page of tests I’d write. NIST SP 800-111 asks for forensic pre-release testing—can you really believe such happened here?

This isn’t a failure of the engineer who wrote out the wrong buffer. Everyone makes mistakes like that. It’s a failure of the Engineering culture and engineering management that shipped without reasonable testing, or manual pre-release examination. It’s a failure of the culture that accepted bugs like this, rather than asking (appropriately, for an Apple FDE product): let’s assume that it will cost someone $1B or a thousand lives if this fails. What should we do to assure its correctness?

Re:If macOS High Sierra shows your password instead of the p... by dilap on Thursday October 05, 2017 @08:30PM (#15413618)
I opened the App Store just now to see if a few lack-of-polish bugs were present. The screen flickered a couple times and then was nothing but white and a loading spinner. Waited 30 seconds, never went away.

Force quit, reopen, loads fine.

Go to the Today tab. Scroll through. Notice that sometimes your scroll doesn't get registered. Why? Because if you try to scroll over an "Open" or "Get" button, it steals the event and breaks your scrolling. Amature mistake, and the kind of detail Apple used to always get right.

Watch OS SDK: When the user performs an action on a notification that arrives on the watch, it calls a callback on the application on the phone. What happens if the user's phone is not reachable? The action just gets dropped on the floor, and to the user the app looks buggy. (Maybe/hopefully this is fixed in the latest version of watchOS; I haven't checked.) Flawed, poorly thought out API design.

Go to the updates tab on the App Store app. Pull down to refresh. No updates, but the "Available" headline disappears and then weirdly reveal-animates back into place, an overall feeling of flicker.

Huge issues? No, but a very real drop-off in quality and polish from what Apple used to put out.

(The password bug is a little different -- obviously bugs can and do happen. But not having a testing procedure in place for the core paths through a piece of software is a huge process failure, especially for something critical like security. Every release of the software should have testers going through a plan like, "enter password hint. attempt to access volume. verify password hint is correctly shown." &c.)

(Also, to be fair, I think after taking a huge dive the quality of Apple software seems to be slowly ticking up again.)

Re:If macOS High Sierra shows your password instead of the p... by IncRnd on Friday October 06, 2017 @01:27AM (#15414615)
You shouldn't accept mediocrity instead of correct software. They are worlds apart.

There is a significant difference between a bug and a severe security error regarding basics.