Archives / Search ›

Steve Zellers: “The big loser in Mac OS X is the file system fragility problem.”

Yup. Cocoa makes things easy for the programmer, at the cost of fragility and poor error reporting: I still can't believe there is no result code or structured exception handling in Cocoa at all. Zip, zero. This is a huge failing: if the framework can't return specific errors to the programmer, then how can the programmer present intelligible error messages to the user? These are simple things like distinguishing 'file not found' from 'permission denied' from 'disk full', which Cocoa completely hides as a single boolean success/failure value despite their presence in the underlying BSD APIs.

The old Mac philosophy was to make things easy for the user, at the potential cost of pain and suffering for the programmer. I don't mind the pain and suffering all that much—I just spent the last five hours trying to fix some threading/corruption issues that I still haven't isolated with a (Cocoa) application, but I'd do it a hundred times over if it meant giving users an application that behaved stably and made sense.

As a programmer, I'd prefer the best of both worlds: an API that's easy to use, but robust and predictable for the user.

The big loser in Mac OS X is the file system fragility problem.

Got a tentative go-ahead on two PhD thesis ideas from my advisor today. I'm still way off the mark as usual, but at least I know what to do to come up with a concrete problem to solve.

Finally realized what was using all the hard disk space I kept on losing, seemingly at random. Core files! In /private/cores on OS X:

[p2:6] /private/cores%ls -l
total 311M
-r--------    1 root     wheel         59M Mar  7 21:18 core.225
-r--------    1 root     wheel         69M Mar  6 23:20 core.226
-r--------    1 root     wheel         61M Mar 20 18:17 core.230
-r--------    1 root     wheel         68M Mar 11 17:13 core.239
-r--------    1 root     wheel         54M Mar 15 23:17 core.241

I have core files enabled because I sometimes need them for debugging, but thought my limiting coredumpsize to 0K was sufficient. However, when daemons (lookupd in the above cases) crash, they still dump core.

Iconfactory Design Sample: Even if you can't have PGP for Mac OS X, you can see its icons. (How sad considering certain people's commitment to its release).

‹ Newer Posts  •  Older Posts ›