A comma, a comma, my kingdom for a comma!

Work on Quarto progresses.  Having firmly re-saddled myself a day or two ago, I settled in and got some real work done today.  Hence, the lack of entries (did you get lonely in the meantime?).  Probably most cheerworthy is the stunning fact that there is now something to actually <em>test</em>&mdash;in addition to user authentication and logging functions, I now have full user editing capabilities set up.

These capabilities make it much easier to test out new functions; it's much nicer to be able to add in a test account from the web interface, instead of needing to do it from the devilishly-charming mySQL command-line interface.In the grandest of domesticat style, I spent the good portion of an evening puzzling over why the 'superuser-editing-another-user' page wasn't working right.  Gareth counseled me to give it a rest until the next morning, but instead I spent until one a.m. poking and prodding the unresponsive code to try to figure out what the problem was.

Eventually, I gave up, and curled up with an Iain Banks book on the couch.  Even rereading the deadly bleakness/seriousness of <u>Use of Weapons</u> was far preferable to [repeatedly] bashing my head into code that simply refused to work.

This morning, I unearthed the problem:  a stray comma inside the second of my two db queries, which caused the second query to fail every time.

Having gained both calmness and introspection in the hours since I found the error, I'd like to say that my initial reaction was "No wonder only part of the user information updated itself!"  In truth, it was more along these lines:  "A comma?  A single comma?  A single, useless, stupid comma in a stupid* mySQL query caused all that?"

Of course, it's a lot more realistic if you start those sentences in a low, growly voice and then escalate the tone so that, by the end of the third sentence, the words are being uttered in a high-pitched wail. 

The cats don't like such vocal theatrics.  mySQL wasn't much impressed with them either.

But, hey, it's all better now.  As said to Will this afternoon:

Amy: people creepy.  code lovely.
Will: =) ahh. you HAVE become one of us!

Stupid databases.

* Editor's note:  Everything is "stupid" when it gets in my way.

Comments

Ahhh... welcome to the world of programming. I spent the past two days debugging a program at work. What was the problem? I initialized the for loop with a j, but incremented with an i. Do you know how hard it is to see the difference between 'i' and 'j' when looking at 400 lines of $#%# code?!

YES. OH YES I DO. (Weird. I felt like I was channeling canspice there for a moment...) Anyway. Yes. I totally understand. Minor update: in addition to authors, categories can now be fully edited from the web interface. Later on I'll have to write some more detailed queries to show how many posts each category has, but that can wait until later (i.e., when I have posts). For now, I've just left a placeholder. I have a choice on what to tackle next: either the 'generate db backup' page or the 'add/edit an entry' page. I may well do the db page first, since I know that a) it stands alone and b) isn't going to be nearly as difficult as the set of pages regarding entries. Oh, how I would love to finish this up before dragon*con. Oh, how unlikely I think that is.

I would work on 'add/edit an entry' page. Then do backup work once you can tackle all of it. Just my $0.02.

I don't know what's funnier: reading this series of entries, or hearing from Amy via IM while she's coding. :)