Pivotal Tracker integration for OmniFocus

I use OmniFocus for my task management and I’ve been using omnifocus and omnifocus-github gems to sync issues assigned to me into OmniFocus.

I also wanted this ability for my Pivotal Tracker projects. So I wrote the needed integration code and released omnifocus-pivotaltracker. It syncs non-finished stories, tasks and chores that are assigned to you from all you Pivotal Tracker projects.

To start using it, simply install the gem and start sync:

$ gem install omnifocus-pivotaltracker
$ of sync

On the first run the sync will create ~/.omnifocus-pivotaltracker.yml file. Edit it and fill your Pivotal Tracker name and token. After filling those, just re-run of sync and it will do the first sync. After that you can run of sync any time and it will update the OmniFocus data.

Comments

jQuery Inline Footnotes plugin released

jQuery Inline Footnotes provides inline footnotes like this 1.

This is the first release (1.0) of this simple plugin. It’s implemented with CoffeeScript as a jQuery plugin.

Code and usage instructions can be found at GitHub and I set up a minuscule site with the README and an example.

Enjoy!


  1. This content can be anywhere on the page, usually in the bottom of the post.

Comments

Benchmarking Rails models and views

Ruby on Rails provides many helper methods and commands to help you benchmark and profile your application code. But tools are only useful if you use them. The following methods seem to escape my mind and I end up creating quick hacks for benchmarking instead of using the built-in ones. That is clearly not optimal and I wanted to tell you about these handy benchmarking helpers.

Models

In models you can use benchmark method available as model class method. It takes a block and after running it outputs the elapsed time to the log file. Here’s an example:

def generate_large_things(users)
  users.each do |user|
    Thing.benchmark("Creating a thing") do
      thing = Thing.generate!(user)
    end
    
    Thing.benchmark("Processing a thing") do
      thing.process!
    end
  end
end

After running the code you will see something like this in the log file:

Creating a thing (0.47019)
Processing a thing (2.17420)
[other output]
Creating a thing (0.42210)
Processing a thing (4.23380)
[other output]
Creating a thing (0.39311)
Processing a thing (2.02156)

The time measurements in seconds are in parentheses. In this case we can see that the processing took more time.

Views

For benchmarking view code Rails provides benchmark method. It works the same way as the model equivalent taking a block and outputting results to the log file. Simple example in Haml:

- benchmark "Generating chart"
  = generate_chart(data)

Comments

Which Ruby library to choose?

When I need a Ruby library I head to GitHub and use their search to see if there is a library for my need.

But when the problem I’m trying to solve is common and there is multiple choices, I head to The Ruby Toolbox. They list Ruby libraries under categories and show you relevant information for your choosing process. Information like number of watchers and forks at GitHub, number of downloads from RubyGems and when the last commit was made to the repository.

Usually this information tells you which library is most used, supported and trusted in the community.

The Ruby Toolbox -logo

Comments

Rails Rumble 2010

Screenshot of Yarn It

Rails Rumble 2010 was last weekend and our 2008 team (Antti Salonen, Ville Ikonen and I) competed again. We built Yarn It, an app for generating and sharing knitting patterns. It’s multiuser and features a simple editor for pattern generation and a chat for communicating with your friends while creating the pattern together.

On the tech side this Rumble was quite an adventure. My main responsibility was the backend. We started building our app with Faye ruby gem, but five hours before the deadline we had problems we could not circumvent and switched to Pusher, which meant substantial rewrite resulting as pretty ugly code in some places. Faye was really nice, but probably due to inexperience with using it we couldn’t get it to work reliably. Pusher is not perfec for our use case, but it seems to work reliably and overall seems like a really nice service.

I also got my first experience with Redis with this project. Redis is an fast, persistent key-value store. We use it to store data for ongoing knitting sittings. My knowledge of key-value stores is limited, but using Redis was a blast and I’m going to use it in the future when there is need for key-value store with more intelligent data types and functions for querying those.

I want to thank Antti and Ville for being awesome team partners and my employer Kisko Labs for letting us compete at the Kisko Rails Rumble HQ.

Comments

More in the archive...