Agile/UX Retreat

February 3rd, 2010

Last weekend I attended an interesting “retreat”, really a mini conference run in the unconference style. The topic of the retreat was “Agile/UX”, where UX = User Experience design. The motivating idea was that while the agile and UX movements have made important discoveries in their respective fields (software development and design, respectively) and really changed how people work for the better, both would be better together.

No agile methodology I know explicitly discusses how user experience design activities fit into the workflow. In the agile context, design usually means the design of code, not the design of the user experience. The standard response of agile to this accusation is “of course each project involves other roles, and they will just fit in wherever makes sense that fits with the principles and practices of the team”. While this may be true, by leaving design out of the explicit picture, many agile software development teams who are doing lots of other things right continue to ignore the importance of incorporating iterative UX design into their process, and therefore are delivering software efficiently that is not as effective as it could be.

I assume something similar is wrong with standard UX practice. For one, it seems that perhaps the design community still tends to think of design as something only done Big and Upfront at the beginning of a project, missing an opportunity to learn from their mistakes and iteratively improve their design as implemented in the hands of real users.

Based on my personal experience, this seemed like a great idea, so I was really looking forward to attending the retreat. At CDD we do work with designers, and although (if I may be so bold) we’re doing better than most informatics companies in this regard, it’s still clear to me that we could do even better. Thus far we’ve have a hard time testing/validating and iterating on user designs and working these activities into our software development workflow.

The retreat was inspiring and motivation building, having so many people in one room who care passionately about making great software from both design and development. One enduring theme was the abolition of “Us and Them” thinking. Two points are important here. One, we should think of designers and developers primarily as people, rather than as roles, people who work together and bring their competencies to bear on a common goal. Two, a given set of competencies that normally would be thought of as belonging to two separate roles can be found in the same person, so we should never be limited by thinking that a given person is either a designer or a developer, isolating them accordingly from activities that involve the other discipline. Design and development must work together, even within the same brain.

I would have liked more detailed discussion at the retreat, however this was difficult to accomplish in two short days. I also would have liked more representatives of the “business” or “money” role, because I think the same principle applies: abolish us vs. them thinking, and find ways for enlightened practitioners from a mix of all of these roles to combine their expertise effectively.

Further activity is planned, targeting something concrete to be presented at the Agile 2010 conference. Stay tuned.

Problems with apt, python2.5 and Ubuntu Hardy?

July 29th, 2009

I couldn’t find a good solution to this on the Web, so I’m providing one in case it helps anyone else.

I recently had a weird problem applying updates to Ubuntu Hardy, due to a failure while dpkg was configuring python2.5, giving me error messages like:

dpkg: error processing python2.5 (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 python2.5-minimal
 python2.5

I fixed this by allowing the pycentral rtinstall command to overwrite “local” files (which weren’t actually local, I think they were left over from previous versions of Ubuntu–I have upgraded the OS several times). In /etc/python/debian_config, I added:

overwrite-local = True

“aptitude safe-upgrade” then ran without a hitch.

Pair programming and microarrays

July 9th, 2008

Yesterday I met with folks at Lawrence Berkeley labs. The PI entered the room, full of energy and clearly ducking briefly out of the fray to speak with us. Part of the discussion revolved around microarray experiments. We’ve all heard about how notoriously difficult it is to reproduce microarray experiments. People have proposed minimum information standards (really they’re guidelines) to combat this problem, and we’ve also all heard that often these standards aren’t enough. Even if people are following the guidelines, inevitably a crucial piece of information isn’t obviously critical and therefore isn’t communicated.

The PI noted that he has seen it to be helpful when more than one lab conducts an experiment, so that each can help the other avoid finicky and/or tacit experimental conditions that would prevent others from reproducing their results. I have wondered for some time (and for the case of microarrays in particular) whether the practice of “pair programming” that we use in software development would be more helpful than minimum information standards to increase the reproducibility of complex experiments. The problem with this, as the PI pointed out, is that duplicating every experiment can get expensive, and in the world of soft money (especially today’s world), people are always looking for ways to make the research dollar go farther. The possible long term efficiency of duplicating some efforts to increase data value and reduce a tendency to go down blind alleys might not be easy to quantify, and thus not easy to weigh quantitatively against the immediate penalty of “getting half as much work done”. (That’s certainly true in software.)

The PI pointed out that even if direct duplication was too expensive, he still advocated some kind of collaboration on experiments. In particular he advocated getting people together in the same room to look at the experiment together as it was being performed, so that the collaborator might catch important things that weren’t immediately apparent to the person performing the experiment. This, at most, only costs a small amount of travel funds.

I asked the PI if others shared his views, and he said that most of the larger microarray efforts had some sort of distributed work going on, but he wasn’t sure that this idea had been formalized anywhere.

I’m interested in this not only because of its parallel with software work, but also because I work for a company focused on facilitating collaborative science. I’m very interested in the different forms that scientific collaboration can take, and how best to help them along.

DTrace predicate hack

July 6th, 2008

One of the things I keep wanting in DTrace’s D language but isn’t there (right?) is a richer set of string comparison functions. Ideally I want full regular expression functionality, so that I can predicate actions on, say, regex matches of a class and/or method name. For instance, a while back, while profiling some Java, I wanted to only count time spent in methods of classes that belonged to a particular package (org/apache/solr) or to its subpackages. There is no “starts with” string operator in D. However, the following did the trick:

hotspot$target:::method-entry
/(self->class = copyinstr(arg1)) != NULL && self->class >= "org/apache/solr/" && self->class < "org/apache/sols"/
{
  /* action goes here */
}

A little ugly, but it worked. The choice of “org/apache/sols” as the upper bound was somewhat arbitrary.

Too many mock objects == ruby refactoring death

July 6th, 2008

It’s a question we face as test-driven ruby programmers: Should we use mock objects or real objects in our tests?

Both approaches have trade-offs, and their biggest downsides both have to do with wasting programmer time. If you test with real objects, then your tests run slowly (especially if you use an ORM that binds your domain objects tightly to the database like ActiveRecord). Your tests hit the database, and this is slow. There are other sources of slowness, but nothing has anywhere near as great an effect as hitting the DB.

If you test with mock objects, once your app has any kind of complexity, your refactoring and test writing processes become slow. This is not immediately apparent when you start using mock objects. But as you start writing more and more code, eventually you start having to come up with a crazy number of mock expectations just to test some of your methods. It is true that this is good feedback that the class you’re testing presents too complex an interface to other collaborating objects, or that it collaborates with too many objects, etc. What starts simple will eventually become too complex, and at some point you’re going to need to refactor.

More insidious than this, however, is the effect this web of mocks you’ve wrapped yourself in has on refactoring. You don’t notice how thoroughly you’ve painted yourself into a corner until you want to refactor some ugly aspect of a core class that collaborates with many objects in your system. Suddenly all of those collaborating objects’ tests break because they expect certain method calls from this core object. These tests break because you’ve changed a method signature, a method name, or even worse just an implementation, because no matter what those BDDers tell you, if you test with mocks, to too great a degree that means you’re testing implementation, not behavior (or is that behaviour).

So, now you have to go through all of those mock-based tests and “correct” them, i.e. change their expectations so that they fit the new method name/signature/implementation. This is horrible. The whole point of tests during refactoring is to verify that your refactoring hasn’t changed the behavior of the system (that being half of the definition of refactoring). The tests should pass before you refactor, and they should pass after you refactor. Not only does this break the fundamental refactoring process, it also can take a lot of time, because you have to remember the context of each of those test cases that you have to fix.

You can do something about slow running tests that hit a database (in extreme cases you can use a faster in-memory database, or even parallelize your tests). Of course they won’t run as fast as they would if they didn’t hit a database, but in my opinion it’s something you can live with. Dav Yaginuma has a good suggestion for what to do with this time: Go write that email you need to write, go take the bathroom break, go walk around the office and stretch your legs. It’s not like that’s really wasted time. It is wasted time, however, if you’re sitting there squinting at the screen fixing all of your mock expectations. You can’t do anything else with that time.

I’m kind of half-convinced now that people who advocate the heavy use of mocking either have really nice IDEs that make fixing the expectations a breeze, or they don’t refactor. And if they’re using Ruby that means they don’t refactor. Ok, tongue out of cheek. Seriously, I’d love to hear from folks who have used and continue to use mocks heavily on long running projects, to hear how they handle the refactoring issue. I have pretty much sworn off mocks except in old-school traditional cases (“mocking out an external dependency too expensive to call directly”) because of it.