Two Thousand Fourteen is the year we all take back ownership of our data, or so I’ve been hearing, anyway. Whether or not that is any sort of official marching order for content creators for this year, it is a sentiment I can get behind.

For those of us creating content that we post online, why do post so much of it only to services which we have little to no control over the fate of? Services that we can’t pay money to use—even if we wanted to—so they reserve the right to use our content in ways that may be unsettling to us. Of course, I’m talking about services like Twitter, Facebook, and Instagram (nobody really uses Google+, right?).

Is all that content we’re creating so ephemeral that it’s not worth hanging on to?

Of the services I listed, Twitter is the only one I use with any regularity. My relationship with it has been pretty durable, too. I’ve been posting there regularly since 2008. I find value in occasionally going back over my old tweets when I remember that I posted something I found interesting, something which I’d like to dig up again because I can’t quite remember it. The trouble is, Twitter’s search is useless for searching through your tweet archive. There are otheroptions to help with this problem, but they are somewhat clumsy tools, in that they retrieve and keep copies of what was posted to Twitter. They still don’t provide you with a sense of ownership of the content you authored and posted.

When I look at the body of content I’ve produced and posted to Twitter over the past 6 years as a whole, I begin to look at each of those items in that corpus less as tweets and more as short notes. In this view, it doesn’t make much sense to me to have Twitter be the canonical source of that content, particularly if it something I’m posting which I think may come in useful at a later date. It’s something I, as its author, should have the original source of. Because of this, going forward, I’ll be posting these short notes in the Notes section on this site.

I still love Twitter, though, and don’t want to leave it behind. It’s still valuable to me as a broadcast platform and a place for public conversation. I’d still like to post—or, rather, syndicate—my short notes there. That’s why I’ve implemented POSSE for them.

The rest of this post is going to be a bit more nuts-and-bolts oriented, seasoned with implementation details. If that sort of thing makes your eyes glaze over, feel free to stop reading. I won’t be offended.

POSSE is not a particularly new idea. A clumsy acronym though it is, it stands for Post on your Own Site, Syndicate Elsewhere. I first came across this idea last month in a piece by Chloe Weil in which she describes implementing POSSE on her own site to post short, Tweet-like entries and syndicate them to Twitter. Chloe is not the first to do this, though. Tantek Çelik has been at it since early 2010, and others have followed suit, not only with Tweets, but full blog posts, too.

The sort of moving parts POSSE requires in order to function aren’t available by default in Statamic, my CMS for this site. It does, however, offer a fairly robust API which you can utilize to author your own add-ons (Statamic parlance for plugins). So over the past few weeks, I’ve cobbled together a workable system for syndicating my short notes to Twitter.

The first thing I did was to set up the Notes section. I wanted to pre-populate it with my existing Twitter archive, creating one entry for each tweet in the archive. Twitter offers each user the ability to request an archive of their tweet history, so I did exactly that. Within a few seconds, I had a bunch of JSON files, each representing a month’s worth of tweets. Since I wanted each tweet to be an individual entry in the notes section, and Statamic expects each entry to be a Markdown file, I pieced together a PHP script which read through the JSON files and generated a .md file for each tweet. I quickly had over 2,200 .md files which I dropped into the new notes section1 and voilà—instant tweet archive2!

Now that the Notes section will be the canonical source of useful3 short-form content I write going forward, I needed to set up a way to syndicate new posts to Twitter. In order to make it all work, there were a couple of things I needed in place:

Set up a way to auto-generate titles and slugs for each note.

The ability to set up a short link to the post.

A mechanism to post the entry to Twitter as a new tweet.

The first point isn’t so much a necessity of POSSE, but rather, a need to reconcile the format of short post content with the needs of the CMS. Statamic requires each entry to have a title and a slug4, like a typical blog post. Tweets, and things that take a similar form to tweets, like the short notes, don’t typically get proper titles—it’s just the tweet/note text. As for the slug, in the case of a tweet, its slug is its ID, or identifier in the Twitter’s database. Since Statamic doesn’t use a database, you’ve got to provide a slug. To satisfy the CMS, I wrote a bit of JavaScript which truncates the first couple of words of the note into a title, and I generate a short unique slug based on the time the note is authored. It ends up looking something like KRyRb. Both are populated automatically by the JavaScript when I author a new note.

Moving on to the second point, one of the basic tenets of POSSE is the idea of original discovery. That is, when you post something and you syndicate it out, you provide some way to identify the original source of the content. Permashortlinks and their cousins, permashortcitations, are used to create references back to the original post. A permashortlink is a short URL points to the original post, typically rendered as a hyperlink. A permashortcitation is a unlinked, text only shortener of the permashortlink, and is included in a syndicated copy of a post when that copy of the post is displayed in its entirety. If you have a permashortlink like http://mub.io/KRyRb, the permashortcitation of it would look like (mub.io KRyRb)5. For the note at that permashortlink, you can see the permashortcitation in the POSSE‘d tweet.

Of course, to do that, I needed a short domain, so I purchased mub.io. I also needed a URL shortener service. In keeping with the ethos of owning your own content, I opted to build my own rather than tie the domain to an external URL shortener service. Once I had that up and running, I hooked into the publish event back in Statamic. I send the URL of the new post over to my domain shortener and get a short URL in return. It gets saved along with the post, as well as tacked onto the copy of the post that gets syndicated to Twitter. Which brings us to step 3.

If the post is short enough to be fully displayed as a tweet, the permashortcitation gets appended to the tweet, otherwise the permashortlink gets tacked on. This allows people who see the partial post as a tweet to follow the link back to the note on this site so they can read the whole thing. Of course, now that the tweet version of the post has been constructed, it needs to be posted to Twitter. I set up application-only auth credentials on Twitter so I could use its API to post new content to my timeline from this site. Using those credentials, I wrote a bit of PHP utilizing the awesome TwitterOAuth library which makes the post on my behalf when I publish a new note in Statamic. The response from that posting returns metadata about the new tweet, including its ID on Twitter. That ID gets saved along with the note so I can then create links to view, favorite, reply or retweet the syndicated tweet on Twitter from my original post.

Now that all that is in place, the process is complete. The note gets published here, it gets a shortlink and it gets syndicated out to Twitter. I have the original post in a Markdown file that I can keep as long as I have disk space to keep it on. POSSE, baby. It’s a bit of a rigmarole get it to work, but it feels good to have a sense of ownership.

I’ll refine the moving parts as I utilize this more, and am thinking of ways to POSSE more content, like my photos I post to Flickr. If you’ve done anything similar, I’d love to see it. Send me a tweet and let me know!

I did have some reservations over the potential performance hit of a dropping a few thousand entry files into Statamic for it to chew through. I considered using a database in which to store the notes, but was pleasantly surprised to see that the speed to load the pages averages around 2 seconds. Not exactly blazing, but still acceptable for now. I’d still like it to be faster, though. As Fred suggested, this sort of thing is an edge case for Statamic, and it would probably perform best with a database. Given that Statamic’s philosophy is to be a flat file CMS, that doesn’t feel right to me. I’m more inclined to implement a caching layer rather than add a database as a sidecar to a Statamic site. ↩

I’m not displaying @ replies in the short notes section, so that brought the archive of tweets I’m displaying from about 2250 down to around 1450. ↩

I don’t intend to post everything I would normally tweet as a note. Retweets, @-replies to people, and silly tweets like this one will by in large still get posted directly on Twitter. Things which I think may be useful or interesting both now and at a later date will get posted here as a Note and POSSE‘d to Twitter. ↩

The slug is the part of the URL, or address of a web page, that identifies a particular page within a section. In the case of this post, the section is journal and the slug is online-homesteading. ↩

The whole point of the format of a permashortcitation is that it doesn’t get converted to a link when it gets posted on a service like Twitter. If you syndicate a post to another service, it’s poor form to include a fully fledged link to the original post if the reader isn’t going to see any additional content when they follow the link. If they really want to, they can copy the permashortcitation without the parenthesis and replace the space with a slash. That turns it into the permashortlink, which will bring the reader to the original post. ↩

Bruce had me up to three miles a day, really at a good pace. We’d run the three miles in twenty-one or twenty-two minutes. Just under eight minutes a mile [Note: when running on his own in 1968, Lee would get his time down to six-and-a half minutes per mile]. So this morning he said to me “We’re going to go five.” I said, “Bruce, I can’t go five. I’m a helluva lot older than you are, and I can’t do five.” He said, “When we get to three, we’ll shift gears and it’s only two more and you’ll do it.” I said “Okay, hell, I’ll go for it.” So we get to three, we go into the fourth mile and I’m okay for three or four minutes, and then I really begin to give out. I’m tired, my heart’s pounding, I can’t go any more and so I say to him, “Bruce if I run any more,”—and we’re still running—”if I run any more I’m liable to have a heart attack and die.” He said, “Then die.” It made me so mad that I went the full five miles. Afterward I went to the shower and then I wanted to talk to him about it. I said, you know, “Why did you say that?” He said, “Because you might as well be dead. Seriously, if you always put limits on what you can do, physical or anything else, it’ll spread over into the rest of your life. It’ll spread into your work, into your morality, into your entire being. There are no limits. There are plateaus, but you must not stay there, you must go beyond them. If it kills you, it kills you. A man must constantly exceed his level.”

It’s from a book called The Art of Expressing the Human Body, which compiles notes and stories from Bruce Lee. While the quote may come off as sounding high-minded or too hardcore to take too seriously, I think that it’s a powerful thing to remember during those times you find yourself stagnating. For me, anyway, it’s the sort of mental kick in the ass I occaisionally need to push me forward during those moments.

In recent months, I’ve worked on a few different projects which utilize AngularJS as their foundation upon which to build. The first one ended up being highly complex—and is still ongoing—and I was totally unfamiliar with utilizing Angular, or even how to think about using it effectively. Previously, my application programming experience centered on DOM manipulation, AJAX requests, callbacks and server side templates—not always utilizing jQuery specifically, but doing the kind of things that jQuery excels at. Coming from that mindset, it was a real struggle to get comfortable with Angular and begin to find my legs with it.

Through tutorials, trial and error, as well as dogged persistence, I eventually did find a level of ease and familiarity with Angular, but I wish I had found this Stack Overflow answer while I was learning the basics. One choice cut:

First know that single-page applications are applications. They’re not webpages. So we need to think like a server-side developer in addition to thinking like a client-side developer.

If you’re comfortable with jQuery, but you’re interested in learning Angular as well, go read the whole post. It’ll be well worth it.

I have, for some time now, considered myself to be a “craftsman” of code. In my Twitter bio, I’ve even been calling myself “A craftsman of fine digital goods”. By using that term, I intend to convey that I take a good measure of pride in the fact that on whatever project I’m currently working, I do my best to build interfaces that are a pleasure to use. That is, interfaces that help a user get their job done, and don’t get in the way by being showy or gimmicky. It also means that the code which I author to realize those interfaces is meticulous and rigorously written. Logically structured? Check. Namespaced to avoid scope collisions? Check. Thoroughly commented? Linted? Minimized for production? Check, check and check.

The use of the term “craft”—as well as its variants “hand crafted” and “craftsman”— arose in the collective consciousness of the web developer community perhaps 5 years ago as a synonym for “high quality”. Of course, I strive to produce the highest quality work I can in both my personal and my client’s projects, so I started to apply the word “craft” and its variants to my own work. I must admit that I hadn’t considered all the implications of what the word actually means.

I recently came across some posts1 which take critical views on the term and this particular application of it. They are The problems with ‘crafting’ code by Harry Roberts and I’m not a Craftsman by Mark Boulton. Together, they’ve made me consider more deeply the term which I’ve chosen as a convenient handle to represent the level of work I do and the pride with which I do it. Am I really accurately representing myself by calling myself a “craftsman”?

Among web development folks, in addition to denoting “quality”, I think the word “craft” and its variants also connote some gauzy, romanic notions of spending hours in a cozy workshop, whittling away at code to produce this perfect little, artisanal, one-of-a-kind handcrafted thing. Now that I consider the word in this light, it strikes me as sounding self-congratulatory, twee, and not really appropriate for the realities of the work we developers produce.

Most of my work day is spent doing contract development for clients. My clients expect that I deliver code that is efficient, fast, solid, robust, and scalable. They expect that I can turn their requirements into a functional product that adheres to those standards and do it reasonably quickly. While I’m fortunate to typically have a lot of latitude in my projects in which I can inject my own approaches methods and tastes, my clients couldn’t give a toss whether or not I “craft” my code. They only care that my code is clear, maintainable, and bulletproof.

While I’m not yet sure what the appropriate alternative to “craftsman” should be to describe development work of a certain quality, I do like the terminology used by Thomas Moser to describe himself and the people who work for his company.

…designers and builders of fine, solid wood furniture…

It’s earnest, unfussy and thoroughly appropriate for what they do. By using the adjectives fine and solid, it also connotes an easy, mature confidence in the idea that when you buy a piece of Thos. Moser furniture, you’ll enjoy using it, you’ll enjoy looking at it, and it will last you a lifetime.

So what is the most appropriate analogue to connote those ideas as they apply to development work? Am I a “designer and builder of fine, solid user interfaces”? Using the same adjectives is too facile and rings with a bit too much pretense to my ear. How about a “designer and builder of robust user interfaces”? Perhaps, but perhaps I should simply call myself a “designer and builder”, code the highest quality work that I can muster, and let the quality speak for itself.