PermaLink Oops! - found a bug in class BetterListStr03/27/2007 08:47 PM
Some work I did on a potential open source project turned up a problem in the BetterListStr class I posted a while back. Turns out there's a flaw in my "double-indexing" technique. Why didn't it crop up before? Because I used the class in a new way. Or, put another way, there wasn't a test plan or a unit test for the class. It was just a little class after all...

But even little classes can harbor big bugs as I have just managed to demonstrate. What happened here? My BetterListStr class keeps a second index to allow the list to be traversed without knowing the keys in advance. This has been in production use since July 2006. It works well and continues to work well because it doesn't ever try to update an item that's been put in the list. Updating the "normal" list index is no problem; That is part and parcel of what lists are for. Updating the second index is where things get break down. As written, there's no way to determine the second (numeric) index given the first index. Attempts to get at any updated data stored via the second index will get the original data.

I haven't fixed this in the class yet. I'm still considering the best way. Another list in the class that stores the index of the first key might work.

Technorati:
This page has been accessed 51 times. .
Comments :v

1. Jens04/01/2007 01:22:51 PM
Homepage: http://www.ligonet.ch


Bruce .... look at my comment to your class ...

***
Another point, if you update an entry, you only update the entry, that is accessible by "key", but not the second entry, that is accessible by the count-on-creation.
***

So I already pointed that out back then and gave a way to resolve the problem




Add Manual Trackback
Please enter the details of the trackback post. Your trackback will not appear on the site until it has been verified. This won't be immediate, as trackbacks are validated on a scheduled basis. Be patient.











Powered By :

BlogSphere V1.2 Beta 3

Join The WebLog Revolution at BlogSphere.net

Contact Me
The BlogRoll
What is a Jagular?
It is a malapropism for jaguar found in Winnie the Pooh and has nothing to do with jugulars.

usually

for more information about jagulars try here
Lotus Domino ND6 RSS OPML List RSS News Feed RSS Comments Feed Geo URL netcraft RSS Validator Blog Admin Lotus Geek Chris. A. Brandlehner Open Notes Picture Database OpenNTF CoComment Integrated BlogSphere
Calendar
No calendar found.
By Category
Hot Blogs
No Hot Blogs
Monthly Archive