REST, refactoring, and the best cheap sandwiches

May 27, 2009 at 7:19 pm (Ruby, Week 10) (, , , , , )

Today Jim and I finished up the second iteration of our client project on Rails (I had been under the impression that we were on iteration 1 until this morning’s stand-up). I coded a story on my own early in the day, along with some styling and validation work, and we paired to finish off another story (and do some refactoring) later in the day. It was a little hectic, and we ended up not quite finishing all of the stories for the iteration, but the good news is that we have well-tested, relatively clean code that will be easy to modify and refactor as changes become necessary.

I was excited to see that in Rails 2.3.2, overriding a RESTful route doesn’t seem to force you to manually override routes on a per-action basis when you want to add non-RESTful actions (through the use of the member and collection parameters to the routes file). Our growing understanding of the project is guiding us towards refactoring those actions to their own controllers (making them CRUD/RESTful along the way). We haven’t done that refactoring yet, but in the meantime, it’s nice that Rails is now doing what I had expected it to do in 2.2. I’m not sure where that change came along, but I like it!

There were a few times pairing with Jim where I would lose focus and find myself needing to take several steps back to remember what exactly we were wanting to test, but things are feeling pretty natural with BDD/RSpec on Rails. I ran into more issues with objects like template on my own when working on helper and view tests, but I’m getting more of an understanding – the more times I have to figure these things out, the quicker I’ll get at it.

We’re using Pivotal Tracker for this project, which is a pretty cool app for agile project management. Note cards are great, but an app like Pivotal Tracker essentially gives everyone their own copy of the cards online, which seems like a must for teams with remote members, and it’s very well-done.

Also, in a poll taken over lunch today, 100% of respondents* agree that Jimmy John’s is better than Subway.

* Sample set for this poll were selected from actual respondents by using only the very common last names Jones and Smith. This is a surefire statistical method that could never fail 😉

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: