Someone else's code-fu

Good things: calls to Andrew and Joy, watching movies with Jeff, cuddle time with the cats, and oh yeah, code-fu.

Notice I didn't say that it was my code-fu. In today's case, it isn't. More correctly, it would be a large bit of whimpering on my part and twenty minutes' worth of code-fu on Gareth's part. Never mind thef act that I spent multiple hours tracking down a code problem that turned out to be a correctly named variable in the wrong scope.

It's the kind of thing that'll drive you to drink. Questing for missing parentheses I can deal with, but this was sheer and utter madness—and all this for multiple log files! Oi, the things I do…

So what got accomplished today? Not much, in truth. The big part was getting the pesky variable problem solved (and, as I check the scoreboard, I see that the current score is Gareth 347, domesticats zero). I did, however, finish up my first full page of the admin section today.

Do try to hold back your excitement when I tell you that it's the "view usage log" page. Next to the "back up my database!" page, it's quite possibly the least exciting page in the entire admin section. Admittedly, the part where you can sort (and display) only errors that match your particular type is rather swank, and given time and a decent bit of sleep, I think I'll be proud of it.

The best part is that, well, now I have a bit of automated logging set up. I told Gareth the neatest part about having this page done is that I no longer have to monitor things by hand. Every page I write up means another few functions that don't have to be performed by a command line.

I'm thinking that tomorrow, I'll start on the "edit yourself" page. It shouldn't be horrifically difficult; it's pretty straightforward yank-it-from-the-database and save-if-necessary stuff. I should also be able to re-incorporate most of it into the superuser author-editing page. Do those, and I'll be able to add, edit, and delete authors from the web interface instead of [laboriously] creating them by hand.

My enormous user-verification function, verify_user(), desperately needs cleaning up. Gareth was kind and didn't call it spaghetti, but I believe my retort was along the lines of "You'd say something nice about it if it were slathered in tomato sauce and had meatballs on top!"

Yeah. It's rather yucky to look at.

All in all, things are getting accomplished. I know that my user auth routines need cleaning up, but they work properly, and the determined-by-permissions navbar works properly as well. I can also pretty much check off the usage log page.

One down…and about eighteen to go.

all tags: 

Comments

It's fun to read these pages with the skin with Edmund on it ... he's staring at his kittymommy and saying, "Can you come out and cuddle?" Heh. :P

Oh, the joys of scoping. Just think, if you were programming in another language the code might have worked because of scoping issues. Oh, the lovely things I learn at school. Btw, I sympathize. I was having the exact same problem earlier today with my Pascal program. Glad you were able to get things working.

*LOL* Pascal scoping is so SCREWY! That was one of the things that screwed me on my compiler. I wrote the whole thing assuming C scoping rules -- NOPE! Oh man, was that ever a bitch to fix -- I think it took me about a week and a half to think of a way I could pound my symbol tables and intermediate representation into submission. Then I spent the next three or four days trying to get it to work.

Yeah, I know. I had to very carefully layout the pseudocode in comment form for this code so that I wouldn't try pulling a C scoping on this program. I can understand it, but it's still screwy to me.

/me watches the pretty words whiz past his bald head

Yeah, now things just go skipping along past your bald head, whereas before they had a chance of being stuck in the hair and eventually being absorbed... ;)

I argue the exact opposite. Learning by osmosis is easier nowadays.

You don't have to worry about scope if you declare everything globally. =)

*LOL* That's like chopping off your foot because you got a blister.