movq

Wherein I Move A Lot of Words Around

Mac

Time Machine Quotas

Quick tip for Time Machine backups: Mac OS X Server (“Server.app” these days) can setup a quota for Time Machine backups that is specific per-machine (rather than per-user). This trick works on any share, actually, since it’s a root-owned property list in the share directory. You’ll want Mavericks or later as a client for this to work, but to set it up cd into the root of the Time Machine share and create the plist with (for a 500GB example):

The Forgotten

After watching yesterday’s Apple Event and reading around a bit at the reactions, I’ve become concerned for the future of the Mac, at least in the hands of the current leadership at Apple.

For a long time we — creatives, power users, and developers, the “Pro” in the product names — felt the fear that Apple’s success in iOS would manifest itself with a locked-down Mac and candy icons on the screen. While that does not appear to have passed, something far more damaging has: Apple completely forgot why people used Macs.

On Gaming Input Devices

Having the desire to upgrade my input devices at the home, I started looking around for a good keyboard and mouse combo. While the business-oriented lines were nice in their own ways, they lacked a certain flair and were woefully short of buttons and standard layouts. (What’s with everyone screwing with the standard keyboard layout? Stop it. I like my buttons.)

As a result, I started to look at the gaming series of devices. I’m not sure how I wound up looking at them, honestly, but once I started to look at the options it was clear to me that all the attention on making input devices better at a hardware level was going into that market instead: the keyboards were mostly mechanical, the mice were high-DPI and loaded with buttons, and the quality was far and away higher — as were the prices, of course.

However Bad It Is…

… it could always be Mac OS 9.

macos9 extensions off crash

Doxygen and NS_ENUM

If you’re having trouble getting Doxygen to parse NS_ENUM statements, here’s the config file magic:

ENABLE_PREPROCESSING = YES
MACRO_EXPANSION = YES
PREDEFINED = "NS_ENUM(_type, _name)=enum _name : _type"

You may or may not want to enable EXPAND_ONLY_PREDEF to only expand that one macro.

Swizzling Swift

Swift & the Objective-C Runtime:

Even when written without a single line of Objective-C code, every Swift app executes inside the Objective-C runtime, opening up a world of dynamic dispatch and associated runtime manipulation

With an opener like that, how can you not read (and be both slightly horrified and optimistic)?

Carbon is Apparently Not Dated

High Caffeine Content — MPW, Carbon and building Classic Mac OS apps in OS...:

What interested me the most is how so much of the API remained identical - I was still using only functions that existed on System 1.0 in my app, but they were working just the same as ever in a Carbonized version. The single built binary ran on OS 8.1 all the way to 10.6 (care of Rosetta).

The MAS is Killing the Mac

Yosemite and Default URL Handlers – Edovia Blog:

Unfortunately, Apple is now blocking sandboxed apps to change the default handler for a particular URL scheme. This is why Screens is not able to set Screen Sharing back as the default handler. This change affects a whole bunch of apps that use to rely on this functionality.

The sandboxing rules on OS X have always been a source of difficulty, as some cautioned early on. At the time I felt that Apple would see the harsh edges and work something out with developers so that more useful apps could be in the MAS over time. I thought that perhaps they’d sort it out to the level that even top-tier folks would manage to get their apps in there (think Photoshop or Office).

CGRect and CGGeometry

The best description of how Cocoa’s views are designed that I could find from Apple is in the Cocoa Views Guide PDF in the chapter called View Geometry. If you’re trying to get your head around what a CGRect is and why self.view.frame.origin.x++ doesn’t work, that’s required reading. (A hint to the latter: view.frame is return-by-value; CGRect is a struct, self is an object.)

That said, here’s a handy graphic to not only help you get your head around when to use frame and when to use bounds, but also what they mean in the grand scale of things. Also included are some visual guides on when to use some handy CGGeometry.h functions to do some work for you.