Archive for January 7, 2013

Monday, January 7, 2013

Dependency Injection Is a Virtue

Marcel Weiher rebuts David Heinemeier Hansson:

Having hard-coded class-names like in the example is effectively the same as communicating via global variables. DHH’s suggestion of stubbing out the Time class’s now is selling us mutable global variables as the solution to global variables. Or more precisely: passing an argument to a method by modifying a global variable that the method reads out and restoring the state of the global variable afterward.

Mac App Store: Year Two

Federico Viticci:

A full year after that post, I believe it’s safe to say one word epitomizes Apple’s 2012 with the Mac App Store: uncertainty.

The biggest surprises for me are that “App Store” app itself remains unreliable and that there’s still no way to gift apps. We still don’t really know the full effect of mandatory sandboxing because so many apps in the store remain unsandboxed.

Should Error Messages Apologize?

There’s now a User Experience Stack Exchange (via Joel Spolsky):

We are having a discussion on our team about an error message that says “Sorry, you do not have permission to access this feature. Please contact your administrator for assistance.”

Is it appropriate to use language of “apology” in this instance? The rationale against it is that it would be more appropriate to “apologize” for something that would be considered solely the “fault” of the application such as downtime (“Sorry but our site is currently unavailable…please try again later”).

Geofencing in Flickr

Dr. Drang:

Because I have this pseudonymous presence on the ’net, my reason for keeping certain location data hidden is obvious: I take a lot of photos at home and at work, and although I often want the photos themselves to be public, I don’t want those locations known. And even if you use your real name in your blog or on social media sites, that doesn’t mean you want everyone who sees you photos to know exactly where you live. Geofencing is the solution.

Flickr lets you draw circles on the map to designate areas for which your photos’ location data should be hidden. However, you’ll also need to make sure that you don’t allow the public to download your originals, as the location data is also in the EXIF.