It looks like more stormy weather ahead! Oy!
Due to an unbelievable workload and an upcoming friend’s wedding it turns out that I am completely swamped and exhausted to the point of being able to do not much else. So I’m going to break the build-something-every-day rule until next week, until after the wedding. In fact, I may not be around a computer much after Thursday anyways, so I will probably not have a choice!
But in positive (non-)news, I have been thinking about the applications for the site once it gets up and I can see a lot of possibilities. Hrmmmm….well, just wait and we’ll see!
[Updated 2007.05.23 00:38]
I just added the user object tagging facility. This means you can now tag things by user! I’m also trying to do a little optimization by allowing you to pass in the objects being tagged. You still have to pass in the IDs but previously the code would do a lookup based on ID to get the object—what if you already have the object? That would save a trip to the database!
This isn’t tested yet. I’ll try to do that tomorrow.
Since changing the error message reporting to return a general error category as well as a message that semi-broke the user creation page. Tonight was spent writing a splicer to separate the category from the descriptive message and to generate a meaningful user error message. It seems to be working; the server stalled before I could finish the test.
[Update 2007.05.13 02:37]
Oh, nope. It works fine. The server has come back up and after addressing a couple of syntax errors it’s working very well.
Yay! Date tagging is now active! The routine for adding a time tag is now active. The important thing is that it also updates a flag in the object registry to tell it that there is a date tag for that object. I also checked to make sure queries were using the indexes, and it appears that EXPLAIN SELECT is showing the right results.
Posting a half-day late, but I was so tired last night I closed the little laptop after finishing up…
I finally got back to looking at the code and put in rudimentary tagging for dates. This is sort of a first test to see if 1) tags can be stored, 2) tags can be properly associated with the parent record(s), 3) indexes actually work. I need to make sure that queries for tags don’t miss the index otherwise it will quickly bring the database down since almost everything is automatically tagged. I think I’m planning on adding a keyword scanner that will pick up certain keywords automatically and add tags for them.
I still haven’t run the code so it’s very likely things will break later on. But I just simply don’t have time to do it.
I’m still worried about Ruby/Rails performance. But I’m hoping that by funneling all database requests through a library that one day if I need to change things that it will be as simple as replacing the library, leaving all calls intact.
Speaking of leaving calls intact…
I’ve been working on a project at work for integrating someone’s API. Now, their API includes parameters which must be passed in sequence, e.g. function foo( param1, param2, param3, …). Now, in the past couple of days the authors rewrote the API which means that you now have to walk through the code and change the parameter order. Oy. That’s horrible. This is my perfect argument for why I use parameter maps, e.g. function foo( ‘userid’ => val1, ‘password’ => val2, …). That makes it impossible for this situation to happen. Sure, it’s slower, but it’s more sane. Plus I often allow a pass-through for arguments which I don’t understand currently. (The hope there is that as the code is enhanced that it will still be backwardly-compatible.)
I’m trying not to let this happen. I’ve gone a full 4 days without any work on the site and that’s bugging me. True, I much value the time spent with bandmates, friends, and generally staying out late. However, progress must be made. Though at the moment I’m just beyond exhaustion from everything going on. So, maybe tomorrow, the 8th, I’ll put some more muscle into getting at least something done!
Delved into why the object registry and user registry tables were not being populated and it came down to me making a stupid error in the SQL DDL. I had been trying to be smart and put in indexes for heavily-scanned columns and when I cut-and-pasted the index syntax I had actually be cutting-and-pasting the unique index syntax. It’s pretty obvious, but I was working fast to get it up. So the good news is that the registries are now being populated exactly as expected.
What’s still needing fixing are: 1) tagging facilities, 2) trapping exception messages and creating user-readable versions of them.
Regarding the exceptions, I think I’m going to change the way the DB utility reports them. Right now they’re one big long string, no delimiters. I think I’m going to change it to be a string with a newline delimiter: “n“. The user interface will extract the error code from the message and then determine how to display that message.
All in all, though, I think things are going well and I should have tagging up this weekend. Hopefully beyond that you will actually be able to create an account and log in.
Despite being really tired I am making progress! Tonight I went back into the user generation code and put in the rudimentary registry entry and user entry object creation. Now we just need to add a tagging interface and we should be done.
I spoke to a friend about strategies to manage database tags. It’s pretty much what I expected he’d say, and it seems to be working for him.