Click here to show or hide the menubar.

Rewrite of html.directory.walk


I had been aware there were some bugs in the way outlines handled links to documents. I had gotten all the bugs out that kept howtos.opml.org from working, but now I hit a whole other set of issues in trying to get the outline for newbie mode to work.

I fixed a number of them, only to find more. And it's a bad sign that when you fix a bug others pop up. There was cruft in the way all the pieces fit together. And this is where some very big pieces fit together, one very old (the walk code), one very new (the outline renderer) and one with a lot of culture (worldoutline's main routine).

But there was a big mistake in the way the walk code worked. I've been juggling so many huge pieces of code, this is one that I never was able to focus on. I just sort of accepted the way it worked, and tried to work with it. Mid-afternoon yesterday I decided that I was spending a lot more time working with the problems that it would take to rewrite the main loop. And when I decided to do that, I found that I didn't need to. After deleting all the dead bits, and simplifying, and adding a case statement where there was a nested mess of if's and flags, I could see exactly what the problem was. It was already trying to do what I was going to make it do.

Anyway, there's a new release of html.directory.walk, and it's a major rework. That's the point of this post. It shouldn't behave any differently on existing sites, and some sites that didn't work before, particularly outlines, may now work.

Parts

html.directory.walk

html.directory.viewDirectory


Posted on Tuesday, April 24, 2012 at 9:14 AM by Dave Winer.