Archive for December 2008

Wednesday, December 31, 2008 [Tweets] [Favorites]

Frozen Zunes

The cause of the Zune freezes seems to be an infinite loop in the clock driver’s handling of leap years (via Greg Titus). This looks like the sort of bug that could be detected via static analysis.

Update (2009-01-05): More analysis of the bug and possible fixes.

Tuesday, December 23, 2008 [Tweets] [Favorites]

BBEdit 9.1

BBEdit 9.1 can exclude dictionary words from the completion list, and projects now store relative references to files.

Saturday, December 13, 2008 [Tweets] [Favorites]

The 99-cent Message

Manton Reece:

I’ve bought apps for $5 and $10, and now many of those prices have either been cut in half or lowered to 99 cents. I felt like I got my money’s worth at the higher price, so I’m not complaining that I was ripped off. Instead, I just feel like a fool.…Apparently the way to buy iPhone software is just to wait a month for the price to drop.

Indeed. When apps I’ve bought go on sale, their icons get “Sale” badges in my iTunes Applications pane. I already feel somewhat like a fool for the apps that I wouldn’t have bought if there had been a trial available. Now there’s a way to reduce the satisfaction of having purchased an app that I do like.

Tuesday, December 9, 2008 [Tweets] [Favorites]

Higher Order Perl

Mark Jason Dominus’s excellent Higher Order Perl is now available for free in PDF and MOD formats. This is the kind of book I like to read on paper, though.

Update (2014-12-02): Mark Jason Dominus:

Would the book have made more money if it were not available as a free download? We can’t know for sure, but I don’t think so. The book has always sold well, and has made a significant amount of money for me and for Morgan Kaufmann. The amount I made is small compared to the amount of work I had to put in, just as Greenspun said, but it was nothing to sneeze at either. Even now, ten years later, it is still selling and I still get a royalty check every six months. For my book to have lasted ten years is extremely rare. Most computer books disappear without a trace after six months.

[…]

So my conclusion is, Greenspun’s advice was exactly correct. As an author, you owe it to yourself to make your book available to as many people as possible. And the publisher may agree, so be sure to ask.

Monday, December 8, 2008 [Tweets] [Favorites]

On Leaky Abstractions and Objective-J

Francisco Tolmasky:

Everybody is writing “abstractions” around JavaScript…I mean EVERYBODY, including Prototype, Dojo, and jQuery. Yes, you read correctly, all the major JavaScript frameworks are essentially doing the same thing we are to some degree or another—we’re really not that original. The sole difference between their approach and ours is that when they add new language features to JavaScript, they’re not taking the extra step of introducing new syntax.

He goes on to explain that they chose Objective-C syntax not because they were targeting Objective-C programmers but because they faced the same issues extending JavaScript that Stepstone faced 25 years ago extending C.

From C++ to Objective-C

From C++ to Objective-C (PDF) looks like a concise and useful book for experienced programmers who want to learn about Objective-C (via John Haugeland). Unlike the various paper books I’ve seen, it isn’t full of step-by-step example projects. Unlike Apple’s book, it has lots of comparisons with C++ and advice about common techniques. However, it could use some technical review. For example, page 25 cites Wil Shipley’s incorrect recommendation to avoid self = [super init]. In fact, this idiom makes sense and is recommended by Apple.

Saturday, December 6, 2008 [Tweets] [Favorites]

Let’s Talk About Python 3.0

James Bennett:

Although at the start I paid only the most cursory attention to the Python 3.0 development process, every time I looked into it in any detail I was struck by the amount of time and thought which went into the changes which have been made to the language. There are, so far as I can tell, no frivolous “we just did this because we liked it” differences between Python 2.x and Python 3.x; every breaking change seems to have been discussed to death, justified based on real-world problems and even then carefully considered and reconsidered just to see if a backwards-compatible way could prevail. Python 3.0 came out of a years-long process of development by people who were simultaneously actually using Python and taking notes on how it could be better, and it shows.

Thursday, December 4, 2008 [Tweets] [Favorites]

Python 3.0

Python 3.0 is now available. It includes a huge number of forward looking but backwards incompatible changes.

Wednesday, December 3, 2008 [Tweets] [Favorites]

Cocoa Bindings and Arrays

Peter Hosey has some good examples of what to do and what not to do when modifying an array controller’s content.

Tuesday, December 2, 2008 [Tweets] [Favorites]

Quarz Event Taps

Rainer Brockerhoff:

Both Quay and Klicko do part of their seeming magic with a technology called “Quarz Event Taps” (PDF file). This was introduced in Tiger, and perfected in Leopard. Briefly, an event tap is a C callback routine that is called to filter low-level user input events at some points in the system's event processing, which is actually quite complex. Events can be generated, examined, modified or even suppressed before they're delivered to an application. Since user input events are usually routed to the foreground window (that is, to the foreground application, even if it has no window), this makes event taps quite powerful.

Monday, December 1, 2008 [Tweets] [Favorites]

ATPM 14.12

The December issue of ATPM is out:

AnchorFree Offers Free VPN for iPhone

Glenn Fleishman:

To work around these problems, AnchorFree chose to add to Hotspot Shield a VPN type that the iPhone has built in: L2TP, which stands for Layer 2 Tunneling Protocol over IPsec (Internet Protocol security). L2TP is an extremely strong method of creating a secure connection, and is one of three methods that the iPhone 2.0 Software and later support. (Alas, the iPhone can’t maintain a seamless VPN connection when you roam among Wi-Fi networks or between Wi-Fi and cell data networks; you have to disable and then re-enable the VPN connection for each network move.)

Don’t Use NSOperationQueue

Mike Ash discusses a bug in NSOperationQueue that can cause crashes:

Indeed, just about the only thing that seems to help is to only have a single NSOperationQueue running at a time. Since you can’t prevent framework code from running its own NSOperationQueue, this is an untenable solution.

Update: His solution is RAOperationQueue.

License Plate Sabotage

Mark Dominus:

…for a number of years I have toyed with the idea of getting a personalized plate with II11I11I or 0OO0OO00 or some such, on the theory that there is no possible drawback to having the least legible plate number permitted by law. (If you are reading this post in a font that renders 0 and O the same, take my word for it that 0OO0OO00 contains four letters and four digits.)