On Thu, Sep 05, 2002 at 04:36:58PM +0200, Oskar Sandberg wrote:
> Another interesting issue is with the trees. Earlier there were a lot of
> complaints about routing table weirdness, ie it would return Route Not
> Found with only one attempted route even though the table was full. I
> changed routing table from being backed by a red-black binary tree to a
> skiplist a while ago. Are these errors still occuring?

I haven't seen any.

> It would be nice they aren't, because the only other place the red-black
> tree is used is exactly in the filesystem accounting code, and that could
> also be made to use skiplists (balancing trees are very complicated
> structures, and while the one we have passes some VERY rigorous unit
> tests, some extremely esoteric error condition is still possible.
> Skiplists by contrast are very simple structures and I'm quite convinced
> that the one I wrote is working.) Of course, life is never that simple.

Well, it sounds like we should switch to skiplists everywhere that 
red-black tree is used, and see if that resolves the problem.

> In the long run though, it is not realistic for us to use a large chunk
> of code like that unless somebody is willing to maintain it.

....unless it is sufficiently well documented (not just APIs, but from 
the top-down) that someone can get up to speed with it without too much 
difficulty.  Many parts of the code fail to meet that criteria - and it 
is probably my fault for allowing people to check-in insufficiently 
documented code.

I would argue, in retrospect, that introducing complex and 
insufficiently documented code into CVS is ultimately more damaging than 
not doing anything, since it demotivates those who might be willing to 
do the same job, but properly.

It is unsurprising that there has been some developer-turnover - there 
is in every project, but the fact that people are leaving the project
and their code undocumented (and again, simply documenting the APIs is
insufficient, good documentation requires high-level overviews of
packages and systems of packages too).

We either need to raise people from the dead to come back and document 
their code properly - so that it can be picked up by others when they 
need to - we document it ourselves if we can figure it out - or we 
replace it with properly documented code.

Ian.

-- 
Ian Clarke                                        ian at freenetproject.org
Founder & Coordinator, The Freenet Project    http://freenetproject.org/
Chief Technology Officer, Uprizer Inc.           http://www.uprizer.com/
Personal Homepage                                       http://locut.us/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
URL: 
<https://emu.freenetproject.org/pipermail/devl/attachments/20020905/49e5ec17/attachment.pgp>

Reply via email to