Archive for the 'Productivity' Category

Presenting Clojure with a Gitorial

Monday, March 2nd, 2009

GitHub Mascot on whiteHere are the slides to the Clojure presentation I gave last week for the OrlandoJUG. Initially I was planning giving a comprehensive overview of the language, but the content ended up being long and mostly rehashed information already available online. Such a presentation would have also probably been too much to take in for one sitting.

Instead, I came up with an experimental tutorial-style format. The core of the presentation was explaining a gradually built Clojure library with TDD. The experimental part was that this presentation was captured in the Git revision control system. Every commit has a commit message that explains the “next slide” of the presentation. People can then view diffs between commits to quickly see what changed.

GitHub was used as the presentation medium. First you go to the library page, then click the commits tab, and finally click the “Older” link at the bottom to get to the first revision. For each revision you can click the title to see the commit message, and see a nice colored diff of the changes. For small commits the diff is enough and you can explain what happened right there. For larger changes it’s easier to click the filename in the diff to get the new file by itself, including syntax highlighting.

Because the “presentation” is on GitHub, people can view it when they get home again even if they don’t know how to use Git. However, one really powerful feature is exclusive to Git users. Once the repository has been downloaded, you are able to check out any particular revision. Because the library has passing tests at every commit (unless otherwise noted), you are able to create a branch and play with the code with the backing of tests.

Some other nice perks are that Git allows commit message and revision history editing. This allows you to write a “shitty first draft” quickly and not worry about getting the presentation-intended commit history perfect the first time around. Another cool thing is that presentations like this can be collaboratively improved through GitHub forks and merges.

The end result is a toy library accessible through a webservice, logging api hits in a separate thread, producing and consuming JSON, and integration tested through localhost over HTTP. Note that only the later commits have long messages with better explanations more suitable to a web audience. This is because I didn’t really know what I was on to at the beginning of the “Gitorial experiment”, and was planning on doing most of the explaining “on stage”.

This whole thing reminds me of the whole “unintended innovation” thing that keeps happening with Twitter (or even on GitHub itself with things like Reg’s Homoiconic blog). One could even imagine gradually built public Gitorials where the GitHub RSS feed is announced early for people to subscribe to. After that an Internet-full of people could “watch” the presentaiton unfold day by day in their feed reader.

Anyway, I talked to some people in the audience later and have only had positive feedback on the presentation format thus far. I loved it personally and plan to make more presentations in this style in the future.

Portable and Organized Bookmarks

Thursday, November 2nd, 2006

Across desktops, laptops, work computers, etc managing your bookmarks can become a pain. I used to use a Firefox plugin called “Bookmarks Synchronizer”:https://addons.mozilla.org/firefox/14/ and a free FTP service. But, having to download bookmarks on startup and upload them when they change got to be to annoying.

Eventually I stopped using it and got back into disorganized and multiple computer bookmark hell. This wasn’t good so I quickly sought a solution, and started using “del.icio.us”:http://del.icio.us/ . As it is too tedious to use the web interface to add bookmarks, the “Delicious plugin”:http://del.icio.us/help/firefox/extension is a must have, allowing you to go to your bookmarks and create a new bookmark from buttons on Firefox.

The nice thing is that throwing a bunch of tags onto something organizes your bookmarks for you. As you type, popular suggestions and bookmarks you’ve used are displayed to avoid tagging some things “rails” and others “rubyonrails”. Another nice benefit is that the popup to bookmark something also contains a description field, making it more convenient to describe the value of the bookmark instead of only naming like you do with traditional bookmarks (not that you can’t add descriptions to them, it’s just less convenient.)

I still use Firefox’s bookmarks toolbar for frequent sites that I use access like Gmail, Rails and Ruby API’s, etc. But, which of these are used usually varies computer-to-computer because they are situational (work, personal, etc), making the need for them to be portable less. Plus, the number of these are limited so you can always add them quickly.

In any case, another great tip is to use “Firefox Live Bookmarks”:http://johnbokma.com/firefox/rss-and-live-bookmarks.html to grab the feeds related to specific tags or delicious groups, and add them to your bookmarks toolbar. You could even make a “bookmarkstoolbar” tag that you subscribe to as a live bookmark, making the whole thing even more portable!

Versioned Taste in Music

Tuesday, October 31st, 2006

Some people can’t tolerate music during work, and I can vary. When I am in the music-with-work groove, then it’s great. But, let’s face it, getting work done is the goal and any time spent on looking for, organizing, remembering, etc music is a distraction.

Enter “RadioBlogClub”:http://radioblogclub.com/ , a website distributing a Flash application that streams music in its player. You can get complicated with it, and use similar services such as “Pandora”:http://www.pandora.com/ , but I prefer the speed and simplicity of RadioBlogClub (I call it radioblog among friends for brevity, and I will adopt that for the rest of this article =p ). What this entails is going to the website, searching for any song you like (many people host the player so a lot of songs are on there), and picking one. After the song ends, the “blog” will continue to the next song in the playlist, and the one after that, etc.

So…you get free songs that usually have a similar style that you’re looking for. You end up getting tons of new and old songs that come to you! No work required, you just keep developing and new songs appear before your very ears. So…you may be asking yourself, “Where does versioning come in?” Like I said before, I don’t like to waste time using the service’s features and building “bookmarks” of popular playlists. I don’t get interested in just one song from a particular blog either. Instead, with radioblog you get unique attachments to songs because they bring up several blogs, each with different styles of music…and you get attached to that as a whole.

“Yeah, yeah, so what’s the solution?” Well, as many of you probably know “37signals”:http://www.37signals.com/ has these neat little wiki-like editable pages called “Writeboards”:http://www.writeboard.com/ . They use a great markup language, “textile”:http://www.textism.com/tools/textile/ , that I also use in this blog (try it in the comments!) Like wiki history entries, writeboards have revisions. They also have this nice little ability that lets you compare two revisions (think the unix @diff@ command formatted nicely and with color), something that tailors to Writeboard’s collaborative writing audience. Finally, here comes the elegant solution: use writeboards to store a simple collection of songs that you currently enjoy. At any time, pull up your writeboard and radioblog the song and/or artist combo. If you find a new song/artist combo that pulls interesting results in radioblog, edit your writeboard to include it.

The key is to only keep the combos that you currently like in your writeboard. That way, the board isn’t cluttered…but even better, now try to compare two revisions. Alright! Versioned taste in music! At any time you can look at what you liked in the past, and start radioblogging those combos again. Talk about simple, fast, and productive…now get on to coding and Happy Halloween!

As my treat to you, here is a very simple example of the textile markup to keep your combos in. This can be made more pretty, but I like it because it keeps the textile markup I edit easy to read and manage too:

bq.
|*Song*|*Artist*|
|Perfume|Sparks|
|Zombie Remix|Cranberries|
|*|Richard Cheese|
|*|Daft Punk|

Which ends up looking something like this:

|*Song*|*Artist*|
|Perfume|Sparks|
|Zombie Remix|Cranberries|
|*|Richard Cheese|
|*|Daft Punk|

My first post

Saturday, October 28th, 2006

My goal with this blog will be to make exactly one post per day, always learning or reflecting on something new.