Archive for October 2006
Tuesday, October 31, 2006 [Tweets]
By examining the code (ADC registration required) that implements
obc_sync_exit, we can see that on every
@synchronized(foo) block, we are actually paying for 3 lock/unlock sequences.
id2data, which is responsible for getting the lock associated with
foo, and then locks it.
objc_sync_exit also calls
id2data to get the lock associated with
foo, and then unlocks it. And,
id2data must lock/unlock its own internal data structures so that it can safely get the lock associated with
foo, so we pay for that on each call as well.
Plus the overhead of entering an exception handling block, which is currently expensive in Objective-C.
Update: two faster versions. The first takes advantage of a guarantee that (Objective-)C++ makes, and the second uses swizzling to replace the method with one that isn’t synchronized once the initial race condition is over.
Monday, October 30, 2006 [Tweets]
ThisService is DropScript for services (via John Gruber). I haven’t yet found a good way of invoking services, though.
Scott Stevenson responds to Adobe’s John Nack:
I’m struck by John’s comments that the end of PowerPC-based Macs validates the idea that new apps can assume Intel. This isn’t what “newness” should buy you. It should be an opportunity to not repeat the mistakes of earlier software designs.
In simpler terms, the goal shouldn’t be to write an application that runs on both PowerPC and Intel, it should be to write an application that is not built around a single processor design.
Friday, October 27, 2006 [Tweets]
I think it’s weird that it looks so much like Apple Mail, because it doesn’t act very much like Apple Mail at all. For example, yes, you can drag-and-drop messages in the new .Mac Webmail, but you have to click on them to select them first; you can’t use Shift with arrow keys to select multiple messages, etc. These are hard things to implement in a Webmail client—but if it looks this much like the regular desktop Mail, it ought to act more like it, too.
Monday, October 23, 2006 [Tweets]
Pygments is a new pure-Python package for syntax highlighting source code. It seems very well done, and quite full-featured. Not only does it lex and color a bunch of languages, but it handles embeddings too, like Django templates in HTML. I use SilverCity on this blog, but have never liked that it calls into Scintilla DLLs to do the hard work, and isn't up to the task of two languages shuffled together. Pygments seems like a good alternative.
Paste “brings consistency to Python web development and web application installation, providing tools for both developers and system administrators” (via Ian Bicking).
Daniel Jalkut responding to John Gruber at C4:
Is the HIG dead? I don’t know. But Gruber’s talk was thought-provoking, and I’m feeling pretty convinced right now, high on sleep deprivation and freshly returned from the fray. At the very least I think it’s time for us crotchety old engineers indoctrinated by System 7 or earlier values to mellow out a bit. I got so used to defending the party line for so many years, that I stopped questioning whether it was worth defending. Taking a step back now, I have to wonder why none of us, noticing that Apple was “constantly violating its own HIG,” stopped to consider whether we were the suckers for being so hung up about these problems on their behalf.
Violations in appearance are the easiest to see and get the most play. They bother me because I like looking at a consistent interface and because I think many of the custom controls are ugly. But it’s not that big a deal because, as the Web has shown, people know how to recognize weird-looking buttons. More important, I think, are higher level design and behavior. These were never as codified as the appearance guidelines, they’re more subtle and so are harder to build into an implicit HIG, and yet they determine what it’s like to use Mac software. This is where the real shift has happened in the second Jobs era.
I’m thinking of the card interface in Address Book; the decision that (until recently) iMovie would take over the screen and not allow more than one open document; the increased use of icons for verbs; the increased use of modes; the use of large multi-paned windows and tabbed inspectors over larger numbers of smaller windows, i.e. extreme reduction of window clutter even when this makes the interface constricting; the behavior of selected objects and panes; and the trend towards tabbed windows with a very small number of controls on each tab.
Apple has, deliberately or not, been doing a lot of things differently. There have been both good and bad ideas, with little guidance about which ones should be adopted, and in which circumstances. New ideas are rapidly adopted throughout Apple’s apps, but are slow to make their way into the frameworks. The problem is not that Apple has been breaking its own rules or writing new ones. It’s that—as the brushed metal saga has shown—Apple’s choices seem more driven by fashion than considered design. It’s leaving a leadership vacuum.
Update: Scott Stevenson writes:
Some Mac users are concerned that the lack of guidelines means things could spin completely out of control. Here’s what I’ve learned: Mac users, on the whole, have a sense of taste. If an app’s experience isn’t right, they simply won’t use or buy it. The Mac user base is its own filter. It’s not just theory, we’ve seen it happen.
Which is true to an extent. However, in some ways things already have spun out of control, and there aren’t enough apps for us to have the luxury of choosing a product that has the right functionality and good taste (though, fortunately, these sometimes coincide). Scott says “Can you imagine Front Row with NSTableViews,” but that’s a false dichotomy because Front Row is a full-screen app that will be controlled from across the room; it’s obviously an exception. I can imagine Mail with a normal outline view, and it works just fine. Also, I don’t buy the idea that there can’t be consistency or guidelines or framework support because the new stuff is still in flux. Gear buttons have been around for at least three years. They should be relatively easy to standardize. Yet they still look and behave differently in each app and they have no support in either Carbon or Cocoa. They are mentioned in Apple’s publication style guide, which calls them action pop-up menus—rather unfortunately, because “action button” has a completely different meaning in the interface guidelines and because historically pop-up menus (with up- and down-pointing triangles) have been for showing states. The gear button more closely resembles the pop-down menu, which has a larger down-pointing triangle and typically contains commands rather than states.
Friday, October 20, 2006 [Tweets]
I used to use this a lot, as it seemed more effective and efficient than ObjectAlloc. Then around 10.4 or so it stopped working. Now it’s back and seems to be better than ever.
Thursday, October 19, 2006 [Tweets]
CD quality audio, in effect, has frames which are only four bytes long (16-bit samples, two channels) but which play back at 44.1KHz. This only gives you 22 microseconds per frame! Of course, the frames are miniscule, but if you miss even one, odds are that the user will hear it. If you did something terrible like take a disk interrupt that took five milliseconds to process, you will hear an ear-rending glitch in the output audio. By contrast, you can drop an entire 17ms frame in 60fps video and it’s usually pretty hard to notice.
Tuesday, October 17, 2006 [Tweets]
David Weiss has some quotes from Steve Wozniak’s visit to Microsoft:
Regrets about Apple, no. Regrets about my own life? Yes, I wish I would have put floating point in Basic, but I wanted to get it done quick.
What pains me is that Apple has already won. They could go for interoperability now and still win, maybe win even more, because having products as good as iTunes and iPod support other formats is a customer magnet. I want to use OGG Vorbis, FLAC, DivX, Windows Media. I want iTunes to speak your crazy moon language. But most of all, I want Apple to acknowledge that I want that, beyond hiding icons.
Who would have thought it—a better stapler. This is a great example of how even the most mundane, commonplace commodity can be improved. Staplers look pretty simple and their design has not changed much, until now. Many’s the time I have had to redo a staple, pulling out the original, bad staple, and trying to do it right: push straight down, hard—but neither too slow nor too fast. Bah.
I have recently been using a 17″ MacBook Pro with a US English keyboard layout. It’s interesting how certain keyboard shortcuts make so much more sense when you’re using this layout than a UK keyboard.
Fake Steve Jobs:
If you haven’t seen the story in today’s Journal (page B1) you should go check it out. Big profile of what a wonderful, smart, professional guy our COO Tim Cook is. And in case you don’t know what it means to have your company’s #2 guy glowingly profiled on B1 of the Monday Wall Street Journal, let me explain it to you: I’m toast.
Kim Burchett introduces Flapjax, a new programming language for client-based Web applications that’s designed by Shriram Krishnamurthi and other smart people at Brown.
On Friday, I released a brand-new application. EagleFiler grew out of an idea I had around 1999 of building a mail archiver that combined a standard file format with an interface like that of a real mail client. A few years later, I realized that it should also help me organize and search my piles of PDFs and Web pages, as well as other types of files.
It’s a relief to finally show people what I’ve been working on. So far, the reaction is positive, and I’ve received a lot of good feedback. Some of the requests are great ideas that I should have thought of, but didn’t. Most of them are what I was expecting—they’re for things that I’ve been planning but that weren’t done in time for 1.0. On an open-ended app like this, it’s hard but necessary to postpone more than you want until later versions. Development is more fun, and productive I think, when it’s more interactive. This is where feedback will really help shape future versions of EagleFiler. There are some things I left out of 1.0 that I thought were important, but that no one has yet requested. Other things which I thought would be nice but not essential have struck people as glaring omissions. As a result, I’m reshuffling my to-do list to address the more common requests first.
Lastly, since I’m too lazy to drag and drop, one of my favorite features in EagleFiler is the capture key. While working in another application, you press a hot key and EagleFiler determines what you were viewing and adds it to the library. A bunch of apps are already supported, and you can add support for additional apps by writing capture scripts. Of course, for this to work, the app must be scriptable, and it must provide a way of accessing the content or selection of the front window. Scriptable applications are cool.
Thursday, October 12, 2006 [Tweets]
The new Mac Pro is also much much quieter. The old G5 fans drove me nuts. Every time I hit “build” in XCode the fans would wind up like it was struggling to do the work. It was kind of stressful. I felt like I was hurting it every time I compiled.
Friday, October 6, 2006 [Tweets]
I built Billable for my own needs and it eventually became something commercial. When I first started I made a point to store the money as NSDecimalNumbers to keep all the calculations accurate and later I turned on the “Localize” checkbox on the Number Formatter in Interface Builder which basically will do its best to show the money in the local format of the system. This approach kind of works but is incomplete and clunky.
Thursday, October 5, 2006 [Tweets]
Sean Patrick O’Brien
(via Matt Gemmell):
The main reason I decided to take a set of controls that mimic the iLife interface and combine them into a framework is to provide developers with a one-stop shop for their Apple-style interface needs. Looking at the third party Cocoa applications floating around on the Internet, it’s common to see applications that mix and match interface schemes taken from several different types of Apple products, as well as interface components that aren’t quite implemented properly. In order to try and remedy this situation, I’m trying to create a framework that’s geared towards proper implementation, and interface consistency.
Wednesday, October 4, 2006 [Tweets]
The driver for my keyboard is finally out of beta and Universal.
Sunday, October 1, 2006 [Tweets]
Quentin Carnicelli measures how long it takes four different Macs, including a new Mac Pro, to compile his app.