You are viewing a read-only archive of the Blogs.Harvard network. Learn more.

Where I’m at

ø

Well despite the apparant lack of blogging things have been going quite well. I’ve been working hard on the Acts As Freetaggable plugin. I got things going with a simple app now located here and from there developed a nice big full suite of RSpec specs. After some deliberation (mostly internally, some with my mentor) I cutoff which features I would be putting into the plugin (from the core set of Cohort features, the missing ones will be implemented inside Cohort). Once I was sure the app’ified version of the plugin was (mostly?) working I started porting things over to a plugin.

Making the app into a plugin was, at first glance, quite a difficult task. The problem stemmed from the fact that Acts As Freetaggable uses other plugins to accomplish its job. I looked around and couldn’t find any other plugins that seem to do anything close to this. I ended up deciding to make the plugin a rails engine and whipped up a rake task to install the appropriate migrations and plugins. I’ve seen some plugins with pretty hairy set-up, and I think that a single rake task (rake freetaggable:install) is pretty straight forward. My friend Stefan might disagree with me about using plugins within other plugins, but I think in this case it works pretty well.

Since getting things nicely packaged as a plugin I’ve begun integerating the plugin into my fork of the cohort project. This process will ultimately be one that either takes a really long time, or a really short time. At this point I’m thinking somewhere in between the two lengths, but anything could turn up. So far I’ve trudged through migrations and have the application launching with PostgreSQL. Without a full set of integration tests I’m forced to manually test paths and actions until I find methods missing (usually just name differences, sometimes missing altogether) or view problems. I’ve come against a few so far and they seem to be generally straight forward to fix; the only problem I am having is adding new properly tested features to the plugin is a bit of a pain once it’s been moved to a plugin (I do have a “test” app I use though).

still alive

ø

Hey there, I am here, doing science, and I am still alive. Its been a little hard thinking of something to write about when I’ve spent the last week and some mainly reading and figuring (things out). Now that I’ve begun coding I hope I’ll have something more to write about.

Since last we met I’ve done a few things:

I’ve read The RSpec Book and it has made me a believer. I used to be a solid shoulda guy but seeing as RSpec almost all of the macros/matchers that shoulda has I see no reason not to switch. RSpec also seems to have a little larger set of tools to support it, and the verbosity of failing tests is just right.

On the “figuring” front I spent a decent amount of time writing up what we call “The Plan” – a light read detailing features, design and timeline of the project. The Wiki we use is behind authentication, so I snapped a shot of the wiki page and you can find it here.

If you are familiar with GSoC you might know that this weekend marked the start of the coding period. I started developing a standalone rails app today to build the acts_as_freetaggable plugin. As detailed in the plan I’ll be developing a small standalone rails application, writing tests for functionality we need, then coding it into the standalone app. Once I’ve gotten things working on the smaller scale I’ll pull acts_as_freetaggable into its own plugin, test that, then integrate it into Cohort CRM.

3 down

ø

Which is your favorite?

Well 3 days down and I’ve begun to understand the direction and vision of Cohort on the whole. In addition I’ve also finished reading PeepCode’s Plugin Patterns. I seem to be able to catch up much more quickly than last year, partly because I’m familiar with Ruby & Rails and partly because I’ve been doing a lot more with myself – it’s been a big year for me.
I don’t think this time around I’m going to go into the same level of detail I did last year. For those who didn’t read hammerofcode.com (when it was still a blog) I blogged on an almost daily basis.

What have I done the last few days?

  • Read Plugin Patterns
  • Read lots of the source code
  • Spoke with Daniel for upwards of 1-2 hours on skype and jabber about the project, its goal and vision

Knowing what Berkman wants out of Cohort, as a tool, has really helped me to craft my own vision of the App. Coupled with what I learnt reading Plugin Patterns I’m now attempting to piece together and digest how tagging should exist decoupled from the App. The current tagging system bangs pretty hard on acts_as_tree and as I understand this mucks up the DB, hence pgplsql stored procedures are required to maintain it. Because of this I’m looking for a suitable replacement to acts_as_tree that has good data integrity, solid performace on moves & inserts, and is well tested. Via Mark Gunderloy’s article on tree structure plugins for rails I’ve come up with three alternatives that I am currently considering:

Since I’m not uber-familiar with tree structure plugins I’m going to have to spend some time getting to know the three plugins – sort of like a dating show. Part of this process might entail writing some wicked & cruel unit tests that pound the living snot out of whatever problems we want to watch out for. From there I can toy with each individual plugin and see how it copes.

After I’ve decided on a new tree plugin (or during) I’ll start writing some more tests for the Tag model and start piecing together a gem to try and pass said tests. I’m not totally sure if I’ll be doing a full rewrite or not, probably couldn’t hurt, given the comfort and guidance of the old code.

Do any of my yet-to-exist readers have anything to say about Tree plugins? Ever used any of the plugin’s I’ve mentioned? Let me know in the comments.

Welcome, come one, come all!

ø

Here be where I’ll be (occasionally) blogging about my progress working on the Cohort project during my time with GSoC 2009. First and foremost I want to thank Daniel, my mentor, from the Berkman Center @ Harvard for doing what he could to get me the position for the summer; I’d been hoping long & hard to get to work on a Ruby/Rails project for the summer as it is relevant to my interests.

Today I started to sync myself up with the project on the whole and I’ve gathered a small list of things I’d like to get done before I begin coding two weeks from now:

  • Read PeepCode’s “Plugin Patterns” PDF that I had laying around but not read yet. I’ll likely be extracting tagging into a rails plugin or engine. Jeweler will help me nicely package everything up.
  • Learn some SQL as well as PL/pgSQL. I’ll be helping to make the app degrade gracefully when not using postgres.
  • Read most of the source related to tagging, if not all of it. I need to understand both how the tagging functionality works, but how other pieces of the app will use it.
  • Tests. I figure defining more and more about how we believe tagging should work will make it easier to pull everything out into a separate component.

For anyone intensely interested in my Dev environment I’m running OS X 10.5 with TextMate/Emacs for rails editing. I’ll likely use shoulda for a testing framework. Umm, I like zsh, I keep my dock on the bottom, and at the moment green tea is my favorite.

Log in