Did some good work yesterday, and over the weekend, after last Friday's failing. Seems I need some down time after every few productive days. It feels like I'm not doing anything, but maybe that's not actually the case. It's interesting the way the mind works on problems.

It used to be that I slept very deeply straight through the night. Every time. Now that hardly ever happens. Lately my pattern has been (as best I can make out) to sleep for a few hours. Then I wake up after a first round of dreams. Lay in bed for a while unable to get back to sleep. After about 30 seconds my mind starts working on code again. I can't help it so I just let it go. Eventually I fall back asleep, and then after another dreaming episode I wake up again and start back in on the code. I think I had about four cycles last night. This is pushing back my wakeup time a bit in the morning. But on the other hand, I'm actually working during the night.

Yesterday evening I was sitting at the bar at aKa having a glass of wine, waiting for MB, and writing notes to myself about things still needing to be done in the new system. And then it hit me. Not only could I move comment page directory entries out of the main directory table, but I could just get rid of them all together. Without losing any functionality! It's easy to make huge breakthroughs when your original idea was so far off. Here are some numbers concerning this site which might illustrate why I'm so excited about this:

There are 4,379 entries in the directory table. These entries correspond to the 4,379 pages on this site.

But under my new system I'll only need 231 entries to categorize the same information (most of those 4,379 pages are threaded comment pages which, it turns out, don't really need to be in the directory.)

The subscription table is even worse. With one entry for every users subscription to every page we presently have 144,507 entries in the table (33 users X 4,379 pages.)

In the redesigned system this number would be 7,623. I will have to add one column to the table to make this happen, but still it's a major savings.

These are some startling results. We'll see if I can make it work. If so, then my fears about hitting the ceiling for how large this system could scale have been pushed back quite a bit. I'm going to try to get it minimally working today.
- jim 1-29-2002 3:33 pm

O.K., it's minimally working. What does that mean? It means that everything I could think to change has been changed and that new code seems to work, at least in the most straightforward way. Probably I have introduced some bugs and these will become apparent with more testing. But I would be surprised if I found any major bugs that would make the whole thing impossible.

The worst case now is that there are bugs, but I won't find them until much later when many other people are using the system (maybe the bugs only show themselves under some weird set of circumstances, and I didn't think to test for that circumstance.) By then it will be harder to fix because I will have forgotten exactly how I did everything.

If I was a better coder everything would be more clear. And the documentation would be better. But while I am improving, I'm still not very good at these finer points. Right now I care most about just making it work. That's the short sightedness of an amateur.
- jim 1-29-2002 8:09 pm


"Right now I care most about just making it work. That's the short sightedness of an amateur."
No, that's the concern of someone who is actually involved in the process of making something. Good work.
- steve 1-30-2002 2:08 am





add a comment to this page:

Your post will be captioned "posted by anonymous,"
or you may enter a guest username below:


Line breaks work. HTML tags will be stripped.