Blog An exploration of the art and
craft of software development

October 2008 Archives

Effective agile planning

Posted by Marty Haught on Oct 04, 2008Comments

Recently, several things have occurred that have brought my attention to how you plan an agile project. Before I get into the specifics of my current situation let me give some background. I was introduced to agile development in 2004 on a project was pretty close to pure XP. We had two years to experience a fairly smooth agile project, including over a year where part of the team was remote. During this time I explored deeply the aspects of agile development as well as other important parts of the XP equation (DRY, refactoring, TDD).

Continue Reading…

Me Meme

Posted by Marty Haught on Oct 03, 2008Comments

Saw this on some other blogs and figured I should join in. Marty Haught

via Obie Fernandez

  1. Take a picture of yourself right now.
  2. Don’t change your clothes, don’t fix your hair…just take a picture. (should be super-easy with Photobooth)
  3. Post that picture with NO editing.
  4. Post these instructions with your picture.

Mocking too much?

Posted by Marty Haught on Oct 30, 2008Comments

I’m a big advocate of stubs and mocks in testing. In our current project we use Rspec which has mocking and stubbing as part of its framework. One of the big reasons that I like the use of stubs and mocks is in how it allows you to test in isolation. This allows you only to test the behavior of the class/method that you’re testing and not the rest of the application. This can very beneficial if your code uses an expensive resource (sockets/database) or something outside of your system (like a third party service). It can also keep you from having to set up a lot of dependencies in your own system if they are not directly used by your code. An added bonus is it can shorten your test execution time. But given my title there must be some aspect of this that makes me uncomfortable.

Continue Reading…

Testing controllers without gets/posts

Posted by Marty Haught on Oct 18, 2008Comments

Another conversation that has come up recently was how best to test protected methods in controllers directly. You might ask why would you care but this is fairly important to me. I like to test in isolation especially for ‘helper’ methods in controllers, or ApplicationController itself. When you isolate just the method you can test all its permeations more directly.

Continue Reading…

View Specs

Posted by Marty Haught on Oct 14, 2008Comments

I’ve had some conversations lately with the developers on one of my projects about test driven development. As this is a new concept for some of them, we get into discussing the approach. As I have been practicing TDD since 2004 it’s natural for me. Covering model and controller specs have been easy as the benefits are clearly visible. While I won’t discuss the specifics of that sort of testing, I do want to reflect on view testing as that feels different to me.

Continue Reading…