The missing link

The most convincing part of Colin Powell’s speech yesterday, to me, was the evidence that Iraq is letting al-Qaeda set up shop in his back yard. Well, according to Britain’s military intelligence service, that’s untrue. Who’s right here? Beats me.

February 6, 2003

Test Driven Development

I have an ongoing interest in various development methodologies, even though I’ve never worked anywhere where we applied any sort of formal approach to software development. Extreme Programming has gotten a lot of attention for the past few years, but I’ve never really wanted to work in that sort of environment, in large part due to pair programming. I’ve read any number of testimonials that describe hwo much more productive pair programming can make you, but for me getting to work on my own without someone sitting next to me all day is a quality of life issue. I think I’d get burned out if I couldn’t click over and read a news article or my personal email every now and then, and I’m pretty pleased with my produtivity working solo anyway. One of the pillars of XP that has really caught on, though, is the test first approach. In other words before you write code that, say, fetches a record from the database, you write a unit test that will exercise the record fetching code. Then, when you write the record fetching code, all you have to do to make sure you’ve done it correctly is run your unit test. Even better, as you add more and more things to the system, you can always go back and run that unit test and make sure that your record fetching code still works as intended. Nearly any software engineer sees the value in writing unit tests, and writing them first is no doubt the best time to do it, because then they’re done and you don’t have to think about it. If you write features before the tests, there’s a great chance you’ll never get around to writing the tests at all, because it will be time to move on to the next feature. Test Driven Development seems to me to be an outgrowth of XP that focuses on the test-first approach without a lot of the other XP baggage that people find off putting, and indeed it intrigues me greatly. I see the value in writing my software in a test-first fashion. I intend to do it, and yet I’ve never gotten into the habit, for several reasons. The first is that JUnit (a popular unit testing framework for Java) is not second nature to me yet. I’ve written tests with JUnit, but not enough that I can write them without thinking about how JUnit works. That just takes time, but until it’s second nature, writing tests will feel like a chore. I just need to do my chores. The second is that even though Martin Fowler will tell you that the test first approach is faster, it doesn’t intuitively feel faster. That combined with the JUnit overhead adds up to a big deterrent. And the final reason is that I don’t have a good mental model for where to put the test classes in relation to the actual classes that are part of the system, how to integrate the tests into the build process, and what the scope of each test should be. Then there’s the matter of dealing with the data created during the testing process. Let me go into the last point a bit more. Let’s say you’re writing a test for a class that inserts records into a table. That table does not allow you to insert duplicate records. How then do you write a unit test that you can run repeatedly? One option is to fetch the most recent record (perhaps as part of another unit test), and then somehow increment the information in it to make sure you’re generating a unique record. I’m certain there are common practices here, but I don’t know what they are. One thing I know for certain is that developers with blogs tend to be way ahead of the curve when it comes to software engineering practices. I’m almost ashamed that I don’t write my code test first, due to fear of mockery by Javabloggers who do things that way. There’s a Martin Fowler interview on test driven development that’s helpful, but I’m still looking to learn more. Kent Beck has published Test Driven Development: By Example, but I haven’t picked it up, and I’m hoping not to have to. I’m trying to avoid buying computer books these days for some reason. Anyway, expect more posts on test driven development, because I’m determined to apply it in my everyday work. ...

February 6, 2003

SpamAssassin 2.44

Over the past couple of months, it seems to me that the overall effectiveness of SpamAssassin has gone down a little bit, perhaps because spammers are writing their spam specifically to dodge SpamAssassin’s rules. I realized that I was a few minor releases behind, and upgraded to version 2.44. Unfortunately, I went back and looked at the release notes and found that few, if any, of the changes will make SpamAssassin better at trapping spam. However, version 2.5 is on the way, and it’s going to implement a Bayesian filter for spam trapping, which should cause things to pick up. The persistent spam that I can’t seem to get rid of consists of ads for night clubs in Las Vegas, “stock tips” from some company (probably part of an ongoing spam and dump scheme), and very short emails promoting porn sites. A pox on all their houses, I say. ...

February 5, 2003

Dangerous art

First, John Ashcroft had the Justice Department hang curtains over statues because he found them offensive, and now the UN has put up a curtain in front of the reproduction of Picasso’s “Guernica” that hangs outside the UN Security Council, saying it’s not an appropriate backdrop for press conferences. Picasso painted Guernica for the 1937 Paris World’s Fair as an indictment of the destruction of the Basque village Guernica by fascists during the Spanish civil war, and is a seminal work of anti-war art. (Via Unqualified Offerings.) ...

February 4, 2003

All hail Kurt Vonnegut

One gift I wish I had is the ability to describe things as I perceive them to be without a thought in the world as to whether I’m being fair, or even whether I’m right or wrong. The gift of absolute clarity is not one to be taken lightly, and Kurt Vonnegut has it on full display in this interview with In These Times. I particularly love this response of Vonnegut’s: ...

February 3, 2003

Policy

One thing you may or may not have noticed about rc3.org is that I never link to the printer friendly version of articles. In fact, I find it quite interesting when other sites (blogs in particular) link directly to printer friendly articles. Granted, they are often easier to read than the gunked up versions full of ads and navigation, and in that sense are really user friendly versions of the articles, but I still don’t link to them. The reason why is that I value free content on the Internet, and despite my pop up blocking ways, I feel like if I’m going to link to content from this site I ought to subsidize the producers of that content in the way that they choose. For example, I’ve linked to more than 250 New York Times articles over the past few years, and I feel like I owe it to them to view some ads and to make you guys view some ads. I hope you understand. ...

February 3, 2003

The nature of European anti-war sentiment

Thomas Friedman criticized reflexive opposition to war from Europeans in his column this weekend, and it’s pretty clear that he has a point. I don’t dispute that the American government has done many bad things in our name over the past century or so, but a big reason why so many people around the world are dead set against us is that we’re on top right now. It’s not unlike the Yankees being the most popular and most hated team in baseball at the same time. They have the most championships, they make the most money, and they’re the most famous. For many people, that’s reason enough to hope they lose every game. Full disclosure: I always pull against the Yankees. There’s plenty of room in this world for principled opposition to war in Iraq, America’s hypocritical foreign policy, and globalization, but the problem is the people who protest those things out of habit are easily dismissed, and often drag down the people with better arguments with them. ...

February 3, 2003

The dangers of space travel

I was reading this interview with John Logsdon, an academic and member of the NASA Advisory Board, and in the article he speculates that the death of the seven astronauts who were aboard Columbia will be a setback to the space program because people will question whether it’s worth the risk to send people into space. I hope beyond hope that people don’t have that reaction. Of course travelling into space is risky, the amazing thing is that NASA has made space travel seem not so risky. Were I to venture a guess, I would think that the seven astronauts who risked and ultimately gave their lives in the quest to further human knowledge would not want their legacy to be the temporary end of space travel. ...

February 2, 2003

Looking for quotable people

If you used to be a heavy participant on another site (like MeFi, Slashdot, or one of the other biggies), and you’ve abandoned that for blogging, please send email.

February 2, 2003

Space shuttle Columbia breaks up on reentry

Utterly awful and tragic news today. The space shuttle Columbia disintegrated on reentry this morning. Speculation on the cause is already under way.

February 1, 2003