Archive for January 2014

Friday, January 31, 2014

Automatic Authentication on iOS

Bit Stadium:

The full-size icon is just a 512x512px png file, but things get exciting when you know that the png specification does declare ancillary chunks, including one to store text. This means that HockeyApp can pass textual information into your build at installation time without modifying the .ipa file.

Coming back to the user that taps the Install button: If the user is signed in or his UDID is present in the current browser session, then HockeyApp writes this information into the metadata of the full-size image. The new version of HockeySDK parses this metadata at the first start to automatically identify the user. Thereby the SDK utilizes the same URL scheme that we introduced with HockeySDK 3.5, allowing for a seamless fallback if the user was not signed in or installed the app through iTunes or Xcode.

ARC’s Fast Autorelease

Wolf Rentzsch:

ARC has a trick that keep returned objects out of autorelease pools if both the caller and callee are ARC.

This has been well advertised, but he links to the relevant runtime source code:

To summarize, callerAcceptsFastAutorelease() inspects the caller’s instructions and uses it to determine at runtime whether it needs to actually put the returned object in the autorelease pool or if it’s on the same ARC-team and it can be skipped (speeding things up).

The related Twitter conversation also revealed some interesting details. For example, the autorelease pool optimization initially did not work for +[NSDate date]. Its implementation calls gettimeofday(), and something about this confused Clang’s optimizer so that it did not generate a tail call, without which the ARC optimization can’t work.


Robbie Hanson:

You cannot store a plain-old NSString in Core Data. It must be wrapped inside a NSManagedObject. Why? Because of the mandate above. An NSString is immutable. And Core Data wants to update the object you have in your hand, at the moment the context merges changes from another context. And it can’t change an immutable object. So it must wrap it inside something else, and change that.


This also has implications on threading. Why is it not safe to pass a NSManagedObject to background threads? Because that darn NSManagedObjectContext may mutate the thing at any time. So now threading becomes a nightmare. The fact is, the rules for NSManagedObject don’t follow the same rules you have for all other objects. Developers understand mutable vs immutable. Especially in objective-c where there are often 2 versions of a class, one mutable and one immutable. And developers understand the implications concerning threading: “Don’t be mutating something on one thread if it’s being used on another.” This is something we’ve lived with for a long time, and we’re quite adept at solving these problems. But NSManagedObject presents a whole new set of problems. We can’t just wrap one of these things in a lock, or only access it through a serial queue. Because NSManagedObjectContext isn’t going to follow our rules. It won’t play nicely, and so we’re forced to play entirely by its rules.

In contrast:

YapDatabase doesn’t use NSManagedObject, or any similar kind of silliness. You can store plain-old NSObjects. This includes your own NSObject subclasses, as well as the usual suspects such as NSString, NSNumber, UIColor, UIImage, etc. As long as the object can somehow be serialized & deserialized you’re good to go. This could be via NSCoding, or any other way you want such as JSON serialization. It’s completely configurable.


YapDatabase will never mutate any of your objects. Ever. This gives you complete control over your objects, and how & when you access and mutate them. You know, the way you’re used to dealing with objects.

YapDatabase looks really interesting. I skimmed the wiki to try to figure out the general architecture. It’s based on SQLite, which it uses as a collection-key-value store. In contrast to Core Data, it’s quasi-schemaless, although it does have some support for relationships.

It looks like there are four different mechanisms for selecting/filtering objects:

Wednesday, January 29, 2014

Check Your AppleCare Term

Reader Bill on Lloyd Chambers’ blog:

When I ordered my Mac Pro from B&H I also ordered AppleCare. The problem is that Apple started the 3-year AppleCare clock on the day I pre-ordered which was Dec 19, 2013. The unit did not ship until Jan 17, 2014. I actually received it on Jan 22, 2014.

My AppleCare “Welcome Kit” was emailed directly to me from Apple and indicated a Dec 19, 2016 Coverage Period End Date. Basically, I lost an entire month of coverage.

Parsing HTML With Regular Expressions


You can’t parse [X]HTML with regex. Because HTML can’t be parsed by regex. Regex is not a tool that can be used to correctly parse HTML. As I have answered in HTML-and-regex questions here so many times before, the use of regex will not allow you to consume HTML. Regular expressions are a tool that is insufficiently sophisticated to understand the constructs employed by HTML.

Tom Christiansen:

It is true that most people underestimate the difficulty of parsing HTML with regular expressions and therefore do so poorly.

But this is not some fundamental flaw related to computational theory. That silliness is parroted a lot around here, but don’t you believe them.

So while it certainly can be done (this posting serves as an existence proof of this incontrovertible fact), that doesn’t mean it should be.

Twitter Username Stolen Thanks to PayPal and GoDaddy

Naoki Hiroshima (via Hacker News):

I tried to log in to my GoDaddy account, but it didn’t work. I called GoDaddy and explained the situation. The representative asked me the last 6 digits of my credit card number as a method of verification. This didn’t work because the credit card information had already been changed by an attacker. In fact, all of my information had been changed. I had no way to prove I was the real owner of the domain name.

He recommends two-factor authentication, not storing credit card information with your accounts (to prevent it from being used for fraudulent verification), and not using a custom domain for your e-mail address of record.

Update (2014-01-30): GoDaddy requires a valid payment method for each domain. So you cannot actually remove your credit card information (unless you replace it with your bank information), and you cannot enter an invalid card number. You can, however, have your card issuer generate a single-use number and enter that, even if the number has already been used elsewhere.

Update (2014-01-31): PayPal (via Emil Protalinski and Hacker News):

PayPal did not divulge any credit card details related to this account.

Josh Bryant:

I read this tonight, and sadly, the story was all to familiar to me. My version also has a few implications that are far worse.

Update (2014-02-26): Josh Ong (via John Gruber):

It remains to be seen what exactly took place behind the scenes at PayPal and GoDaddy, and why it took so long for Twitter to decide to return the account to its original owner, at least we’ve arrived at a happy resolution for this particular saga.

NewtonScript and Newton OS Papers

Walter Smith has some interesting articles and papers about the Newton (via Wolf Rentzsch):

Tuesday, January 28, 2014

Creating Animated GIFs for Documentation

David Smith:

You could accomplish many of the goals of the way I use GIFs with inline videos or links to Youtube/Vimeo. However, I find that in many cases the result of a simple focused GIF is far better than a video. Firstly, they don’t require fancy hosting or embed codes to work. Any modern browser can display them inline. Their short, looping nature also make it really easy to immediately get the gist of what the video is trying to communicate. They also take far less time to create than a polished video.

There’s Only Four Billion Floats—So Test Them All!

Bruce Dawson (via Hacker News):

A few months ago I saw a blog post touting fancy new SSE3 functions for implementing vector floor, ceil, and round functions. There was the inevitable proud proclaiming of impressive performance and correctness. However the ceil function gave the wrong answer for many numbers it was supposed to handle, including odd-ball numbers like ‘one’.

Monday, January 27, 2014

Joining PDF Files

The “Combine PDF Pages.action” Automator action includes a Python script that’s often more convenient to use (via akuhn).

Plain Text, Papers, Pandoc

Kieran Healy:

So, first I will say a little bit about the general problem, and then I will tell you something specific: how to take the draft of a scholarly paper, typically including bibliographical references, figures, and the results of some data analysis, and turn it into nice-looking PDF and HTML output. The hopefully redeeming thing about this discussion is that it will help you use the various resources I make available for doing this.

Update (2014-01-28): Dr. Drang:

The Markdown file is processed by a shell script, md2report, which spits out a LaTeX version of the report. Most of the time this file is ready to be processed by pdflatex, which also gathers in all the images files and creates the PDF output. If the report needs a particularly complex table, or if I need to tweak the spacing somewhere, I’ll go in and edit the LaTeX file directly. This is pretty rare, which is why I’ve grayed out my input to the LaTeX file. The great majority of my reports need no direct LaTeX input from me.

What Benefits Does the iPhone 5S Get From Being 64-bit?

Pierre Lebeaupin:

That means, for instance, that Anand’s comparison on the same hardware of two versions of Geekbench: the one just before and the one just after addition of ARM64 support, while clever and the best he could do, is not really a fair comparison of ARM64v8 and ARM32v8, but in fact a comparison between ARM64v8 and ARMv7. When you remove the impressive AES and SHA1 advantages from the comparison table, you end up with something that may be fair, though it’s still hard to know for sure.


I’m not going to conclude one way or the other: neither that the 64-bit aspect of the iPhone 5S is a marketing gimmick, or that it is everything Apple implied it would be. I won’t enter this game. Because what I do see here is the result of awesome work from both the processor side, the OS side, and the toolchain side at Apple to seamlessly get us a full 64-bit ARM environment (with 32-bit compatibility) all at once, without us having to double-guess the next increment. The shorter the transition, the better we’ll all be, and Apple couldn’t do shorter than that.

PHP Function Naming

Rasmus Lerdorf (via Hacker News):

htmlspecialchars was a very early function. Back when PHP had less than 100 functions and the function hashing mechanism was strlen(). In order to get a nice hash distribution of function names across the various function name lengths names were picked specifically to make them fit into a specific length bucket.

Disabling Auto Updates in WordPress

Andrew Nacin:

The DISALLOW_FILE_MODS constant blocks any kind of filesystem changes, not just by background updates but by all users as well. So, gone are the file editors; the ability to update core, themes, or plugins; and the ability to install new themes or plugins.

I want to disable automatic updates because I update my site by rsyncing to the server from my local copy. So anything that the server downloads itself will get blown away.

Friday, January 24, 2014

30 Years of Mac


Thirty years ago, Apple introduced the Macintosh with the promise to put the creative power of technology in everyone’s hands. It launched a generation of innovators who continue to change the world. This 30‑year timeline celebrates some of those pioneers and the profound impact they’ve made.


This demo emulates a Mac Plus with a bunch of abandonware applications and games to check out.

John Siracusa:

Thirty years ago today, Steve Jobs introduced Macintosh. It was the single most important product announcement of my life. When that upright beige box arrived in my home, it instilled in me an incredible sense of urgency. I greedily consumed every scrap of information about this amazing new machine, from books, magazines, audio cassettes, and any adult whose ear I could bend. This was the future—my future, if I could help it.


Join us as we live the time-traveler’s dream—the deep, lucid, Orwellian vision of hope, fear, and nostalgia that is 1984. Just in time for its 30th anniversary, we laid hands on an ’84 original: the Macintosh 128K. And, you guessed it—we’re tearing it down like it’s the Berlin Wall.

Jason Snell:

Of course, the success of the iPhone and iPad has also led to speculation that the Mac is on a collision course with iOS, one that will inevitably merge the two into one single Apple interface for all its devices. The appointment of Federighi as the leader of all of Apple’s software efforts could have been seen as a sign of that merger, but Federighi himself is adamant that the Mac will always be true to itself.

“The reason OS X has a different interface than iOS isn’t because one came after the other or because this one’s old and this one’s new,” Federighi said. Instead, it’s because using a mouse and keyboard just isn’t the same as tapping with your finger. “This device,” Federighi said, pointing at a MacBook Air screen, “has been honed over 30 years to be optimal” for keyboards and mice. Schiller and Federighi both made clear that Apple believes that competitors who try to attach a touchscreen to a PC or a clamshell keyboard onto a tablet are barking up the wrong tree.

Fred McCann:

Apple has a new page/advertisement celebrating 30 years of the Mac. It’s glossy, and pretty, but there are two things that stand out to me.

1. Even though this is about the Mac, iOS products are featured.

2. There is not a developer in sight.

Dave Winer:

It’s no coincidence that the earliest experimenter in the area we were commercializing, Doug Engelbart, was also the inventor of the mouse. We had been hearing about mice, I had even used one in a demo at Xerox PARC, but now, with the Mac -- I had one on my desk. I loved the Mac at first sight, but the foundation of our long-term relationship was the mouse (30 years later, I’m writing this story in my outliner, on a Mac, with a mouse).


I love the Mac. I love what it did for me, it gave me a lot of freedom I wouldn’t have gotten any other way. However, it stopped short of where it could have gone, and in doing so, I hope serves as a lesson for future generations of technologists. When someone argues for reserving the best stuff for your employees, tell them to stop screwing with your success.

Steven Sinofsky:

I also had access to MacApp and the tools (LightSpeed Pascal) to write my own Mac software. Until then all my programming had been on PCs (and mainframes, and Unix). I had spent two summers as an intern (at Martin Marietta, the same company dBase programmer Wayne Ratliff worked!) hacking around MS-DOS writing utilities to do things that were as easy as drag and drop on a Mac or just worked with MacWrite and Mac Excel. As fun as learning K&R, C, and INT 21h was, the Macintosh was calling.


There’s no doubt our collective experiences contribute to the products we each work on. Wikipedia even documents the influence of MacApp on MFC (my first product contribution), which was by design (and also by design was where not to be influenced). It is wonderful to think that through tools like MFC and Visual Basic along with ubiquitous computing, Windows brought to so many young programmers that same feeling of mastery and empowerment that I felt when I first used Macintosh.

Steven Levy:

The Macintosh was new, but the media would have to be old. There were no tech blogs, no Facebook, no Twitter, and certainly no Mac rumor websites. There were no websites at all. So Jobs had to generate his own campaign to tell the world about the computer that he would announce on January 24, 1984, 30 years ago today.


I have to admit my first moments with Jobs were not auspicious. He complained again that the story would not be on the cover. Then he proceeded to use scatological terms to describe a recent Rolling Stone story about MTV. I interrupted the rant by informing him that I had written that story. Jobs simply changed the subject.

Steve Jobs, interviewed by Steven Levy in 1984:

There’s sort of a local maximum happening where we know how to do really great crisp, printer resolution on black and white sheets. We can’t do colored sheets, it’s double the price. The second thing is, laser printers that are coming out which are going get really cheap-they are monochromatic, they’re black and white. Black panel displays, all black and white. So there’s a whole thing, in the next few years we’re going be able to make the dream come true of having this incredibly great, Dynabook type of thing. Even better, I think we’ve sort of gone even beyond that a little bit, and color will come, we’ll have color types of products, but I think this we need to make a reality, too.

Horace Dediu:

Nevertheless, it’s still important to understand the role of the Mac. In years gone, the advantage of Windows was measured in multiples of Mac sales. That peak occurred in 2004 when there were 56 times more PCs sold than Macs. At that moment, when the Windows advantage peaked, the Mac sold 3.2 million units  into a market where 182 million PCs shipped. This means the Mac had 1.7% market share.

And yet, remarkably, even with 1.7% share, the Mac did not disappear. The figure of 3.2 million units was not great and below the peak to date but it was enough to sustain Apple while it developed its next products. At the time the iPod was starting to grow rapidly and development on iPhone/iPad was already underway. The point being that there were new products. 3.2 million was a sufficient volume to preserve the company until such time when they would be ready.

Update (2014-01-27): Jean-Louis Gassée:

As we celebrate 30 years of Macintosh struggles and triumphs, let’s start with a semiserious, unscientific comparison between the original 128K Mac and its dark, polished, brooding descendant, the Mac Pro.

Leif Johnson:

Looking for a great way to celebrate the 30th anniversary of the Mac? You could certainly do worse than download a font from Apple that shows every single Mac that’s even been created in place of the usually boring business of letters and numbers.

The mac-icon-standard.ttf font was first reported by Greg Barbosa.

Harry McCracken:

It’s January, 1984. Steve Jobs, nattily attired in a double-breasted suit, is demonstrating Apple’s breakthrough personal computer, Macintosh, before a packed room. […] Over at YouTube, you can watch the Cupertino presentation, along with a sort of a rough draft held as part of an Apple sales meeting in Hawaii in the fall of 1983. As for the BCS version, all 90 minutes of it are there in the video at the top of this post, available for the first time in their entirety since they were shot on January 30, 1984.

Update (2014-01-31): John Gruber:

“Special” was a stroke of genius. Two of its four items were dangerous (and Empty Trash, originally, didn’t prompt for confirmation), and “Special” seems like as friendly a way as possible to cue the user to be a little careful in this menu. But more than serving as an apt categorization of the menu items it contained, “Special” served a higher purpose — an apt description of the Macintosh in its entirety.

Update (2014-02-02): Harry McCracken:

Last weekend, when I shared the unseen January 1984 Boston Computer Society meeting at which Steve Jobs and team demonstrated the Mac, I mentioned that Glenn Koenig, the BCS’s videographer, had saved it for all these years in a now-obsolete tape format: U-matic. Glenn shared a few fun photos of the setup he used in his video studio to get the meeting off that fragile tape and into a format everybody can enjoy.

Software in 2014

Tim Bray:

We’re at an inflection point in the practice of constructing software. Our tools are good, our server developers are happy, but when it comes to building client-side software, we really don’t know where we’re going or how to get there.

The Demise of QuarkXPress

Dave Girard (via John Gruber):

As the big dog of desktop publishing in the ’80s and ’90s, QuarkXPress was synonymous with professional publishing. In fact, it was publishing. But its hurried and steady decline is one of the greatest business failures in modern tech.

Quark’s demise is truly the stuff of legend. In fact, the story reads like the fall of any empire: failed battles, growing discontent among the overtaxed masses, hungry and energized foes, hubris, greed, and... uh, CMYK PDFs. What did QuarkXPress do—or fail to do—that saw its complete dominance of desktop publishing wither in less than a decade? In short, it didn’t listen.

Principles of Programming Languages 2014

POPL (via Lambda):

The POPL’14 proceedings are now available for individual download from the ACM digital library.


The annual Symposium on Principles of Programming Languages is a forum for the discussion of all aspects of programming languages and systems, with emphasis on how principles underpin practice. Both theoretical and experimental papers are welcome, on topics ranging from formal frameworks to experience reports.

Jeremy Gibbons:

ACM has offered SIGs the opportunity to run a three-year experiment to make conference proceedings open-access for a month around the conference. Also, SIGs can make the most recent year's proceedings open-access, until the next one comes along. See ACM web page about the experiment.

There is also a GitHub repository.

Kid Pix - The Early Years

Craig Hickman (via Kyle Sluder):

One day in 1988 while I was using MacPaint, the wonderful paint program that came with the Macintosh, my 3-year-old son Ben asked to try using the program. I was surprised at how quickly he got the knack of using the mouse and how easily he was able to select tools. The problem was that he didn’t have total control of the mouse and would occasionally (like every five minutes or so) pull down a menu and bring up a dialog box that he couldn’t dismiss without being able to read. Everything was fine as long as I was in the room, but if I stepped out for a few minutes I would come back and find Ben kicking on the floor in frustration. This was not what I had in mind for his introduction to the computer. As it turned out I was looking for a good programming project. I decided to write a simple paint program for Ben to use.

API Copyrightability

Florian Mueller:

As far as the copyrightability of Oracle’s Java API declaring code is concerned, I would go even further: it’s practically inconceivable that the district court’s non-copyrightability holding will be upheld considering that the circuit judges made perfectly clear that District Judge Alsup confused “fair use” and copyrightability issues and that Google’s whole non-copyrightability theory, which Judge Alsup adopted in its entirety, rests on a complete misreading of two key cases (Sega and Sony).

Ole Begemann:

What does it even mean to “hijack APIs”? I can’t remember a single case of a large company crushing a small developer solely by copying their innovative API. You don’t lure users away from a platform just by offering the same API. You get users for your API by offering a superior platform.

Introduction to libclang

Mike Ash:

libclang provides a nice interface for using Clang’s knowledge of C and similar languages to find information about source files. It’s possible to create and walk the abstract syntax tree, generate errors and warnings, and even perform autocompletion. I’ve only scratched the surface of what’s possible, but I hope it’s enough to get you started.

Clang vs. Free Software

Richard Stallman (via Hacker News):

In the free software movement, we campaign for the freedom of the users of computing. The values of free software are fundamentally different from the values of open source, which make “better code” the ultimate goal. If GCC were to change from a free compiler into a platform for nonfree compilers, it would no longer serve the goal of freedom very well. Therefore, we had to take care to prevent that.

Wednesday, January 22, 2014

Setting OmniGraphSketcher Free

The Omni Group:

We’re aware that there are drawbacks to open source software, but we’re convinced that setting GraphSketcher free is the best option going forward. We’re proud of the work that we did on OmniGraphSketcher, and we’d love it if as many people as possible were able to use it. In fact, the support that we received for OmniGraphSketcher after we discontinued it is one of the reasons we think this project will work well.

Apple ][js

Will Scullin’s Apple ][js and Apple //jse are Apple ][ and Apple //e emulators written entirely in JavaScript and HTML5 (via Bill Budge). They include lots of interesting disk images that you can load. See also Joshua Bell’s Applesoft BASIC in Javascript and Applesoft BASIC Quick Reference.

Oral History of Adele Goldberg

Adele Goldberg (via Lambda):

It was a different user interface. Ultimately, it was the very first spreadsheet where the spreadsheet was an object, where all the cells were objects, and therefore a cell could be a spreadsheet. In those days they didn’t have that. It was all hooked to a database and it was all getting CIA data coming down and it was a remarkable tour de force. And I said to him, “I don’t understand how you did that.” I mean I just couldn’t believe this non professional. He said, “Well, I’ll show you.” And so I said, “Okay.” “Hit Control-C,” which is how you then get into the code and interrupt it. I remember saying to him, “That is the ugliest piece of code I’ve ever seen.” And he said, “Oh that’s okay, because it does what I want it to do and the professionals down at XSIS are going to rewrite it all. This is the spec.” Suddenly the prototype became the spec and it didn’t matter how. What mattered was “what.” Talk about learning from your customers! That was the beginning of my getting interested in having customers. Alan never wanted to have customers because you have to support them. If you support them, you’re going to do what they need and not what your vision is. I’m sure to this day he is livid angry with me because I marched down to software engineering row and got customers.

Where’s Print to PDF on iPhone and iPad?

Rene Ritchie:

When Apple introduced AirPrint to iOS, they made it incredibly easy to send files right from your iPhone, iPod touch, and iPad to any compatible Wi-Fi printer in the vicinity. Unfortunately, what Apple didn’t do was bring Print to PDF (Export as PDF) along for the ride. At least, not yet...

One of the great features of OS X on the Mac is exactly that — the ability to export almost anything and everything quickly and easily to a PDF file. It’s something I’ve mentioned in the past when discussing OS X Mavericks features that’d be great to see in iOS 8. It’s my understanding Print/Export to PDF was in the pipeline years ago, but simply never got polished and pushed out.

Debugging NSUserDefaults

David Smith wrote a DTrace script for observing CFPreferencesServer.

Update (2015-04-07): David Smith has posted a newer script.

Tuesday, January 21, 2014

Code Bubbles: Rethinking the User Interface Paradigm of IDEs

Code Bubbles (via Edge Cases):

Code Bubbles is a front end to Eclipse designed to simplify programming by making it easy for the programmer to define and use working sets. Working sets here consist of the group of functions, documentation, notes, and other information that a programmer needs to accomplish a particular programming task such as adding a feature or fixing a bug.

Code Bubbles accomplishes this by providing compact function-based views of the code (all backed by the underlying files) that are displayed in bubbles and that are easily moved around and manipulated on the screen. The bubbles are fully editable. A large bubble area lets the programmer set up different working sets simultaneously and easily move between them.

As Rentzsch says, this provides an interface that is more spacial and has higher information density than is available, say, in Xcode. See also the YouTube video. Importantly, this is only at the user interface level. Unlike some other futuristic IDEs, it does not require trading all your files in for a database and, as a result, giving up your existing toolchain.

Ask for the Clock

Craig Gidney (via Reddit):

The method I use to create testable time-dependent code is to ask for a “clock”. A clock is a provider for the progression of time, an instance of an interface with methods for all the various time-related things the code might want to do: delaying an action, measuring elapsed time, creating periodic events, querying the date, whatever you need.

When the code is being run in production, the provided clock will be advancing with respect to external time. When the code is being tested, the provided clock will be a “fake” manually controlled instanced that the test can advance as needed.


Interestingly, once you’re asking for clocks everywhere, you can start reaping some benefits unrelated to testing.

Calendar App Asks for Apple ID and Password

Neven Mrgan:

For years I’ve rejected app ideas that would require the user’s Apple ID and password, certain that Apple would reject such apps swiftly. Now, Sunrise app—which asks for this info, and a whole lot more—is not just approved, but prominently featured. Sigh.

A previous version of OmniFocus also asked for your iCloud login info, since there was then no API for reminders. iOS does have an API for calendar access, but apparently it doesn’t cover everything the Sunrise (App Store) developers wanted to do. A couple months ago, they had a security breach and recommended that customers change their iCloud passwords. This does not inspire confidence, but I wouldn’t focus too much on this particular developer. These days, your Apple ID is the master key to all sorts of personal information and privileges, including the ability to remote wipe iOS devices and access your Mac, even if you didn’t share your FileVault 2 recovery key with Apple. It doesn’t seem prudent to share it with anyone.

Update (2014-01-22): Marco Arment:

I couldn’t believe it, so I downloaded the app myself and took these screenshots.

Update (2014-01-23): Sunrise:

When you type in your iCloud credentials, they are sent to our server only once in a secured way over SSL. We use them to generate a secure token from Apple. This secure token is the only thing we store on our servers, we never store your actual iCloud credentials.

Marco Arment:

This is better than storing your password in their database, but it’s still not very secure by modern standards: they’re still taking on the responsibility of transmitting it securely from the app, receiving it securely on the servers, sending it back to Apple securely to get a token, ensuring no tools, proxies, or analytics are caching or logging it along the way, and ensuring that their servers aren’t quietly hacked and nobody’s monitoring the application to capture the credentials in flight.

Update (2014-01-30): Sunrise:

Since our 2.11 version, we are not sending iCloud credentials to our servers, the app generates the secure token client-side.

Why Sass?

Dan Cederholm:

CSS is anything but DRY. At times, it drips with repeated rules, declarations, and values. We’re constantly writing the same snippets of code for colors, fonts, and frequently-used patterns of style throughout our stylesheets. One look through a decent-sized CSS file, and a DRY software developer will weep, first with bewilderment, then frustration.


Sass is a CSS preprocessor—a layer between the stylesheets you author and the .css files you serve to the browser. Sass (short for Syntactically Awesome Stylesheets) plugs the holes in CSS as a language, allowing you to write DRY code that’ll be faster, more efficient, and easier to maintain.

It seems like ultimately this sort of thing should be built into CSS itself, though.

Network Solutions Auto-Enroll: $1,850

Brent Simmons:

I couldn’t believe that I’d been opted-in, without my permission, to any new product — and I was stunned when I saw how much it cost. And further surprised when I saw that I would have to make a phone call to deal with all this.

Update (2014-01-23): Andrew Allemann:

In an interview with Domain Name Wire today, COO Jason Teichman said the program will actually be opt-in, and no one will be charged for the service unless they agree to add it.

Brent Simmons:

Even though NetSol spokesman said nobody would have to opt out, I still did. They called me, but I still had to opt out. (Guy read script.)

Brent Simmons:

So what happens when something so obviously inflammatory is posted?

Frere-Jones Sues Hoefler

Fredric S. Newman (PDF), attorney for Tobias Frere-Jones (via John Gruber):

However, in the most profound treachery and sustained exploitation of friendship, trust and confidence, Hoefler accepted all of the benefits provided by Frere-Jones while repeatedly promising Frere-Jones that he would give him the agreed equity, only to refuse to do so when finally demanded.

Michael Burke, attorney for Jonathan Hoefler:

Following his departure, Tobias filed a claim against company founder Jonathan Hoefler. Its allegations are not the facts, and they profoundly misrepresent Tobias’s relationship with both the company and Jonathan.

I was surprised to learn that fonts are such a big business. And, more so, that such an important partnership agreement, between former rivals no less, was apparently never committed to paper.

Common Init Method Name

Marco Arment asks what to name a method that factors out shared code, so it can be called from multiple initializers. The results seem to indicate that there is no agreed upon standard. Apple seems to use -commonInit, but when subclasses are involved it’s probably better to use a name like -commonInitForClass. I lean toward -setUpClass, which is shorter and more verby.

Inception FireWire/Thunderbolt Hack


Inception is a FireWire physical memory manipulation and hacking tool exploiting IEEE 1394 SBP-2 DMA. The tool can unlock (any password accepted) and escalate privileges to Administrator/root on almost any powered on machine you have physical access to. The tool can attack over FireWire, Thunderbolt, ExpressCard, PC Card and any other PCI/PCIe interfaces.

Via Jen Savage, who writes:

I knew these Thunderbolt/FireWire attacks were possible, but I wasn’t aware there was a tool that makes them easy.


If FileVault 2 is enabled, the tool will only work when the operating system is unlocked.

Douglas Adams on Mac OS X 10.0

Douglas Adams in April 2001, two weeks before his untimely death (via Daniel Pasco):

I was going to wait till the summer to install it, but I succumbed and installed it last week. It takes a little getting used to, old habits are hard to reform, and it’s not quite finished (what software ever is), and much of the software that’s out to run on it is Beta.


I think it’s brilliant. I’ve fallen completely in love with it. And the promise of what’s to come once people start developing in Cocoa is awesome…

I’d gone to see him speak six months earlier. He gave an engaging talk about his non-fiction book on endangered animal species. The title was Last Chance to See.

Update (2014-01-22): See also Douglas Adams’s Mac IIfx (via Rui Carmo).

How Does Apple Keep Secrets So Well?


On the software side, apparently they use API names that are disguised.

For example, still image stabilization was one of the new features of the iPhone 5S camera announced today. And yet, iOS 7 beta has been out for a while. They would have had to have development support for that feature somehow in the OS that thousands of other developers also need to get their hands on.

For example, here’s an API diff. The other answers to the question have some interesting stories.

Saturday, January 18, 2014

OmniOutliner 4

I’ve been a happy OmniOutliner user since version 1.0, but I have not really been following its development that closely. Lately I have been using more plain text lists, and version 3 has long done pretty much everything I’ve wanted in a comfortable, reliable way. So I did not know what to expect when I downloaded version 4 to see what was new. This release seems to mostly focus on the user interface and code modernization, rather than on outliner features. Here are some of the first things I noticed:

  1. I miss the drawer, which was easy to toggle with the toolbar button. In version 4, the window resizes (on the left) when you hide or show the sidebar, so the toolbar button moves out from under the cursor. This is so maddening that I’ve removed the button from the toolbar and switched to using the keyboard shortcut.

  2. The useful pop-up menu in the toolbar for displaying the section list has been removed.

  3. My old documents were displayed with much more row spacing, so I couldn’t see as much content at once. It looks like the Pro version is now required if you want to tighten up the layout. (Even then, the spacing does not seem quite the same.)

  4. The Esc key now triggers auto-completion rather than taking you in or out of edit mode, but there’s a preference to get the old behavior back.

  5. The inspectors have been completely redesigned and seem much simpler now. If, as it seems, all the old features are still there, this is a major achievement. More approachable, less clicking around.

    OmniOutliner 3: Inspector 9 OmniOutliner 4: Inspector
  6. Styles work differently. The new way is initially confusing to me, as I was used to the old interface. I have not used it enough yet to determine whether the new design is an improvement.

  7. As with Xcode 5, OmniOutliner no longer seems to be able to display bitmap fonts properly. Many of my outlines have long used Osaka 9, without font smoothing. Instead of sharp (albeit not pretty) text, it now appears muddy:

    OmniOutliner 3: Osaka 9 OmniOutliner 4: Osaka 9

    With larger sizes and font smoothing, standard fonts like Helvetica 12 look similar in both versions:

    OmniOutliner 3: Helvetica 12 OmniOutliner 4: Helvetica 12

    Monaco 9 is another of my favorite fonts that no longer looks good:

    OmniOutliner 3: Monaco 9 OmniOutliner 4: Monaco 9

    However, with Retina the tables turn and the new version looks much better:

    OmniOutliner 3: Monaco 9 Retina OmniOutliner 4: Monaco 9 Retina

Update (2014-01-22): OmniOutliner has switched to using the system window restoration feature. This means that if you quit and relaunch OmniOutliner, it remembers which documents were open and puts them back the way they were. However, if you simply close one document and then reopen it later, it no longer opens back up in the same place.

Update (2014-02-04): Dr. Drang:

For years, the lack of this simple control was what I hated most about OmniOutliner. It always displayed the outline with one pixel equaling one point, a poor choice when monitors commonly run at 120 dpi or greater. Font sizes that were comfortably readable on screen came out childishly huge on paper or PDF; sizes that looked good in print were unreadable on screen. The zoom control allows the best of both worlds.

Update (2014-06-27): In OmniOutliner 4.1, the row padding feature no longer requires the Pro version.

Thursday, January 16, 2014

Restoring the Default Set of Mac Fonts

fontrestore (via Charles Edge):

fontrestore detects fonts in /Library/Fonts, /System/Library/Fonts, and ~/Library/Fonts which are not part of the system install and moves them to /Library/Fonts (Removed), /System/Library/Fonts (Removed), and ~/Library/Fonts/Fonts (Removed) directories. Critical fonts required for operation of the user interface are also restored.

The Net Neutrality Endgame

Matt Drance:

It’s sad that this has come to an issue of courts and regulatory bodies. The real problem here is that there’s nowhere else to turn. There is no tangible consumer choice. The infrastructure is effectively monopolized. It will not be possible to vote on this with your wallets: you can submit, or cancel your service. But nobody’s going to stop using the Internet — certainly not in the kind of volume that would make a dent in policy.

Even a victory for network neutrality would not be an optimal solution. The price of forbidding the bad behavior is locking us into the less efficient common carrier model.

Associated Objects on Value Types

Greg Parker notes that one should not use objc_setAssociatedObject() to attach associated objects to immutable value-like types such as NSNumber, NSDate, and NSString. The reason is that, due to de-duplication and tagged pointers, the objects may be shared and/or immortal.

Git Choose Your Own Adventure

Seth Robertson (via Ned Batchelder):

This document is an attempt to be a fairly comprehensive guide to recovering from what you did not mean to do when using git. It isn't that git is so complicated that you need a large document to take care or your particular problem, it is more that the set of things that you might have done is so large that different techniques are needed depending on exactly what you have done and what you want to have happen.

The Lost Art of C Structure Packing

The Lost Art of C Structure Packing (by Eric Raymond):

There are ways to reduce memory usage significantly in situations like this, by rearranging the order of structure members in careful ways. This can lead to dramatic gains - in my case I was able to cut the working-set size by around 40%, enabling the program to handle much larger repositories without dying.

iOS Needs Frameworks

Landon Fuller:

Nearly six years later, we still don’t have a solution on-par with Mac OS X frameworks for distributing libraries, and in my experience, this has introduced unnecessary cost and complexity across the entire ecosystem of iOS development.


It’s been nearly 7 years since the introduction of iPhoneOS. iOS needs real frameworks, and moreover, iOS needs multiple-platform frameworks, with support for bundling Simulator, Device, and Mac binaries—along with their resources, headers, and related content—into a single atomic distribution bundle that applications developers can drag and drop into their projects.

Update (2014-01-29): Andrew Pontious:

The Dropbox SDK has a sample project in it which just has a single reference to the Dropbox.framework, both in the Project Navigator and in the “Link Binaries with Libraries” Xcode build phase. And while there is a custom framework search path in the project’s build settings, there’s no custom library search path or header search path. And the headers are available via the usual #import <Framework/Header.h> format.

Starbucks App Stores Passwords in Clear Text

Evan Schuman (via Sean Hollister):

The Starbucks mobile app, the most used mobile-payment app in the U.S., has been storing usernames, email addresses and passwords in clear text, Starbucks executives confirmed late on Tuesday (Jan. 14). The credentials were stored in such a way that anyone with access to the phone can see the passwords and usernames by connecting the phone to a PC. No jailbreaking of the phone is necessary. And that clear text also displays an extensive list of geolocation tracking points (latitude, longitude), a treasure trove of security and privacy gems for anyone who steals the phone.

Update (2014-01-17): Nick Arnott:

The Starbucks iPhone app, like many iOS apps, includes a crash reporting framework: Crashlytics. In addition to crash reports, Crashlytics is also able to provide custom logging and reporting for mobile apps. The issue that Wood uncovered is the Starbucks app is far too liberal in what information gets logged. Developers can choose to have certain events result in corresponding debug information being logged. For instance, if a request made to a server results in an error, the developer could have information pertaining to that error recorded, and then sent back to them in a log by Crashlytics.

In the case of the Starbucks app, the application is logging information that it shouldn't, like users' passwords. When a user signs up for a new account through the Starbucks app, all of the information for creating this account – email address, username, password, birthday, and mailing address – is temporarily logged to a file in the app.

Also, the app has now been updated:

With the update, all of the debug logging appears to have been disabled. While the old session.clslog file still originally appeared for iMore after the update, after restarting the Starbucks app the file was cleared out and left empty. After performing a number of actions in the app, such as signing out, signing in, failed login attempts, and creating a new user account, the session.clslog file remained completely empty.

Movie Code Blog

Rob Marvin on Source Code in TV and Films (via Slashdot):

Source code pops up on screens and in the background of television and movie scenes all the time, but one programmer finally paused a movie to figure out whether the code was accurate.

British programmer and writer John Graham-Cumming started a blog called Source Code in TV and Films on Jan. 3 after noticing that code used to reboot the futuristic space station in “Elysium” was actually taken from an instruction manual for Intel x86 processors.

For example, StarGate SG1:

In StarGate SG1: The Ark of Truth there is JavaScript source code taken from the web site of a Canadian bank.

Jurassic Park:

In Jurassic Park there is unknown but real looking source code (possibly for an SGI UNIX machine)

Strike Back:

In the TV series Strike Back (series 1, episode 5) the scrolling source code is WordPress JavaScript.


In the film Terminator, the HUD shows a listing of 6502 assembly language which appears to have been taken from an Apple II.


This code appears to be an example from the Addison Wesley book The iPhone Developer’s Cookbook by Erica Sadun.

Wednesday, January 15, 2014

Shaping the App Store

David Barnard:

It would be interesting for Apple to study various “post-PC” apps in the App Store (including ones featured in the “Your Verse” ad and featured on the App Store in recent months) to better understand the financial viability of creating and maintaing those apps. If the apps Apple brags about and features aren’t financially viable, we will inevitably see less of those apps being built over time.

Friday, January 10, 2014

Why GNU grep Is Fast

Mike Haertel:

Moreover, GNU grep AVOIDS BREAKING THE INPUT INTO LINES. Looking for newlines would slow grep down by a factor of several times, because to find the newlines it would have to look at every byte!

So instead of using line-oriented input, GNU grep reads raw data into a large buffer, searches the buffer using Boyer-Moore, and only when it finds a match does it go and look for the bounding newlines. (Certain command line options like -n disable this optimization.)

“Doom” 20th Anniversary Stories

Wil Shipley:

The way I got into the software business (besides learning to code) was to use every piece of software I could find and send the developers tons and tons of notes and bug reports. It turns out developers liked this, and it gained me a lot of opportunities. One of them was porting Doom and Quake to NEXTSTEP.


Don’t take this to mean [Carmack’s] code was spaghetti—it was actually some of the easiest-to-understand code I’ve ever worked with. It has an almost indescribable quality of “obviousness.” Like, you know when a really good teacher explains something, it seems obvious? That’s what his code was like.


We did some other ports for free as well, because back when OS X was new it wasn’t at all clear that the Cocoa layer would win out over the Carbon layer. (Most people thought not.) It had been my life’s mission (since 1987) to make sure that NEXTSTEP technology got into the mainstream, and OS X was our last and only hope. We knew games were crucial for a platform‘s wide adoption (c.f. iOS), and Steve didn’t like games, so it was up to us.

Why MacPaint’s Original Canvas was 416 Pixels Wide

Bill Scott (via John Gruber):

The key to this really fast render operation was the use of the Motorola 68k’s MOVEM command. MOVEM stands for Move Multiple. It can take a range of registers and move bits from an address into the M68k registers or do the reverse.

Wednesday, January 8, 2014

codesign Lies

Marcel Weiher:

Just had a case of codesign telling me my app was fine, just for the same app to be rejected by GateKeeper. The spctl tool fortunately was more truthful, but didn’t really say where the problem was.

To verify that my apps are signed properly before deployment, my Makefile includes these two lines:

spctl --status | grep "assessments enabled"
spctl --assess --type execute -v "${APP_PACKAGE}"

Fortunate Bear’s Future

Andy Finnell:

I regretfully announce that most of Fortunate Bear’s products have been discontinued and support ended effective immediately. Specifically the products terminated are Illuminate, Skyscraper, Pagesmith, and Log Leech. When I acquired these products I had big plans for all of them, which suffice to say didn’t work out. I will spare you the details, but in broad strokes I was unable to make them financially viable.

As with Hog Bay’s products, these were good apps from a very talented developer. He’s also written an interesting Postmortem of Failed Products. One of the common problems was the Mac app sandbox. Also:

I thought porting it to iOS would be a great idea. After all, there was no 1st party competition and a lot of the 3rd party competitors were crap. However, I ran into trouble on the outset. After submitting it to the App Store I got a call from Developer Relations saying they didn’t allow “that kind of app” in the store. I pointed out there were already half a dozen of “that kind of app” in the App Store, which they seemed genuinely surprised about. How were they supposed to know what got let into the App Store?

Update (2014-01-09): Brent Simmons:

It reminded me of my first go at being an indie developer.

Hog Bay Software’s Future

Jesse Grosjean:

For the last 3 years Grey, Mutahhir, Young Hoo, and myself worked full-time at Hog Bay Software. Unfortunately our sales dropped this year forcing it back to just me again.

Going forward I will focus on the Mac apps: FoldingText, WriteRoom, and TaskPaper. The next version of FoldingText is in progress. After that I’ll do updates to WriteRoom and TaskPaper.

I will stop selling the iOS apps. I’m sorry, I know this is disappointing, but I see no way to maintain them all myself. They are free this week and then will be removed from the app store.


That major problem that I’m having is supporting two different platforms. And in particular on iOS I spend 90% of my effort on infrastructure issues… file system browsers, url data sharing schemes, sync, etc. Leaving me little time/energy to actually push the actual app function forward.

OS X is much easier in this regard. You don’t need to build the finder from the ground up. You get Dropbox and iCloud sync (and lots of others) for free. For document based productivity apps OS X is a much more mature system.

PlainText has been sold. TaskPaper for iOS is now open-source.

Sad news, both for fans of these apps and for anyone who wants development of quality iOS apps to be a sustainable business.

Grasp: AST-based JavaScript Find and Replace

Grasp (via Patrick Dubroy):

Grasp is a command line utility that allows you to search and replace your JavaScript code - but unlike programs such as grep or sed, it searches the structure behind your code (the abstract syntax tree), rather than simply the text you’ve written

Apple Shutting Down Developer Mailing Lists

Greg Branche, administrator of Apple’s MPW-Dev mailing list, quotes a message saying:

List owners are encouraged to move their conversations to (for developers), (for users) or create an “Open community” group (via <redacted>). To facilitate this transition, we plan to make the non-confidential Apple Developer Forums readable by all Registered Apple Developers (i.e. the free membership level).

Via David Ryskalczyk and Landon Fuller. This is terrible news, as the mailing lists offer a superior user interface compared with the Web forums, along with better searchability and reliability. Of course, the MPW list no longer sees much traffic, but the Cocoa list continues to be very useful (and the archives are invaluable). Hopefully, a third party such as The Omni Group can (once again) step in to fill this void.

Update (2014-01-09): Reprieve!:

I am working with several fellow list owners to secure some resources to address the remaining concerns that will allow stay alive. The good news is will not be retiring the service after all.

Update (2019-07-01): Eric Schlegel:

I’ve been informed that the carbon-dev list will be closing down this weekend, on June 30th.

Update (2019-12-30): Felix Schwarz:

Looks like Apple has removed many mailing lists from - including archives

Just tried to read a post from 2017 in bonjour-dev referenced from Apple's forums: Page Not Found. Not even the Internet Archive has it.

UITextView Scroll-to-Typing Bug

Brent Simmons:

The caret is hidden. Type any other key and it un-hides. But I really, really want the caret to be not hidden right then.

Brent Simmons:

So I went through all the help I got on Twitter and tried different things. The only things that worked reliably were the solutions that involved adding a delay before scrolling.


So this is an opportunity to talk about when to use hacks like this. The short answer is never. I hate doing things like this and I can go years in between.

But the important thing is the quality of the user experience. Nothing else matters.

Update (2014-01-09): Peter Steinberger:

To enable these fixes, simply use PSPDFTextView instead of UITextView

Apple’s 2013 Scorecard

John Siracusa:

At the beginning of last year, I posted a list of things Apple can and should do during 2013. It’s time to settle up. Because I’m feeling scholastic, I’ll give a letter grade to each item.

Here are my thoughts on his to-do list:

Ship OS X 10.9 and iOS 7.

In general, OS X 10.9 is well designed and executed. However, it shipped with the most unreliable version of Apple Mail that I can recall. Some of the bugs have been fixed, but I help customers with Mail every day, and many of them are still having major problems with smart mailboxes, basic server connectivity, AppleScript, and junk mail handling.

There are also still major problems with code signing. I am holding off submitting updates to the Mac App Store because there’s a good chance that storeagent will break my app so that it won’t launch.

In general, I like iOS 7, and the transition has gone better than I would have predicted. However, my phone still crashes multiple times per day, which never happened with any previous version of iOS. From what I’ve heard, this is a common problem, but only when running the 64-bit version. Update (2014-01-23): Adario Strange: “‘We have a fix in an upcoming software update for a bug that can occasionally cause a home screen crash,’ Apple spokesperson Trudy Muller told Mashable.”

Diversify the iPhone product line.

The iPhone 5s is terrific. I don’t think the 5c is quite what people were hoping for in terms of diversification, nor can I recall seeing one in the wild.

Keep the iPad on track.

I’m blown away by how good the iPad mini with Retina display is. The iPad Air is impressive, but I’m not very interested in the larger form factor.

Introduce more, better Retina Macs.

The current Retina MacBook Pros are very good, but where are the other models and displays?

Make Messages work correctly.

I’m in the camp that finds it pretty buggy still. Update (2014-01-17): iMessage is apparently the number one software problem reported at Apple retail stores.

Make iCloud better.

There have been some improvements, but iCloud Core Data is not fixed yet. Calendar syncing works very well for me, better even than Google Calendar. Reminders still do not sync reliably. Documents are still siloed per-application and per-user. Photo Stream works reliably, but what people want is not what it’s designed to do. You can now download old versions of apps. I’m not using iCloud Keychain.

Resurrect iLife and iWork.

It’s not clear to me that the current iPhoto is better than iPhoto ’09.

There were major changes and regressions for iWork. It’s now more compatible between Mac, iOS, and the Web. However, I’m not convinced that the redesign is an improvement. The app I use the most is Numbers, and I find it slower and more cumbersome to use than before. Apple has shown little concern for document or workflow compatibility, so I would be hesitant to use iWork for serious work. Google Docs is better for simple stuff and sharing. Microsoft Office is better when you need more power or efficiency.

Reassure Mac Pro lovers.

The Mac Pro is back, but it’s different. When I used Apple’s pro desktop computers, they offered far superior CPU performance for most apps and fast internal drive bays. Apple no longer makes that type of Mac. On the plus side, I pay less of a penalty for having portability.

Do something about TV.

I want what Siracusa wants, but I’m not sure what Apple could be realistically expected to do here, other than fix bugs. Apple TV still has that bug where if you tell it to hide NBA game scores it shows them anyway. But this matters little since nearly all the games I want to see are unavailable due to blackout rules.

See also: Erk Barzeski, John Gruber, Hacker News.

Monday, January 6, 2014

Lightning Lint Causes iPhone Charging Problems

Adam C. Engst:

No crud was visible in the Lightning port, and a quick blast with a can of compressed air didn’t blow out anything I could see, but even so, it solved the problem. Since I cleaned out the port, the iPhone charges properly with any Lightning cable, and with no pressure necessary. Others have reported using a paperclip or pin to clean out the Lightning port, but the compressed air approach seems safer.

This has happened twice already with my iPhone 5s. Neither time did I see anything blown out. I don’t recall ever having charging problems with my 30-pin iPhones, despite the larger receptacle.

Update (2018-06-02): Dr. Drang:

The Lightning port is so narrow that even these tweezers couldn’t reach in and pluck out the lint. I had to use one side of the tweezers as a pick to poke at the lint and draw it out. And it took several minutes to clean because even the sharp pointy ends of the tweezers had trouble digging in and getting under the lint.

The two lessons here are don’t assume you’ve done something right without checking and don’t wait over 2½ years before cleaning out your Lightning port.

Sunday, January 5, 2014

OmniFocus for People Who Work From Home

Tyler Hall:

Practically speaking, this means I’ve gotten rid of my Home, Work, and Phone contexts and replaced them instead with labels that borrow traits from Allen’s “Time available” and “Energy available” criteria.


Replacing due dates with start dates has dramatically increased how often I add something to my inbox. I used to worry about adding trivial small reminders because I didn’t want them clogging up my task list. But now that I’ve discovered the power of start dates, I throw everything in there with a start date, knowing it won’t appear until I can actually do something about it.

I use start dates far more than due dates, and I set my contexts to only show Available actions. This reduces the number actions shown for each context, so it is actually possible to get to “Context Zero.” As a result, when looking at a context, I assume that the actions need to be done soon. I rarely need due dates, so when the Forecast does turn orange or red, I know it’s something important.

Friday, January 3, 2014


Ilja A. Iwas:

objc-run is a shell script which compiles and executes Objective-C source code files.

It’s perfect for small programming tasks you want to handle in Objective-C, that don’t justify setting up a complete Xcode project, e.g. manipulating plist files. Think of it as CodeRunner without an user interface.

See also: Shebang Objective-C.

Mac OS X Updates Bypass FileVault 2

Rich Trouton:

With Apple’s release of OS X 10.9.1, it looks like the automated FV 2 unlock process that Apple built into the Mavericks install process has been included with OS X updates. […] During the upgrade process, an unlock key is being put into the SMC by the update process to unlock the encrypted volume at boot. The reboot process then automatically clears the key from the SMC. This process is similar to how fdesetup authrestart works, except that the user is not being prompted to authorize it.

Jordan Merrick:

I’d rather the minor inconvenience of entering my password after a software update has restarted my Mac than automate the process and potentially create a window of vulnerability.

Thomas Brand:

The problem is that 10.4.6 was the first time a Apple Software Update ever required a second restart. People who had shutdown their computers after the first restart were confused when their Macs failed to boot the next time they were turned on, and instead restarted a second time. Even worse was the fact the second restart often took several minutes to complete, causing impatient users to hold down the power button on their machines potentially corrupting Mac OS X.

The reason Apple is automatically unlocking FileVault 2 in Mavericks is to avoid the potential confusion a second restart would cause on today’s even larger and less prepared Macintosh user community.

I don’t think this fully explains what’s going on here. Macworld says:

The swap happens before you get to the login window, and the system restarts almost immediately afterwards, thus avoiding the potential conflicts.

Brand seems to be saying that FileVault needs to be unlocked so that the installation can be completed and the Mac restarted again. That’s fine; it restarts before the login window. However, Trouton’s video shows that, after the update, his Mac is left in a logged in state. Why?

Thursday, January 2, 2014

Identifying and Handling Transient or Special Data on the Clipboard

Smile Software’s is a reference document about how Mac apps can cooperate when using the system pasteboard:

TextExpander, Butler, TypeIt4Me, Typinator, Keyboard Maestro, pasteboard history applications, and other applications briefly commandeer Mac OS X’s general pasteboard to transport large chunks of data into the user’s current context quickly. Often, shortly after this data is inserted, the pasteboard is returned to its previous contents. These applications need a way to identify their data as being temporary, different than content Copied by the user, and/or otherwise special – additional pasteboard types offer a solution.

CopyPaste, PTHPasteboard, iClip, and other pasteboard history utilities maintain histories of the pasteboard’s contents. Pasteboard data identified as transient should not be included in these histories.

Additionally, password utilities such as 1Password might mark passwords or other sensitive data, either placed programmatically or user-Copied to the pasteboard, so that pasteboard history utilities could obfuscate passwords when displayed on screen (to avoid inadvertently revealing your password to a “shoulder surfer”), and/or avoid writing them as plain text to a pasteboard history file.

No iTunes Extras on Apple TV or iOS

Rene Ritchie (via John Gruber):

Back on September 9, 2009, Apple introduced iTunes Extras, an HTML5-based way for studios to include digital versions of director’s commentary tracks, behind the scenes videos, and the other kinds of bonus material commonly found on DVD and Blu-Ray. The original OS X 10.4 Tiger-based Apple TV was updated to support iTunes Extras, and it’s musical cousin, iTunes LP. Then, on September 1, 2010, Apple announced an all-new, all-streaming, all-iOS second generation Apple TV, and... iTunes Extras didn’t survive the transition. Not only that, they didn’t get added back with subsequent software updates. On March 7, 2012, Apple announced the third generation, 1080p Apple TV, and still no iTunes Extras. Now, some 4 years later, iTunes Extras on Apple TV are still MIA.

I’ve been buying more video content from iTunes lately, but I buy my favorite content on disc because of the extras (and picture quality).

Network Time Machine Without a Time Capsule

Adam C. Engst notes that Time Machine now supports backing up to a hard drive connected to an AirPort Extreme Base Station:

What’s most compelling about backing up to an AirPort Disk, as opposed to an AirPort Time Capsule, is that you’re not combining two entirely unrelated pieces of hardware in one package. If the AirPort Time Capsule’s hard drive fails, it’s difficult to replace, and if you want to upgrade the wireless gateway side of the equation, there’s no easy way to bring your backups over to the new device. With an AirPort Extreme Base Station and attached USB hard drive, you gain more flexibility.

Being able to, occasionally, connect the drive directly to the Mac is huge. It helps work around the two biggest problems with the Time Capsule: slow restores over the network and the inability to use disk repair software when something goes wrong.


Kyle Sluder:

This project demonstrates how to wrap a C function—specifically, printf(3).

Seems like this could be useful for debugging in the field.

Wednesday, January 1, 2014

Archiving Favorite Tweets

I’ve long wanted a way to archive my favorite tweets to make them easily browsable and searchable. (As with tweets, Twitter stores the old favorites but does not make them readily available.) I have been using using Tweet Nest to archive my tweets, but it does not archive favorite tweets from other users.

There are a bunch of posts about this, but I have yet to find a good way to import old favorite tweets. For example, Twitterscribe only imported the most recent favorites and did not make them available on the Web, only for download. Twitter Archiving Google Spreadsheet wanted access to my whole Google Drive, and the output is, well, a spreadsheet.

There is, however, an easy way to archive favorites going forward. You can create an IFTTT recipe with a Twitter or trigger and a Pinboard action. Now my Twitter favorites and starred posts get archived in Pinboard.