Bugfixes in Scarab are hard
Ronny Voelker <[email protected]> Wed, 27 May 2009 04:24:31 -0700 (PDT)
| Newsgroups | gmane.comp.java.scarab.devel |
|---|---|
| Message-ID | <24346719.39571243423471453.JavaMail.httpd@localhost> |
Hello, The problem with bugs in Scarab is that they are usually harder (take a longer time) to fix than they seem - at least if you really want to fix the root cause of the bugs. Some of the recent commits were fixes for inconsistent data or nullPointerExceptions. And all of this worked that way, that they ignored the inconsistent data or unexpected null-values. The problem is, this fixes are just hiding the bug instead of fixing it. So the bugs are still there, but much harder to track down. Pile some of this kind of fixes one over the other and it takes days to track down the original bug. Last year this occurred multiple times to me, because Scarab seems to be full of this kind of code. It was quite annoying! I'm all in favour of 'fail fast'. The faster the code fails, the easier is it to find the bug and fix it. I also think that Scarab shouldn't have to deal with buggy data in the DB. Scarab is the master of its DB. If there is bad data in the DB it was caused by a bug in Scarab. So fix the bug and fix the data but keep failing if there is something inconsistent. When I fixed bugs, I tried hard, to understand the code, to remove the checks for unexpected null-values and fix the root cause of the bug. I'm sure that I have missed some root causes, which results in more Stacktraces displayed to the user. Maybe this is what Johannes meant, when he said, that he found v0.21 more stable than v0.22. In fact v0.21 is just hiding it's bugs! I even may have removed one or two checks for null, which made perfectly sense. Well, in this case we (I) have to add them back and to refactor the code that it is more obvious why it is expected that a value can be null. So I urge you, whenever you are fixing a bug, please try to fix the root cause instead of hiding it, to make the code base better instead of worse. Ronny ------------------------------------------------------ http://scarab.tigris.org/ds/viewMessage.do?dsForumId=455&dsMessageId=2355728 To unsubscribe from this discussion, e-mail: [[email protected]].