The code for the Tumblr Likes Grid is now available on GitHub. Hopefully this will help improve the overall experience, as well as share some knowledge about how to interact with Tumblr’s API.

Be sure to read the original blog post for the background of the project if you have not already.

Please feel free to use the integrated GitHub issue tracker to report any problems. I know that some users have experienced some sluggish responses at least, but I have had a hard time reproducing anything.

Enjoy!

Continue reading…

In a previous post, Using Generics To Build Fluent API’s In Java, I detailed a way to create type-safe fluent API’s using generics. Handy, but unfortunately the process can be somewhat tedious. Any project wishing to utilize a builder must carefully hand-code the various classes and interfaces. Modifications made later are oftentimes painful to implement.

Continue reading…

So the bad news is that it’s been several months since my last blog post. I can’t stand how busy I am all the time!

However, the good news is that I have been productive! InfoQ was kind enough to publish an article of mine today. You can read it here: Generating Avro Schemas from XML Schemas Using JAXB. The goal was to use JAXB XJC to generate Avro schemas from an XSD, and the results were pretty great. The code is currently unavailable, but I am working with the relevant parties at Nokia to try and get this open sourced.

Until next time…

A friend of mine suggested that Tumblr was lacking a decent way to visualize the posts which you’ve ‘liked’. Tumblr provides a great way to view your own posts via the archive page, and so I thought I would try using their existing layout style to visualize liked posts. The Tumblr Likes Grid is my attempt.

Now, I’m not Tumblr, and so I don’t have access to users’ information directly. The information about posts a user likes is available via a call Tumblr’s API. Tumblr is among a growing list of sites using OAuth to authenticate a user and allow querying for data.

Unfortunately, there aren’t many decent javascript OAuth libraries, and I finally settled on using PHP for the three-legged OAuth handling. Even then, it was difficult to get right, and I relied heavily on examples in lieu of better documentation about the process.

The rest of the page is pure javascript. I’m using jQuery for all of my AJAX and DOM manipulation, and mustache for template rendering. I have to say, mustache is really enjoyable! Tumblr has several different types of posts, including text, photos, audio, video, quotes, and more. Each post type corresponds to a matching partial template that mustache can retrieve dynamically when rendering a post object. The templates are cached after the first use for faster rendering.jQuery is used to insert the post objects into columns and month sections dynamically as they are received.

Repeated calls retrieve successively more posts. I tried to emulate the style of the archive page as best as I could, and most of the css and imagery is taken from Tumblr verbatim. I made some alterations, including abandoning the absolute positions of all the photos. I’d like to investigate other interesting ways of visualizing the data in the future, maybe with charts and graphs (yay math!).

Here’s what’s inside the box:

The following sources were helpful, especially in setting up the OAuth authentication process:

Unfortunately, you’ll need a tumblr (and some liked posts) to view the page. Here’s a screen-shot for the uninitiated:

Tumblr Likes Grid

a screenshot of the grid

So that’s the Tumblr Likes Grid. Check it out! Feel free to leave comments and questions here or on my tumblr.

Enjoy!

I spent a few hours on Sunday customizing my JIRA instance to be a note transcription tool. I started out over a year ago trying to make my own standalone Java desktop application. I later changed it to Spring web application, then a Google App Engine application, but still never finished (I spent a long time designing it though, as an exercise). Then I decided to see what I could do about just customizing an existing tool.

I started with Evernote, which was pretty great, but didn’t allow the custom meta-data that I required. I then moved to WordPress, which is very good at this sort of thing. The idea of typing a note, setting the date, setting an arbitrary number of meta-data fields, attaching scanned images—all of these concepts it handles natively, and very well. However, it is somewhat rigid in the way it works. Making everything private is difficult. The editor is heavily focused on rendering HTML, and tends to obfuscate the text with layout markup. A wiki might be better, but they tend to be a pain to set up and maintain.

Then I thought about JIRA. Most of the concepts I could port to my new domain. Books, locations, pages, tagging people, simple wiki-style markup. I added a bunch of custom fields and altered the screens and workflows for the project, and after a bit I had tuned the settings to my needs. In fact, it’s been far better than I expected: none of the overhead or privacy concerns of a ‘private’ blog, a powerful query language for finding entries, a few hierarchical concepts to support the idea of “books containing pages containing entries”—I am quite satisfied.

This got me thinking though: how many of my software ideas could be designed to utilize existing systems? I’m not trying to avoid all development (that’s the best part!), but writing plugins on a flexible system should be far easier than writing a whole new application from scratch. While I enjoy the challenge and the level of control that the latter affords me, I am starting to feel that it is a poor use of my time. I am only one person, and if people don’t want to collaborate on my projects then I need to be more efficient about seeing them through.

I have another application in mind, similar to this one. I am definitely going to investigate the possibility of using JIRA to accomplish my goals, or at least prototype the idea.