samedi, février 07, 2009

How to waste 2 hours...

One of the biggest problem when you are using the Apache project you have participated to is that you have hard time trusting yourself.

Last thursday, I spent 2 hours debugging Apache Directory Server just because the program I'm working on (which is based on ADS) was failing. Obviously, it was an ADS bug ! What a damn idiot I was... Instead of blindly trust ADS, I should have focused on my current code ! (thanksfully, it only took me 2 hours to realize that).

What kind of lessons did I learnt from this bad experience ?
- first, just realize you are a client of your Apache project. How many times you replied to a user on the mailing list : "hey, you'd better have a real reason to think that there is a bug in the project instead of a bug in _your_ code...". Generally speaking, you are more likely to FU in your new code than in the project's code !
- second, resist to the idea to go knees deep into the project code just because you have a deep knowledge of the code base. Step back, ask your co-workers, and try to check the code you have just wrote.
- last, not least, improve the Apache project's error messages ! Really, it helps :)

Otherwise, it's a really good thing to use teh Apache project you are working on for some client : you have a better perception of what is good, what is bad and what is ugly. And you can improve the project in the process :)