From: Joe E. <jo...@em...> - 2005-03-15 06:18:53
|
Bill Zwicky wrote: > Joe Emenaker wrote: > >> I think that we'd have more bug-free checksum methods if they were >> centralized in core.*. If there's a bug in one of the checksum >> methods that was being used by multiple synthdrivers, it would get >> noticed and fixed sooner. > > How many buggy checksummers do we have now? I don't know because: A) some checksum methods might have bugs that only show up 1 in 128 or 1 in 16384 times. B) the author of the synthdriver might have just copied a buggy one from another synthdriver and just coded around it. I'm assuming that your point is: "It's not that difficult to write a checksum method", and you're right. However, if enough of them are written from scratch, buggy ones *will* happen. Time will cause the improbable to be inevitable. > What are the odds that fixing a "bug" in a common checksummer will > actually break some other synth? The only way, that I can see, that would cause it to break another synthdriver is if that synthdriver *accounted* for the bug with its own code. But two wrongs don't make a right. I bug in a checksum method is a mistake. Trying to solve the problem by tweaking *other* parts of the synthdriver (instead of the checksum method) is *also* a mistake. > Does anyone actually *have* the problem you're solving? Well, I think the XML driver will. It's going to need (or want) to be able to choose checksum methods with a text string. More importantly, the problem I'm trying to solve is one of long-term code maintenance. Right now, there could be dozens of copies of someone's original checksum algorithm. What if a seldom-occuring bug is found in the original? I doubt that anybody is going to go find all of the other synthdrivers that copied its method. (My apologies to non-native English speakers at this point, because I should probably stop here, but I want to add a couple more points). I'm also trying to solve future code-bloat. I'm looking forward to the day when JSL has support for 1,000+ devices. Even if we are lucky and *every* developer in the entire future of JSL writes flawless checksum methods, then our best possible outcome is needlessly-bloated code and a lot of duplicated effort. Lastly, having centralized checksum methods doesn't *prohibit* having specialized ones, anyway. We could put the 4 or 5 most-common ones in core.* and still allow individual synthdrivers to put in their own. - Joe |