|Home » Industry Watch
Sierra: The Honeymoon's Over?
Talk about Apple ruining a good game, jeopardising their good name.
We have a new 'flat' UI. We have Siri. And NSA-compliant iCloud functionality. And a coming file system designed and written by the creator of the BeOS file system.
We also have the crappiest, dodgiest, and most dangerous file system APIs in the entire computing industry.
We are Apple. We 'think different'. Indeed we do.
Here's today's hands-on lab.
- Upgrade to macOS 10.12 Sierra. Do it now.
- Log in for the very first time.
- Create a directory for this experiment. Put it, for example, in '~/Downloads'. Name: 'foo.txt'. Yes you want that precise name, and don't start whinging already. FFS.
- Fire up TextEdit.
- Use the app's menu to change the format to plain text.
- Get ready to save that empty file. Use the expander button to get at the tick box to turn off 'Hide extension'. Use the drop-down to set the encoding type so you're offered the extension 'txt'. Change the filename to 'foo' so the full name is 'foo.txt'. Navigate to '~/Downloads' so that when you click 'Save', you're prompted by the following alert. Then click 'Replace'.
- Now check what happened to your directory.
(Old TextEdit isn't so smart anyway, but it's not really TextEdit, it's the bloody system, more specifically the Cocoa document controller NSDocumentController, so it affects ALL applications, not just TextEdit. And 'file' and 'folder' (ahem, 'directory') are but two of eight (8) Unix file types, the others being FIFO buffer, character device, block device, symbolic link, socket, and whiteout. Your homework is to try document controller overwrites with the six remaining file types. Enjoy.)
(And note, please please note, that the file extension is immaterial. That's only used to make things simpler for those who need simpler. The experiment works regardless. You could also try the above with files saved as '~/Documents', '~/Downloads', '~/Library' if you can find it, or why not your own user root directory? Safari build 48, the first release ever, could do it, so why not you?)
The above is a flaw in Apple's way of thinking. Or not thinking. Or thinking 'different'. And it's plagued the corporation all along, it plagued NeXT as well, and it plagues you on macOS Sierra today, right now.
It's a pestilence that hit the world's very first Safari users. Apple committed a 'mens rea' by foolishly trying a coverup. It's a pestilence long known by ISVs on the platform, everyone from Microsoft to BBEdit to TextMate to Xfile.
Apple's standard evasion is 'works as designed'. They've even gone so far as to redact and finally remove posts in their forums that draw attention to the matter.
Nice work, Apple.
If you write to Apple and submit a bug report (and you should) then don't vent your anger on support staff. They're not involved. They're just doing their job, they're just the go-betweens. Between you and the snarky Apple programmers who think they know better (but actually know embarrassingly little).
Apple's (Mac) OS X/macOS is the 'great hope'. It's been what people who are sick and tired of Windows are understandably hoping for. They understand that the madding crowd will never adapt Linux or anything 'FOSS' in great numbers, and they want more than a better and safer computing environment for themselves: they want a world that as a whole is better and safer for everybody, as only in such a world will they all be able to kick back and relax.
That's why they want Apple. That's why they recommend Apple. But Apple just can't measure up to the challenge. Apple's operating system, to this day in September 2016, remains a very dangerous toy and should not be entrusted with your data.
It's as simple as that.
Apple had every chance. They've even hired on some of the big guns in the business. They've had Dominic Giampaolo since 2002. They've had the legendary Avie Tevanian. They've had every possible chance. But they continue to opt to fail.
This story goes back a long time. At least ten years. It's been followed by this site, by Slashdot, by others. It's a pestilence. There's no excuse. None.
The beast reared its head in January 2003. David Hyatt had been hired on from Chimera to give Apple an alternative to Internet Exploder on OS X. Safari was announced at Macworld right after the new year. It was immediately made available for download, and it immediately began hosing file systems.
Users were a bit 'confunded', as some had their systems destroyed whilst others had not. Then someone ingeniously suggested running a message digest on the Safari executable. Those who had systems that survived the holocaust had this:
Those who were less fortunate all turned up with this:
What had Apple done? They'd tried to hide. Even David Hyatt was muzzled. He acknowledged a second minor flaw, he never opened up about the really serious flaw, and Apple have of course removed the link to even the little he wrote. And they've evidently got Wayback blocked by robots.txt, just to make sure they really can rewrite history.
The beast reared its head again at the end of 2006. The flaw rediscovered in macOS Sierra only today, already known by Apple support, resulted in the following response.
This is a follow-up to Bug ID# 4893378. We have received the following update regarding your report:
Engineering has determined that this issue behaves as intended based on the following information:
When the Save panel asks if you want to replace a file or folder of the same name, and the Replace button is clicked, expected behavior is received.
The Bug Reporting Team
Apple Developer Connection
The assumption in the interim years was that, after the chaos of Tiger and Leopard, perhaps somewhat mitigated by Scott Forstall's kidnapping of the company's better programmers for iPhone, Apple finally got around to cleaning up their act. But that assumption was, as seen today, totally unwarranted. Apple are, if nothing else, consistent in their foolishness, jeopardising the industry's respect.
Sometimes being market cap leader is not enough.
Farm Team Coding?
Sit in on a device driver programming class sometime. Your fellow students may not be inspiring. They're often a rather antisocial lot. Don't ask to borrow a pencil from their desks. They can go ballistic. Their own desks, with multiple monitors, will be meticulous.
Check their code. It'll be meticulous too. Huge /* */ headers extending beyond the first fold. Indents perfectly aligned. A pathological overuse of curly braces.
Device driver programmers define caution. One slight error in a nanosecond of time will be repeated millions of times. Catastrophe the result.
Now consider code for a file operation. Copy, move, whatever. Hierarchies have to be strictly coordinated. API return codes have to be observed, and always there's a readiness to handle the unexpected: hardware and other exceptions. Every possible and impossible eventuality is covered in the code.
Can this be something for the glee crew of Cupertino? No? There's another way, perhaps not as satisfactory, but it's a lot easier. And a lot more beige.
But for heaven's sake do warn your ISVs that those APIs can be dangerous.
File systems are entities unto themselves, by far the most important part of a computing machine. Some architects and engineers take great pains to create the most bulletproof hermetically sealed file systems you could imagine. Unfortunately, it seems that others can't be bothered to care.
What's needed is a full-scale industrial approach to file system intrinsics, and a file system capable of protecting itself. But given Apple's traditional attitude towards professional computing, that's not likely to happen.
[2003-01-10] Industry Watch: Enough For Two Macworlds?
[2003-06-23] Software Review: Safari 1.0 (73/75/85)
[2006-12-20] Industry Watch: Sanity Checks at Apple
[2006-12-20] Learning Curve: A Sanity Check for Apple
[2007-02-08] Learning Curve: 4893378 FAQ
[2007-02-10] Learning Curve: 4893378: 'Expected Behaviour'
[2007-02-12] Learning Curve: Rebel Scum: More Attacks on 'Expected Behaviour'
[2007-11-05] Tom Karpik: Massive Data Loss Bug in Leopard
[2007-11-06] The Technological: Apple's File System APIs
[2007-11-06] Developers Workshop: performFileOperation:
[2007-12-17] Industry Watch: The QuickBooks Disaster
[2007-12-19] Industry Watch: Apple Redact, Close Down Intuit Thread
[2008-04-21] Developers Workshop: No Easter Bunny
[2010-04-30] Macworld/Rob Griffiths: Why WWDC 2010 doesn't add up for me