Diasparsoft Logo Let's write software that people understand.

Home | Contact

Training

JUnit support

Outsourcing

The work that Diasparsoft did for us was outstanding. We are now using the software on a daily basis and their work could well have a dramatic impact on the Reds' organization in the near future.Cincinnati Reds Baseball Club.


Publications

Tips & Tricks

Diasparsoft Toolkit

What is Diaspar?

Interesting Bits RSS

Wednesday, March 23rd

Review of Test-Driven J2EE

So far, so good.

jbrains on 03.23.05 @ 04:10 PM ET [link]

Sunday, March 13th

Test-Driven J2EE: worth the wait?

Well, I apologize for the last-minute publication, but the final, final, final instructors for Test-Driven J2EE at SD West Expo are complete. Go to this page and follow the instructions. With any luck, they're Too Simple to Break. (I know, I could have added an Ant build, but I'm tired.)

Thank you so much for your patience. I look forward to many beers with you in Santa Clara. See you Monday!

jbrains on 03.13.05 @ 12:45 AM ET [link]

Friday, March 11th

Test-Driven J2EE: instructions are on the web

We have updated instructions on the web, but we still don't have an Eclipse project file uploaded yet. I'm working with my ISP's support to make that happen.

jbrains on 03.11.05 @ 12:44 PM ET [link]

Programmer's retreat this summer?

My wife and I are planning an eventual move to Dauphin, Manitoba. (Yes, we've seen Funny Farm, although we were more inspired by Lost in America.) We have already purchased a house there and we plan to go back every six months or so until we're ready to move. I consider it a two-year experiment: if, after two years, we don't like it, then we move elsewhere; but in the meantime, it's cheap livin'.

I'd like to run a programmer's retreat there this summer, likely soon after Agile 2005. Some of you will be going to this conference and others not. If you think you'd be interested in a retreat during which we will write code, play games and think only about programming, then send me e-mail with the words "Programmer's retreat" in the subject line. (This helps you get past my spam filters.) More news as we get closer to August.

jbrains on 03.11.05 @ 07:01 AM ET [link]

One way to know your tests are fast enough

I'm pretty sure I ran the tests. They ran green. Still, I ran them again because I didn't quite remember having run them. I'd say they're pretty fast.

jbrains on 03.11.05 @ 06:03 AM ET [link]

Thursday, March 10th

Ah, learning tests!

Yet another win for Learning Tests. It turns out that, ugly enough, creating a FileWriter (in Java) automatically blanks out the underlying file, even if I never actually write anything to it. That's just crappy, but at least I have a test that demonstrates the behavior.

jbrains on 03.10.05 @ 07:50 PM ET [link]

TDD evangelist? Moi?!

"October" says, about JUnit Recipes...

This is a book that should be on the bookshelf of any Java developer. I just finished implementing a continuous integration system here on my team, and I leave this one out on the corner of my desk. It disappears usually once a day, as the team starts to get up to speed on automated unit tests. I highly recommend it. My only quible with it is a general quibble I have with many things I read written by TDD evangelists: it assumes that the reason organizations don't refactor to support easier testing is laziness, inertia, fear, etc. How about because the system works as is, and trying to sell refactoring of a working system to project stakeholders is a tough sell? How about timelines are tight enough to just to hit the critical must have features that customers are demanding? Yes, I know testing is important. Believe me. However the system has a lot of EJBs that need to be run in container. I've mocked out where I can, where it makes sense, but applying things like Inversion of Control is going to have to be done over time.

I don't remember being a TDD evangelist when writing JUnit Recipes. I tried rather hard not to be, simply saying, "Here's what I'd do if I had my choice. If you can't do that, do this instead." This explains why there are so many recipes for dealing with legacy code that one can't change to bring under test. (For more on this topic, thou shalt read Working Effectively with Legacy Code.) Evidently, here is one case where I failed at my objective.

I don't have the energy to go back and re-read the book, because it's quite big and I have Too Much to Do as it is. When I do, I'll likely be embarrassed by the strength and naivete of some of my opinions about the importance of testability. I likely did a little soapbox speaking, and I apologize for that. My only defence is this: it had to be done.

Today, I counsel people to examine the tradeoffs between refactoring to support testing and testing legacy code as is. In examining the tradeoffs, I try to point out to people a few things:

  • The gain (in reduced costs) from refactoring is usually much more than people think.
  • The cost of refactoring is usually less than people think, if they have the right guidance.
  • The extra earned value from getting software tested sooner is more than most people realize.
In other words, while I counsel people to examine the tradeoffs, I advise them not to underestimate the gain/savings. If you need to do this kind of analysis on your project, let me know and we'll take a look.

jbrains on 03.10.05 @ 05:53 PM ET [link]

Wednesday, March 9th

Test-Driven J2EE: an update

To the attendees of Test-Driven J2EE at SD West Expo next week, we will be posting a downloadable Eclipse project containing all the dependencies for the first exercise. We will include instructions for installing and running the project, which assumes you have JBoss installed and the JBoss-IDE plugin for Eclipse. If you get that working, then when you update on Monday, things will go much more smoothly.

jbrains on 03.09.05 @ 08:40 AM ET [link]

Sunday, March 6th

I have some catching up to do...

I just looked at the story backlog on my desk under the category "Technologies to try". There are about 50 cards. Eek.

I suppose if I just put "cloning" at the top of the list, I could use the earned value to do the rest.

jbrains on 03.06.05 @ 07:09 AM ET [link]

Thursday, March 3rd

Eclipse vs. IDEA

After nearly two weeks of living mostly in IDEA and arguing with the locals about which is better, I have come to the conclusion that one of Eclipse's default settings is wrong.

Run/Debug > Launching > Save dirty editors before launching should, by default, be "Always" and not "Prompt".

jbrains on 03.03.05 @ 09:25 AM ET [link]

Wednesday, March 2nd

Contract Tests

Contract Tests explain how a class should extend a superclass or implement and interface, so that I don't have to read a bunch of prose to figure out how to do that. Typically, a contract test case class is abstract, then I extend it and implement a creation method or two to return instances of my own implementation of the given interface. That gives me a standard battery of tests I can run to drive my implementation. It might not be perfect (I'll have n failing tests to start) but I prefer it to documentation written in prose.

So if you're delivering something you want me to extend and I need to follow more than three rules, please deliver me some contract tests.

jbrains on 03.02.05 @ 09:24 AM ET [link]