Vincent Gable’s Blog

October 14, 2009

Misunderestimating the Cloud

Filed under: Programming,Quotes,Security | , , , ,
― Vincent Gable on October 14, 2009

Recently, a Microsoft datacenter lost thousands of mobilephone user’s personal data.

A common response to this story is that this kind of danger is inherent in “cloud” computing services, where you rely on some service provider to take care of your data. But this misses the point, I think. Preserving data is difficult, and individual users tend to do a mediocre job of it. Admit it: You have lost your own data at some point. I know I have lost some of mine. A big, professionally run data center is much less likely to lose your data than you are.

Ed Felton

It’s easy to convince yourself of this anecdotally. Look around you, how many people people that you loosely know on Facebook have you seen complain about losing all their contacts when they lost their phone? I’ve seen at least a dozen such announcements. But nobody I actually know has been affected by this recent fiasco, or complained about losing contacts in any other “cloud” failure.

But people have a bias to overestimate risks they can’t control, and underestimate risks they can control. So we reinvent the wheel, and lose our own data ourselves.

Hey, I do it too. Actuarially, I really should be paying wordpress.com to manage this blog.

October 12, 2009

Don’t Check malloc()

Filed under: C++,Cocoa,iPhone,MacOSX,Objective-C,Programming,Quotes,Tips | , , ,
― Vincent Gable on October 12, 2009

There’s no point in trying to recover from a malloc failure on OS X, because by the time you detect the failure and try to recover, your process is likely to already be doomed. There’s no need to do your own logging, because malloc itself does a good job of that. And finally there’s no real need to even explicitly abort, because any malloc failure is virtually guaranteed to result in an instantaneous crash with a good stack trace.

Mike Ash

This is excellent advice. Peppering your code with if statements harms readability and simplicity.

It’s still a good idea to check large (many MB) mallocs, but I can’t imagine recovering gracefully from a situation where 32 byte memory allocations are failing on a modern desktop.

October 6, 2009

‘Yum!’

Filed under: Design,iPhone,MacOSX,Programming | , , , , ,
― Vincent Gable on October 6, 2009

I give Microsoft’s current Mac software some shit, but I think it’s deserved. So it’s only fair I mention their glory days.

From “Classic” Mac OS 8.1 in 1998 through Mac OS X 10.2 Microsoft’s Internet Explorer (for Mac) was the default web browser Apple chose for Mac OS. The very fist iMac? It came with IE:mac, just like the first version of Mac OS X.

And IE:mac wasn’t so bad, for it’s era. (It was the first browser to have color correcting PNGs, by the way!) There was one really neat feature that I think is worth calling out: it would match your iMac’s color, automagically.

Technical Details That I Only Half Remember

If you have a better understanding of how this worked, please let me know! I couldn’t find any details online. Mostly, I’m writing down what I remember before I forget.

The poorly named Gestalt function lets you check information about the Mac OS runtime, like “what version of Mac OS is this?“. You pass it a FourCharCode, and replies with a 32-bit value or an error code — old stuff from the “Classic” Mac OS days.

There was an undocumented code, 'yum!' 1, that returned the color of an the iMac or iBook case. IE:mac would check this when it first started, and choose a color scheme to match the operator’s Mac. It was a seamless personal touch that really impressed me.

It’s the sort of thing I’d like to see more of on today’s multi-colored iPods and iPhones.

1It might have been 'Yum!', I don’t remember exactly, and Gestalt() returns gestaltUndefSelectorErr, -5551, for all of variations on my MacBook Pro under Snow Leopard.

October 5, 2009

Disclosure Of Amazon Affiliate Linking

Filed under: Announcement | , , , ,
― Vincent Gable on October 5, 2009

Today the FTC ruled that bloggers must disclose “material connections” to products they review. More complex regulations are a pain, but I’m in favor of increased transparency.

So, in solidarity with the ruling, I’d like to disclose that I use AmazonAssociates program when I link to stuff on Amazon.com.

Amazon Affiliate Linking

Here’s how the program works. I make my links to Amazon products, “affiliate links”. If you click one then buy the item, I get a kickback (usually 4% the purchase price). I do not get paid if you click the links, only if you click the links and buy the item. I do not get paid just for showing the links on my blog. I don’t get paid if you decide the buy the item a few days later, and navigate to it without clicking a link on my blog.

To date I’ve “made” $1.73 over about 3 years; but Amazon won’t disburse payments under $10, so I’ve yet to see a single cent.

Why I Bother

There are books and items that I think are worth linking to. Whoever I link to gets a (microscopic) boost from my blog. I like that Amazon gives me something in return — at least in theory. And that’s why I take the time to use affiliate links, even though I’ve gotten a $0 return for 3 years of work.

Yeah, I guess there’s some unbridled optimism in there too. If I could only be one of the top 100 technology blogs, I’d have enough readers to actually make money.

I also generally feel comfortable linking to Amazon.com. Their prices aren’t always the best, but they’re competitive on the whole. Their service is the standard for online resellers. I figure readers have a very good idea of what they’re getting if they buy from them. And yes, sometimes I do direct people to buy somewhere else.

And to be absolutely clear, everything I’ve reviewed or recommended to date was purchased with my money. If I’m lucky enough to get gifts from some amazing company (hint!), I’ll disclose it in my review.

Summary

If any link on my blog points to amazon.com (like this), I get a small (usually 4%) commission off the item iff you buy it immediately after clicking the link.

« Newer Posts

Powered by WordPress