Archive for October 2009

Saturday, October 31, 2009

Apple TV 3.0

Jason Snell and John Gruber discuss the software changes. Unfortunately, Apple TV needs much more than a software update. With true HD video, a lot more content on iTunes, and a 3.5-inch hard drive it could be interesting.

Wednesday, October 28, 2009

F-Script and the Finder

Philippe Mougin uses F-Script 2.0’s object browser to inspect the new Cocoa Finder.

Tuesday, October 27, 2009

Pound the Quality

John Gruber:

But my interest remains, as ever, in the quality of the apps, not the quantity. Let’s say that when the dust starts to settle in this market, Android winds up with far fewer total apps than iPhone OS, but they’re of generally higher quality. That would make Android the Mac to the iPhone’s Windows. I would switch to that platform.

Having lots of applications is actually a detriment, in as much as it makes it harder to find the good ones.

The Mythical LSSetApplicationForItem

Ben Artin uses the 'usro' resource to work around Snow Leopard’s lack of support for creator codes.

Saturday, October 24, 2009

Xcode Unit Test Bugs

Dave Dribin has some suggestions for improving Xcode’s support for unit testing. It’s much nicer in Xcode 3.2 than before, but it’s still complicated to setup and rather kludgy. Even with the dependencies setup correctly I often have to nuke the build folder to get it to work, and it’s awkward to switch between testing and debugging.

The Loss of ZFS

Louis Gerbarg:

Sun calls ZFS “The Last Word in Filesystems,” but that is a lie. ZFS is on of the first widely deployed copy on write FSes. That certainly makes it a tremendous improvement over existing FSes, but pioneers are the ones with arrows in their back. By looking at ZFS’s development it is certainly possible to identify mistakes that they made, and ways to do things better if one were to start from scratch.

Wednesday, October 21, 2009

Stop WordPress Mangling Your Code

I had been modifying WordPress’s default-filters.php file to turn off the wptexturize and wpautop filters, but Lynne Pope says that you can instead override this at the theme level in functions.php. This makes it easier to update WordPress, as I no longer have to merge in my changes.

MacBook Polycarbonate Unibody Teardown

iFixit:

The hard drive isn’t as easy to replace as it used to be, but it can be done. The hard drive is still considered “user replaceable” by Apple. It’s strange that the hard drive is “user replaceable,” but the battery is not.

Just a few more screws, basically.

1,000 Issues of TidBITS

Adam Engst:

This marks our 1,000th issue of TidBITS, and we can barely believe that we’ve arrived at this point, more than 19 years after Tonya and I took our first tentative publishing steps in April 1990. But here we are, going strong and writing and publishing more than ever before.

Congratulations, and keep up the good work!

Tuesday, October 20, 2009

Steven Frank on the iPhone

Unfortunately:

iPhone competitors have less reason than ever to provide a stellar experience for Mac desktop users, as the iPhone has that angle sewn up. I expect future non-Apple smartphones to scale back Mac desktop support even further than they already do, as it will cost them a fortune to provide an experience that’s even half as good as the iPhone provides with the iTunes/MobileMe ecosystem.

The first time around, Palm’s Mac software was a late, crummy Windows port. This time, they’re just trying to piggyback off iTunes.

Frank expands on Marco Arment’s point:

In other words, you have the Windows market, and the Mac market, but within the app store itself. And you’d better be damn sure which one you’re targeting, and set pricing and development schedule accordingly.

Friday, October 16, 2009

Acorn 2.1

My favorite new feature in Acorn 2.1 is that it optimizes PNGs using pngcrush when doing a Web Export.

Fixing “Copy Address” in Mail on 10.6

Ken Aspeslagh shows how to restore the Leopard behavior of having Mail’s “Copy Address” command copy just the address, rather than the name and the address (via Justin Williams).

Thursday, October 15, 2009

Tracking Down Snow Leopard’s Apple Events Bug

Matt Neuburg:

When Snow Leopard assigns FFFF (-1) as the Apple event’s return ID, it takes this as an invitation to increase the return ID again. So the Apple event goes out with a return ID -1, but the reply comes back with the next return ID in the sequence, which is 0. The two return IDs don’t match! Thus, the reply can’t be associated with the original Apple event. So the sender thinks that no reply has ever come back—and, after waiting for a while, gives up and generates the “timed out” error.

Friday, October 9, 2009

The Two App Stores

Marco Arment:

But they’re not two different stores (“Are you getting it?”). There’s just one App Store at a casual glance, but if you misunderstand which of these segments you’re targeting, you’ll have a very hard time getting anywhere.

Safe Key-Value-Coding

M. Uli Kusterer suggests using:

#if DEBUG
#define PROPERTY(propName)    NSStringFromSelector(@selector(propName))
#else
#define PROPERTY(propName)    @#propName
#endif

to define symbolic constants for keys so that the compiler will give you Undeclared Selector warnings.

Thursday, October 8, 2009

MacRuby 0.5 beta 1

MacRuby is now in beta:

The new MacRuby 0.5 runtime is built upon LLVM, a compiler infrastructure also sponsored by Apple. Thanks to LLVM, MacRuby is able to transform the Ruby abstract syntax tree (AST) from the parser directly into highly optimized machine code. MacRuby supports both Just in Time (JIT) and Ahead of Time (AOT) compilation. The JIT mode will compile down the code at runtime, and the AOT mode will allow you to save on disk the compilation result. AOT compilation makes MacRuby a true Ruby compiler.

Very cool. Compatibility with RubySpec is much lower than I would have expected, though.

Flash on the iPhone

Louis Gerbarg:

Technically speaking, these do appear to basically be within letter of the SDK agreement, modulo the fact that Adobe appears to making private API calls. They should be able to do what they need to without making those calls, so ultimately that should be a non-issue.

Now, the notion that what this thing emits is indistinguishable from something Xcode emits is laughable. They are very different, and not in a good way. While the apps may get acceptable frame rates on an iPhone 3GS, they don't on earlier hardware, and they almost certainly uses substantially more power battery than native games.

He’s looked at an IPA file and found some interesting details.

Wednesday, October 7, 2009

Creator Codes and UTIs

John Gruber:

There is nothing any developer can do, with UTIs or with any other supported technology, to restore the functionality of creator codes in Snow Leopard. It’s just wrong. UTIs indicate a file’s type, not the application in which it should open by default. Furthermore, developers can’t even directly assign UTIs to files. UTIs are derived from file name extensions.

A good summary.

Tuesday, October 6, 2009

DRAM Error Rates

Robin Harris (via John Siracusa):

A two-and-a-half year study of DRAM on 10s of thousands Google servers found DIMM error rates are hundreds to thousands of times higher than thought — a mean of 3,751 correctable errors per DIMM per year.

[…]

Most DIMMs don’t include ECC because it costs more. Without ECC the system doesn’t know a memory error has occurred.

Everything is fine until the data corruption means a missed memory reference or an incorrect value or a flipped bit in a file writing to disk. What you see is a “file not found” or a “file not readable” message or, worse yet, silent data corruption - or even a system crash. And nothing that says “memory error.”

Adobe’s iPhone Flash Compiler

Aditya Bansod (via John Gruber):

We created a new compiler front end that allowed LLVM to understand ActionScript 3 and used its existing ARM back end to output native ARM assembly code. We call this Ahead of Time (AOT) compilation—in contrast to the way Adobe Flash Player and Adobe AIR function on the desktop using Just in Time (JIT) compilation. Since we are able to compile ActionScript to ARM ahead of time, the application gets all the performance benefits that the JIT would offer and the license compliance of not requiring a runtime in the final application.

In other words, it’s regular compilation.

Saturday, October 3, 2009

Mini DisplayPort to Dual-Link DVI Adapter, Improved

As mentioned in March, there were serious problems using Apple’s Mini DisplayPort to Dual-Link DVI Adapter to connect my MacBook Pro (Unibody) to a 30-inch display. This seemed to be a software problem, as other users reported that everything worked properly under Windows (via Boot Camp), and Apple’s support specialists suggested that it might be fixed in a software update. After Mac OS X 10.6 shipped, the problems continued, so I contacted Apple again and they agreed to ship me a newer version of the adapter, with firmware 1.0.2. (You can check your firmware version using System Profiler.) The new adapter seems to fix the major problems with distortion, snow, and flicker.

It’s hard to quantify, but I still feel like the video quality is not as good as connecting via Dual-Link DVI directly. Sometimes gradients and areas of solid color appear a little fuzzy or with a slight pattern of lines.

I’m still seeing the problem where the system forgets the display’s ColorSync profile, making everything appear lighter and washed out. Under Mac OS X 10.5, I could fix this by opening the Displays pane in System Preferences. Under Snow Leopard, I need to open the Displays pane and then click the Colors tab.

It’s still a mystery me why Apple doesn’t ship its own 30-inch display with built-in Mini DisplayPort support. Additionally, despite lots of problem reports in the store and forums, Apple’s phone and retail support staff seem to be mostly unaware of the problems. At least for me, though, they seem to be mostly fixed.

Update (2009-10-05): The flicker problems are not resolved, after all.

Update (2010-07-26): The update to firmware 1.0.2 has reduced the frequency of the problems, but I still see snow, flicker, distortions, and partial screen blackouts at least once a day. This is with a 2010 MacBook Pro, and others are reporting problems with desktop Macs. 9 to 5 Mac suggests that it might be Apple’s worst product ever. Apple is no longer selling 30-inch displays so I doubt this will ever be fixed.

Update (2011-03-08): Apple has released a new version of the adapter with firmware 1.0.3. I’ll post another update after I’ve received mine and had a chance to test it.

Update (2011-04-20): The 1.0.3 adapter is by far the best yet, though still not perfect: the display problems have occurred with it twice in the last month.

ATPM 15.10

The October issue of ATPM is out:

QuickCursor

Jesse Grosjean’s QuickCursor:

For Mac users who want to use their favorite text editor everywhere. QuickCursor is a menu item that allows you to edit text from any application in your favorite text editor. Unlike custom “edit in” plugin solutions QuickCursor provides a standard open source solution that uses public API’s and doesn’t require input manager hacks to work.

Instead, it uses the accessibility APIs.

Care and Feeding of Singletons

Mike Ash:

Programmer safety is, in my opinion, counterproductive. Apple’s approach, of building a singleton which can’t be destroyed by accident and which intercepts attempts to allocate a second instance, covers up errors rather than fixing them. It’s much better to trap and eliminate the bad code rather than render it harmless. For example, instead of overriding release to do nothing, override dealloc to log an error and abort the program.

Fail fast!

Friday, October 2, 2009

Cost of Testing

Miško Hevery:

Now, I think that if you look at these two chunks of code, it is easy to see that even though they are about the same length, one is much harder to write. The reason, why tests take so little time to write is that they are linear in nature. No loops, ifs or interdependencies with other tests. Production code is a different story, I have to create complex ifs, loops and have to make sure that the implementation works not just for one test, but all test. This is why it takes you so much longer to write production than test code. In this particular case, I remember rewriting this function three times, before I got it to work as expected.

He then explains what the 10% cost of tests buys him.