Sunday, January 3, 2010
Fraser Speirs:
It’s Apple-retrospective time all over the internet, and everyone’s talking about Mac OS X, the iPod and iPhone. I wanted to take a minute and reflect on ten lower-level technical innovations that Apple produced in the past decade which are probably unremarkable to any marketing-oriented discussion but which moved the state of the art on in some way.
A good list, though I’d probably put WebKit at the top.
Friday, January 1, 2010
Mike Ash:
It’s also helpful just to demystify a class. It’s easy to get into magical thinking, where you see a class as being incomprehensible and elevated above the mortal plane. The fact is, while the particular implementations of some of these classes can be pretty sophisticated (the CFRunLoop source will make your eyes bleed), the basics of what they do and how they do it are usually very straightforward. For 99.9% of the APIs in Cocoa, they aren’t there because they’re doing something amazing that you could never achieve, but rather they simply exist to save you the time and trouble of having to write it all yourself.
Thursday, December 24, 2009
Philippe Casgrain has an interesting localization workflow that puts only the localized .strings files under version control. He updates the English .strings and generates the localized nibs at build time. The layout is controlled by the English nib files, which have a little extra padding. Compared to runtime localization, this makes it easier to spot layout problems. Compared to the traditional approach, there’s less work maintaining and updating localized nib files. The downside is that the layout isn’t tuned for each language.
Matt Robinson draws some typefaces using a ballpoint pen (via Geoff Tsai). The last image shows how much ink each used.
Tuesday, December 22, 2009
John Gruber:
Basically, he’s spewed 4,000 words to say that “open” is always good and always wins, Google is always open, therefore Google is always good and will always win. And please don’t worry your pretty little minds about things like Google’s search or ad algorithms or the specific details of how its data centers work, all of which things Google could not possibly be more secretive about.
Yup.
LaunchCodes (via Matt Deatherage) is a clever utility that tries to restore the creator code functionality that Apple removed in Snow Leopard. It sort of does for files what Choosy does for URLs, acting as a trampoline to receive opened files and redirect them to the proper application. The basic functionality seems to work, but I ran into a few problems:
- It doesn’t pass along Apple events. For example, if you find a PDF file using Spotlight or EagleFiler and open it, the query should be passed along to the PDF viewer so that it can search within the file. This stops working when you enable LaunchCodes.
- Some of my creatorless files now display in the Finder with generic white document icons.
- Applications can no longer tell which application would be used to open a file. For example, when you select an HTML file in EagleFiler, one of the menu commands will say “Open With Safari” and show the Safari icon, and if you select a PDF file it will say “Open With Preview.” Once you enable LaunchCodes, you’ll see “Open With LaunchCodes” and the LaunchCodes icon, which is not very informative.
- It doesn’t handle extensionless files. For example, if TextEdit is your default text application and you double-click a Makefile with creator code
'R*ch', it will open in TextEdit rather than BBEdit.
(1) seems like a bug that could be fixed. I’m not sure what’s going on with (2); it may be unavoidable since LaunchCodes doesn’t declare any icons for the file types that it handles. Unfortunately, (3) and (4) are probably not fixable given the way LaunchCodes works.
Matt Gallagher demonstrates using OCMock to develop a Cocoa application test-first. I’m skeptical about relying so much on mocks, but it’s good to see a complete example project.
Wired tells the story of Duke Nukem Forever:
It’s a dilemma all artists confront, of course. When do you stop creating and send your work out to face the public? Plenty of Hollywood directors have delayed for months, dithering in the editing room. But in videogames, the problem is particularly acute, because the longer you delay, the more genuinely antiquated your product begins to look—and the more likely it is that you’ll need to rip things down and start again. All game designers know this, so they pick a point to stop improving—to “lock the game down”—and then spend a frantic year polishing. But Broussard never seemed willing to do that.
John Gruber:
A big part of the appeal of the <video> and <audio> elements is that they should be easier to use. As it stands today, though, these elements are unusable in popular contexts without resorting to JavaScript DOM manipulation to effectively turn auto-buffering off.
Sunday, December 20, 2009
Jesse Grosjean:
The iPhone standard UI provides an “actions” icon (middle above), but to most people it looks like a reply icon. I use it in WriteRoom for iPhone, but I keep hearing from users who never found the actions (delete, send email, rename, word count), because they thought it was only for sending email.
The iPhone action icon looks like a “share” icon.
Saturday, December 19, 2009
Chris Clark:
It’s a simple and elegant solution, but not at all discoverable; I needed documentation to help me find the setting, which is unusual and troubling for a UI nerd. I might’ve been understanding if they’d just nixed the feature, as Mail is bundled with OS X and one could argue that it’s not supposed to be for Power Users. But Apple’s designers and engineers took a different route. They added the feature and obviously put a lot of work into it, considering new aliases show up in the menu automagically, but they opted for zero interface. No fifteen pixels of fame.
Friday, December 18, 2009
Bill Bumgarner has written three good posts describing how objc_msgSend() works.
Thursday, December 17, 2009
Paul Kedrosky (via John Gruber):
Pages and pages of Google results that are just, for practical purposes, advertisements in the loose guise of articles, original or re-purposed. It hearkens back to the dark days of 1999, before Google arrived, when search had become largely useless, with results completely overwhelmed by spam and info-clutter.
It’s interesting how Google is dynamite in many areas but almost useless in others. Search is a hard problem.
Wednesday, December 16, 2009
Jonathan Rentzsch has written a script that makes it easier to view tab-delimited files in BBEdit. I’ve been doing this manually for a dozen years or so.
Wednesday, December 9, 2009
Tim Wood has some interesting suggestions for resolving some longstanding problems with Cocoa’s responder chain.
Update: Marcel Weiher adds his thoughts.
Monday, December 7, 2009
Joel Levin:
If you move the networks you actually use to be the top items, you will see a drastic decrease in the connection time as airport no longer has to spend a bunch of time connecting to networks that aren’t currently around.
Mark the Spot is an iPhone app for reporting problems with AT&T’s coverage (via Rich Siegel). It remains to be see how much effect apps like this and Citizens Connect (for reporting potholes in Boston) will have, but if the process is frictionless enough it seems worth a try.
Sunday, December 6, 2009
Google:
What we’re doing today is expanding Personalized Search so that we can provide it to signed-out users as well. This addition enables us to customize search results for you based upon 180 days of search activity linked to an anonymous cookie in your browser.
I suppose this makes sense, and even without cookies Google could figure out the history, but it still creeps me out. You can turn it off by clicking on “Web History.” SEO just became a lot more unpredictable.
Jeff Bezos (via Marco Arment):
For every 100 copies of a physical book we sell, where we have the Kindle edition, we will sell 48 copies of the Kindle edition.
That’s incredible, but I’m not sure that I believe it. Are the numbers skewed by averaging in the free Kindle books or something?
Thursday, December 3, 2009
Jonathan Rentzsch shows how to disable the quarantine and how to remove the quarantine xattrs from existing files.
Wednesday, December 2, 2009
Sunday, November 29, 2009
Pie Guy is a Pac-Man-style iPhone game from Neven Mrgan. It’s amazing what he can do with a local Web app (using JavaScript and WebKit HTML extensions), although because it’s a little slow to respond it might not fool you into thinking it’s a native app.
Saturday, November 28, 2009
Bill Bumgarner highlights a non-intuitive part of the NSError contract: it’s not safe to look at an error object unless the method returned failure.
Tuesday, November 24, 2009
The Little App Factory:
Now, you may be saying that we deserve it for using Apple’s trademark but no, in Australia it doesn’t work that way. Our Trademark Act of 1995 states that if “the person uses the trade mark in good faith to indicate the intended purpose of goods” then we are not causing an infringement. When we created the name back in 2003 it was quite simple: Apple was advertising “Rip, Mix and Burn” and my software ripped your iPod back to your computer. Hence, the logical conclusion was iPodRip.
They couldn’t rename it “PodRip,” either. John Gruber:
That’s crummy. “iPod” is Apple’s. “Pod” is just a word.
Sunday, November 22, 2009
Jonathan Rentzsch has written an AppleScript to enable the Xcode warnings that Peter Hosey recommends.
Thursday, November 19, 2009
Microsoft adds Edward Tufte’s sparklines to Excel 2010 (via Philip Greenspun).
Friday, November 13, 2009
Paul Kafasis, John Gruber, and Manton Reece discuss Apple’s rejection of a bug-fix update to Airfoil Speakers Touch because of images that it displayed (but did not contain).
Update: Apple changed its mind.
Mike Ash has a great list of Cocoa APIs that are subtly dangerous. Note that since NSBundle isn’t threadsafe, neither is NSLocalizedString.
Cameron Booth has made a great map of the Eisenhower Interstate System (via Jason Kottke):
Drawing my cues from the original and best metro diagram, H.C. Beck’s wonderful London Underground diagram, I have rendered the Interstate system in a much simpler form. I have made the “major” highways (those divisible by 5) the framework of the map, with the “minor” highways reduced in importance and rendered as thinner grey lines. Even with these highways, a difference in the greys indicates whether they are even-numbered (west-east) or odd-numbered (north-south).
Now I feel like playing Ticket to Ride.
Thursday, November 12, 2009
Jens Ayton proposes that adding generics to Objective-C would allow for better static analysis with no changes at runtime or to existing code. Jesper concurs. This seems like a reasonable idea, although I’m not sure it’s worth the hassle and visual clutter. I don’t think improper typing is a major source of bugs.
Marcel Weiher points out that blocks are noisy compared to HOM. Of course, HOM can be more concise because it’s so much more limited. Chiefly, it requires predefined methods. He argues that this is a feature, not a bug, that HOM encourages good code and blocks encourage bad code. That’s not wrong, but with power comes the ability to shoot yourself in the foot. Blocks make the language much more expressive and solve problems that HOM can’t. Used judiciously, they can make for clean code.
Peter Ammon’s cdecl.org translates C type expressions (including function pointers and blocks!) into English—and vice-versa.
Monday, November 9, 2009
Daniel Jalkut:
If you’re not a developer and are just looking for some excellent discounts on a huge variety of Mac applications, check out the One Finger Discount page and see what everybody has to offer.
I’m pleased to be participating as a developer and a customer.
Saturday, November 7, 2009
Neven Mrgan has screenshots.
Wednesday, November 4, 2009
BBEdit 9.3 has a bunch of neat additions:
- Live multi-file search results.
- Awesome new bbfind command-line tool.
- I can now open a the multi-file search for the current project or disk browser with a single keypress.
- Dropping a folder on BBEdit can now create a temporary project (like in TextMate).
- Quick Look in projects and disk browsers.
- Per-language tags files to store common completions.
- A language module for Makefiles (very rudimentary coloring, though).
Tuesday, November 3, 2009
Andy Finnell:
The ASObj function creates an ASObject proxy object for any NSObject that implements objectSpecifier. invokeCommand takes care of marshalling the parameters into an AppleEvent, sending it, and unmarshalling the return value into an NSObject. The name of the command is the name of the name used in AppleScript, not the Cocoa implementation.
Then his controllers use the proxy objects to talk to the model through AppleScript.
Eric Bangeman:
If you want to right-click, you’ll need to get used to lifting your left-most finger off of the mouse in order for it to register correctly. If you have an Apple Mouse, you’ll already be used to it—I do it without thinking, but that doesn’t change the fact that lifting your index finger into the air so your middle finger can click is a more stressful position for your hand.
I use a Mighty Mouse with the main surface set as the primary button and the scroll ball set as the secondary button. This frees me from worrying about which side of the mouse I’m clicking and which finger I’m using, as my hand will be in different positions depending on whether I was using the scroll ball to scroll.
Pierre Igot:
How is the user supposed to “know” and remember intuitively that click-through now only works in icon view mode and not in list view mode and column view mode? And how is the user supposed to “know” and remember intuitively that, even though click-through no longer works, “double-click-through” (to coin a phrase) still does?
Lukas Mathis:
I believe click-through in Mac OS X is fundamentally broken. It should be turned off for all interface elements, except for a few standard elements which always receive click-through and have hover states to clearly indicate that they are clickable.
Chris Clark:
I believe click-through should be disabled entirely.
Either would be fine with me. As Clark points out, you can hold down the Command key to indicate that you do want click-through.
Sunday, November 1, 2009