Slicing & dicing, and Chicago Code Camp!

May 31, 2009 at 1:55 pm (Ruby, Scheme, Watching, Week 10) (, , , , , , , )

Friday I spent the morning with Eric Meyer working on the same Rails app Jim and I had been working on last week. We got two bugs knocked out pretty quickly, and we also did some planning for a database refactoring (not as big of a deal as it sounds like, as the system isn’t in production yet). Eric’s laptop was having some boot problems, so we used mine; hopefully his Time Machine backup worked over the weekend – there aren’t many things more frustrating than not being able to boot. In the afternoon I chopped up a new website that should launch on Monday, showing Paul some tricks with the Slice tool in Photoshop along the way. I feel like I’m pretty efficient slicing up a PSD into XHTML/CSS – hopefully before too long I’ll feel that way in the code world!

Saturday was Chicago Code Camp, and it was awesome. The first session I went to was “Trends in Continuous Integration and Software Delivery” with Sean Blanton of OpenMake software. He went through the major features of a continuous integration system, and while we’ve got one in place for a couple of websites I work on (cc.rb), there was a lot of information there. I never realized how many different systems were out there. I was impressed with the fact that Sean wasn’t just pimping his products (Mojo and Meister) – it really seemed like a pretty fair assessment of the different systems. There were a couple of slides on Git, actually, which talked about how powerful it was, but that it might be hard for novices to get into. I thought that was odd at first, but as people asked questions I realized that Subversion and other systems have lots of GUI implementations that integrate tightly with OS’es, and Git doesn’t have so many yet. Maybe that’s a good project for someone…

Then I made the tough choice to miss Eric Smith and Eric Meyer’s talk on “TDD for the IPhone,” in order to attend Dean Wampler’s talk on “Better Ruby through Functional Programming.” Sorry, guys! I figured that since I’m working on a presentation involving functional programming, and I mostly use Ruby during work hours, I’d learn a lot there. And I did! I have a much better grasp of what functional programming is now, and how to apply that to Ruby (it can be done without too much hassle, actually). There was one particularly interesting point where Dean posited that we’d see programming (and concurrent programming in particular) become more functional on a small scale, but still object-oriented on a macro level.

Micah’s talk on Limelight (“Develop your Graphical User Interfaces (GUIs) faster than ever, with a thorough suite of unit tests to boot.”) was great, but it was tough because the 8th Lighters were the only Rubyists in the audience (I think), and there were only a few Agile/TDD practitioners. But there was a powerful point about what to do when something is hard to test: rewrite it so that it’s easy to test. And that’s just what Micah did with Limelight – which is indeed easy to test, once you know what you’re doing.

Next, I went to Dean’s other talk, “The Seductions of Scala,” and missed Jim’s “TDD and JavaScript” talk. Sorry, Jim! I had seen a version of Jim’s talk on Friday during the Lunch & Learn, and it was awesome. I’d of course heard about Scala because of the big Rails/Scala/Twitter debacle awhile back, so I was interested in what a language looks like that’s built with concurrency in mind. The language runs on the JVM, so like JRuby, it’s easy to interface with existing Java code. There is some strange-looking syntax to get used to, but it seems interesting, and it sounds like it’s gaining traction on production systems. I had thought the next language I took a look at would be Clojure, since it’s a Lisp dialect with concurrency in mind, and I’ve been studying Scheme, but now I’m thinking I may look into Scala. Or maybe learn JavaScript right. We’ll see. Incidentally, Dean’s new book, Programming Scala is available online in draft form as a preview – it looks great!

Micah’s last talk on “Ruby Kata and Sparring” was great. I’d seen forms of it before: the Langston’s Ant Kata and RubyConf 2008. There’s some kind of magical stuff in this version of the kata (instance_eval), but it’s extremely elegant once you understand the algorithm. I really like the notion of practice as important in software development; Paul was talking about this earlier in the day as well. I’m going to try to do the same kata 3 times a week for a few weeks and see if I see any benefits. I know from trumpet playing that even playing ridiculously easy exercises on a regular basis, with strict attention to form, can yield great benefits.


Permalink 2 Comments

Photoshop, Radiant, and threads

May 28, 2009 at 6:59 pm (Graphic Design, Week 10) (, , , )

I polished off the old Photoshop skills today to put together a design for an upcoming event web site. Things came back to me relatively quickly, but it’s still an amazing program that I’ll probably never master. The CS 3 version of Photoshop, incidentally, gives you the ability to select multiple layers in the Layers palette. I’m pretty pleased with the way the design is coming together so far; it’s almost done; I’m just waiting on a logo to finalize the look for the header. I ended up using a lot of shapes and the Direct Selection tool to modify them when the shapes needed to change. It seems like the Agile way to design: change becomes very easy, compared to just painting and filling selections.

Caleb and I are going to be working on the site together, and we’re pretty sure we’re going to use Radiant for the site. Radiant is a CMS (content management system), using Rails. It’s installed as a gem, which makes things very easy and makes our work mostly configuration rather than re-inventing the wheel by coding up an admin section. We don’t need anything too complicated, just some image uploads and static information. We took some time this morning checking out Radiant’s extension system to make sure it’s going to be customizable enough, and I was really pleased to see how easy it was. I’m looking at Keith Bingman’s paperclipped extension, which is based on Thoughtbot’s excellent Rails plugin: Paperclip.

I’m also working through Uncle Bob’s The Craftsman articles (click “Craftsmen” on the link to get to the articles), which I’d started a month or two ago, but fizzled out on. Justin Martin’s apprenticeship blog reminded me to get going on them again, and I’m thinking a lot more about concurrency. Threads have seemed fairly magical when I’ve used them (and seen Micah use them) so far, so I definitely need to do more reading and practice with them.

Permalink Leave a Comment

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 😉

Permalink Leave a Comment

RSpec getting easier on new project

May 26, 2009 at 9:44 pm (Ruby, Week 10) (, , , )

I hopped on a new project today with Jim and Paul (both Erics are also on the project, but weren’t in the office today). It’s a Rails application, and I was making some changes and bug fixes. I ended up having lots of questions for both of the guys as I got acquainted with the application; some of those are going to go away as I learn the codebase. The end of the first iteration is tomorrow, so I’m trying to work quickly to patch up these bugs, but at the same time I’m keeping a high standard of quality. It was a little stressful, but that’s probably mostly because I had a little too much caffeine – nobody’s putting pressure on me to hurry up yet!

It was great taking responsibility for a small piece Rails code (test-driving it, of course) and improving it. As I’ve said before, I generally feel very comfortable working with Rails and HTML/CSS, so I appreciate the chance to give back to the team, even though the other guys are probably still faster on the Rails test-writing.

RSpec isn’t feeling foreign at all anymore. At this point, I think I have a decent intuition for when to mock, when to stub, and the general syntax, but my vocabulary needs much improvement. I spent some time with the RSpec documentation looking for matchers, but I didn’t always know where to look to find what I wanted (especially in view and controller tests). So I’m planning to bone up a bit on objects like response and template (looks like the RSpec wiki on GitHub is a great source of information).

Tonight Software Craftsmanship group meeting was awesome. Doug kicked things off by talking about a bit of the history behind the software craftsmanship manifesto, and his thoughts on gaining consensus and what makes someone an authority. The main takeaway, for me (in addition to the contextual history of the manifesto), was that apprenticeship is the path to finding your personal authority. When you’re an apprentice to someone, you’re making that person an authority in your field of apprenticeship.

Then Jake Scruggs and Jim talked about their experiences during the software craftsmanship swap (which they’ve also both blogged about). It was mostly a question-and-answer session, but both of the guys were really interesting and engaging speakers. I’m excited about the next swap; it seems to me that it’s energized both teams into improvement.

Permalink Leave a Comment