Friday, November 09, 2012

Dropbox Seems to Have Lost Its Performance Edge

You know a file synching utility like Dropbox has gone horribly wrong when Mail in OS X downloading its latest messages and attachments looks like a speed demon by comparison! I shouldn't have to choose between getting an unedited file out of Mail to start working or waiting for my file synching utility to finish "starting" so I can get the copy I worked on.

I've been using the latest preview Dropbox for OS X builds for best OS X 10.8 compatibility. At the time of the writing, 1.5.47 is the latest and the performance hasn't been very good. In fact, I've seen this in many Dropbox builds at this point. I use Dropbox to keep a MacBook Pro and iMac in sync. The MBP is sleeping most of the time. When I need to get work done, I wake the MBP from slumber, then dutifully wait for Dropbox to pull down changes.

This cycle is one of the worst so far. 15 minutes for Dropbox to complete it's "starting…" phase, 5 minutes for "indexing" and finally around 20 minutes after waking from sleep, Dropbox is actually downloading files.

I know, everything is amazing and nobody is happy, but for a product whose sole reason to exist is file synching, bad performance can't be tolerated. is even worse, so not even an option.

Tuesday, September 11, 2012

Worse Development Anti-Pattern I've Ever Seen: Using Goto in Objective-C

This is actual code I was reviewing a few months ago. I've anonymized the code and did a bit of renaming... 
- (BOOL)aTerribleMethod:(NSString *)iDontKnowWhatImDoing
    if(iDontKnowWhatImDoing isEqualToString:@"YES") {
        [self callAnotherTerribleMethod];
        goto bail;

    if(iDontKnowWhatImDoing isEqualToString:@"SOMETIMES") {
        [self callYetAnotherTerribleMethod];
        goto bail;

    if(iDontKnowWhatImDoing isEqualToString:@"NO") {
        goto bail;

    //Do a whole bunch of other stuff

If you've ever written something like this, please quit programming.

Monday, September 10, 2012

LLDB Custom Object Summaries Implemented Using Python, not Objective-C

In the seemingly benignly titled WWDC 2012 session Debugging in Xcode, the speaker team shows you how to implement custom summaries on your own objects for LLDB. This is pretty important since LLDB is now the recommended default debugger as of Xcode 4.3 (Xcode 4.4.1 is the latest at the time of this writing, with Xcode 4.5 just days away).

What a second, what's wrong with implementing [ClassInstance description]? The speaker sternly says it's an action fraught with danger since you might run code and change the state of the object inside description. I admit, I never really thought about it much. But one of the side affects calling description caused was seeing the dreaded Summary Unavailable next to your variable where its description should be. When implementing LLDB, Apple choose another way to get custom summaries which really surprised me.

For LLDB, you create a Python script that directly inspects member variables of your class, then you use Python code to do any summarization, formatting, or transformation, and finally return a Python string. The video shows exactly how this works, and of course you need to register a script and function in the script to call when LLDB sees your Objective-C class.

I'd never seen Python before. It doesn't look radically hard to pick up, and seeing it used for LLDB sure made me wonder if it will have a more prominent role at Apple in the future. Things that make you go hmmmm…

Friday, September 07, 2012

My Favorite Unadvertised OS X 10.8 Mountain Lion Feature

Notification Center is without a doubt my favorite Mountain Lion feature, particularly the way Calendar reminders go from moderately disruptive to not disruptive at all.

My favorite unadvertised feature is that you can now add files to the Trash while it's emptying! I know, it's the kind of thing that seems like a no-brainer/should have been there for years, but it wasn't.

This is great for me since emptying build folders, or large batches of icons takes a few seconds, and I frequently find something else to trash after I've already started emptying the trash.

Wednesday, August 22, 2012

Is Amazon Glacier Really As Cheap As It Seems? The Math Might Be Surprising

I was very excited to read the announcement of Amazon Glacier earlier today and signed up when I had a few minutes last night.

At first, it seems perfect. $0.01 US per GB / month seems crazy cheap. I love the idea of only paying for what you use, look at that table for potential storage costs.
How could you really go wrong at 100 GB for $1.00?
First thing that went wrong was I didn't know was there is no client! The only way to get data into Glacier is via API calls. I'm sure that existing clients that support S3 will adapt to include Glacier support as well, it's early days.
I thought about rolling my own, but Amazon has Glacier SDKs for Java and .NET, so no quick OS X app could be cobbled together to get my data in. I mean I work with REST APIs all day long, and Glacier has that too, but I wasn't looking of that kind of work last night.
While doing a last ditch search for a client that already supported Glacier, I stumbled on the Hacker News post Beware that retrieval fee! I hadn't paid much attention to the retrieval fees when I activated my account. I'm thinking of Glacier as an emergency, the house burned down, kind of retrieval situation. So how much would that scenario cost?
That's where things get…complicated. How can Amazon offer a storage service and not provide a calculator or spreadsheet that helps customers estimate their costs? Seems like Amazon is hiding the true retrieval costs because, well, look at the math I came up with.


If my math is right, those download costs sure add up quick. Calculating this stuff appears intentionally very tricky. The Paid Retrieval columns represent my best guess based on the information I found, but I could totally be wrong. I tried to use the Glacier FAQ Formulas to work it out, but its crazy complicated and written mostly as prose! After I did the formulas one way I thought could be right, I re-read all the discussion and theories on formulas on the Hacker News thread, then found this Wired article. In the Update section, Amazon lays out a completely other formula for the Billable Peak column if you're downloading your whole archive. I used that because it was easier and I think it fits the scenario I'm looking for better, which is immediate disaster recovery. If you've lost everything, you don't want to trickle download your archive to stay under the GBs / hour column.
If you want to play with the math yourself, you can use the spreadsheet I started with:

Amazon Glacier Pricing Math - Numbers
Amazon Glacier Pricing Math - Excel

Sunday, August 19, 2012

Watch: Keanu Reeves shares some insights on the digital vs film debate in Side By Side

How come Keanu Reeves sound so much smarter here than in anything else I've seen him in?

Own Your Words

Scott Hanselman says Your Words Are Wasted. If you don't have a blog, get one. If you do, start posting more. Figure out how to make posting on your blog as easy as posting on Twitter, then you win!

Friday, August 10, 2012

Of Course I Would Get Punished The One Time I Buy Music from Amazon

I hardly ever buy music from Amazon, I'm always afraid somethings going to go wrong because of course it's happened before.
I had some MP3 download credits through movie ticket purchases, so I finally decide to spend them and this:
Screen Shot 2012 08 09 at 10 55 06 PM

I was literally toggling back and forth between iTunes and Safari, thinking do I pull the trigger with Amazon or pay out of pocket with iTunes because I know it's going to work, there's just about no risk.
WTF do I do now? In no way do I want to contact f***ing customer service to buy an album.
Instead I find the link to Your Cloud Player under the Account menu, find the album, attempt a download, have to install the downloader, get told a download failed repeatedly for a song bought like a year ago, and finally the download for this purchase succeeds, but still says some imports failed for the old song. I have iTunes Match, so I then go into iTunes, wait for matching to complete, then delete all the songs and download from iCloud to get AAC files.

Monday, July 30, 2012

I've Been Charging iPads Wrong For Over Two Years

I've got a number of these iPhone USB Power Adapters lying around the house. When I got the iPad 2, I knew of the higher power requirements for charging, but I just never thought much about it because I usually charged the iPad by plugging it into my iMac.

iOS 5 & iCloud changed all that. With backups now going to iCloud, I really had no reason to plug the iPad into the iMac. So I started plugging the iPad directly into the wall, using the iPhone USB adapter. Was charging slow? When I paid attention, sure, but I usually didn't notice because I charged overnight.

When I got the iPad Retina, aka iPad 3 or the new iPad, I noticed charging took a long time. I mean a really long time. I rationalized this away because I know how much larger the iPad Retina battery is. But I started to kind of plan around having to charge the new iPad, making sure the battery was topped up if I knew I needed to use it for an extended time on battery.

I don't remember who, or how it came up, but recently someone mentioned you have to be using the iPad 2+ included adapter or charging takes forever. I of course dismissed this out of hand. How could I, with all the iDevices, detailed knowledge of the development platform and hardware, possibly not be using the correct adapter? I certainly didn't remember any fancy adapter!

Yesterday I opened the iPad 2 and iPad Retina boxes, and sure enough, there's a 10W USB Adapter included! I immediately took my 50% charged iPad Retina and plugged it into the 10W adapter. A few hours later, 85% charged, BOOM! That is simply astonishing charging speed compared to what I was seeing before.

Best of all, the 10W charger works with all iDevices for the fastest charging possible. The cherry on top is that the 10W has a removable plug so you can use it with the World Travel Adapter Kit or the US extension cable.

I was feeling super dumb when I saw the 10W adapter in the iPad boxes, but I quickly got that once I realized how much an improvement this was. If you never took your 10W adapter out of your iPad's box, now would be the time.

While doing laundry this morning, I saw the iPad 1 box, which has been demoted to the basement. I wondered what charger was included with the iPad 1 ? Was it the iPhone Adapter? Opening it up, I see the box layout is the same as the iPad 2 and new iPad, but a charger wasn't in the box! I went back up to the office and opened my junk electronics drawer. Sure enough, another 10W adapter was there collecting dust. I obviously completely forgot about it when I moved houses late last year.

Feel like I should be busted to Apple geek private or something.

Monday, July 16, 2012

License Agreement Screens in Mobile Apps are a Really Bad Idea

Launched the latest update to The Weather Channel app and this is what I see:
IMG 0832
License agreements in apps are a terrible idea. The only app I've ever seen implement something like this is the iTunes app, and that has widely been derided as terrible user experience.
I know I've never seen this on a web site, I'm sure will never show a license agreement before showing the front page. Why should the app be different?
Worse, the App Store already includes a provision for license agreements, and custom ones at that. Every app gets a generic license agreement that Apple has written by default. However, if you want to provide a custom one, you can.
In the App Store page for The Weather Channel app, I've highlighted the relevant link.
Screen Shot 2012 07 15 at 12 49 38 PM

Monday, July 02, 2012

Sometimes it's the little things in programming that surprise the most

I need to brush up on Core Data, I've got bugs to solve and I haven't used Core Data for anything real yet, so best to school myself.

I've got iOS Programming: The Big Nerd Ranch Guide 2nd Edition with a chapter on Core Data and Core Data: Apple's API for Persisting Data on Mac OS X to choose from to get started. I chose iOS Programming because it's just a chapter, should be more focused if I can't get all the way through Core Data…

I'm reading through, getting reacquainted with the terminology when I see something that strikes me as odd. The sample is talking about how entities in Core Data don't automatically save their order relative to other entities and how you have to create an attribute yourself to manage this. Authors Joe Conway and Aaron Hillegass call it orderValue. No big deal, done this countless times. Then the authors do something completely unexpected. Instead of using an integer for the attribute, they use a double!

I literally think "huh, that seems strange, I've always used an integer..." and keep reading. A few paragraphs later, they explain why they chose a double. If the entity's position is changed, with an integer you have to change all the other entities orderValues. With a double, you just find the orderValue of entities in front and behind the entity that got moved, then add them together, and divide by two. Thus, the new orderingValue will fall directly in between... As soon as I read that, my mind did something very similar to this moment in Pixar's Ratatouille when critic Anton Ego has a childhood flashback after trying the titular food (starts at :15 into the clip).

 Of course instead of food, I flash backed to all the code I ever wrote using an integer to solve that problem. Correction, all the wrong code I wrote to solve that problem.

Friday, June 01, 2012

iReality: The promise of iPad like fun, the delivery of Windows Vista fail

IMG 0742
IMG 0739Was on the way to Great Grandma's house and stopped at the Palisades Center in West Nyack, NY because of heavy traffic. Wandering around looking for a way for the kids to burn off some energy and what do we find but a small cluster of motion rides.

The heavy hitter was the iReality. It takes some serious arrogance for a mall ride to claim The World's First FULLY Interactive Simulator. Even better, it's blatantly using the iPad to sell this as a ride of the future.

Of course, kids were all over it, and mine were clamoring for a ride. I swing around the side and what do I see but Windows Vista! A classic bait and switch.

Not only is this "ride" not using anything resembling Apple technology, but what's this, the software has crashed and is showing a DOS prompt. DOS, the future is yesterday.

Ducking inside to look closer at the screen, I see that some script is caught in an infinite loop waiting to receive a message from a network service that never answers. I was laughing to hard to take a more clear photo.

So glad I couldn't give these clowns $2.

IMG 0741

Friday, May 25, 2012

How Rogue Amoeba's Airfoil Speakers could get pulled from the App Store for using a non-private API

Apple says Rogue Amoeba's Airfoil Speakers was pulled from the App Store for using a private API.

To recap, using a private API is sure to get your app rejected from the App Store. Unless Rogue Amoeba open sources their app, no one knows for sure if they're using a private API. I believe them when they say they aren't using one. But there is another way to get in the situation they're in.

Let's say an app developer unknowingly uses an API that was previous not flagged as private. Perhaps it's a publicly "known" API, even an open secret, but technically not part of the public API set. Your app passes the automated private API check and gets through manual review. A little while later, Apple adds the previously not-private API you used to the catalog of private APIs. Perhaps Apple realized their oversight, and given how serious they are about apps not using this API, ran an automated check against all App Store apps for usage. They discovered that Airfoil Speakers used this private API. Clearly they choose to pull the app in this case.

I offer this possibility because something similar happened on a project I was working on. A number of versions of the app had been approved and where for sale on the App Store when a small bug fix release was stopped cold during App Store manual review for private API use. The team was mystified at first and insulted, we hadn't used any private APIs, and had barely changed the app, what gives? But we did use a private API without even knowing it. The app used MAZeroingWeakRef for weak pointers, almost exclusively for delegates, but also for KVO notifications. Turns out the version of MAZeroingWeakRef we were using was intercepting a private API call!
@interface NSObject (KVOPrivateMethod)
- (BOOL)_isKVOA;
In a later version of the library, there was a #define to not use that API. We turned it off, the app came crumbling down with memory issues. It was not a fun few days working to solve all the memory management issues MAZeroingWeakRef had hidden from view when there was a critical bug fix update to ship.

Tuesday, May 22, 2012

How Stephen King's "Under the Dome" Made Me A Reading Coward

Stephen King's "Under the Dome" was the first eBook (Kindle if you're keeping score) I ever bought. Reading it took me nearly as long as it took Mr. King to write it, close to 2 years, because I was a coward. Why? Because for most of this book, at least up to the halfway point, I had no idea how it was going to end. That's a good thing you say? I agree, which is why my reaction was so surprising. 

Warning: light spoilers

How does King pull off the "not sure who's going to make it" feeling? The cast of characters is huge, and they die all the time, even the ones that have got significant page time. It sort of feels like Game of Thrones in that regard. Maybe I wasn't being cynical enough, because once you make the halfway turn, the characters that seemed most likely to make it do. The character most likely to be the villain is in fact the villain, or at least the secondary villain. The cause of the dome, the main "villain", I can honestly say was one I didn't fully expect. Does this tie into the Dark Tower somehow? All the "19" references leads me to believe so, but not in any significant way that I can see.

But my cowardice in continue reading the story was shocking once I identified why I took such long breaks. I read other stuff in between, including King's hopefully not final Dark Tower book "The Wind Through the Keyhole" (loved it). I didn't have any issues finishing those stories. If dawned on me as I was finishing Under the Dome that I haven't been watching many movies & shows, playing many story driven games, or reading many books that don't have a long running story. I think this is what sequelitis must feel like, the damage never ending or long running stories do. Maybe it's just me, but it feels like I've been unconditioned from enjoying stories that actually end. Under the Dome was going to fast, the plot was to chaotic, is he going to explain the whole universe?

While I love stories connected to a larger universe (and any Dark Tower connection is tangential), sometimes you just need a story that's self contained, and which leaves a little to the imagination. Sometimes the best stories are the ones that end.

Monday, March 12, 2012 Ad Shows New Apple TV Had Different App Names

I was surprised to even see an ad for TV on Apple has barely been marketing TV, this seemed like a big deal.

Then I looked closer. The top three apps are named iTunes Movies, iTunes TV Shows, and iTunes Match! Click the ad, and at the full site you see the names as they actually are on the TV: Movies, TV Shows, and Music.

I have two theories. The marketing department intentionally changed the names to more clearly call attention to iTunes, or the new TV was going to ship with the iTunes derived names until a very late date and it slipped into marketing department.

Either way, and interesting alternate universe view in the new TV.

Tuesday, March 06, 2012

Fix Radar or GTFO (my duplicate rdar://10995271)

If you're a 3rd party Apple developer,  please go to Fix Radar or GTFO and follow the steps. My duplicate is rdar://10995271

Another blog post The psychology of Radar is broken is also worth your time reading.

This always amuses File a Radar

And the always amusing Radar or GTFO, which is of the always dapper Apple developer evangelist Michael Jurewitz. Note that Apple has never actually said "Radar or GTFO", it just became a joke meme that stuck.

I think we have Daniel Pasco @ Black Pixel to thank for really bringing this issue to a head in his blog post Radar or GTFO

Thursday, February 16, 2012

Dear Apple, Please Bring Free Updates from iOS "Back to the Mac" with OS X 10.8 Mountain Lion

I'm not cheap. I pay for all my software. Suggesting to Apple that OS X 10.8 Mountain Lion be a free update isn't about saving $30 bucks. I've gladly paid for every OS X update and will continue to do so if that's the direction Apple takes.

But I think the best idea from iOS, free updates, should come "Back to the Mac". This policy would allow developers to use the latest APIs as quickly as possible and help developers & Apple reduce support cost for older OS X versions more quickly. Any kind of monetary transaction is going to slow down OS X update adoption. Any iOS developer with access to analytics can see how quickly iOS 5 adoption has taken off (I've seen 60-75% already). Lion has sold 17 million copies, Apple's best selling release ever. The last reported install base was 58M Macs. Lion is on roughly 29% of all Macs. Pretty good, not nearly free iOS 5 adoption good. 

17 million Lion copies is a $510M gross, no small stash of cash to throw away. Except Apple has nearly $100B (or more by now) in cash, and making up that revenue is only 398k Macs at an average selling price of $1281

Imagine the ad Apple could deliver promising free software updates for 2 years on all their devices! Contrast that with the Android 4.0 upgrade schedule from Motorola or the confusing array of costly and confusing Windows upgrades, the comedy gold practically writes itself.

I think Apple replaces the revenue easy with a combination of Apple's cut of increased Mac App Store sales, decreased support costs, but more importantly new users. They could really amp up the expectation that when you buy a Mac, Apple "takes care of you" unlike with all those razor thin margin PCs. More importantly, it hits Microsoft where it really hurts, their wallet.

Tuesday, February 07, 2012

Easily Localize Custom NSDateFormatter Date Format Strings in iOS 4+

Apple ships a lot of new APIs with every major iOS release. They claimed iOS 4 had over 1,500 new APIs, and the same claim is repeated for iOS 5!
Any way you slice it, a lot of new code
It's easy for a new API that is developerlife altering to slip through a release undetected.

Which is exactly what happened to me for new in iOS 4 API [NSDateFormatter dateFormatFromTemplate:options:locale:]

Why is this API such a big? It gives developers an easy way to generate a custom date or time string for display to the user. Cocoa Touch (and Cocoa before it) have had predefined NSDateFormatterStyle that correlated to specific date or time display representations. For example, NSDateFormatterShortStyle used for dates would be 11/23/37 and for time 3:30pm. But the really big deal was that if you use these predefined styles they would get localized based on the NSLocale of the device. Meaning the short date format in the U.K. would output 23/11/37 and 15:30 respectively.

If you wanted a custom format and localization, like just month and day, you were out of luck without writing it yourself, which means you usually just used the pre-defined styles. Until iOS 4 that is!
Starting in iOS 4, you could not do stuff like this (straight from the documentation):
NSString *formatString = [NSDateFormatter dateFormatFromTemplate:@"EdMMM" options:0
locale:[NSLocale currentLocale]];
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setDateFormat:formatString];
NSString *todayString = [dateFormatter stringFromDate:[NSDate date]];
NSLog(@"todayString: %@", todayString);

Which results in this output formatted for the US like this:
2012-02-07 09:32:16.725 Untitled 2[1803:707] todayString: Tue, Feb 7

And when the locale is, for example, Great Britain, the output is this with the same code:
2012-02-07 09:36:32.439 Untitled 2[1839:707] todayString: Tue 7 Feb

Notice this even puts a comma in or not as required by the locale!

BTW, the excellent CodeRunner (available on the Mac App Store) is perfect for quickly running these kinds of code snippets to see the output.

Friday, February 03, 2012

A Lack of Sandboxing Leadership: Apple's AirPort Utility 6.0 for Mac OS X 10.7 Lion is NOT Sandboxed

AirPort Utility 6.0, the iOSified and Lion only update to Apple's excellent WiFi network and base station management app released on January 30, 2012, is not sandboxed.
All Shall Sandbox

Apple decreed all apps submitted for Mac App Store review on or after March 1, 2012 must be sandboxed (there's no direct link, screenshot captures for posterity). The previous deadline was November 1, 2011.There has been a ton of debate on whether sandboxing as currently implemented actual solves the problem it sets out to. I'm not going to re-litagate that here. Introducing App Sandbox (Apple developer account required) from WWDC 11 makes as persuasive a case as I've ever seen for sandboxing. 

There are problems with sandboxing in Lion that Apple needs to solve, and 10.7.3 implements or fixes (Apple dev forum) a number of sandbox issues. Good arguments, documentation, fixes, and mandated deadlines that have already been pushed back aren't going to conclusively prove to 3rd party app developers they must implement sandboxing now.

Leadership does. Look at a list of Apple apps, and you're just as likely to see them not sandboxed as sandboxed. A lot of Apple's high profile apps are not sandboxed:
  • Safari 5.1.3 (
    • Some of the parts of the app like Safari Web Content are, but the main UI app isn't
  • Pages 4.1 (Mac App Store)
  • iBooks Author 1.0 (Mac App Store)
  • AirPort Utility 6.0 (
  • iPhoto 9.2.1 (Mac App Store)
  • iTunes 10.5.3 (
  • Xcode 4.3 (Mac App Store - Released February 16, 2012)
Maybe Apple's going to drop sandboxed versions of these apps any minute. But the closer we get to the submission deadline without even Apple's brand new apps (iBooks Author I'm looking at you) being sandboxed, the harder the deadline is to take seriously.

I've already taken one shot at sandboxing SleepMute in its current development cycle on Mac OS X 10.7.2. SleepMute has a UI app to write preferences and a helper that reads preferences and mutes or unmutes sound. Sandboxing completely broke the app. Both apps read/write preferences (with CF functions) to the same file preference file. This feature works perfectly without sandboxing, has to be completely rewritten for sandboxing. Also, simply launching the helper from the UI app wasn't working. That may have been fixed by 10.7.3, so I'll probably give it another shot, but not until Apple's apps start getting sandboxed.

Thursday, February 02, 2012

Netflix is my new HBO

 When I grew up in the 80s, a particularly life changing event was when my family subscribed to HBO.

There were no parental controls in those days. If you had parents like mine that put a TV in your room with HBO on it, you could watch all sorts of stuff that you had no business seeing. HBO's always had loads of cheap crappy movies to round out the expensive good stuff and original series. HBO would play those crappy movies over and over, I'd watch'em over and over again. The later at night the better, especially if it was some horror or mind fuck flick. Past midnight, I'd watch stuff that I'd never give time during the day. Nightmare on Elm Street 4? Why not, I've got time. Swamp Thing? I've only seen it 15 times, what's one more viewing.

It hit me tonight that Netflix is my new HBO. Insomnia at 3 AM? Why not Don't Look Back, subtitled because it's French, starring The Matrix Reloaded's Monica Bellucci and The World Is Not Enough's Sophie Marceau? I've got nothing better to do.

The perfect kind of late night crappy movie is the one you:

  • Can fall asleep to if you get tired again
  • Don't mind turning off at any point because you really don't care about the story
  • Might show you a bit of skin, no matter how fleeting
  • Is unintentionally funny, so you laugh at it not with it
  • You can watch in the background while you do something else (like write this post)

Plus, Netflix has mostly crappy content and it's getting worse as movie studios refuse to cut deals for newer better streaming content in reasonable timeframes. Which makes Netflix kind of perversely perfect for my late night insomnia needs. I won't be turning it off again if it stays anywhere close to $8/month and keeps the obscure content and/or bad content. And to think, I haven't even entered the time wasteland of TV-MA rated Japanese anime yet!

Wednesday, February 01, 2012

Exhibit A. On Why iOS 5 Newstand Apps Should Always Be Universal

I've had the New York Times app on my iPad since Newstand launched alongside iOS 5. I don't read the content, it's just not part of my workflow. What I love however are the notifications of important events just for having the app installed. The editorial selection is perfect, so I downloaded the NY Times app to my iPhone to get the notifications there as well.

I didn't realize what I downloaded on the iPhone was not a universal app. Imagine my surprise when I got back to my iPad & through the magic of App Store automatic downloads it appears I now have two NY Times!

When the iPad first came out, I would've agreed it was acceptable to ship separate apps for one actual app to pay for the cost of adding iPad features. No more. A universal app is really just table stakes at this point  There's no user experience case to be made for shipping separate iPhone & iPad apps. Multiple apps for the same app just creates user confusion on the App Store, and in cases like this, on the device as well.

And it just looks really dumb in Newstand!

Why External Links Should Maybe Open in New Tabs

UX Movement posted Why External Links Should Open in New Tabs. I've never quibbled with any of Anthony Tseng's advice before, but this time I think he misses the mark somewhat.

True, for the primarily audience of this blog, I think opening external links in a new tab makes sense. I just went back to my posts this year and changed all external links. That's the key though, this decision has to be made based on the audience of the site.

Ever watch an older user or even young but not to savy user get dumped into a new browser tab? This sentence from UX Movement completely applies:

When a new window opens, it covers the user’s earlier window. The user is left confused and wondering how to get back.

Just replace window with tab and it still applies. All these users know is the back button.

So if your trying to appeal to browser savy users, go ahead and open external links in a new tab. If however you're trying to appeal to a broader audience with less browser know how, open external links in the current window or tab.

Tuesday, January 24, 2012

Apple: This Hard to Find Evidence Suggests You Should Release iBooks for Mac OS X

Top Free in the Mac App Store
Look at the image on the left of the Top Free apps in the Mac App Store. Notice anything?

Number 1 with a bullet is iBooks Author. Look further down. Number 5 is Kindle. That's like oil and water. You know what would be nice to have as Number 1 or Number 2. iBooks! iBooks Author and iBooks are two tastes that taste great together.

I can think of reasons why Apple might not release iBooks for Mac OS X, but none of them make much sense to me. If Apple wants to take on Amazon and Kindle for eBook supremacy, they have to broaden the reading platform off of just iOS.

I would have bet real money that iBooks for at least Mac OS X was going to be released at the Education event. Clearly I would have lost big.

I'd like to be able to read iBooks on Mac OS X, even if it's just for the occasional reference. Clearly the Mac App Store proves Kindle book readers aren't just reading on their Kindles.

This is What's Wrong with Hollywood: Where are the biggest box office movies (not) streaming?

Take a look at this compilation of the Top 100 movies of 2011 and where they are available (or not) to legally stream from online. This isn't even a complete list as the studios still frequently will only put the standard definition version of a movie up on iTunes when of course an HD copy is available. Also, support for iTunes Extras is nonexistent or weak.

This is why Hollywood is losing money to piracy. There will always be people that just don't want to pay for content, but the big attraction of piracy to honest people is that it feels like everything is available. It's a better service. Seems very analogous to Napster before Apple convinced the music labels to license a very high percentage of their catalogs at reasonable prices for download. Then you have the studios trying to launch their own streaming service, while continuing to cripple the established services out there.

Hollywood has crippled the legal download sites with this quagmire of availability, SD vs. HD, and little to no price break over buying a manufactured physical disc. Clearly the studios are trying to preserve buying physical discs or make at the least make it more enticing than downloading, but it's just not going to happen anymore. The tide has turned. Add to that the complicated "windowing" that studios try to enforce on home viewing rights, and a lot of consumers just check out.

This should be obvious, but don't the studios get that most people can't and won't keep track of the studios windowing schedule? Once you market a movie, if people want to watch that movie and they can't get it legally and at a fair price, at some point they are probably going to investigate pirating because it bypasses all the studio bullshit.

I'm not supporting pirating, but it's not hard to understand the appeal beyond just not paying for stuff.

I tried to watch Game of Thrones and this is what happened cartoon from The Oatmeal perfectly captures the problem.

Update x2
Andy Ihnatko perfectly captures what I generally try to practice regarding the byzantine content access rules, find something else to do!

Friday, January 13, 2012

Thoughts on 44 days of uptime in Mac OS X 10.7 Lion

Decided going into the Martin Luther King, Jr. Day weekend I would actually shutdown day job MacBook Pro instead of sleeping it like I had every other day for who knows how long. I only thought of doing this to save a battery charge & discharge cycle.

I wondered: "How long have I been running this instance of OS X 10.7 Lion?"

44 days was the answer Terminal command uptime gave. The MacBook Pro hadn't booted since November 30, 2011, a whole other year ago! Probably the last time I had powered it off because of Thanksgiving break.

I was kind of shocked for two reasons. I'm usually doing every 2 week beta OS updates or standard updates that require reboots. I skipped the current round because I really wanted to run stable after the OS X 10.7 Lion, Xcode 4.x, iOS 5 beta trifecta over the summer & fall. More surprising though, rebooting OS X has been completely deprecated in my mind as a useful activity unless forced to. To be fair of course, I've quit cycled a few heavy use apps (here's looking at you Xcode) over this stretch. But the system has remained perfectly usable and stable. If not for the holiday, I would have just slept the Mac like I had done before.

What a contrast to the issue I have with Windows 7 on my iMac that would have necessitated some task killing after a few hours if I was really using the OS day to day.

What I'm really curios about is iOS device uptime. I don't ever turn off or reboot my iPhone or iPad except to install a software update.

I marvel at the software engineering!

Wednesday, January 11, 2012

iOS 5 Dev Warning: UITableView's Multiple Select During Editing Doesn't Work with Swipe to Delete

I attended Session 125 - UITableView Changes, Tips, Tricks at WWDC 2011. I also downloaded the video & slides of that session from the WWDC 2011 Session Videos site  (Apple developer account required) .

You can here it in the video, and being in the room, one of the, if not the, favorite moment for developers at the talk was when multiple select during editing was announced. The announcement starts at 16:51 in the talk video.

Jason Beaver immediately shows Apple's Mail application in edit mode. Why? Because that's what every developer and user that has spent any time in Mail want in their apps when editing lists of user content. 

You would expect, given the heavy references to the Mail app and how it works that what regular developers would now have in UITableView is exactly the functionality Mail supports.

But You Would Be Wrong Because Swipe to Delete is Disabled!
If you do this in your code:

self.tableView.allowsMultipleSelectionDuringEditing = YES;
or change the UITableView property in the XIB for Editing to use Multiple Selection During Editing you don't get swipe to delete.

I have no idea if that functionality was planned at WWDC and got dropped during development. The only hint you get swipe to delete won't work in the iOS 5 release documentation is the following on the allowsMultipleSelectionDuringEditing property (emphasis mine):
The default value of this property is NO. If you it to YES, check marks appear next to selected rows in editing mode. In addition, UITableView does not query for editing styles when it goes into editing mode. If you call indexPathsForSelectedRows, you can get the index paths that identify the selected rows.
So if you don't see the docs, or it just doesn't click on first read that this means no swipe to delete, you might do a whole bunch of work for no reason because you need both multiple select during edit and swipe to delete, I'm only saying this for a friend, of course.

Skeptical? I was too, went through all 7 stages of grief before conclusively proving it. I kept thinking: How could Apple play Lucy with the multiple select football to my Charlie Brown?

Prove it to yourself. Go download Apple's TableMultiSelect sample (Apple developer account required). Open MyTableViewController.m and paste the following three lines in (I pasted after the tableView:cellForRowAtIndexPath: method just to be tidy):

// Override to support conditional editing of the table view.

- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath
    return YES;

- (UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath 
    return UITableViewCellEditingStyleDelete;

- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath 
    NSLog(@"Commit Editing Style");

Run your app in the simulator and true to swipe to delete. It won't work.

Now go to line 74 and comment self.tableView.allowsMultipleSelectionDuringEditing = YES; 

BOOM, you got swipe to delete!

Next Steps
I know, file a radar or GTFO and I will, eventually. I say this not to deride Apple. UITableView is a great piece of UI programming. Whenever designing something of my own, I always ask:
What Would UITableView Do?
I wrote this to warn developers using UITableView's multiple selection functionality at the time of this writing (Xcode 4.2.1 & iOS 5.0.1) is an either or choice with swipe to delete that user's are most likely not going to be happy with. Better to stick with custom implementations unless/until Apple changes the functionality.

An workaround has been found. Default your tableView to not allow multiple select during editing so you get swipe to delete. Then in your viewController's setEditing: method, enable multiple select on your tableView. When editing is done, set your tableView back to not allow multiple select during editing.

Seems like a hack, but I've had a bunch of people tell me it works!

Monday, January 09, 2012

Integrating SharePoint with Twitter on a Corporate Intranet

Thankfully I don't have to know how to integrate SharePoint with anything right now, but if I did, I'd know who to turn to for insight.


John DeGiglio is one of the smartest people I know, and one of the most relentless developers I've ever seen. If you give him a problem, he will solve it. John and I used to write .Net apps together, and he specialized in  SharePoint. He's become an expert over the last 5 or so years.

John's recently published his first public blog articles and CodePlex projects on integrating Twitter with SharePoint.  

Twitter Displays Tweets WebPart

How this WebPart came together is documented in two blog posts hosted by Synergy Online:

Displaying Tweets on your Corparate Intranet - Part 1
Displaying Tweets on your Corparate Intranet - Part 2

John's also restarted his blog Backhand Volley at Unfortunately some good content was lost when Microsoft shutdown MSN/Windows Live Spaces. He didn't get the notification from MS to download his content before it was deleted.

John's also on Twitter @jdegiglio and his Tweets just went public! I expect more SharePoint or tennis focused tweets, John's a huge tennis fan.