The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
Sometimes It's Easy

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Obie Fernandez

Posts: 608
Nickname: obie
Registered: Aug, 2005

Obie Fernandez is a Technologist for ThoughtWorks
Sometimes It's Easy Posted: Mar 16, 2006 4:04 PM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Obie Fernandez.
Original Post: Sometimes It's Easy
Feed Title: Obie On Rails (Has It Been 9 Years Already?)
Feed URL: http://jroller.com/obie/feed/entries/rss
Feed Description: Obie Fernandez talks about life as a technologist, mostly as ramblings about software development and consulting. Nowadays it's pretty much all about Ruby and Ruby on Rails.
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Obie Fernandez
Latest Posts From Obie On Rails (Has It Been 9 Years Already?)

Advertisement

As I've mentioned in passing, I'm working on a story-driven development application called Kipling and I'm "dogfooding" it on my current project. There's nothing like a dose of criticality to add urgency to a side project -- then again sometimes you realize that despite good intentions dogfooding is just not going to work. This week I finally came to grips with the fact that I don't have time to do a full-time job, edit a series, write a book AND add features to Kipling fast enough to satisfy my project management requirements. So I did what any sane project manager would do: turn to trusty Excel.

One of the great aspects of working for ThoughtWorks is that you have access to some pretty frickin brilliant people to help you out when you're in need. In this case, one of our most talented project managers, Mark "Sparky" Rickmeier hooked me up with the small/medium version of his project tracking spreadsheet. I'd seen it before, but never realized how useful it is until I pulled the story list out of Kipling and copied it into Sparky's spreadsheet. We're talking information galore, with tons of graphs and fancy tabular calculations, enough to make your head spin.

Sometimes it's hard to get information from an application into Excel and other times it's pretty easy. This time it was easy. I briefly considered doing a database dump from Postgres and then (duh) realized that I could get the job done with a few lines of Ruby.

#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require RAILS_ROOT + '/config/environment'

Story.find(:all).each do |story|
  puts "%s,%s,%s\n" % [ story.id, story.name, story.points ]
end

It took exactly 2.5 minutes to write this script, then run it and pipe the output into a file in my /public directory for easy downloading. Thank you Rails.

Read: Sometimes It's Easy

Topic: Call graphs to analyze code dependencies, or just because. Previous Topic   Next Topic Topic: The value of a debugger

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use