A blog about the joys and perils of software development

Monthly Archives: March 2011

Zero Tolerance: Writing Good Software Is Tough

When I had the opportunity to participate in a new project with no dependencies on legacy code, I thought I would try something new, just for fun. Let’s call it zero tolerance: “when finding flawed code, fix it *now*”. […] It is tough on your mental health to just ignore the easy-to-reach reward and do the really boring stuff. […] I expected it to get easier over time. The funny thing is, the amount of code that needs to be fixed seems to be constant over time! How is that possible? Continue reading

Eclipse Won’t Run All My JUnit Tests

Here’s a Eclipse/JUnit4/Maven problem I came across, maybe my “solution” can help someone else. I was using Eclipse to unit test some Maven projects in Java. I noticed that Eclipse only executed two out of my four JUnit4 unit tests. Right-clicking a test case and choosing “Run” on it gave me an error: “Unrooted test”. […] Continue reading

Decoupling Starts with an Interface, but Where Does It End?

Decoupling is more than just talking to interfaces. How do you write code so that nowhere in the code do your classes refer to each other? How do you write code so that you can replace a module in run-time? How do you write software using geographically distributed components? Continue reading

Strands, Concurrency and Message Passing

Using locks for synchronization makes software development difficult, with run-time problems such as deadlocks and live-locks. There are also design problems: locks break modularity since they do no obey module boundaries. […] In my experience, message passing is a more appealing way of handling concurrency complexity. A nice way to implement message passing is the concept of “strands”: message passing that uses a fixed number of threads. […] Continue reading

Lean Software Development

In essence, “lean” means “reduce waste”, and “waste” means “everything that does not make your customers happier”. […] When a customer ask you for a feature, how long does it take until they get it (calendar time)? While implementing it, how much effective time have you spent on the feature? The difference between calendar time and implementation time is waste (since waiting makes your customer unhappy). […] Continue reading

Test-Driven Development Done Right

A couple of years ago, I had at least two misconceptions about Test-Driven Development: (1) you should write all your tests up-front and (2) after verifying that a test case can fail, you should make it pass right away. […] Continue reading