Re: [Junitdoclet-users] exception handling patch (bugfix)
Brought to you by:
sgemkow
From: Nicola F. <nic...@va...> - 2003-04-06 17:51:31
|
hello steffen On Sun, 2003-04-06 at 18:25, ste...@ob... wrote: [..snipped dismissive rant..] > The update frequency of JUnitDoclet is not as high as > in other projects, but there is good news in that: > > Don't touch a running system (if it's not nessecary). I deemed it necessary. And luckily I have other things to do than writing novels - because then I'd refactored JUnitDoclet so nobody would have recognized it again. No seriously, JUnitDoclet does a wonderful job, but needs change quite badly IMO. Important classes are very big (talking about DefaultTestingStrategy), and I have not encountered one exception in the whole project - everything is done with return values, even errors are reported back this way. clearly not that elegant, but works admittedly. > What I don't enjoy in that much detail is a stream of > untested patches, that make our software appear > unstable. To be forced to react on this issue takes Are you afraid of people contributing code and the fact that you cannot control what exactly floats around (speaking of patches)? I understand up to a certain degree. But it is still your group releasing official releases - so nobody (mentally sane) will complain about a non-official patch not working correctly. > away time from developing the tool. (I admit, in the > last few months I've been busy with other topics, but > now some of my time is for JUnitDoclet again. So > the statement is true.) Very glad to hear that. > Before we release a new version we run a lot of tests. > (Testing before the user does, isn't JUnit all about that?) 100% ack. and why do 8 of your 105 tests fail constantly, even without having touched the code? :) btw, with my patch the exact same 8 tests still fail. is this success? ;) > With respect to the goal you try to achive: > Is testing an exception really worth complicating any > tool? How often is it used in good programs? In my Sorry, no offence, but exceptions are an integral part of Java and if you don't think so, I have no problem with that either. But please let the other 95% Java programmers use exceptions, ok? :) > opinion exceptions should be used only in exceptional > cases. So there is very little of them. Right? Exactly. And what do you do, if (for example) somebody tries to set a negative price on a product? Business as usual? I'd throw them a IllegalPriceException right in the face! Generally speaking: Programming C in Java is certainly possible, but it's like speaking English with French accent. Works, but is suboptimal. > Don't test RuntimeExceptions if you don't throw them > (and you should't throw them) ! I have to admit that my example was kind of confusing. The patch only generates additional code if there _are_ exceptions declared to be thrown, and only then tests only those. You can check out the exact behavior for yourself, if you are interested. > IMHO there is not only "not enough testing" there is > also a "to much test code" when the real tests get > hidden behind a cloud of meaningless, generated code. 100% ack again. > Actually that is what some of the other test geneators > do: They claim to think on behalf of the developer and > produce nice, compilable clouds. mine are not even compilable, sniff. :) well, I put my thinking into code. And if someone does not like my thinking, he's better without my patch. It was never intended being different. > JUnitDoclet meight generate some kind of tests for non > RuntimeExceptions in the future but not now. As our > software develops in iteratations, there are features > that are much more important. Those will even serve as > a better foundation for testing exceptions by preventing > clouding the tests. I hope you will agree when the next > release is out, even if exceptions are not adressed. I will certainly take a look at the new release. > This email is not ment as an offense. You like our tool, > you use it, you spent time to add something which > seems usefull to you. You even shared your idea. > That is Open Source. Thank you. It is interesting how your email has changed attitude in itself (when comparing the first dismissive lines you wrote with this quite nice paragraph at the end). And yes, that's the way open source works. You don't have to like my patches (what the hell reminds me now of Linus? :), but I don't have hold back my patches either. After all, open source is about freedom, right? > All I ask is a little bit more testing before someone sends > out a message like you did. If someone has an idea to > improve our tool, please send an email to > jun...@ob.... We'll be more than happy to That maybe have been the way it worked until now. You have to accept that there are also creative people out there using the freedom you gave to them - they build their dreams with their own hands and don't have to beg. I certainly won't send bother you with an email if I see that the change is no more than 2-3 hours worth of programming and so can be done by me... > discuss that. And if it seems usefull to us too, it may > even make it into the next release (as do other user > suggestions like configurations for indent levels and > accessor prefixes). I assume I stepped on your toes - I am sorry for that. I am however not sorry for my belief in open, direct & fast communication - so I still think this patch got out the right time. If you don't like my patch being published on sf.net, then drop me a line and delete it, so I can put it on my website. One question: why did you chose the LGPL as license and not the GPL? Using GPL software for commercial software engineering is perfectly legal - or is there another reason? regards nicola |