Thursday, February 07, 2013
Developers Don't Ever Do This on iOS to Hint Interface Rotation
Wednesday, January 23, 2013
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. Box.net 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
- (BOOL)aTerribleMethod:(NSString *)iDontKnowWhatImDoingIf you've ever written something like this, please quit programming.
{
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
bail:
}
Monday, September 10, 2012
LLDB Custom Object Summaries Implemented Using Python, not Objective-C
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
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
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
http://www.hitfix.com/motion-captured/watch-keanu-reeves-shares-some-insights-on-the-digital-vs-video-debate-in-side-by-side
Own Your Words
Friday, August 10, 2012
Of Course I Would Get Punished The One Time I Buy Music from Amazon
I had some MP3 download credits through movie ticket purchases, so I finally decide to spend them and this:
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.
Simple.