Archive for the 'Macintosh' Category

Page 2 of 3

OS X Scripting

John Gruber followed up on Daniel Jalkut’s suggestion that Apple replace AppleScript with Javascript:

I agree with this wholeheartedly. Or maybe even make a clean break and scrap OSA and introduce a new system.

I’ve been talking up the benefits of scripting apps on the Mac since the 1990′s. The sad fact of it is that Apple has never really supported scripting to the level that it deserves. It’s even more important now in the days of a UNIX based MacOS. I have a bunch of scripts that I rely on daily to help me get things done more efficiently. I’d write more of them, but two things hold me back. AppleScript is really a funky language. I’ve partially solved that by switching to using Python (via appscript) to do the scripting, but that’s only half the problem. The other half of the problem is that the API exposed via OSA is also pretty funky. If Apple cleaned all that up, in say, 10.6, I’d be happy to rework my existing body of scripts.

Even if that happened, the big problem is that developer’s don’t really support scripting that well, so a good scripting system overhaul needs to look at making it easy for developers to expose application functionality to scripts. Unless that part happens, improvements in the scripting language, and OSA’s API’s will not be enough to push scripting to the level where it belongs.

(Finally) upgraded to Leopard

At the beginning of the month I got my work laptop, one of the early 2008 MacBook Pro’s. It came wit h 10.5.2 preinstalled, so I took the opportunity to upgrade to Leopard. It’s been an interesting experience sitting on the sidelines watching everyone else explore the new features, but I don’t regret it. I had a few hiccups moving things over, mostly related to installing Python packages. But I had fewer migration problems than I expected, especially given how customized a setup I am running.

Spotlight is actually fast now. It’s not absolutely lightning fast, but it is now fast enough to be usable, at least for me. This might also be partially related to the 7200RPM disk in the new laptop, but either way, I am happy, because this is the thing I wanted the most from Leopard.. Well, except for the fact that mds still sometimes shows up as the top CPU consumer on the machine.

Mail.app improved a lot. There was a bug in the reply all command that made moderating Apache mailing lists a pain. Gone. Account setup, and more importantly, self-signed certificate support is hugely improved. No more trips to Keychain Access to make things work. If only it could remember the position of multiple viewer windows across restarts.

I used one of the virtual desktop managers on my Powerbook and then stopped, so I didn’t expect much out of Spaces. It turns out that spaces is actually pretty good. It works with multiple displays and plays well with Expose. I’m using it all the time I just wish there were shortcuts to go to a particular Space.

Against my better judgment, I’m using Time Machine for primary backups at the moment. This is due to an unfortunate fragmentation of external Firewire disks. After JavaOne I need to spend some time rearranging stuff on various hard drives, so that I can put a SuperDuper! backup into the rotation again. I don’t yet have complete faith in Time Machine’s reliability. Just yesterday, I successfully used Time Machine to save my bacon, and then later in the day, a Time Machine backup just failed with an error. Running Disk Utility over the backup disk didn’t find any problems, and after a reboot, backups seemed to work again. Doesn’t exactly inspire confidence, though. I also tried to use a USB disk that is attached an Airport Extreme, and Time Machine could never finish its initial backup. I like to work with a large display, so wireless Time Machine is not a huge deal to me, but it really ought to work. It’s likely to be several more point releases of 10.5 before I really feel like I can rely on Time Machine.

Quicklook is useful when I remember to use it. I’m getting tons of PDF slideshows in e-mail, and Quicklook is good for those. I really wish there was a Quicklook plugin that work on OpenOffice documents.

The next one is dumb but true. I really like having pictures for my desktop backgrounds. The translucent menu bar isn’t a factor in this. Apple provided a nice set of pictures for the backgrounds, and I have it set to rotate the background fairly often. All I need to do now is find some time to pull some of my own pictures into the rotation. The new animations for the picture folder screensaver is also cool – it drops the new pictures on top of the older ones, so that over time your screen looks like a pile of photographs.

On the infrastructure front, things seem a mixed bag. Things are snappy, but the machine also has 4GB of RAM in it. I have yet to see a kernel panic, but it seems less stable than 10.4. I’ve had a bunch of little problems: the issue with the Time Machine disk, loss of sounds after using Front Row to play a DVD, a bug that makes it impossible for file moves to work correctly in PathFinder, and syslog running amokfor no good reason. I had to turn off Growl because it was causing NetNewsWire refreshes to clog up. At the moment, anytime the machine makes a noise, the screen flashes (and yes, I did check the preferences for Universal Access). I’ve also been having a problem with my Firewire 800 disks just disappearing, sometimes during operations. Turning off one of the drives seems to be helping the problem, but that’s 500GB of storage that is offline. It makes me wish (again) that ZFS was going to be in 10.5.3, but alas, it will not. In any event, 10.5.3 will certainly be welcome. All these little problems are really starting to annoy me.

Ted Leung on the (MacBook) Air

Ok, the title is a horrible pun. Blame DrErnie. I don’t have that many comments about the Air itself as a product. I like the form factor for the most part, but I think it’s underpowered for anyone who is seriously writing code or processing RAW photographs at a serious level. At the same time, there’s no doubt in my mind that they will sell a lot of units, because it’s just so cool.

The most interesting thing about the MacBook Air is the custom packaging of the Core2 Duo that Intel did for Apple. It’s interesting to see how that partnership is working out. I certainly don’t remember anything like this happening with Motorola or IBM. If Apple is able to get custom versions of Intel chips, that gives them space to introduce products that will be harder for competitors to match. Of course, Intel probably wants to give those chips to its other customers eventually, but if Apple could secure, say, a 1 year lockout before anybody else got the chip that is in the Air, that would be a nice position to be in.

Many people (including me) were surprised that there was no MacBook/MacBook Pro bump, but some articles on the new Penryn chips suggest that there isn’t a large benefit, and it turns out that the dates for Intel’s Montevina laptop platform have been moved up to May, so maybe Apple just decided it wasn’t worth the trouble.

On the whole, there wasn’t much for me to personally get excited about this year. At one point, I commented in IRC, “we killed twitter for this?”. Which is probably the other interesting point about the Stevenote, Twitter got knocked so hard that my Twitterific is still reporting errors multiple times per hour. The only decent live reporting that I saw was in the Ars Technica and MacRumors IRC rooms and on the MacRumorsLive website. Everybody else was bombarded or laggy. Seems to me that there’s still plenty of scalability issues for people to be working on.

Obligatory Pre-Macworld Post

It’s that time of year again. As usual, I’m not going to try to predict. Lots of people are doing that, and either most of what we’ll see on Monday is either obvious if you’ve followed the Intel hardware roadmaps, or it falls into the category of “super-sekret, many chinese walls inside of Apple” projects, in which case predicting is ridiculously hard (and less fun than immersing yourself in the reality distortion field for a few hours).

I do however have a wish list of things that I’d like to see happen at Macworld. These aren’t so much predications as statements of pain points that I am having:

Mac OS 10.5.2
It’s amazing that I should be wishing for an operating system point upgrade for Macworld. Three months after release, I still haven’t upgraded to Leopard. Every time I work up the courage to do it (the DVD has been on my desk for 3 months) I see another report of some Leopard related disaster and turn back. Truth be told, even if 10.5.2 ships this week, I won’t be installing till enough other people have taken the arrows.

Universal Quicken
Two years into the Intel Mac transition, we still don’t have an Intel version of Quicken. This, and Microsoft Office (not that I use it much) are the only major PowerPC applications left on my machine. Firing either of them up is a huge pain in the neck, and the sluggishness is annoying. Office is ready to ship (not that I care much), so that leaves Quicken.

Cinema Display revamp
I’ve lost track of how many times this has been predicted. My 21″ CRT is running at 1920×1440, which is microscopic by anyones measuring. It’s time for a big LCD for me. Until I started taking pictures, I would have been happy with the current displays, but now the color gamuts just aren’t wide enough. This is leftover from last Macworld.

3G GPS iPhone
I am pretty sure this is coming sometime this year. But I would really like one now. But I bet not.

Aperture 2.0
I already wrote about this a few weeks ago. Aperture is long in the tooth. Unfortunately Macworld is the wrong show for this. This is a “pro” photography app. So it’s more likely that this shows up at PMA in a few more weeks. I hope so. The longer I use Lightroom, the more images go into it, and the harder it is for me to switch back.

Lightroom 2.0
See Aperture 2.0.

Java 6
Yes, I know. Wrong show, wrong audience. But wouldn’t Apple like to get over the embarrassment of this?

Leopard, Java, and Open Source

I haven’t gotten around to upgrading to Leopard yet for several reasons, probably the most prominent of which is that Lightroom doesn’t work correctly, and I’m starting to use it a lot (more on that in a later post, perhaps). But it’s not for lack of Java 6. I’ve been following the Java on Leopard thing with bemusement, but John Gruber’s most recent post sparked a few thoughts.

Since I haven’t posted in a while, let me remind you of the context. For a while I was a Java developer, but that was another life ago, and since then, I’ve been a Python developer, and am now a manager of Java (and Javascript) developers. I’d agree with John that Java is not directly important to the Mac. No important piece of Mac software that I am aware of is written in Java, and the only important (unless you count Azureus, which Mac folks would not) client side Java apps are Java IDE’s or custom corporate applications. So it is hard to make a compelling argument that a late Java is directly bad for Macintosh sales, which Apple is surely focused on.

Nonetheless, I do think that Java, and all those Java developers (who many in the Mac community look down their nose at) are important. Their pushing for Titanium Powerbooks and MacBook Pros helped (in a lot of situations that I am directly familiar with) to improve Apple’s credibility in development shops, which helped Apple get to where it is today. I might still be using Windows if I hadn’t gone to ApacheCon 4-5 years ago and started to see the Mac’s, which were being used by my Java developing friends.

Gruber says that Java is not made to “just build” on any Unix-like OS:

Several irritated Java developers suggested that I’d feel differently if it were a developer runtime that I personally cared about — that I’d be irate if, say, Perl or Ruby or Python were dropped or degraded in Leopard. But that’s not a good comparison; Perl, Python, and Ruby pretty much compile out of the box on Mac OS X. Apple doesn’t have to do much at all — at least relative to Java — to include them on Mac OS X. Why? Because that’s how these tools are designed and engineered — they’re made to “just build” on any Unix-like OS. It’s not Apple’s responsibility that Java isn’t like that — it’s Sun’s.

Actually, I don’t think that he is correct here. When I worked at Apple, one of the projects that I worked on was a port of Java 2 to run atop the Newton operating system. I personally wrote the driver code for networking and the file system, and I can tell you from first hand experience, that Java definitely builds fine on Unix like operating systems. That’s not the problem. The problem is where OS X is not a Unix like operating system.
The places where there seem to be problems are the places where Java needs to talk to Carbon to do all that client side GUI Java stuff. I don’t think that you can claim that Carbon is part of “any Unix-like OS”.

I do think that there is something important buried in the quote from Gruber’s post. Look at the difference between the runtimes that got “kept” in Leopard. Perl, Python, and Ruby (Let’s leave aside for a moment the sad truth that hardcore Python and Ruby developers end up installing their own local runtimes). Not only were these runtimes bundled, but 2 of the 3 were actually improved – things like bridges to Cocoa, DTrace probes, and so on. What’s a critical difference between these runtimes and Java? How did all these improvements happen? Many of them were done by people outside of Apple, on a schedule that was not Apple’s, but which coincided with Apple’s. The Ruby DTrace probes were done by Joyent, the Python Objective-C bridge was done by people outside Apple. Apple pretty much just had to pick up the changes that were made. How did this happen? Those runtimes are open source, as were all the improvements that I just mentioned.

A few years ago at JavaOne, Sun took a poll of Java developers to see if open sourcing Java was important to them. If I remember right, about half those developers said no. From where I sit, it looks like an open source Java would have contributed substantially to having Java 6 ready to go for Leopard. Today, Sun has opened up the source code for Java, but a version of Java based on that opened codebase has yet to arrive. Maybe open source Java really is important after all. I guess we’ll have to wait for OS 10.6 and Java 7 to find out.

Leopard hasn’t even shipped yet, and I am already mad…

I found Leap via TUAW today. I’ve been watching Yep because I collect PDF’s like candy, and it’s just getting a little out of hand. So the idea of a “tagging Finder” sounded pretty good to me. I installed the demo and briefly played with it. It relies heavily on Spotlight for finding the files and for doing things like excluding directories — I had to exclude a bunch of files in ~/Library/Application Support, for example. My big question was whether or not Leap tapped into Spotlight facilities for storing additional metadata. Before firing off a message to the authors, I dropped into the Google Group for Leap, and a little poking around produce this message thread. Unfortunately, the upshot is that even in Leopard there is not system level support for user defined metadata on files, despite the proliferation of third party tagging solutions. I’ve avoided looking at those solutions because I was expecting to see major improvements in Spotlight in Leopard, but it looks like that is not to be.

Sometimes reading is useful…

Turns out that there is a little more technical information for us poor folks that aren’t at WWDC. So on the topics that I wanted more info on:

  • Multicore – fixes to the scheduler, including processor affinity, multithreaded networking stack, more threading in Mail.app and Spotlight, NSOperation and NSOperationQueue, and OpenMPI
  • 64 bit – 64 bit Java, MySQL and Apache.
  • DTrace / XRay – Dtrace-ified Ruby 1.8.6, Python 2.5, Java, and Perl. XRay alone would justify the $129 upgrade.

There’s also a bit of news on ZFS [via Simon Phipps].

I guess I feel better now. Now if only someone would tell me that Spotlight is no longer crawling…

WWDC keynote impressions

I have to say that I was pretty underwhelmed by the WWDC Stevenote today. Between the combination of last year’s keynote and the promise of super cool, top secret features, I was expecting a bit more than what actually took place. Let’s look at the ten features that were shown:

  1. New desktop – this is pretty, and I will appreciate a unified window look, but I’m doing just fine today. Unlike the rest of the world, apparently, I am using the plain old blue apple background, so a desktop that is friendly to my digital photographs just isn’t making me that excited, although in theory it should. Stacks the only thing that look like a new feature, and while they look cool, I’m not sure that I will use them that much.
  2. New finder – I’d like a new finder – so much so that I already use PathFinder on Tiger. The sidebar searches are nice — assuming that Spotlight actually has something like decent performance now. CoverFlow looks very pretty, but the only time that I can see using it is on collections of images or PDF’s. Looking at my Applications directory using CoverFlow isn’t really very exciting. The file sharing stuff would be good if I actually shared any file with people, but mostly we’ve been doing just fine using the existing, albeit clumsy networking.
  3. Quicklook – This is nice, and it’s nice that enabling quicklook support enables other things, like iChat Theater support. But I’d rather have working (i.e. performant) Spotlight.
  4. 64-bit – A genuine advance. Too bad it missed the window so that we could have 64 bit Photoshop
  5. Core Animation – I’m just not an eye candy guy. There wasn’t really any indication of how much effort is required to build something like the video wall that was demonstrated. Without a look at the code, it’s hard to know how impressed to be by this. It does look like Core Animation is an enabler for lots of what was shown.
  6. Boot Camp – I understand the rationale for Boot Camp, but continue to find the idea of rebooting into Windows a non starter. Give me VMWare or Parallels any day.
  7. Spaces – Virtual desktop management is so 1990′s.
  8. Dashboard – more specifically, a movie widget, and webclip. I can’t remember if we saw webclip last year, but it looked impressive. I am sure that people using Dashboard will find this a boon. Personally, I turned off all the Dashboard triggers because Dashboard is such a resource hog.
  9. iChat – It’s great that there is all the iChat eye candy. I might actually use the iChat theater features, but the big impediment to iChat is that I don’t run it. I run Adium because I need to talk to people not on AIM. Also, my experience has been that firewall tunneling for iChat doesn’t work very well, so it’s anybody’s guess as to whether video or audio chat will work on a given day. I’m basically using Skype for those features now. If Apple improved the firewall tunneling, then this might be interesting. I do give points for leveraging Quicklook to get things into iChat Theater
  10. Time Machine – well, okay, but we saw this last year.

Note that 64 bit support, Core Animation, Boot Camp, Dashboard, iChat, and Time Machine all appeared last year. That leaves the new desktop, finder and Quicklook as the Top Secret features that we’ve waited an additional year for. The things that I really want from Leopard are probably still buried in those NDA’ed sessions. I want my OS to stop leaking VM. I want XRay and ZFS. I want to know if the processor thread affinity problems have been fixed. I want garbage collected Objective-C – actually I want that one for the ISV’s. Perhaps most of all, I want Spotlight to actually be usable for me.

I”m not that excited about Safari for Windows. Since I do “Web 2.0 AJAX apps” for a living now, the last thing that I need is to add another browser/platform combination to the test matrix. It’s great that Safari is so fast on Windows, but that doesn’t really help me much. It kind of bothered me that when Steve talked about increasing Safari’s share, he overlaid the share that currently belongs to Firefox and “other” browsers. That did not make me warm and fuzzy. Nice that tabbed browsing is improving in Safari, but why couldn’t they do something slightly cooler like using stacks to organize the tabs?

As for the sweet SDKless iPhone development story? Well, it’s nice to know the whole Safari engine is in there. Basically what they said is: Hey you can write a dashboard widget that is deployed from the web. Ok. You can build some decent apps that way. I still think that a regular SDK is going to need to happen some day. In the meantime the problems that I have with iPhone remain, which means that I’m likely to end up with something like this. But that’s for another post, sometime in the future.

Macintosh Tips and Tricks revised

My Macintosh Tips and Tricks page is one of the most visited page on my site. However, it was pretty out of date, particularly with respect to Intel Macintoshes. A few weeks ago I started converting the page to a “page” in WordPress. Scoble’s request for Mac tips last week motivated me to push through and finish.

So without further ado, the newest revsion of my Macintosh Tips and Tricks. (The old one redirects to the new one too).

Update: corrected my French/English. Thanks Adriano!

Growlified Tweet

I’ve updated Tweet, the Applescript Quicksilver action for Twitter, so that it sends a Growl notification when it completes. The code is here.