Well, take a look at this case. I created a unit test that tests whether I can set the properties on a message header type implementation.
The test tests setting properties on the proxy instance like the BCC, CC, FROM, TO and finally the SUBJECT field. All of those properties except one worked: the subject field crashed the unit test.
I checked what the tests does and noticed there was one difference with the other properties: all the other fields forced me to create at least one CamelInternetAddress object before creating the CamelMimeMessage instance. Different from the TO, CC, BCC and FROM fields didn’t the SUBJECT test force me to create such a CamelInternetAddress instance first for setting the SUBJECT on the CamelMimeMessage instance.
It turns out camel_mime_message_new doesn’t work when you haven’t yet created another Camel object first. So basically, this can mean that camel_mime_message_new doesn’t initialize Camel like other CamelObjects do. Or something like that (I don’t know). The camel_type_init didn’t make the problem disappear. It does change the behavior of the crash.
A typical Evolution debugging session wouldn’t have showed this problem as Evolution probably initializes Camel very early. Only unit testing kills bugs like this before shipping the library and before declaring it stable. This is why the GNOME development community should use unit testing more often. We probably are shipping a lot such bugs in our core libraries.
It would be very doable to create a bunch of unit tests for camel. Just like how it would be very doable to create a bunch of unit tests for gtk+ and/or any other popular and important core GNOME library. Such unit tests could very easily be build to detect regression bugs early. Why aren’t we doing this? Why are we only using our girlfriends as our testers? This way, we aren’t going to convince ISVs about using GNOME as their target platform for customer software development.
Here’s my proposal for making Jeffs 10×10 concept succeed: let’s stop behaving like Ren & Stimpy hackers and start thinking like programmers.
Oh, before people get grumpy: there are a lot gnome-related companies who do unit testing already. And I’m not saying unit testing detects all bugs nor am I saying camel sucks. All human creations have bugs. It’s how you deal with it that makes the difference.