Mostly, I do business software. That may seem surprising since I work for the Space Telescope Science Institute and we not only operate Hubble for NASA but we’re also working on the James Webb Space Telescope, which is the project I’m deeply involved in at the moment. So you might think the work I do here is all sciencey and stuff and it mostly is, but not in the flight engineering sense of it. I do business software, and science like everything else has to account for its money and time. So as it turns out, a lot of my work still revolves around Microsoft products, and doing traditional business client-database applications. The other day I was tweaking something I’d done in Excel VBA (Visual Basic for Applications…a product Microsoft hasn’t upgraded in decades, probably because there is so much legacy stuff out there in their business user base). It was your basic fetch some data from a backend database server and feed it to Excel and let Excel make tables and charts out of it for management to ponder. And I needed to do something that I figured I could use a custom document property for. Which I could, but not exactly in the way Microsoft’s documentation said I could.
You run into this phenomena quickly in this trade: The Documentation Lies. Or more charitably, it is out of date. The documentation is buggy. The documentation is written by people who write software and hate writing documentation. If religious fundamentalists had to actually use passages in the bible like we software developers have to use the documentation and example code snippets we’re provided with maybe they’d stop waving that thing at everyone, and try a little figuring things out for themselves like we’re always doing…desperately at times. Oh you’re worried about the second coming are you? Let me show you my project’s Gantt chart…
See…I hate using Magic Numbers…
In programming, a “magic number” is a value that should be given a symbolic name, but was instead slipped into the code as a literal, usually in more than one place.
It makes the code hard to understand, which makes it hard to maintain. This is something a programmer is wise to avoid, even if it’s code you are nearly certain only you will be maintaining. Time passes, the universe expands, and you open a code file you haven’t touched in years to make a small change and you’ve forgotten what ThisWorkSheet.CustomProperties.Item(1).Value referred to. Better to write it ThisWorkSheet.CustomProperties.Item(“GetsGraph”).Value. And lo and behold the documentation says I can call that property with either a numeric value (the property index) or a string value (the property name). But it does not actually work that way.
Let it be said Microsoft is hardly the only culprit here. My first experience with this sort of thing happened right at the starting gate of my career as a software developer many many moons ago, when I was a youngster doing volunteer work for a gay BBS system (before the Internet Tubes came along) and I was asked to write a system for a local gay activists organization to generate welcome letters and membership funding letters and mailouts and so forth. They had a licensed copy of Ashton-Tate’s dBase IV which back then was the powerhouse database system for PCs. It was working my way through the dBase documentation while trying out their code snippets I had the displeasure of finding out that computer documentation will lie though its teeth at you and laugh at your pain and suffering. In those days I hurled many a programming book across the room. Nowadays I glance at the time and do a quick rough calculation of how many minutes until Happy Hour.
So I got through my little difficulty the other day by creating a sensibly named numeric constant that I can pass in lieu of actually passing the value of the name of the custom property whose value I want to check. That’s what we call in the business a kludge, because I’m not certain the property I want will have that index value Every Time. I think it’s likely since I’m the only one maintaining this code, for now, and I only have that one custom property in there. But what happens when someone else gets into this code? Okay…I’ve commented my useage of the property. But maybe the next update to Excel changes the starting index from 1 to 0? Surprise!
Oh well. So I get things working to a close approximation of my satisfaction. Then I sit back and I ponder the Five Stages of Software Development…
Denial: Oh I probably just forgot to close a parenthesis somewhere.
Anger: Oh F*ck Me…that is a COMPLETELY LEGAL FUNCTION CALL!!!
Bargaining: Maybe if I use single quotes instead of double quotes…
Depression: I should have gone to art school…
Acceptance: My software tools are buggy, the vendor is shady, the next upgrade cycle will probably depreciate my entire code base, but the bar at Rocket To Venus is open late.
That Feeling You’ve Done All This Before…But Differently…
Facebook has this memories thing where it shows you all the posts you’ve made on this day, running back to the beginning of your Facebook account. Here’s what came up in mine today…
It was prescient…I watched Gollum fall in with it last spring. But he was happy at last, so there’s that.
It would have been ten years this October 6. Now I just wait for the boat to take me to The Undying Lands…
I wake up this morning from what my Fitbit confirms was a really lousy night’s sleep. Ten hours, but sprinkled within that two periods of wakefulness and 23 (!) periods of restlessness. I turn on my morning Pandora station, a generic “Relaxation Radio” channel. It starts playing a lovely, relaxing piano melody. Now I’m beginning to feel a tad better. So I look to see what it is that’s playing.
It’s called The Dark Night of The Soul. The artist is Philip Wesley. I had no idea the dark night of the soul was so…relaxing.
Some days you get up on the right side of the bed. Some days you get up on the wrong side of the bed. And some days you get up on the surreal side of the bed.
Wandering the all new Disney Springs today. Almost the entire area that was once Downtown Disney and Pleasure Island has been massively redone. The old maps in my head are half wrong now. But staying at a nearby hotel makes it possible to get it out of my system without having to deal with the new parking garages and street changes. Tuesday I go to my DVC room at Boardwalk for a few days. I reckon I’ll hit the water parks in the morning and the theme parks in the evenings. Maybe. Boardwalk is nice enough I can just hang out there all day too. This makes for a nice respite from travelling the great plains last week, and my cameras being mostly disappointed this trip. But I got a few good ones. Tell you more later.
Disney Springs is crowded this holiday weekend. That’s to be expected. Normally I hate crowds. But every now and then they bring me nice things. Like beautiful young visiting latinos who still wear briefs, out of style though they seem to be in this country, and silken athletic shorts over them that, long and baggy though they may be, make that fact clearly evident, and let you see the seams move as they walk along in front of you…
I made reservations for the dining room at Wolfgang Puck’s tonight since it’s holiday crowded here and I wasn’t sure I could sit at the bar downstairs. Turns out that was no problem, but there was a bar upstairs too so I sat there. It’s not that I have to drink Every Night. But sitting at the bar makes it easier for the single traveler to talk with his fellow diners. And if the bar is empty, as it was this night for some reason, there’s always the bartender.
I was wearing my rainbow Mickey pin and the bartender noticed. He began telling me about his friends who were at Pulse the night of the shooting. Three guys, two of which were on the fence about going that night, and the third who really wanted to go, so the others went along with him, and they died and he lived, and now he can’t forgive himself…
The article is about an Ambien user who crashed her car, she says while sleep driving on Ambien. It’s not a difficult defence for some of us who have encountered Ambien’s little side effect to accept. The comments on this article wherever it is shared, by folks who have had the experience of sleep walking under it, are very very creepy, even if nothing serious came of it. Or maybe especially so.
There are so many stories about this drug’s sleep walking side effect I think it really needs to be taken off the market until that’s understood better. Not everyone sleep walks under it. But the stories of people who have are so widespread it’s disturbing that the drug is still being widely prescribed for sleep problems. I have my own story, and it’s the only time in my life I’ve been petrified scared.
I was having really bad trouble sleeping…it later turned out to be diet related…and I was prescribed Ambien. The doctor I was seeing at the time assured me it wasn’t addictive. Well it was addictive as all hell but that’s another matter. What scared me was the time I walked into the kitchen to get a glass of ice tea.
I’ve made my own sweet ice tea the same way ever since I was a young teenager. The process starts with boiling water in the kettle and then pouring the boiling water into a container that already has a measured amount of sweetener in it. The sweetener is dissolved immediately. Then several tea bags are dipped into the water to steep. The trick is to let the tea cool down at room temperature, to room temperature, before putting it into the fridge to chill. If you put it in too soon it turns bitter.
So one day I’m walking into the kitchen to get a glass of ice tea. I’m still having trouble sleeping well despite the Ambien, and what is more my head is staying a bit fuzzy all day long which is worrying me. I’m getting forgetful (more than usual) and I’m starting to seriously worry if there is something wrong with my head. So this is my state of mind when I open the fridge to get some ice tea…and I see the kettle in there.
I freaked. I thought, oh god I’m losing my mind, had to take the kettle out, set it down in the stove where it usually sits, walk into the living room and sit down on the sofa and wait until I stopped shaking.
For the next several weeks I watched my behavior closely to see if anything like it happened again. But I also did this: I started weaning myself off Ambien. It took about a month of my shaving the pills smaller and smaller until I could finally sleep without dropping one. Later…when I reconnected with a certain someone from my past, I started paying more attention to my weight and what I was eating and that solved the sleep problems. And shortly after that I started hearing stories about people on Ambien sleepwalking and made the connection to the kettle in the fridge.
I will Never touch sleeping pills again. Ever. No matter how bad the insomnia gets.
Continuing in our series of Homeland Security Color Alert Code illustrations. Because you all want to be safe and secure in these uncertain times don’t you? Well we’re not from the government and we’re here to help! Our color coded alerts will keep you informed and up to date on everything you need to be afraid of.
Today’s color is YELLOW: Hit the brakes or the gas…think quickly now…
On Facebook a friend posted earlier today that Homeland Security was resurrecting its color code terror alert system. Coolness! Back in the Bush years when it was first rolled out I did an outline for an alert color system of my own, but beyond one sketch never pursued it. I should have. I think mine’s better than the official one.
Horrible as today was however, at least I did get a catcall out of it. While I was out on a cigar walk some guy in a passing car shouted Get a haircut at me. I haven’t heard that one in years. Made my day…
After three years tobacco free I am officially back to my cigar hobby. Because some days alcohol just isn’t enough, drugs are illegal, and it takes forever to come back down off a bullet to the brain. Yes…slowly killing yourself can be a hobby, you just need to take an geek like interest in the details.
In 1967 CBS ran a short lived comedy series called “He and She”. It was smart, witty, the main characters, a young couple in New York bantered with each other and the other characters in this very dry humor I just loved. I was attracted to it instantly and watched it religiously. So of course it was cancelled after just one season. There was a scene in the first episode, I forget the lead in to it, but the Dick Hollister character (a cartoonist!), played to perfection by Richard Benjamen was arguing with his wife Paula, played by Paula Prentiss, and she says to him exasperated “What are you’re saying!?” and Dick says “Never mind what I’m saying, just listen to me!”
Don’t you just hate conversations like that? Especially when it’s your manager and he keeps asking you what went wrong and every time you start telling him he interrupts and says he didn’t want to know that. “What went wrong?” “Well…A, B, C, D…” “I don’t want to know that…do you realize if we had done the entire operation manually we’d have been finished long before this?” “Well if I knew at the beginning what I know now…” “I don’t want to talk about that…”
He came down to my office and we went though the process. At least one of the problems I kept running into manifested itself for him. Some tasks fight you in a big way, but it’s the ones that fight you in every minute teensy little way possible that completely demoralize you. Either way, if my orders are to save the Kobayashi Maru don’t ask me why I’ve got a bat’leth sticking out of me afterward. Did you know that Klingons fight back? Surprised the hell out of me, let me tell you…
My attitude is this: why let stress kill you when can smoke a good cigar while death puts a scythe in your heart. Life is short. Never pass up an opportunity to enjoy something good.
So…Who Are We Talking To Here? I Mean Besides Each Other…
One of the oddest sensations in the world is having a conversation with someone and both parties knowing there is a silent third party always listening in to that conversation, but never chiming in. Oh…don’t mind me… So when you write back is it me you’re talking to or you-know-who that you’re talking to? The irony is not lost on me that you recommended The Lives of Others to me at one point. Eavesdropping? Me? You must be kidding.
You also told me not to be sending you any dick pictures because You-Know-Who. You must have meant these…
Okay. Fine. No dick for you! How about some ass photos instead?
Okay…that last one was from The Onion. But it’s hard to tell satire from reality these days isn’t it?
Life’s Little Ironies Only A Gay Person Of A Certain Age Will Fully Appreciate…
#1: Having “Dude, Get Real!” hurled at you by someone who will probably be buried in his closet because not even the Grim Reaper will be able to pry him out of it.
This blog is powered by WordPress and is hosted at Winters Web Works, who also did some custom design work (Thanks!). Some embedded content was created with the help of The Gimp. I proof with Google Chrome on either Windows, Linux or MacOS depending on which machine I happen to be running at the time.