Innovation is a Fight#

Michael Lopp:

Love him or hate him, Scott Forstall’s departure makes Apple a more stable company, and I wonder if that is how [Apple’s demise] begins.

TextExpander's folder-level options

November 01, 2012

Earlier today I asked the following on Twitter:

Is there a way to force TextExpander to ignore non-whitespace chars that prevent expansions? E.g., ” xyz” expands, but “(xyz” doesn’t.

This is the kind of thing that’s driven me nuts forever, and every time I’d go to solve it something would grab my attention and I’d forget about it…until it pissed me off again. Imagine then, my joy (and embarrassment) when my buddy Dr. Drang tweeted this:

@jblanton “Expand after: Any character” and “Expand after: All but letters & numbers” are folder-level options.

What?! *click* *click* *click* Yep, he was totally not lying to me. I’ve been using TextExpander for years, and at a very high, geeky level. In fact, I’ve been using it since before it was even called TextExpander (it used to go by the name “Textpander”). How did I not know about these folder-level options?

I’ve used folders from jump and I guess just never noticed that when you highlight a folder, various options show up on the right, just as a snippet’s content appears when you highlight it. Even after Dr. Drang’s tweet it took me a second to figure out where these preferences were. I started out by right-clicking on a folder and wondering why I didn’t see any folder-specific options.

My guess is that I (maybe) saw these options years ago when I first started playing around with the app, before I started to really push it, and just didn’t realize they might be useful. My usual habit is to create a few snippets and then realize that they’re related enough to be put into a shared folder, which I’d create, drag-and-drop, and then go on my merry way. The options were invisible to me.

All of that said, can someone give me a good reason as to why these Expand after options aren’t available at the highest level?

Anyway, this was an incredibly long-winded and boring way of saying that you should never 1) be too proud to ask for help; and 2) WRITE A BLOG POST ABOUT SOMETHING SO UNINTERESTING AS NOT BEING ABLE TO SEE AN OPTION STARING YOU RIGHT IN THE FACE. (It’s been a long month, folks.)

Cleartones#

Cleartones offers sets of elegant, hand made minimalist ringtones and notification tones for the serious user.

The notifications—both “classic” and “organic”—were an auto-buy for me. They’re absolutely fantastic.

Slate#

Slate is a window management application similar to Divvy and SizeUp (except better and free!). Originally written to replace them due to some limitations in how each work, it attempts to overcome them by simply being extremely configurable. As a result, it may be a bit daunting to get configured, but once it is done, the benefit is huge.

I’ve been using Divvy to great effect for the last couple of years, but I’m giving this a shot because, well, it’s incredibly geeky.

CruxSKUNK, an iPad-based "laptop"#

So, yeah, the name couldn’t be worse, but the product looks pretty damn cool. If you’re in the market for a device that turns your iPad into a laptop (whatever that means), you could do a lot worse than the CruxSKUNK, which probably is the best one I’ve seen.

I’d back it on Kickstarter, but I’m not sure I’m not going to switch to the iPad “Air”, rumored to be announced in a few weeks.

Related: I recently received my GroovBoard and may write up something on it soon.

Design of iPhone 4(S) > 5?

September 23, 2012

A couple of days ago, Ben Brooks said the following at the end of a piece regarding nicks he was seeing on his black iPhone 5:

All of this to say, if you haven’t bought one yet — I’d seriously consider the white model, that’s what I would get if I could do it over again.

Agreed. After having owned the white 4 and 4S, I ordered the black model this time around because, from the pics online, I thought it looked the best. However, I was quickly disabused of that notion once I actually held the black one in my hand. You see, mine was nicked and scratched right out of the box, before I even put my pillow-soft hands all over it.

After 24 hours of use there were a couple more nicks in it, which was incredibly odd, because as anyone who has read this site for any length of time knows, there’s probably no one on the planet who’s more anal-retentive and careful when it comes to handling his toys. (The 4S this replaced looks as perfect as the day I bought it one year ago. There’s not a single blemish on it.) More to the point, I can’t recall this phone ever having touched anything other than my skin and cotton.

Sure, the iPhone 5 might not shatter if you drop it, but the edges are soft, and the paint thin—time will not be kind to these devices.

The aluminum on the black model is anodized/painted black pretty much everywhere but the front glass, and that layer of paint so easily scratches off that I shutter to think what these black models are going to look like after just a week of use by a “normal” person.

The aluminum on the white model doesn't appear to be painted at all, and so the sides, back, and chamfers, while still overly susceptible to nicks and scratches, don’t advertise their warts as much because there isn’t a glaring silver color sitting under a matte black coat.

Anyway, after having the phone for 48 hours I decided that I was going to try to swap it out for the white model. (I had to swap out my white 4S twice to get “good” buttons—even after all of these generations, the buttons are still a crapshoot, which pisses me off to no end.) I went down to a local Apple store, explained the issue, and was walking out of the store with a white iPhone 5 within minutes.

I’ll say this about the white 5: if you really liked the white 4S, you’ll really like the white 5. I think it looks great, and wish I went with it from jump. Unfortunately though, it too had a slight nick on a chamfer right out of the box (though it’s far less noticeable), the SIM tray doesn’t sit flush, there’s a slight gash near the headphone jack (again, right out of the box) and I’m having some button issues as well, just as I did on the black model.

The home button is perfect (unlike the black one I had, which was biased heavily toward the top of the button), but the power button is a little wobbly, and the volume-up button probably is the worst button I’ve ever had on an Apple device. It depresses probably a half millimeter before engaging the actual button underneath. It’s maddening to use, and I can’t stop touching it hoping that it will just right itself. (UPDATE: The day after I wrote this post I again went to an Apple store and swapped this phone for another. Third time was a charm (as with the 4S)—this one is perfect!)

Am I being ridiculous? Depends who you ask. I have serious (likely clinical) issues when it comes to this sort of thing, there’s no doubt about it, but then again, I also paid $650 for a device that I expect to look and operate flawlessly out of the box. Don’t analogize its build quality to a “finely crafted watch” and expect me to roll over when it isn’t perfect.

I think it’s safe to say that between the iPhone 4(S) and 5 there probably isn’t a better made—at volume—consumer electronics device in the history of the world. I just wish production was a bit more consistent, and quality control a bit more rigorous. It’s asking a lot, I realize, but it’s Apple, and I know they’re capable of it.

Poster, a WordPress blog editor for iOS#

If I wasn’t moving away from WordPress, Poster very likely would be the iOS app I used to interface with the venerable CMS. I’m pretty sure it’s the first iOS app for WordPress I’ve seen that handles custom fields and the editing of post slugs, thereby making iOS blog posting/editing a real option for WordPress users. Plus, it’s beautiful.

(If, for whatever reason, you want to continue using the official WP iOS app, but need access to custom fields and post slugs, I hacked together solutions for both a while back; see How to set post slugs with WordPress’ iOS apps and How to set custom field values with WordPress’ iOS apps.)

So my dad calls me...

September 18, 2012

(This is an email a close friend of mine sent me this morning. I knew you guys would enjoy it. So, enjoy.)

So my dad calls me yesterday and he asks for my address. He tells me he needs to sell that old convertible he bought a while back (the one from 1980 that he thinks is awesome). I say, “ok”. Then he tells me that he’s going to mail me some pictures of the car and he wants me to put it on Craigslist.

OK, he’s going to physically mail me some pictures of the car, so I can scan them and put it on Craigslist.

For a second I’m thinking that’s a rather obtuse way of doing things, but alright. Then I ask him, “Hey, why don’t you just take the pictures with mom’s digital camera?”. And he says, “I did, that’s how I printed the pictures. I’m at Walgreen’s right now.”

So, let’s recap:

  1. My dad takes pictures with a DIGITAL CAMERA
  2. Drives to Walgreen’s
  3. PRINTS them out
  4. Puts them in an envelope and drives to the POST OFFICE
  5. Where it will be put on a plane and then driven to my house
  6. So that I can use my iPhone to take a picture of the picture
  7. And upload it to Craigslist.

This is how your family does it too, right?

I fucking love this family.

Use TextExpander to sanitize formatted text

September 16, 2012

This is such a trivial “hack” that I debated even writing about it at all, but whatever.

At work, I often have to copy and paste between apps stuff that has wildly different formatting (e.g., rich text, HTML, plain text, etc.), and, depending on what I’m pasting into (e.g., a spreadsheet, an HTML email, a Word doc, etc.), this can cause some serious headaches.

If I want to strip the formatting, one obvious solution is to just paste into a text editor, and then copy/paste out of it. But, well, that’s a lot of steps. An easier, almost mindless solution is to create a new TextExpander snippet that outputs only the contents of the clipboard, in plain text.

To do this, set the menu located just above the snippet body to “Content: Plain Text”, and set the body of the snippet to %clipboard. That’s it. When you want to keep the formatting, simply paste the contents; when you want to strip the formatting, invoke the snippet.

UPDATE: Of course there are a million ways to accomplish this, and my buddy Ben wrote up a couple of different methods, one using LaunchBar and one using Keyboard Maestro. Also, Twitter follower, Josh Whittington, reminded me that within most Cocoa apps, ⌘⌥⇧V will “Paste and Match Style”.

Deadweight#

Deadweight is a CSS coverage tool. Given a set of stylesheets and a set of URLs, it determines which selectors are actually used and reports which can be “safely” deleted.

Multiple Octopress blogs, one Amazon S3 bucket

September 13, 2012

Because of work I had to take a week off from this whole migration thing (I was in DC without my personal machine), but I’m slowly getting back on the neckbeard wagon. I’m still debating between Squarespace and Octopress, and along the way I’m basically just building up solutions for both platforms, so my site is kind of mirrored three ways right now.

Github Pages is a non-starter

A couple of days ago I concluded that hosting Octopress at Github Pages probably wasn’t an option for me; I need to run both my regular blog and photoblog, and as far as I can tell there’s no way to put a repository within a sub-directory of another repository, which I’d need to do if I wanted the photoblog to reside at /photos.

You might be thinking (but likely not!), “Hey, dumb shit, why don’t you keep a single Octopress instance and use categories to distinguish the two blogs?” Sure, that’s a great option, but for the fact that Octopress doesn’t support pagination of category pages (and I’d want that for the photoblog). Sure, it can be hacked together (see also), but it’s not pretty, and adds a layer of complexity to the system that, frankly, I’m trying to get away from.

Another option might be to insert some extra stuff into the YAML Front Matter of individual blog posts, and then if/else around them in the template code, but I think that could get a little hairy, especially if I want to style the photoblog a lot differently than the regular blog.

Amazon S3

As some of you know, you can host static websites with Amazon S3. The initial setup is relatively painless (I didn’t even have an Amazon Web Services account before getting all of this working in an evening), though pushing your Octopress files to the S3 bucket can be a little tricky.

The basic steps are this:

  1. Install s3cmd, which is a CLI tool for interfacing with Amazon S3.
  2. In your Octopress installation, modify Rakefile to include a deploy_default = "s3cmd" line and an s3_bucket = "name of bucket" line.
  3. Add the following code to Rakefile:
task :s3cmd do
  puts "Deploying to Amazon S3 [#{s3_bucket}]"
  ok_failed system("s3cmd sync --acl-public --reduced-redundancy public/* s3://#{s3_bucket}/")
end

That’s all you need to start pushing your first blog to Amazon S3. To get an additional blog working within a subdirectory of the same bucket, you need to repeat the above steps from within the second blog’s Octopress installation, and then add the subdirectory you want to the code in step 3, like so:

ok_failed system("s3cmd sync --acl-public --reduced-redundancy public/* s3://#{s3_bucket}/SUBDIR/")

Then, in _config.yml, you’ll want to add the sub-directory name to the url and permalink variables (assuming you want the permalinks for this blog to include the subdirectory). Finally, you’ll want to leave root set to “/”.

That’s it—two blogs, one bucket.

Everything is Incredible#

This is a beautiful, if not somewhat tragic, short film about a disabled man and the helicopter he’s been building for the last 50 years. Prepare to be moved.

The first comment captured my thoughts exactly:

In ten minutes your film encompasses the tragic beauty of the act of creation. All the pain, joy, and fear an artist feels is bared for the world to see and in turn reflected back at those who have felt the bliss of creation.

725 precision-matched inlays#

Never before has this degree of fit and finish been applied to a phone. Take the glass inlays on the back of iPhone 5, for instance. During manufacturing, each iPhone 5 aluminum housing is photographed by two high-powered 29MP cameras. A machine then examines the images and compares them against 725 unique inlays to find the most precise match for every single iPhone.

This is just the kind of thing that makes this perfectionist, anal-retentive bastard swoon.

I'm leaning towards Squarespace

August 25, 2012

After that 2200-word piece earlier this week about wanting to make the move away from WordPress to either Jekyll/Octopress or Squarespace, Squarespace reached out and gave me access to their Template Developer Kit (TDK), which likely will be released soon to everyone.

After having spent quite a bit of time hacking away at the template files and learning my way around the system, I can say that you have control over pretty much everything. This is great news, and was kind of a requirement for me (and surely many others) to even consider the platform.

I’m still trying to determine how to handle the photoblog, and my decision will depend on figuring out how to style separate and custom Squarespace “collections,” or at the very least query for category names.

One thing I’m still a little uneasy about is getting my data out of Squarespace should I ever decide to move the site. A few days ago, they wrote a blog post titled, Your Data, Everywhere, which went a long way towards easing my concerns. The take-away quote:

As a platform, we’re fully committed to both data extraction and portability, so you can move as you wish and get your data to where you need it.

That’s exactly what I like and need to hear. That said, I just tried the WordPress exporter and have a few issues with its output. It’s nothing that can't be easily fixed, but it’s just one of those things that gives me slight pause.

The first issue is that for linked-list posts, the source URL isn’t exported at all, and there’s otherwise nothing to distinguish it from a regular post. I realize that WordPress doesn’t have native support for linked-list posts, and so for this to work at all, Squarespace will just have to decide on a convention for distinguishing its “passthrough” posts from regular posts in the WordPress export. This could be as simple as adding a <passthrough> element to linked-list items, whose content would contain the external link.

The second issue is that the slugs include the permalink structure you’ve chosen. For example, if your site’s permalink structure is /year/month/slug, then the export defines the slug as the slug + the year and month (i.e., /year/month/slug). This obviously will present a problem when moving to a new system, where, if you define the permalink structure the same way, you’ll end up with links that look like /year/month/year/month/slug.

The final issue I saw is that the export injects some HTML crap into the beginning of each post’s <content:encoded> section, though it seems to do this only on Markdown posts (you have to write in either Markdown or Rich Text), and not on the posts that I imported into the system, which were all in HTML. This is what I’m seeing at the top of Markdown posts, right before the actual content:

div class="sqs-layout sqs-grid-12 columns-12" data-type="post" id="post-50348b0384aea193bcb76b8d"><
div class="row sqs-row"><
div class="col sqs-col-12 span-12"><
div class="sqs-block markdown-block" data-block-json="&#123;&quot;html&quot;:&quot;

Like I said, all of this stuff is relatively easy to fix, so it’s not the end of the world … but it must be fixed.

From WordPress to Jekyll/Octopress or Squarespace?

August 21, 2012

Slowly, but surely, the migration is happening. To which platform, I’m not entirely sure just yet, and was hoping you might be able to help me make that decision.

As some of you might know from my Twitter comments the last few weeks, I’ve put a lot of time and energy into proving to myself that my 3000 posts can be migrated both to Squarespace and to a static, database-less site (in my case, Octopress). I’ve been able to migrate successfully to both of these, but both took a lot of work. (More below.)

The reasons for me wanting to make this move are legion. Currently, this site is hosted at Slicehost, where I have a VPS. This basically means that I have root access to a portion of a Linux machine that I share with a few other people, and have to maintain the entire web stack myself (e.g., Apache, MySQL, PHP, XCache, etc.), and other system-related stuff like SSH.

Frankly, I’m just tired of having to upgrade WordPress (and then make all of my little one-off modifications each time I upgrade), tired of having to manage memory on the web server, tired of having to think about whether something I do is going to break the site in some fatal way that I simply don’t have the time these days to fix. The list goes on and on and on. I just want to write.

One of the biggest concerns I have regarding transferring this site to another platform is maintaining the permalinks to the content I’ve worked so hard to create. This issue is two-fold for me: justinblanton.com links need to redirect to corresponding hypertext.net links, and the permalink structure at the new place must be the same as the structure I’ve always used (i.e., /year/month/slug).

Regarding the first concern, moving from justinblanton.com to hypertext.net last year wasn’t too bad, because I was able to handle the jb → hypertext redirect directly in Apache, but this time I might not have that ability (depending which route I take). It may be the case that I have to do some sort of registrar-level redirect, where the requested permalink would break, but the user would end up at the correct site, where he could maybe search for what he originally requested. Clearly that’s not ideal, but I might just have to bite the bullet at this point and give up my obsession with perpetual “backwards compatibility”.

Regarding the second concern, I’ve been able to take care of that through both potential hosting options; all permalinks will remain the same.

One last wrinkle is my photoblog, which is powered by a modified Pixelpost. I discuss this hurdle at the end of this post; I bet you don’t make it that far. ;)

Squarespace

Ideally, I think Squarespace is where I’d like to end up, because it would offer me the most peace of mind. I’d never have to worry about upgrading or maintaining anything. All I’d be in charge of is the design (which, as you guys know from reading my site, doesn’t change too often), and the words. That’s it.

Importing

For the past couple of years I’d create a throwaway account every few months and try to import my WordPress blog to Squarespace, and it always broke. Every time. (Not sure if that had to do with the volume of posts, or because I had a mix of post types.) The latest version of the importer doesn’t let you specify an export file to import—you have to point the importer to your WordPress site, where it uses WordPress’ xmlrpc.php to slurp down all of your content. This means you can’t cut your export file into smaller, date-delineated chunks, to better help you understand where and why the importer is choking. This, coupled with the fact that when the current importer fails, you might have no idea why, meant you were kind of screwed if the import broke for any reason.

After complaining about this on Twitter a couple of times, the CEO of Squarespace reached out to me directly to see if he could help. This blew me away. After some rather technical back-and-forths via email over the course of a few days, wherein I explained exactly how the importer should distinguish between regular posts and linked-list posts, and how each should get added to the Squarespace system, he emailed me and told me to give the importer another shot.

This time it worked like a charm. All ~3000 posts were sucked into Squarespace and I was rockin’ and rollin’. Incredible. Relatedly, I also explained to him, generally, how the DFLL plugin works (it’s similar to my homegrown linked-list solution, and is the most popular WP plugin for doing linked-list posts), and so the importer should now handle WP blogs that use it.

(No matter which system I end up using for this site, I’ll never forget the CEO reaching out to me, listening to my proposed solution, and having it implemented. I’ll be forever impressed by and appreciative of that level of support.)

Potential Issues

  • Squarespace 6 feels half-baked to me. The LayoutEngine is badass, but, at this point, kind of limited. There are only a few templates to choose from, and each can be modified only so much (and the modifications available for each template are different). It’s maddening. Yes, you can provide custom CSS, but it’s impossible to do without using Firebug (or similar) to dig around and figure out the selectors, and even then you still can’t control, for example, exactly what content gets shown in a sidebar. I’m fairly confident that their developer TDK will resolve most, if not all of these issues, but I don’t know for sure, and I’ve no idea when that’s going to be released.
  • There’s no publishing API just yet, which means I can’t use MarsEdit, the app I’ve used for the past ~five years to publish to this site.
  • I don’t think the iOS app lets you define a slug for a new post, and I don’t think it lets you create linked-list style posts.
  • You can’t type posts in HTML. Only Rich Text or Markdown.

Jekyll/Octopress

In the last year or so I’ve seen a lot of neck-beards make the move to Jekyll, and every time it’s caused me to pause and think about doing the same. Jekyll describes itself as follows:

[A] simple, blog aware, static site generator. It takes a template directory (representing the raw form of a website), runs it through Textile or Markdown and Liquid converters, and spits out a complete, static website suitable for serving with Apache or your favorite web server.

Octopress, which is built on top of Jekyll, describes itself as a “Blogging framework for hackers”, and as you might imagine, this appeals to me greatly.

One of the big draws of this system for me is that maintenance would be minimal and I could serve the files from damn near anywhere, including, for example, Github Pages (totally free) and Amazon S3 (super cheap); in other words, I wouldn’t even have to have a proper web host. Moreover, to publish a new post I simply create a new file, supply the relevant YAML Front Matter, write the post, save the file, and execute rake deploy and rake generate. Those commands cause Octopress to re-build (on my personal machine) the site’s pages and upload them to the server. Slick.

Another big draw for me is the templating system. Implementing your custom design is fairly straightforward once you’ve spent a little time snooping around the files that control the way your site looks, and you can do nearly all your modifications on “custom” template and CSS files that don’t get overwritten each time you upgrade Octopress. Relatedly, distinguishing between regular posts and linked-list type posts is as simple as having an if statement in your template file(s) check for the existence of a particular line in the YAML Front Matter (in my case, a line that begins with “external-link:”).

From the WordPress DB to 3000 files

With Jekyll, and similar systems, each post is contained in a file, where the filename controls the publish date and slug attributes of the post. As you can imagine then, the biggest hurdle to having a static site like this work at all is exporting my huge WordPress database—which includes both regular posts and linked-list posts—into the individual files required by Jekyll.

I tried a slew of different import/export scripts, but every damn one of them broke, some violently. I eventually settled on exitwp.py from Thomas Frossman. I ran into a ton of unicode issues, which I ended up having to sort out by loading my massive WP export file into BBEdit, and doing a lot of finding/replacing.

The biggest issue, though, was getting the importer to make a distinction between regular posts and linked-list posts, and having that distinction reflected in the YAML Front Matter of each post’s file. It’s embarassing how long it took me to get this working (in my defense, had I been at all familar with the libraries used by exitwp.py, it would have taken a lot less time), and it required not only a not insignificant modification of the source code (I’ll post this for others if there’s any interest), but also a modification of the XML in the WP export file. (Having multiple <postmeta> entries for each post is kind of a nightmare.)

Potential Issues

  • I worry a lot about how difficult it may be to get all of this stuff back into some sort of database in the future should I decide to move to a non-static system.
  • Might be a little overkill to completely rebuild/upload the entire site each time you publish a new post. (Yes, there are ways to avoid this, but I haven’t spent much time looking into it at this point.)
  • I probably could figure out a way to post from iOS, but there’s no way it wouldn’t be incredibly kludgy and likely more effort than it’s worth. (Related: there’s a project called OctoMars that would let me use my beloved MarsEdit to post from my Mac.)
  • Explaining to people how the site works. ;)

The photoblog

My photoblog is very important to me, and so it’s weighing heavily on my mind as I try to figure out where to go. Unfortunately, neither place is ideal, and ultimately, the “solution” I go with likely will be implemented the same way no matter the system. (See last section below.)

When I first started thinking about getting away from WordPress, I actually thought about going to WordPress Multisite. Huh? Let me explain. I was entertaining the idea of converting my photoblog from Pixelpost to WordPress, and setting up WP Multisite (which, as the name implies, allows you to have multiple WP blogs in one WP install) at WP Engine. The upside to WP Engine is that it basically is a fully-managed solution (and I’d be using WP, which I know quite well), but I wasn’t totally sold on it being around for the long haul, and its damn expensive.

I’ve thought a bit about not hosting the photoblog myself, and maybe going to something like 500px, but I’m just not sure I like the idea of that kind of site (with likes, comments, etc.) where I can’t control fully its look.

Photoblog at Squarespace

Ideally, I’d just create a separate blog at Squarespace, point it to /photos, and have the index show the posts in a grid, where each post has associated with it a thumbnail of that post’s photo. Unfortunately, I just don’t see that that’s an option right now with SS 6, but maybe eventually with the developer TDK? I just don’t know.

Likely solution (using either Squarespace or Octopress)

I think I’ll probably end up creating a “photoblog” category, put all of my photoblog posts into the regular blog, and then just filter them out when viewing anything other than the /category/photos page. (I’m not entirely sure if that’s even possible with Squarespace.) If I did this, I could create a page that would live at /photos, which would contain a grid of thumbnails that each linked to the respective photoblog post. Of course, this would have to be done completely manually, but I don’t post to the photoblog that often, so it’s definitely doable.

Help?

If you’ve any thoughts on this, I’d love to hear them. Reach out to me either on Twitter or via email. Thanks.