Nik's Blog

Geekery, witty insights, software (of dubious quality) and more!

General Geekery

Tech news and observations

Mountain Lion: Initial Thoughts

Apple’s released the first look at MacOS X 10.somethingorother, “Mountain Lion.” Like Lion, it’s a further adoption of iOS technologies at the desktop. Unlike Lion, these adoptions are more than skin deep. Mountain Lion becomes a peer device with your iPad and iPhone. Whether that’s a promotion or demotion of the status of the Mac in your digital life is certainly debatable.

First off, there’s all the new apps. Bringing iMessage into a new iChat replacement, a better to-do manager than iCal’s half-assed handling of the same, and Notes taking on the best of the old Notepad desk accessory and Stickies looks great. Even if I’ll never use most of these things, since I already have half my life in OmniFocus and Evernote, they’re still fine additions.

But then there’s iCloud and Gatekeeper.

Gatekeeper is the most immediately controversial. It simply controls what applications are allowed to be installed, sort of a user security policy. If you want to be able to install applications that are made by developers who have not registered with Apple, you’ll need to change a setting. While this is billed as the “middle ground” between App-Store-Only and the current wide-open standard, I think that misses the point that in order to be able to easily distribute apps, you must register with Apple first.

Next, we have iCloud. Keeping all my files sync’d up across all my Macs without any hard work sounds great. I love DropBox and ChronoSync, and making that system level sounds zippy. Well, except that lots of apps won’t support it at all, especially all of the ones that won’t be distributed through the MAS, which will thereby be ineligible for iCloud.

Not so trouble free, is it?

And in either case, I’ll need to register with Apple, because iCloud’s become a necessity, not the really-just-a-payment-method AppleID of old.

Basically, Apple’s pulling a Google here. They’re taking more and more data on its developers and users, and taking more and more of its consumers’ digital stuff onto its own servers.

This is, I’ll admit, a little alarmist. They’ve always asked for product registration, and an AppleID is pretty much a must-have and with XCode’s distribution on the MAS, a requirement to be a developer. But it still shows a level of personal-level control and management that Apple’s never taken on before.

Using Evernote as a Bookmark Manager

Some time ago, I got sick of my huge bookmark library and dealing with synchronizing it across every browser I have, especially given that one of my few disloyalties to the Apple ecosystem is that I use Chrome instead of Safari, which doesn’t sync in any way with my iPhone. To fix this problem, I signed up for the remarkably good Pinboard service, and used its tools to import my Safari bookmarks. Pinboard was entirely satisfactory, and I recommend it to anyone who wants an easy-to-access online repository of bookmarks. Having all my bookmarks online and available from any computer (i.e. my wife’s PC or other computers when I was a guest at someone’s house) turned out to be quite useful, which was surprising to me.

Where Pinboard didn’t work as well for me is that I clip a great deal of web content to Evernote to keep as notes or research. This meant that I had at least two places to look for what were, essentially, the same thing. (With one just being a little richer in content than the other). Despite Spotlight and the great (and free) delimport utility which let me search both sets of data at once, this wasn’t possible on my iPhone, and seemed simply overly difficult.

So I decided to switch to Evernote as my one and only place to keep track of interesting web content. Evernote was my pick of the two (Pinboard offers a service that will archive and make searchable the content of all of your bookmarks) because it offered local access to all my content, and since it also has a great deal of other valuable information, it lets me easily aggregate combinations of useful information, not only bookmarks.

Since Pinboard and Evernote both excel at import and export of various data sources, it was relatively trivial to put all my Pinboard bookmarks into Evernote. I then went the extra mile and built an AppleScript that went through all of those imported bookmarks and pulled the original web content, which I first “cleaned” using Instapaper’s web viewer, ensuring that I only had the core content and wasn’t storing ads, comments, and navigation menus.

This has worked quite well for me, especially with the Evernote Chrome extension that shows clippings from individual sites as I navigate them and also shows me if I have any notes matching search terms when I search Google or Bing. This makes it stupid simple to find content that I’ve clipped or bookmarked but forgot I’d done so. The addition of the Clearly extension makes it easy to clip only the core content from web pages when I bookmark them (a habit I’ve gotten into, since it ensures the content will survive later deletion/updating or changes in its URL, and also makes it fully searchable). Having all of these pieces of information in one place is, as I expected, very useful, and makes bookmarking a much more useful tool than it ever was before, since I can search it, access it anywhere, and associate it with all sorts of other content through tags and folders.

There are two ways in which it is sub-optimal, however: Firstly, Evernote doesn’t directly launch URL bookmarks in a useful fashion, so I end up searching, opening a note, and then clicking its URL. This leaves me with an open application and selected note, and changing my currently selected note, in order to do what is typically a one-click action. Secondly, Evernote is getting very, very, full. Searching for almost any common search term brings up a dozen or more matching notes. It also falls short in giving me quick access to URLs for sites I visit regularly, so I’ve gone ahead and put those into my browser toolbar and manually updated them in Safari to make sure they get to my iPhone. Since I don’t plan on changing my email service, bank, or favorite social networks any time soon, this works just fine. Auto-completion in the browser has made these bookmarks fairly unnecessary anyhow.

I’ve found two useful work-arounds: I tag anything that I feel is really just a “bookmark” with an un-creatively-named tag of “bookmark.” This makes a search for bookmarks easier, although there’s certainly other clipped content with associated source URLs that are also useful as bookmarks. I have also created a few smart folders which narrow down to notes with URLs and one for notes with the bookmark tag. These don’t bypass the problem of opening bookmarks, but do make it substantially quicker to filter out irrelevant content. I’ve also become accustomed to deleting (or just not clipping) URLs from notes I clip from the web if I’m really just keeping them as reference and I don’t think I’ll ever need to re-visit the site. (e.g. code snippets)

So, do I recommend this approach? Absolutely. It changes bookmarking into research, reference, and a sort of bibliography for my projects and general life.

I’ve also, as you might guess if you’re a regular reader of this site (rather, if you’re THE regular reader of this site – Hi, Mom!), built a few AppleScripts to make my life easier by easily importing original HTML content into notes (with or without Instapaper’s involvement), and also one to export my Evernote bookmarks so that they can be indexed by LaunchBar, and opened without having to launch Evernote at all.

Generate Rich Text in AppleScripts and Shell Scripts

Normally, AppleScript absolutely mangles rich text once it comes in to the system. I have recently discovered a workaround for this, which is the “pbcopy” terminal command. Anything piped to this command will be copied to the clipboard. Normally, this is done only as plain text, but if the incoming data is rich text (has an RTF header), it will come in as rich text. The second part of this is the use of the “textutil” command, which can take text of various formats and output them in, among other formats, rich text. Now, even if you’re limited to only plain text (as in AppleScript), textutil will happily accept HTML, so if you can generate formatted HTML, you can pipe it through textutil and end up with lovely rich text in your clipboard, and it even retains links!

So from the shell, your command is something like:

% echo [html text] | textutil -stdin -stdout -format html -convert rtf | pbcopy

Just make sure that your HTML text is properly escaped.

If you want to do this from AppleScript, you can simply encapsulate the whole thing in a “do shell script” command.

BONUS: You can also put Markdown or MultiMarkdown in the mix to take Markdown-formatted content and convert it to rich text on the clipboard. The following is an example of how this would work with MultiMarkdown:

% echo [markdown text] | mmd | textutil -stdin -stdout -format html -convert rtf | pbcopy

Don't Like Facebook's API? Wait Five Minutes...

Had to update a set of Facebook applications for WCM. (Yup, still freelancing a little for them.) This is the third time these applications have needed a major upgrade to meet Facebook’s ever-changing API – once to migrate from FBML to FBJS, and again to move to Oauth, and no again to meet Oauth 2.0 as iFrame tabs and apps.

Facebook, being the 800 pound gorilla, can do whatever it wants, and the developers who have invested so much in the platform will, ultimately, get in line or just fail entirely. But this really hurts the small developers with modest projects, especially as some of the standby Facebook apps like Static FBML die out and paid services start charging “enterprise” prices.

To Facebook’s credit, they’ve put effort into sunsetting APIs cleanly, with advance warning (sometimes as little as 4 weeks, but usually quite a bit better) and even letting old APIs continue to work… for a while. But they haven’t handled QA at all well, which is exactly where this problem hit.

In the case of this client of WCM, they have a handful of custom, fan-gated tabs, as well as a full blown contest application, which was custom designed to meet their jurisdiction’s gaming regulations. (Otherwise, they could probably get away with any of the other contest apps out there.) When Oauth 2.0 was introduced, Facebook accidentally introduced a boatload of bugs into the supposedly still-supported legacy authorization API, which meant that in the middle of a major promotion, the contest stopped working entirely. This led to a crunch day of moving to the new APIs, which were still buggy as heck and not nearly as feature-rich as the old APIs.

Due to these holes in the API, a great deal of the work had to be custom built using curl commands and manual decoding of returned data, and other nonsense that really shouldn’t have been necessary since Facebook’s published PHP library ought to handle that sort of thing. Luckily, the tab-based apps weren’t affected (they didn’t need to authorize visitors); and since the new API, inexplicably, couldn’t handle fan-gating, they weren’t transitioned.

So now Facebook has killed support for the old API entirely, and requires tabs to move to iFrames (just like applications always have). Because of this, the fan-gating on the tabs (remember, they COULDN’T transition to the new API when it was first released!) broke, and again, WCM was in a crunch with the client since they were in the middle of a major Facebook promotion.

This much is good: The new API, iFrame tabs, and Oauth 2.0, now that they’re mature, are a lot easier to code for than the old system, so the old apps were fairly easy to set up, even though one of them (due to its reliance on non-iFrame-compatible FacebookJS) had to be entirely re-written from the ground up. Everything was no longer on fire within 3 or 4 hours. But there are, of course, lingering bugs due to the major changes in how an iFrame app needs to be managed, which present a substantial challenge to fix, since Facebook’s documentation in regard to these little bugs is limited to the old API – entirely useless.

Okay, enough of my bitching. The end result here is that in order to be a Facebook developer, you need to be on the cutting edge of their API at all times, but only RELEASE when Facebook gets around to making the new API stable and complete, which sometimes doesn’t happen until after they’ve broken your app. Meantime, you’re praying that your clients don’t get stuck with something that just plain doesn’t work because Facebook accidentally introduces bugs/improvements into their legacy API.

As Facebook looks to extend the Facebook platform outside of Facebook, this becomes untenable. If I’m relying on Facebook for users to register for my site, it simply has to work 100% of the time. I cannot be required to update substantial portions of my applications and websites multiple times each year. Doing so doesn’t make me any money, so unless I’m Wildfire or another company that can spread that cost over a large number of clients, it ends up being a drag on resources and revenue. This, of course, is why Buddy Media and the rest can start jacking up their prices from hundreds of dollars each month to thousands, leaving smaller companies to use the low cost tools which end up falling behind the API… same problems. (Ironically, even Facebook’s cut-and-paste social plugins have fallen behind the API and required instant upgrades to new code.)

So what am I doing? Well, nothing at all that’s mission-critical is ever going to be integrated with Facebook. I know there are benefits in hooking these things up, but I can’t afford maintaining these things or losing functionality because I overlooked a blog post. For clients, it’s going to have to be a program built by one of the major Facebook app companies, and they’ll have to cover the cost.

It’s a shame, too. My clients have seen awesome results using some clever custom applications, but if I can’t guarantee a modicum of reliability and uptime, the hit on my reputation will far outweigh a handful of successful campaigns.

Quick Tip: How to Figure Out if You've Already Purchased an App from iTunes

The iTunes App Store will let you re-download an application that you've already purchased. What it does not do, is let you see in advance whether you're going to be charged for it. If you make a mistake, you'll end up purchasing an app that you thought you were downloading for free!

The work-around is simple, but not obvious: Click on "Write a Review" on the app's listing. You can only write a review if you've already purchased the app!

Hope that saves you some money! Thanks to Jmalley on the Whirlpool.net.au forums for this great trick!

Pages

Subscribe to RSS - General Geekery

@inik

inik: RT @chartier: Georgia house democrats introduce a state ban on vasectomies for men. Fantastic: http://t.co/XIoyVv1P >
inik: RT @eshanfelt: New Google glasses by end of the year ... cool, yet somehow disturbing at the same time. #want http://t.co/MR4fLsdZ >
inik: In the next Dan Brown novel, a secret scroll is ultimately found under the 2-year-old's booster seat, covered with creamed spinach. #mylife >
inik: @dcurtis @dcurtisfeed Retweet, please. >
inik: RT @Cabel: The Internet is rough on organized religion, but thanks to churches (that rent steeples to carriers) we all have better cell ... >

Google+

I love Seth's quote at the top. I think that's my new motto.. ; )

Powered by Plu.sr
>
Griping about OS X Lion? Here's two nifty tools that replace a variety of poorly supported third party tools: Command-line and Automator access to video and audio conversion. Super easy to use, and very flexible and supports any format that Quicktime can encode/decode. (So Perian is a must-install if you want to handle DivX/3viX, etc.)

Yes, ffmpeg, Handbrake and...
>
Fix Google Reader's horrible new interface with this user script! Now it fits nicely on my MacBook's small screen. >
Happy 11/11/11 11:11:11! >
What makes this ad awesome is not the true-to-life irony, because the idea is hardly innovative, but rather the excellent execution. Reminds me a bit of that excellent Nutri-Grain spec commercial. Quick delivery, good actors, hit all the high notes. Love it. >