Tag: Xcode

Cleaning up Quicksilver

Given the Quicksilver source code is now out in the open, I’m trying to learn from it while at the same time cleaning it up. Here’s what I’ve done so far.

Continue Reading Cleaning up Quicksilver

Modifier flags during app launch

Unfortunately, [[NSApp currentEvent] modiferFlags] can’t be used to determine if any modifier keys were held down during launch. To accomplish this, it seems one must delve into the world of Carbon.

Continue Reading Modifier flags during app launch

CTGradient code bloat

While getting rid of extraneous junk in an application package is easy using Trimmit, the only way to prevent "code bloat" (and accompanying excess RAM and CPU usage) is through good programming practices. Where most developers fall short is in poor optimization of borrowed code. Let’s take CTGradient as an example as it’s well known and used (or more accurately, abused) in dozens of applications.

Continue Reading CTGradient code bloat

Beyond Repair

Where can you find an application that comprises a single shell command wrapped in so many layers that it ends up 10,000 times bigger, slower, more obtrusive, less intuitive and full of junk, but still performs the same function as the original command?

Here’s your answer.

AppleScript can be handy sometimes, but when people release applications like this, and get awards for it, alarm bells should be going off. WallSaver is almost two megabytes in size. For a single command-line.

Just reinforce the point, I wrote another wrapper for the same command in Objective-C. It’s 100 kb, or 60 kb without the icon. It can pause the screensaver (which brings it down to 0 CPU usage), resume it or restart it. And not once will it throw an “AppleScript error” ;) . Download it and see for yourself.

As for the source code, all you need is:

/System/Library/Frameworks/ScreenSaver.framework/Resources/ScreenSaverEngine.app/Contents/MacOS/ScreenSaverEngine -background

Eliminate Bloatware

The Vikings left their trash on the ground - Mac developers are stuffing theirs into their apps.

Continue Reading Eliminate Bloatware

Mac developer? Clean up your app

The reason for this article should be obvious: too many OS X third party developers do an absolutely terrible job of building and packaging their applications. rixstep

Too many apps are shipped with debug symbols, uncompressed images, redundant files or generally useless rubbish that not only wastes users’ disk space, it ultimately ends up increasing the developer’s own bandwidth costs.

Continue Reading Mac developer? Clean up your app