Showing posts with label mac. Show all posts
Showing posts with label mac. Show all posts

Wednesday, August 03, 2011

perlbrew and 32-bit CPAN modules like Mac::Growl


Today I discovered perlbrew, a utility for managing multiple versions of Perl under a non-root account, in the same spirit as rvm or virtualenv. I was forced into discovering perlbrew, because installing XCode 4 onto a Mac breaks the ability to compile many CPAN modules if you stick with the computer's default Perl.

Even with perlbrew, you might still have trouble compiling CPAN modules on a Mac, if those modules need older 32-bit code. This is because perlbrew doesn't build its perls as fat binaries, it builds them as 64-bit only.

I used perlbrew to install Perl 5.14.1, and then I was trying to install Test::Continuous, which has a long chain of dependencies including Mac::Growl, Mac::Growl itself depending on Mac::Carbon. Mac::Carbon is 32-bit. I was able to work around this, but I had to (temporarily) leave the CPAN shell to do it. The steps are:

  1. Install Cocoa::Growl as a 64-bit alternative to Mac::Growl. You can use the CPAN shell for this.
  2. Install Log::Dispatch::MacGrowl. This module will recognize that you
    have Cocoa::Growl installed, but for some reason it still won't install
    via CPAN shell. But it will install if you download the tarball and build manually.
  3. Now via CPAN install Log::Dispatch::DesktopNotification.
  4. Now via CPAN install Test::Continuous.

Friday, April 23, 2010

Snow Leopard, external displays, and fonts


UPDATE 05/03/2010: The correct answer seems to be this one: 10.6: Re-enable LCD font smoothing for some monitors. "The problem with the Automatic option is that OS X incorrectly detects many third party LCD monitors as CRTs, and consequently, disables LCD font smoothing."

A couple months ago I purchased a new 13" Macbook Pro. This was before the April updates, so it's the mid-2009 model. As an external display I'm still using the BenQ FP202W that I've had since 2006. The MBP connects to the BenQ with an official Apple-branded MiniDisplay-to-DVI adapter.

I've boiled the weirdness down to a reproducible case:

(1) Open XCode. The editor screen looks like this:


i.e. it looks normal. Legible.

(2) Connect the adapter to the BenQ monitor and connect the adapter to the MiniDisplay port on the laptop. My desktop appears on the BenQ and XCode still looks normal.

(3) Quit XCode and restart it. Now the editor looks like this:


It's the same font (Monaco Regular 12) but the rendering is somehow different. Weak and spidery. The difference is noticeable in the screengrabs, in person the difference is even more jarring.

TextMate does the same thing. I have TextMate also using Monaco Regular 12, so maybe it's related to the font? I have no idea what's causing this or how to fix it.

Monday, January 05, 2009

Two Desktop icons in Open File sidebar


I recently had a problem similar to this one:

Fix multiple ghost aliases in the Finder's sidebar

I had two Desktop icons in the sidebar of my Open File dialog boxes, in all of my applications. I had only one Desktop icon in the sidebar of my Finder, though. The advice on that page is good advice, but you don't have to trash the sidebarlists.plist file. Instead you can edit it with the Property List Editor, and under "useritems" you'll find the duplicate entries that are giving you grief. Delete one of them, save it, and then - this is key - logout and log back in.



Sunday, May 25, 2008

Safari bookmarks and Sync Services


For my own purposes, I need to make a Cocoa program that knows about my bookmarks in Safari. Lucky for me, Safari submits its bookmarks to Sync Services, according to Syncrospector:



To complete my evil plan, I also need to know the last time I clicked on a bookmark. Lucky for me, the sync schema includes a "last visited date", according to /Applications/Safari.app/Contents/SafariSyncClient.app/ Contents/Resources/SafariClientDescription.plist:


<key>Entities</key>
<dict>
    <key>com.apple.bookmarks.Bookmark</key>
    <array>
        <string>url</string>
        <string>last visited date</string>
        <string>name</string>
        <string>position</string>
        <string>notes</string>
        <string>parent</string>
        <string>com.apple.syncservices.RecordEntityName</string>
    </array>


So I just need to write my own Sync Services client that syncs with the com.apple.bookmarks.Bookmark(s)...

Uh oh. Let's have another look at that Syncrospector screenshot. The displayed entity there is a Bookmark, but it doesn't appear to have a "last visited date" property. Neither do any of the others.

I went ahead and made my own Sync Services client, so I could poke around in there for myself, but it sure seems to be that Safari doesn't set that property on the bookmarks that it submits to the truth database (it's not required to) even though Apple's own sync schema defines such a property.

Bah. Back to the drawing board for me.

Thursday, May 22, 2008

OS X, Bonjour, Apache


As part of some experimenting the other day, I went into System Prefs on my laptop running 10.5 and activated Web Sharing. To my surprise, my personal web site did not appear in Safari's Bonjour list, nor did any HTTP service appear in Bonjour Browser. I could reach the web page if I typed in the URL, it just wasn't being advertised by Bonjour. I had a very clear memory that it used to work with Bonjour, so I started asking why it's not working now. I did some Googling, I searched Apple's support forums, I finally got my friend Thomas involved. He, also, remembered that it used to work with Bonjour, he, also, could not find any leads via Google. (And he's a really good Googler.) He suggested that we check the httpd.conf on my laptop. ("Mac use conf file? That's unpossible!") Sure enough, here's what we found:


<IfModule mod_bonjour.c>
    # Only the pages of users who have edited their
    # default home pages will be advertised on Bonjour.
    RegisterUserSite customized-users
    #RegisterUserSite all-users

    # Bonjour advertising for the primary site is off by default.
    #RegisterDefaultSite
</IfModule>


I made a trivial edit to Sites/index.html in my homedir, toggled Web Sharing off and on one more time, and presto! there was my personal site listed in Safari's Bonjour list.

I'm not sure if this is something new in Leopard, or if it changed in Tiger and I just never noticed. I'm sure Panther didn't work this way. And I'm not saying the Leopard way is bad. It just surprised me.

Friday, April 25, 2008

How many angels can dance on the tip of a mouse pointer? I don't care.


I used to care about piddly shit like this. The day I quit caring was the day I started wanting a Mac. (That day, incidentally, was about two years before I actually got a Mac, so don't give me any crap about rationalizing in Apple's defense.) After five years of having a Mac, I still don't care and I feel great! It's like switching from Catholic to Buddhist.

That's what not having autofocus is like to people who've been using it for the past 10 to 30 years (in my case, 20 years). BLONK! BLONK! BLONK! I'm serious. It's that bad. Not exaggerating even a tiny bit.

Bull. You're exaggerating quite a bit, because the software isn't behaving inside your narrow definition of "correctness."

(If you skip down past the hyperbole to the part where he actually starts programming, there is some interesting stuff.)

Saturday, March 15, 2008

Creating a menu-based SIMBL plugin


There are a hundred tutorials on creating nib-based Cocoa applications. And there's at least one good write-up on how to make a Cocoa bundle that can be loaded by SIMBL. SIMBL has taken on increased importance with the release of Leopard, because InputManagers can no longer be installed in user folders. They must be installed at the system level in /Library/InputManagers. However, if you or your admin install just SIMBL at the system level, SIMBL acts as a fine-grained meta-manager, loading SIMBL-compatible plugins on a per-user and per-application basis.

Normally Cocoa bundles don't include nibs, but you can add them. The CULater wiki doesn't go so far as to guide you thru adding a nib to your Cocoa bundle, or how to attach the nib-generated menus to your target application. Since we can't edit the nibs of the target application, we have to install our nib contents programatically using Objective-C.

So that's what we're going to do today. I'm going to assume you already have SIMBL installed on your computer, and that you are at least novice-level with XCode and Cocoa. I specifically cover the differences between Interface Builder 2 and Interface Builder 3, mainly to point out how much IB3 has been improved.

1) Open XCode and start a new Cocoa Bundle. Let's call it "George".

2) Before we create any classes, we'll use Interface Builder to make the menu. The menu is going to have a single "About..." menu entry. A little later when we load the bundle, we'll insert our menu into the menubar programatically, since we can't edit the nib file of the target application.

When you create a Cocoa application in XCode, XCode automatically creates your first nib file in your project for you. But since we created a bundle, our project doesnt have any nibs yet.

2a) In XCode 3, go to File->New File and make a new Cocoa nib file. Be sure to create an "empty nib" file not an "application nib" file. Just call it "Menu.nib". Doubleclick the nib file in XCode to open it in Interface Builder.

2b) In XCode 2, you can't create an empty nib from within XCode. Open Interface Builder directly, and choose an empty Cocoa nib as your starting point.



After building the menu (step 3 below) save your new nib file in your project directory as "Menu.nib". It will ask you if it should add the nib to the project, and if it should add the nib to the target "George". Answer yes to both.

3) Drag an NSMenu from the IB palette to the IB main window (the window that contains "File's Owner" and "First Responder".) Then (XCode 3 only) doubleclick it to create an editable menu on your screen. Delete all but one menu item, and rename that one to "About..." Save your work then switch back to XCode.

4) Time to create the class which will contain our menu callback and, in this case, also bootstrap our plugin. Create a new Objective-C class file called "GeorgeController". Be sure to also create the header file. Since we're going to add the menu programatically, we need to create a variable that will be our handle on the menu. That goes in GeorgeController.h:

@interface GeorgeController : NSObject {
    IBOutlet NSMenu* topMenu;
}

@end

Now in GeorgeController.m, add a typical dealloc method, and an almost typical init method:

#import "GeorgeController.h"

@implementation GeorgeController

- (id) init {
    self = [super init];
    if (! self)
        return nil;

    [NSBundle loadNibNamed: @"Menu.nib" owner: self];
    return self;
}

- (void) dealloc {
    [super dealloc];
}

@end

In the init method, we're loading the nib file we just created.

One more thing before we switch back to Interface Builder - let's write the callback that we're going to attach to the "About..." item:

- (IBAction) orderFrontAboutPanel: (id) sender {
    NSImage* icon = [[NSWorkspace sharedWorkspace] iconForFileType: @"bundle"];

    [icon setSize: NSMakeSize(128, 128)];
    NSDictionary* options;
    options = [NSDictionary dictionaryWithObjectsAndKeys:
        @"George", @"ApplicationName",
        icon, @"ApplicationIcon",
        @"0.01", @"Version",
        @"", @"ApplicationVersion",
        @"Copyright (c) 2008 __MyCompanyName__", @"Copyright",
        nil];
    [NSApp orderFrontStandardAboutPanelWithOptions: options];
}

and add the method signature to the .h file:

@interface GeorgeController : NSObject {
    IBOutlet NSMenu* topMenu;
}

- (IBAction) orderFrontAboutPanel: (id) sender;

@end

Make sure to save both files so IB can see your changes.

One thing to note here is that our plugin can access the NSApp instance of our target application - here we call on NSApp to create an About popup window. A little further down we'll use NSApp to get at the application's menubar. Your plugin will probably call methods of NSApplication to initiate most of its interactions with the target app.

5a) Now go back to Interface Builder. If you're using IB3, click on "File's Owner", then open the Inspector and go to the Identity pane. Under "Class Identity" select GeorgeController. If GeorgeController is not listed, you may need to go to File->Read Class Files... and navigate to GeorgeController.h in your project, then try again.

Now that IB knows that GeorgeController is the File's Owner, you should be able to choose Connections from the Inspector and see topMenu under Outlets and orderFrontAboutPanel: under Received Actions. Drag from topMenu to the titlebar of your IB menu under development, and then drag from orderFrontAboutPanel: to the About... menu item.



Here's a gotcha: if your header file contains syntax errors, IB won't be able to parse it but also won't tell you that it can't. Like a naughty puppy, it will just quietly not do what you want it to do. If IB seems to be defying you, try compiling your project and see if you have any syntax errors.

5b) If you have Interface Builder 2, click on "File's Owner" and then choose Custom Class from the Inspector. If GeorgeController is not listed as an option, you need to actually drag GeorgeController.h from XCode's main window to IB's main window. Set GeorgeController as the custom class for File's Owner. Now choose Connections from the Inspector, then Ctrl-drag from File's Owner to the titlebar of your IB menu under development, then click Connect in the Inspector.

Next Ctrl-drag from the About... menu item to the File's Owner object. If the Inspector says "No actions in GeorgeController", click on the Classes tab in the IB main window, then select "Read GeorgeController.h" from the Classes menu in the menubar, then try the Ctrl-drag again. When you see orderFrontAboutPanel: in the Inspector, hit Connect. XCode 3 may be looking pretty attractive by now. :)



6) Next we're going to use the awakeFromNib method as our opportunity to attach our menu to the target application's menubar. You don't call awakeFromNib from your code - when a nib is loaded, awakeFromNib is automatically called on the instance of the class associated with File's Owner. So define an awakeFromNib like this:

- (void) awakeFromNib {
    NSMenuItem* item;

    item = [[NSMenuItem alloc] init];
    [item setSubmenu: topMenu];

    [topMenu setTitle: @"George"];

    [[NSApp mainMenu] addItem: item];
    [item release];
}

Note that we finally use the IBOutlet topMenu, this one moment is the whole purpose of his existence. Also, we take advantage of NSApp again to give us the mainMenu of the target application so we can manipulate it.

7) Now we're ready to do the work specific to SIMBL. Our class needs to define a class method - not an instance method! - called load which takes no arguments and returns void. SIMBL always looks for a load method in the NSPrincipalClass (we'll get to that) and that's where we bootstrap our plugin. In our case, there's not much to do.

+ (void) load {
    [[self alloc] init];
}

When inside a class method, "self" does not represent an instance, it represents the class itself. So we alloc and init a new controller instance, our init calls loadNibNamed:, which causes awakeFromNib to be called, which causes our menu to be attached to the menubar, which worries the cat that killed the rat that ate the grain that sat in the house that Jack built.

8) Finally, we edit the Info.plist. Before it calls our load method, SIMBL looks in the Info.plist of our bundle to see (a) which application(s) we want to plug into and (2) which class in our bundle contains the load method that we want SIMBL to call. In this example our bundle has only one class, but in a real project you'll have more.

This next part is straight from the CULater wiki.

If you just doubleclick the Info.plist in XCode, it opens in the XCode editor. If you'd rather, you can rightclick and Open With Finder, which will bring up the Property List Editor. Either way, set the NSPrincipalClass to "GeorgeController", and then create a new array key called SIMBLTargetApplications. Since this is an array, you can create multiple entries and have your plugin be loaded into multiple applications. In our example, we're just going to have one array entry, telling SIMBL that George should be loaded into Apple Mail:

    <key>NSPrincipalClass</key>
    <string>GeorgeController</string>
    <key>SIMBLTargetApplications</key>
    <array>
        <dict>
            <key>BundleIdentifier</key>
            <string>com.apple.mail</string>
            <key>MaxBundleVersion</key>
            <string>*</string>
            <key>MinBundleVersion</key>
            <string>*</string>
        </dict>
    </array>

How to know the BundleIdentifier and BundleVersion? Don't try to guess at it, cause they're not necessarily related to the application's name or displayed version. You need to manually inspect the application's own Info.plist. Go to the application in the Finder, right-click, and choose "Show Packge Contents". Go into the Contents folder and open the Info.plist that you find there. Look for the CFBundleIdentifier (not CFBundleName!) and CFBundleVersion (not CFBundleShortVersionString!) Although, SIMBL will allow you to use wildcards in the versions as you can see in our example.

9) You're ready to build. Hit Build and deal with any errors. If you've followed the example code exactly it shouldn't generate any warnings either. Right-click the George.bundle in the XCode main window, select Reveal in Finder, and drag the bundle to your ~/Library/Application Support/SIMBL/Plugins directory. Start your target application (Apple Mail if you followed the example Info.plist) and you should see a "George" submenu in the menubar. Congratulations! You're ready to build out our example into a plugin that actually does, you know, stuff.

Credits:
Mike Solomon for the Cocoa Reverse Engineering page on the CULater wiki.
I figured out most of what wasn't in the wiki by picking apart the source code to GreaseKit. GreaseKit is Copyright (c) 2007 KATO Kazuyoshi.

Monday, January 28, 2008

Macbook Thin == iTablet beta


Well, we didn't get an iTablet, we got Macbook Mini. Except it's more like a "Macbook Thin." Which is interesting because making it Thin instead of Mini addresses Bill Manning's complaints about UMPCs, which I thought were spot-on.

I wasn't predicting a tablet, just hoping for one. The Macbook Thin is a great product for the "not me" demographic. There's a lot of neat tech packed into the thing but I don't have a need or a desire for one. I will stand by one thing I said, which is that there's a lot of overlap in the components that go into the Thin and the components that would go into an iTablet. Imagine breaking off the screen half of the Thin, replacing the keyboard with a 13 inch touchscreen, and you'd have a pretty kickass tablet. The internals of the two products would be pretty similar.

Right before Macworld there was a rumor that a tablet is in development, but wasn't going to be ready by January. (This rumor persists, and is gathering strength.) What if the Macbook Thin was actually a "Plan B" product, when it became clear that the tablet wasn't ready, conceived both to make some money, and also get some of this superthin tech out into the field and shake out the bugs?

One thing that is scary about the Thin, relative to my tablet obsession, is the price. If the high-end Thin is $3000, how much might the tablet cost? $4000? $5000? That's too much to pay for a device which is by design an ancillary device to another computer you already own. Maybe that in itself was the reason for delaying the tablet - getting the Thin into production will also allow them to ramp up production of components, streamline the production lines, and bring down costs, so that the eventual tablet will hit a reasonable price point.

Tuesday, December 04, 2007

Here's hoping against the "Macbook Mini"



"As Macworld approaches, reports of an ultraportable MacBook are following patterns of previously expected products that eventually materialized," analyst Gene Munster wrote in a note to clients. "We believe these reports are legitimate and continue to expect Apple to introduce a MacBook with a significantly smaller form factor."

- Piper Jaffray analyst Gene Munster

One might assume that Piper Jaffray has an "inside source" at Apple. And maybe they do. But another thing that these analysts do is watch the supply chains. The individual components of a new computer product have to be ordered months in advance, so by watching who is buying what in what quantities, predictions can be made.

If you consider the individual components that might go into a "Macbook Mini" or might go into an "iTablet", there's actually a fair amount of overlap. So here's to hoping they've read the tea leaves wrong, and we get something less "Macbook Mini" and more "iTablet".

Why?

For starters, the UMPC market already has several offerings, and even though they are neat little devices, I don't see a lot of people ditching their traditional laptops for one. So if you were jonesing for such a device, they're here now, but it's a niche market. It's not stealing global marketshare from traditional laptops. Since OS X is already considered a niche market itself, a UMPC running OS X would be targeting a niche of a niche. If you're a one-man startup, "niche of a niche" smells like opportunity, but if you're already a multi-billion-dollar company, it smells like a poor return.

What's more, I think Bill Manning is on target when he says that UMPCs have "a cool factor of 10" but ultimately they aren't practical. He's touting the Macbook as his laptop of choice, but his criticisms of UMPCs apply in general.

An Apple UMPC just wouldn't be much to shout about.

A true tablet computer, on the other hand... that's my wish. At the end of my work day I want to get away from my office and away from my keyboard, but darn it, I'm a nerd and I still have leisure activities that involve a computer. I'd like to kick back in my recliner and read some mail or read some Apple ][ History or play a web game, and do it reclined and do it without pounding keyboard.

An iTablet would address all of Bill Manning's gripes about UMPCs. It would have a larger screen, but still be small and light, because you omit the keyboard half of the computer. It won't mess with your muscle memory of your work keyboard, because there is no keyboard. It could have the virtual keyboard, or handwriting recognition via Inkwell, or hey why not both? At this point both types of software are completed products.

My perfect iTablet would have flash-based storage only, and would treat CPU power as secondary to cooling and battery life. The perfect iTablet must run quiet and cool, because who can really keep their laptop in their lap anymore, much less hold it in their hands.

Now imagine this: if you own an iTablet, and you also own a Mac, it gets better. The iTablet itself has a cool, low power CPU. But the computational power of your iTablet actually goes UP when it can contact your Mac, without running any hotter. How is such magic possible? Oh dear, everyone has forgotten XGrid.

Wednesday, November 07, 2007

YASIBLR: Yet Another Self-Important Blogger Leopard Review


The 3D Dock sucks. Much hash has been made about why it sucks, but sometimes the gestalt view of the layman is the most telling. On first boot, on my Macbook with the glossy screen, there were so many glares and reflections - some real, some virtual - that I couldn't distinguish... well, anything. It's a visual trainwreck. Using the defaults command to make it 2D is better, but still aesthetically inferior to the 10.4 dock. I guess I'll be browsing at leoparddocks.com.

The translucent menu bar is irritating. Not so much that I want to pluck my eyes out, but it's harder to read and it doesn't even look cool. It's just pointless.

And the thing with the folders in the dock is insane. How can that be a useful idea for anyone, anywhere? I was looking forward to the Downloads folder with the fanout effect, but that shapeshifting icon thing was just too irritating and I had to take it out of my dock. Please give me a haxie to disable that.

I like the unified look, but I still hate the rounded recessed buttons of Apple Mail compared to the metallic raised buttons of, say, Safari. If you open Apple Mail, Safari, and iChat, and set them side-by-side, guess which one still doesn't look "unified"? If someone with clout at Apple is in love with those recessed buttons (El Jobso?) then why haven't they had their way with other apps like Safari? At least then we'd have the "unity" in "unified".

On the other hand, Apple Mail, traditionally a performance dog since at least 10.3, is much more snappy in Leopard. Props for that, but I always thought that Apple Mail in Tiger, with its weird buttons and poor performance, felt like a stepchild compared to the other bundled apps. Now at least it feels like a peer, even with the odd buttons.

The system as a whole feels much faster, even if it isn't - but I think it really is. Windows drag smoother, minimize faster, Dashboard loads faster (remember in Tiger, the first time you'd go to Dashboard after a reboot, and everything would strain as all the widgets loaded at once? No longer noticeable.)

Quick look is awesome. PDFs, Word docs, text files, source code, movies, iChat transcripts... get a look at any of them without having to open an app. Is there a hotkey for toggling full screen mode without going to the mouse?

Cover flow of directories: Originally I wrote "meh. Not for me." but I take that back. If you're not a big iPhoto user, as I am not, you probably have some folders full of images that are not being managed by iPhoto. Cover flow + quick look is a fun and convenient way to browse those folders.

When you select Show All from a Spotlight search, you now get a real Finder window and not some bizarre supernumerary window. Hurray!

To many people (but, admittedly, probably not most people) Spaces is more of an overdue item than a gee-whiz item. Unix, X11, virtual desktops, old-timers, here's a nickel, blah blah. I used to be a big fan of virtual desktops, so much that I used and loved DesktopManager when I first switched from Linux to OS X. Then when Tiger came out, it broke DesktopManager. After that, I learned to make good use of Exposé and learned to live without virtual desktops. Time will tell if I re-incorporate Spaces into my workflow or not. Binding applications to specific Spaces is cool, and the way that Spaces works with Exposé is cool. I'll probably try it, but I don't automatically assume I'll keep it.

Thursday, October 11, 2007

MacBook Pro screen, psychedelic colors


This week, I experienced exactly this problem:

http://discussions.apple.com/thread.jspa?threadID=1065874&tstart=0

At first I was sure it was a hardware problem, because it affected the screen both in OS X and when I booted to XP with Boot Camp. I knew the video card was okay, because my external monitor looked fine, but I thought it could be a problem with the laptop LCD, or with the ribbon cable.

But I deleted ~/Library/Preferences/com.apple.universalaccess.plist, just like the last poster said in that thread. Then I did a complete shutdown of the laptop (not a warm boot) and when it came back, it was fine.

Weird.

If you delete com.apple.universalaccess.plist, you will lose any custom keyboard shortcuts you may have defined, but then you can re-create them. Small price to pay.

Thursday, August 16, 2007

Please, no more Mail.app


Peeve of the moment: Whenever some people refer to the Mac's standard Mail program as "Mail.app" or "Mail-dot-app". I also sometimes hear "Terminal-dot-app", and I expect I'm going to hear "Numbers-dot-app". Yes, "Mail" is a very vanilla name for a program. Yes it needs to be disambiguated from other mail programs, and even from the common noun "mail." But you never hear people say "Word-dot-exe". They call it "Microsoft Word" to disambiguate it from other "words". Likewise, let's call it "Apple Mail". After all, that's what it calls itself:

X-Mailer: Apple Mail (2.752.3)

Google gets it.

Thursday, August 09, 2007

Multitouch desktop? No. Multitouch laptop? Yes.


From the Q&A section of this week's Apple press conference:

"Introduced multitouch on iPhone, what about for the Mac?"

Steve: "Makes sense for the iPhone, not sure it makes sense in the Mac. Classify that as a research project."

(taken from Engadget)

Some people really latch on to this idea. Other people dismiss it, citing the well-known gorilla shoulders effect. I think they're both right, because they're not necessarily talking about the same thing.

But first, if you're not familiar with gorilla shoulders, you need to be. Try this:

1) Extend your arm straight in front of you, parallel to the floor.
2) Extend your index finger.
3) Keeping your arm straight, rotate your index finger in a circle approximately four inches in diameter.
4) Every third rotation, make a jabbing motion with your arm.

Keep doing that, and make a note of how long it takes you to reach "uncomfortable" and then "tired." It's faster than you think. Lots of people use their arms all day - it's called "manual labor." But the particular angles of using a touch screen display on a desktop present unique physical demands. Touchscreen displays have already been tried in the mid-1980s, usually on the workstations of places like banks, and the fatigue effects became known as "gorilla shoulders."

Now with a laptop, it's a different story. The distance is much shorter and the angle is different. I could see a multitouch display on a laptop, in addition to a keyboard and trackpad. So instead of reaching for the trackpad, I just reach out and touch the thing that I want. Try it on your laptop right now. Personally I'd find that superior for most cases of scrolling, and manipulating icons, but I'd go to the trackpad for fine details, like bandboxing an image region for cropping.

That's why I say both camps are right. People who get excited about a multitouch "Mac" really want a multitouch Macbook, and people who already know the history of gorilla shoulders automatically hear multitouch iMac and reflexively say no, that doesn't work.

Wednesday, August 08, 2007

Historic new Apple keyboard


Why is it a historic new keyboard? Check out this photo from Engadget. For the first time in a long time, we have a Mac keyboard where the Command key is not also the "Apple" key.

I've had a strange fascination with the history of the "Command/Apple" key ever since I learned that the original Macintosh used the ⌘ symbol exclusively in the interface, and did not have the Apple symbol on its keyboard:



(Photo from aresluna reprint of Byte Magazine)

But by the time I was doing computer lab support in the mid-90s, Apple keyboards had both symbols on the same key, and everyone in the Mac labs spoke of "Command-S" and "Apple-S" interchangeably. When did those two get conflated, if the original Mac never used the Apple symbol?

It goes back to the Apple IIgs, and the Apple Desktop Bus. ADB was sort of an early version of USB, a unified cabling and signaling interface for peripheral devices that was capable of daisy-chaining. ADB was introduced on the IIgs in 1986 and on the Macintosh II in 1987. This allowed Apple to supply a single keyboard model for both the IIgs and the Macintosh line. The Macintosh of course had the Command key as its primary meta key, but the IIgs was descended from the //e and so used the Apple key as its meta key:



(Photo from the Graphical User Interface Gallery)

So the two keys became one on the unified ADB keyboard, to wit:



(Photo from the Flickr stream of jd_wages)

The IIgs finally reached its end of life in 1992, so why did the Apple symbol continue to live on the Macintosh keyboard for another 15 years? Why choose now to get rid of it?

Wednesday, August 01, 2007

10th Anniversary of Macworld Boston 1997


This August marks the tenth anniversary of Macworld Boston 1997, AKA "The Return of Steve Jobs." You can see the video of his speech here:

http://www.youtube.com/watch?v=PEHNrqPkefI

At the 23 minute mark, he says something very interesting. He says that when he returned to Apple and examined the state of the company, he uncovered two core assets: the Apple brand name, and the MacOS software. Looking back over the last ten years, it is striking how well Apple has executed on leveraging those assets. They have leveraged the Apple brand into markets previously considered tangential to personal computing, and they have continued to invest heavily into creating and maintaining the best personal computer operating system available.

Also notice at the 27 minute mark, when he announces the infamous Microsoft "partnership", how he is carefully conciliatory and diplomatic towards Microsoft. Certainly, that didn't last. Probably, with Apple on the brink of ruin, Jobs wanted the option of increased cooperation on the table, but it turns out they didn't need it. Now, they obviously feel very confident and comfortable in making fun of Microsoft.

Tuesday, April 17, 2007

Eight-core Macs and performance


On the one hand:

New eight-core Mac Pro performance a mixed bag

On the other hand:

"12:23pm - Easy to spread multiple threads across as many processor cores as you want -- demo [of Compressor] shows octo-core encoding jump to 100% across all eight cores. Shows live bookmarks in video, publishing to iTunes. All done!"

- Apple Keynote Live from NAB 2007

Even though SMP has been around for years, it hasn't really been mainstream until now. Around 1997 or 98, I bought an SMP Pentium II system. A few years later when I built a Pentium 4-based computer, I couldn't even find a consumer-grade SMP motherboard. I think that as computer prices continued to fall, the cost of SMP, relative to the other components of the computer, pushed it out of what the consumer market would pay. But now multi-cores have changed the economics again, and the writing is on the wall - multi-processing is going to be a fact of life for all but the most modest entry level computers for the foreseeable future.

Eventually, general purpose software will catch up and take full advantage of the multi-core processors. Until then, buy the tool you need and not more. If your daily software doesn't use eight cores, no one is forcing you to buy eight cores. If you buy a nail gun when all you really needed was a box of thumbtacks, maybe you're compensating for something.


Monday, April 09, 2007

What kind of breakdown would your computer have?


When a Mac, or a Linux computer, or a Sun, is broken, there is still a logic to the brokeness. I have tools available to me for inspecting the computer, and I can pursue the symptoms of the problem, and the symptoms lead on a rational path to the cause. In the cases where I can't fix the problem, I at least feel confident that I have exhausted all my options and the machine is truly well boned.

Trying to troubleshoot a Windows computer is like trying to reason with someone who's had a psychotic break:

Me: Hey what's the problem?
Windows XP: I don't have a problem.
Me: Well you're not remembering my preferences. Really, what's the problem?
Windows XP: BLAH BLAH boogity boogity boo BLEE BLAH BLARRRGH!
Me: Can you be more specific?
Windows XP: I don't have a problem.

Here's a good time I had trying to reinstall Norton Systemworks:

Norton: I'm installing... gosh, I can't do it.
Me: Why not?
Norton: I'm not going to tell you. Would you like to rollback or retry?
Me: What's the point of retrying if I don't get a chance to fix the problem?
Norton: Well, those are your choices.
Me: Fine, retry.
Norton: Nope, still can't do it.
Me: Okay, I give up. Roll back the install attempt.
Norton: Heave... ho... nope, I can't do that either.

(Remember when "Norton" meant "unquestionable quality"? Not anymore.)

Tuesday, November 28, 2006

OS X, perl security update


I noticed in the Security Update 2006-007 for OS X, they are including an update to the system Perl. I remembered that Redhat also recently released a security update for Perl on RHEL4, so I did a little digging. Turns out that today's update from Apple has nothing to do with
CVE-2006-3813 which is Redhat fixing their own slip-up. No, Apple is fixing CVE-2005-3962, for which Redhat released an update on December 20 of last year.

Oif! That's not good turnaround. Especially considering there have already been several other security updates for OS X this year and this relatively straightforward perl fix could have been in any of those.

Does OS X Server get more timely security?

Tuesday, August 15, 2006

I Can See Through Time


Time Machine: incremental backups and rsyncing are nothing new. But if you've ever been responsible for backups you know something about scheduling full dumps versus incremental dumps and layering restores and on and on... it used to be we'd try to come up with clever levelling strategies to optimize our storage space, but now storage has gotten cheap enough that I think everybody just does level ones all week and full dumps on Sundays.

Normally this is where we say "if you've ever tried to walk your mom thru doing X you'll appreciate how Apple makes it easy" but no one I know has EVER tried to walk their mom thru restoring a level zero and layering the most recent incremental over it. That's one of those things that (assuming you make backups for your parents) if you ever have to do a restore you just drive over and do it yourself, stopping for a six-pack on the way there and a fifth on the way home.

Is Time Machine the silver bullet so that now Mom can restore her own backups? Too early to say, but I think there's a chance. I think the interface to Time Machine is pretty damn clever. Obviously each of those windows in the stack stretching off to infinity represents a checkpoint on the backup volume, and you can browse them or search them, and when you find the file you want just drag and drop it back to the present. The slider on the right lets you zoom into the past, but it also lets you zoom back to the present, recovering windows that you had previously popped off the stack. Without that slider the windows would have to be represented as some kind of carousel instead of a stack, and would be much more difficult to navigate a la Fanta's Expose knock-off.

Even assuming Time Machine is every bit as effective and intuitive as its proponents say, is this going to change the face of computing? Of course not. It will "just" be the best backup and restore interface ever. Oh noes! Damn you Apple! I was expecting nanobots that trim my lawn while factoring prime numbers with XGrid!

It's like Dashboard. When Dashboard was previewed the majority response was "oh, it's just eyecandy." But if you actually use a Mac, every day, Dashboard is a great convenience. Just by throwing my mouse into a hot corner (another simple convenience that I love) I can see the weather, football scores, and the stock market, and also have a dictionary, a calculator, and a phone book. Flick the mouse into the hot corner again, and I'm back in my work environment.

Actually I'm not here to apologize for Time Machine or for Dashboard. The underlying theme here is Apple's products, their "innovation", and people's expectations. I think sometimes Apple is part of their own public expectation problem. Dashboard is NOT the centerpiece of anyone's workspace, and it was never meant to be, but when Apple trots it out they make it sound important enough to be a centerpiece. In a way you can't blame them - their people worked hard on these things and they did a great job and they deserve to have their work showcased. But if Apple made a toaster, they'd act like they'd invented bread.

The upcoming Web Parts feature is another example of the same phenomenon. I think Web Parts is going to be a great convenience for me - I anticipate making widgets so I can keep up with an auction or a discussion board or football games or anything else I feel like watching during my day. But if you watch the WWDC presentation, you kind of come away with the impression that Web Parts are so easy and so cool and so much goddammed fun that Apple expects us to spend all day every day making Web Parts. They don't say it, but the grandeur of the presentation is such that you just feel it. But really the exact opposite is true - Web Parts are supposed to be easy so that you don't spend all day making a widget. You make one in seconds and throw it away when you're done with it exactly because you didn't pour your sweat into it.

Part of the enjoyment of using a Mac is the sum of all these conveniences. I can read my mail with Thunderbird on Windows. I can browse the web with Firefox on Linux. But the sum of Expose and Dashboard and Spotlight and Quicksilver makes me happier and more efficient during my day.