Airing Out Some Guilt, and some Gratefulness

Confession is supposedly good for the soul. Mine’s always been just fine with forgetfulness, but since it’s at the front of my mind today…

I’m sorry I forgot your birthday.
I’m sorry I was too selfish with my time to let you spend any with your great grandson, or more with your great granddaughter. It wasn’t thought of as a decision not to let you have that time. Just a decision to do other things. Same result.
I’m sorry I didn’t come to see you since Grandpa died. I’m sorry I didn’t go see him while he was sick, either – even though at the time I was convinced I’d rather not see him or you in that condition. I wish I could change that decision.
I’m sorry my opinion of you lately was “cranky” more than “lonely”. And that I thought you needed to be alone, more than to have company.
I’m sorry that I let other people form that opinion for me.
I’m sorry I don’t have a picture of you and I. Or Grandpa and I.
I’m sorry my children won’t have pictures of themselves with you or Grandpa.
I accept responsibility for these things.

I still remember how your cheek felt against mine. How the water at your house tasted. Going to visit you while you were camping, and the tuna sandwich you made me on pumpernickel bread. How much you always knew about what everyone else was up to. How you had so many photos and stories of so many of my relatives. How I never heard you speak a cross word to me.

I will also never forget porcelain dolls I was not allowed to touch, pet birds I was not allowed to touch, statues of dachshunds, Christmas villages, your cuckoo clock, your doilies, or the Cambridge diet.

I’m grateful I knew you.
I’m grateful you knew Jesus.
I’m grateful for the birthday and Christmas cards.
I’m grateful for the dollars per birthday and time together and doughy-cheeked hugs and kisses.
I’m grateful for the last conversation you, Grandpa and I had – when I learned about the day you got married so young, and how you moved south when you were little.

I regret that all the memories of you that I can summon take so short a space to write down. I hope I’ll remember more than this, for the rest of my life.

I love you, and I’ll miss you.

Google Maps: Screw the highway, Cut across town!

I’m expecting a package, shipped by ground from Las Vegas to my home in Adrian, MI. I decided to see how long Google Maps thinks that trip would take.

As I perused the results, I traced the little blue line for a while, to see what course they’re following, and what towns it goes through. I didn’t expect it to actually go through a town.. Lo and behold, I’ve found that Davenport, Iowa is in mortal peril. Google has decided it’s more effective to cut across town than to take the highway around it. Beware, Davenport.

Screw the highway, Cut across town

Actually, you’ll notice the blue line veers off the road a bit on the east side of town, too. Does Google’s blue line get drowsy like a real driver? Is that a side-trip to see the world’s largest ear of corn?

And by the way, I flipped 230,000 miles on my CR-V yesterday. I think upon 239,000, I’ll christen the car “Alice”. As in, “To the moon, Alice!”


This is ASPLint.vbs:

Actually, it’s more like ASP-VBScript Lint. Sorry, JS programmers. Sorry, .NET programmers.

Here’s what it does, and why…
in ASP when you “SET object = …” an object, that object starts occupying memory. If you don’t release that memory (SET object = Nothing), it never lets go of that memory. Even after the page finishes. Even 3 days later. IIS isn’t too sharp about its “garbage collection”.

ASPLint exists to scan a web server directory for files that have objects SET, and never released. It traverses the entire directory tree you start it at, and examines separately, and in context, every ASP page in there. It creates a log of the objects that aren’t closed, by filename, approximate line number and variable name. Should make finding and fixing memory leaks in your ASP apps much easier.

It doesn’t count comments. It doesn’t calculate white-space. It doesn’t have a neat interface. It doesn’t cost $400. It does help solve the memory leak problems I was having.

How it works:
Assign the four variables near the top of the script: strRoot, strTypes, strLogFile, and intLimit. They tell the script what directory to start in, what file types to look at, what logfile to create, and how many errors are a good stopping place (I hate being overwhelmed by errors to fix). Call the script from the command line: cscript.exe asplint.vbs Go get a pot of coffee.

While you’re gone, the script will start in strRoot, and open every file that matches the filetype extensions you gave it. For each file, first any #include-d file is also opened, and chunked together with the current file – just like ASP does when it displays a page on your webserver. This does NOT actually change your file – the chunkin’ happens in memory. Virtual or File types of #Includes both work, although if you use virtual include types to virtual directories, well, that’s just crazy, and ASPLint won’t go there.

Once the entire file (includes and all) has been assembled, ASPLint starts from the top and looks for any occurence of “set (somevariable) =”. I’ve attempted to be smart about it – it’ll find SETs that are on a line by themselves, or are in one of those annoying : colon : separated : lines that gang several instructions onto a single line. Punk. Don’t code that way. Lines that are ‘ commented out get skipped, so the count should be half-accurate.*

If a SET if found, a corresponding SET … = Nothing is also searched. If that’s not found, that filename, approximate* line number and variable name get logged to the logfile you named.

I tried to make the logfile smart enough so that each file’s dangling objects will only be listed once.
I Tried.

* About all those asterisks…
First, you can probably guess that flow-control statements are obeyed in ASP, and skipped in ASPLint.
Consider this:

if 1=1 then set objMe = Some.Object
if 1=0 then set objMe = Nothing

ASP will obviously only perform one of those two commands. Yay for ASP. ASPLint assumes they both worked. Boo for ASPLint. But accounting for Flow-control statements gives me a headache. You should be writing better code than that anyway — I’m not your mother, I don’t clean up after you.

Second, because ASPLint chunks all those included files together, its count of lines from the top of the whole memory chunk isn’t quite accurate. Sure, I try to calculate the space taken by includes, and I do a decent job of detecting objects opened/closed in includes instead of the file that included them, but there’s a really good chance the line numbers you see in the log will be wrong. The degree of wrong goes up as the number of includes increases. I didn’t feel like figuring the whole thing out. Given the right filename, the right variable name and an approximate line number, you should get close enough to find the little bugger yourself.

There. Now you know what I was planning. You can browse/change/steal the code below, and make any use of it you want. Is that a GPL License? Creative Commons? I dunno. I don’t care. Do what you like, but when you speak of me, speak kindly.

Oh, and realize there’s probably bugs in here (inefficiencies, stupidities, vagueries, etc.). I know that. But I have a real job to get done, and this was just a hacked-together means to an end that I’m giving the world for free. Complain not. If you DO happen to fix or enhance something, please do send me a copy – Jonathan @ this website. I’ll put it back on my website for the rest of us ASP coding peons to enjoy.