Ah… teeth.

I had a dentist appointment this morning that I’ve been looking forward to for quite some time. I’ve been in various stages of dental repair (on my front teeth), and various stages of being-able-to-eat, for something on the order of a year now. For the past three weeks I haven’t been able to bite into anything at all, because even a piece of bread would be enough to knock the temporary crowns loose (and they managed to get pretty loose anyway). There’s just something wrong about having to cut my cheeseburgers into bite-sized pieces.

But now my bridge is securely in place. And I have slightly worse buck teeth than I started with. But that’s okay. Now… I can bite again. I can eat again. Bog be praised!

I just finished a McDonald’s sausage biscuit to celebrate. (Hey, you gotta start somewhere. It was on the way to work.)

Y’know… I’ve really missed being able to eat normally. I’m feeling pretty good right now.

And after all, as the vampires say, “Everything that bites is not necessarily bad.”

Beans per fortnight

I certainly can’t accuse work of being boring lately. I’m hip-deep in the port to client/server, it’s time for our semi-annual employee reviews (with the new addition of peer reviews), we’re interviewing for software engineers and technical support people, and next week we start Extreme Programming for real (those of us who aren’t in training sessions from Wednesday through Friday). It’s been busy.

We made the XP decision early in January, per Don Roberts‘ recommendation. Things should get even more interesting over the next few weeks, as we blindly (well, mostly-blindly; Brian Marick will be coaching us next week) fumble our way into the realm of Extreme Programming.

We’ve been having some interesting XP discussions during this lead-up time. One such discussion was over working arrangements. XP requires pair programming, and most of our cubicles aren’t really set up for two developers at one computer; and besides, Don Roberts suggested (and I think we’ll probably do this, though not necessarily right away, since we don’t have enough computers yet) that we set up a “bullpen” for our pair-programming, an area without internal walls, so everyone can hear what everyone else is doing and chip in at a moment’s notice. We’d still have our own cubicles for filing and e-mail (as Kent Beck says, “people need privacy to take phone calls from their proctologist”), but any time we’re doing something that will end up in the production code, we’d be pair-programming in the bullpen. This brings up discussions about bullpen logistics: phones (should we even have phones in the bullpen?), location, chairs, whiteboards, thermostats, lava lamps, and dozens of other things.

The most recent XP-inspired discussion was on what to call our abstract unit of work. I’ll cheat here, by quoting the e-mail I sent to the rest of the department on the topic.

As we move into XP, we’ll be changing the way we do time estimates. Instead of estimating in terms of hours or days, we’ll estimate in terms of abstract units of work. And we need to come up with a name for those units.

So I’m announcing a contest: the Name-That-Abstract-Work-Unit Game. Get your suggestions to me by the end of the week, and we’ll vote on them next week. The winner (dramatic pause) gets some free M&Ms from the dispenser! (applause)

Don Roberts suggested this idea of an abstract work unit. He called these units “beans” (and that’s our working name for them for now, so if you don’t like that name, send me your suggestions!). The idea is that, instead of saying “that’s a day-and-a-half project”, you say “that’s a three-bean project”. All that strictly means is that it takes about 50% longer than a two-bean project.

The main reason this is important is that we programmers really aren’t very good at estimating time. Testing takes longer than we thought, design issues surface that we didn’t think of, we need to refactor something so we can add unit tests, meetings take a chunk out of the day. Using abstract units will (this is the plan, at least) make those side issues magically go away — because at the end of each two-week iteration, we measure how many beans we actually got done, and that becomes our estimate for how many beans we think we can get done in the next iteration. Over time (and through the magic of statistics), the side issues start to get built into our estimates automatically.

It’s self-correcting, in a way that hours-and-days estimates can’t be. If I say something will take two days and it really takes three days, then I’m behind schedule. If I say something will take four beans and it really takes three days, then everything is fine, because we would know that four beans take (on average) three days to finish, and we would plan our releases accordingly.

I’m already running out of space on my whiteboard for the name suggestions. Figures that I was at home when I thought to blog about this, but I remember a few of them: quarks, parsecs, zots, joules, nuggets, ounces, rubles.

But my personal favorite so far has to be the banana.

Doctor’s Orders

Jennie is very amused.

And I can’t really blame her. I mean, it’s one thing for my doctor to tell me to get some exercise. But when the doctor in question is actually my psychiatrist…


So here’s the backstory. Last week sometime, Jennie and I went shopping. We got home, and I got the job of lugging groceries upstairs. After I’d gotten to the top of the stairs the second time in rapid succession, I suddenly started to feel dizzy, and had to go sit down. That didn’t actually make things any better; in fact, that’s when I started to feel very nauseous. I sat it out, and after five minutes the worst of it passed.

I related this incident to the doctor, in case it might have been a side effect of one of my meds. He said probably not. The lithium wouldn’t do that at this low a dose, unless I was extremely dehydrated (and if I really was that far dehydrated, I suspect I’d probably be feeling like crap with or without the lithium). And the dextro can elevate heart rate, but he said it wouldn’t have effects like what I described. His guess was that either I’d had a panic attack (possible, though I don’t think I felt panicked), or, more likely, that I’m badly out of shape.

He also pointed out that exercise increases the body’s levels of dopamine and norepinephrine, which are exactly the things we’re trying to improve with the dextro (and the Adderall and the Ritalin before it). And besides, exercise should help me sleep better — and I’m sure that sleep deprivation isn’t helping my attention span. (It’s hard to get to bed at a decent hour when Jennie works until 11 at night, especially since we don’t eat supper until she gets home. I need to make the most of the sleep I get.)

I also mentioned a couple of things that I’ve been thinking about lately. Over the last few years, I’ve started to stutter more, and stumble over my words (which did happen to me as a kid, but only around cute girls). And I’ve been having more trouble reading — getting words mixed up, that sort of thing; not anything I ever had the slightest problem with before the last few months; heck, I used to be able to read software license agreements like a pro.

Since I was in a psychiatrist’s office anyway, I figured I’d ask him about this, in case it was cause for concern (endocrine problems, maybe?) The answer was probably not. He has a colleague who’s a speech therapist, and based on stories they’ve swapped, he says the stuttering may be stress-related (plausible enough). And his first guess about the reading was the same as my first guess — that it’s probably time to get my glasses prescription checked again. (Pity insurance doesn’t agree — they say I’m not due for another year. I can see extremely well with my glasses on, both close-up and distance, but the problem could be eyestrain if my glasses are too strong again.)

At any rate, he said I shouldn’t go thinking that exercise is some sort of magic bullet, but that it does tend to help with stress, as well as sleep and neurotransmitters (though probably not eyesight).

So, pursuant to doctor’s orders (and being in a mood for walking anyway — I have been for a while, actually, but the weather hasn’t been very cooperative lately), I went for a brisk twenty-minute walk this evening. Well, almost; I got dizzy and slightly nauseous a little before the ten-minute mark, and decided that would be a good time to turn around and go back home. Maybe a little less brisk next time.

I do feel a little bit better, I think. I’ll have to see how well I sleep tonight. Hopefully Jennie won’t keep me awake with her laughing. (I love you, dear.)

Suspension of disbelief

It’s happened to me, on many occasions, that I’m driving in the car and think, “You know, I should turn on the radio,” only to then realize that the radio is already on. I usually take this as a sign that it’s time to change the station.

Today, I had a slightly different experience: I found myself thinking, “You know, I should find a book to read.” Only to then realize that I was already reading a book — one where the character was talking about how much she liked books.

With music, it usually means the current tune is too blah to keep my attention. With the book, I think it was the other way around — I was in the book, with the characters; I had forgotten that I was reading, not because it was boring, but because it was pretty good.

It’ll be interesting to see how many more of those I have. My church youth group had a book sale yesterday, and I picked up almost $20 worth of books (at $1.00 for hardbacks and 50 cents for paperbacks — I got mostly paperbacks). I’ve read three of them already. It’s actually been a long time since I’ve read this much, partly because I’m too lazy to get to the library when they’re open, and partly, I think, because reading takes a lot out of me — I’m actually physically exhausted after an afternoon of reading. Dunno if that’s because of the mental effort, or if it’s eyestrain. I should probably get my glasses prescription checked again.

Oddly enough, the last time I got my eyes checked, they told me my last glasses prescription was too strong, and the new one they gave me was about half as strong as the one I’ve had most of my life; my eyes had actually gotten better, and I could see more clearly with the new glasses than with the old. It’s entirely possible that my eyes have changed yet again. Jennie has an eye appointment tomorrow; while we’re there, I should check and see whether I’m due in yet.

Okay, I’m rambling. Time to put the laundry in the dryer and go to bed.

Spam spam?

Lately my blog has been averaging around 2 or 3 pieces of comment spam a day. In a way I guess it’s a compliment; the spammers apparently think I’ve got a pretty decent Google rank. Then again, the spam comments contain exactly the same links every single time, so maybe it’s just that one putz thinks I have a pretty decent Google rank.

I get an e-mail notification every time someone posts a comment on my blog, so I can usually stay pretty well on top of things. If I’m at my PC when the notification comes in, a new spam comment dies a speedy death.

But some of them have been slipping through the cracks — sometimes when I go to delete one, I find others that have already been there a while. At first I wondered if the ISP’s mail server had been down when my blog software tried to send the notification.

And then yesterday I looked in my GMail “spam” folder, and what to my wondering eyes should appear but a bunch of comment notifications. Apparently GMail had been selecting some of the spam-comment notifications, at random, to flag as spam!

Figures, that when I want to get spam…

The problem with “Properties…”

A recent QualityCentral report (QC# 10301) says that “When you right click on the Tool Palette to display the context menu, the Properties menu item should have an ellipse [sic] on it.” The poster seems to think that every menu item that brings up a modal dialog box should end with “…”.

This is wrong, though it’s a common mistake. Per the comment I posted to said QC item:

The “…” is called an ellipsis, not an ellipse. And the ellipsis is not intended for every command that brings up a modal dialog (though it’s a common mistake to think so).

Per Microsoft’s UI guidelines:

“If a command requires additional information to complete its intended action, and you use a dialog box to supply that information, follow the command with an ellipsis (…). The ellipsis provides a visual cue that the command requires additional information.”

“Do not include an ellipsis for a Properties command. The user does not have to indicate what object to show properties for or what property to show. Even though the user can use this command to change options, the command’s intended primary action is to display those options. Similar common examples include Options, Settings, Advanced, and Preferences.”

from http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwue/html/ch14d.asp

Huh? Where are all my references?

Hmm. Not good.

At BorCon, Allen told us that Delphi 2005’s refactoring metadata was based on the actual uses list, not just on what’s in the .dpr. But it’s looking like that’s not the case. If a unit isn’t shown in Project Manager (i.e., if it was removed with Project > Remove from Project, or was created while that project wasn’t open and then never added with Project > Add to Project), then it’s invisible to Find References, even if it’s still compiled into the EXE (by being included indirectly, via someone else’s uses clause). You can’t find references that occur inside that not-in-project unit, and you’ll have problems if you try to find references to something that’s declared in that unit.

This is bad news. We don’t add all of our units to our project files; it’d be a source-control nightmare if everyone had to check out the project every time they added a new unit. Even worse, we’ve got one codebase that’s used by several different projects — so every new unit would have to be added to every project (but only the ones that need it).

So Delphi 2005, and those refactoring tools I was so pumped about, are basically useless to us.

(Well, we can use Sync Edit, I suppose, and we can probably refactor unit-private stuff. But that’s about it.)

Oddly enough, the refactoring engine does have some awareness of units that aren’t in the project. If I declare a procedure in unit X (not in the project), and call it from units A and B that are in the project, it knows that both of those calls are to the same procedure. I can’t do a Find References from inside unit X (the menu item is grayed out), but I can do a Find References from the call site in unit A, and it’ll show the call from A and also the call from B. So it had to have built a parse tree for unit X. But it won’t use it. It won’t show me calls to that procedure that come from units X or Y (also not in the project).

It knows those methods are there, it just won’t show them to me.

Allen? Corbin? What’s the reason for Find References only working on files that are in the project? Is there some secret Registry flag I can set that will make it work for all units?

What if I’d grown up Unitarian?

I sometimes wonder what might have been different if I had grown up Unitarian.

For one thing, I think I would’ve been more likely to stick with church. I stopped going to my parents’ church (Methodist) when I was in junior high or high school, partly because I never found it to be all that meaningful to me. Maybe it was just my anarchic streak; Christianity tells you what to believe, and it claims to have the final answers, and it claims to be The One True Way And Everyone Else Is Wrong So We Must Bring The Nonbelievers To The Light, and none of those things ever appealed to me. What happened to “love thy neighbor”?

Unitarians are… a bit different.

If you’re Christian, then you believe certain things. That’s what “being Christian” means, by definition. So by definition, it goes both ways: if you believe those certain things, then, well, you’re a Christian. That’s what the Apostle’s Creed is all about: you’re a Christian if, and only if, you believe the things stated in that creed.

Then there’s us. Unitarians are non-creedal — whether you’re Unitarian has nothing to do with your spiritual beliefs. This takes some getting used to! There are atheists who go to my church, along with agnostics, secular humanists, Christians, Jews, Wiccans, Buddhists, and probably at least thirty-one other flavors. Writing sermons for this lot has got to be a challenge!

Q: Why are Unitarians such lousy hymn-singers?
A: Because they’re always busy reading ahead, to see if they agree with the words.

Going back to my reasons for leaving church: Unitarians don’t tell you what you have to believe — we help you figure out what your own beliefs are. We don’t claim to have the final answers; most of us would agree with Andre Gide, “Believe those who are seeking the truth; doubt those who find it.” And we don’t claim that we’re right and everyone else is wrong. (Well, we try not to, anyway. Fundamentalists and their agendas do make it hard sometimes!)

I really think it would’ve been cool to grow up Unitarian, and go to Unitarian Sunday school and youth group. Learning how to question instead of follow (not that I ever learned much about following anyway). Talking about gay rights at church. Going through a year-long Coming of Age program in ninth grade, writing my own personal statement of beliefs, and reading it in front of the congregation. And the sex-education classes.

Yes. Unitarians have a sex-ed program, called “Our Whole Lives” (OWL). It covers not just the biological side of things, but also the emotional and spiritual. I’m told that some of the discussions can get extremely interesting.

Unitarians aren’t the only ones to do this; the OWL program was actually developed jointly with the United Church of Christ. UCC is cool — they’re the ones who got turned down by some of the TV networks recently, when they tried to air a commercial saying that gay people can be religious too.

The idea of church sex ed is a little jarring at first, isn’t it? U.S. culture has some very screwed-up ideas about sex, and most of them seem to stem from religions with some very unhealthy ideas about “sin”. (“Sex is the most awful, filthy thing on earth and you should save it for someone you love.” — Butch Hancock) But at the same time, church is where people gather to talk about their moral values, and get in touch with the spiritual — it’s about the only place most people do either. So what better place to talk about something that’s so deeply intertwined with both morality and spirituality?

(Okay, I’m getting a little too philosophical here.)

I think back to some of the hang-ups and the teenage neuroses I had back in high school and college, and I wonder if it would’ve been different if I’d had the chance to take those OWL classes. It might be wishful thinking, of course; being a teenager is never easy. But I think that OWL is the number-one reason that I wish I’d known about Unitarians back then.

But all is not lost. I certainly could’ve used this stuff back then, but they call it Our Whole Lives for a reason. The main curriculum is aimed at grade 7-9, but there are also units available for kindergarten/first grade (age-appropriate, but tying into the whole), grade 4-6, and grade 10-12.

And there’s also an adult OWL curriculum. My church is offering the adult class (I think for the first time), and Jennie and I both signed up. It’ll be a twelve-week class, starting later this month.

I really don’t have any idea what to expect, but I’m really looking forward to this. It should be… well, interesting, at any rate. (It remains to be seen how much of it I’ll actually blog about, mind you.)

*Real* regex search-and-replace in Visual Studio

niugang just posted some very cool code on CodeProject: a Visual Studio add-in that gives you real regex search and replace.

It’s long annoyed me that Visual Studio’s regex support is so weird. They have a lot of the features, but their syntax is truly, truly warped. ({} for captures? @ and # and ^ for quantifiers? Needing to either roll a manual character class, or else understand the full Unicode spec, just to do something simple like \w?) And they’re missing some of the most interesting and useful features, like lookbehind and positive lookahead. Which is silly, because they have full-fledged Perl-compatible regular expressions sitting right there in the Framework.

Okay. Enough ranting. This add-in should be way cool. Unfortunately, niugang had to create all new UI, since there was no way to reuse the standard Visual Studio search and replace dialogs. This probably means some of the fancier features are missing (I suspect that I won’t be able to select two different directories and tell it to search them both, for example). But even so, I’m very much looking forward to real regexes in VS. And hey, it’s got source code.

Now someone just needs to write a real regex search-and-replace for Delphi…

End of the Adderall

Well, insurance never did refill my 60-mg-a-day Adderall prescription. The doctor got a letter in the mail saying they had approved it, and I got a copy of the same letter. But apparently insurance didn’t actually tell their own billing department; Walgreen’s never was able to run it through the insurance billing system.

But I was taking it on a sort of provisional basis anyway; it wasn’t so much helping the things I wanted it to. I didn’t know it before I started on this whole escapade, but there are several different types of focus. I used to think there were two, but during the past day or two I’ve started to think there are at least three:

  • The ability to get absorbed in a task, and not easily pulled back out of it. Tends to make you forget about trivial things like food and sleep. The technical term is “hyperfocus”. It’s a bit counter-intuitive, but ADD people (the people who are supposed to have problems concentrating) are the same people who get hyperfocus.
  • The ability to concentrate on the details of what you’re doing, and keep them in your brain long enough to get something done. I call this “detail focus”. When I’m having a bad-detail day, my thoughts are slippery: I’ll start to do something, and suddenly realize that I have no idea what I was working on. I’ll write down the next thing I need to do (so I won’t forget it), and I will have forgotten it by the time I look up at the monitor. That makes it darned hard to program a computer, or even to carry on a conversation — someone will say something, and it will slide right in one ear and out the other, and I’ll blink stupidly and have to ask them to repeat themself.
  • The ability to stay on task, and not let your mind wander off into a daze. This one is insidious, because you don’t realize your mind is wandering until you’re already looking out the window at the birds. I’m not quite sure what to call this one yet; it’s only within the past day or two that I started to suspect it’s different from detail focus.

Odd list, eh? None of them seem to go together. Yet I can have #1 and #2 at the same time, and then moments later be having problems with #3, even though #1 and #3 seem to be diametric opposites. Some days one of these is worse than the others, some days not. It’s all rather bizarre, really.

The Adderall was giving me more hyperfocus, which is not altogether bad, but not altogether good (besides which, hyperfocus really isn’t something I’ve ever had too much trouble achieving); and it didn’t seem to be helping a great deal with the detail focus, or the mind-wandering. It also, on a few occasions (especially if I hadn’t been taking it for a few days), gave me the shakes and made my heart race (last time this happened I measured my resting pulse at 120). It didn’t do that too often, but it certainly wasn’t pleasant.

After some discussion, we decided to drop the Adderall, but stick with the stimulant-based drugs for a while longer, since it takes them hours to kick in, as opposed to months for non-stimulant drugs; much easier to tell if they’re working. There are a couple more he wants to try next: one is Focalin, which is chemically similar to Ritalin; and the other is dextroamphetamine, which is chemically similar to Adderall. He asked which I wanted to try. I asked if either one was available in a generic. So I’m on dextroamphetamine now.

The way he explained it, both Adderall and dextroamphetamine have the same active ingredients, consisting of several related molecules (he described them all as variants on one “mother molecule”). But dextroamphetamine has all of those compounds in equal weights, whereas Adderall has more of some than others, surely as the result of much research. But I wasn’t included in that research, so it’s possible that dextro may work better for me. (Too bad — it would’ve been fun to skew their results.)

I asked if we could just get each individual compound separately, so I can try my own relative weights. He laughed, and said that unfortunately, they don’t package it that way. Phooey.

He started me on a lowish dose, since he wasn’t sure whether it would affect my system differently than the Adderall did. I have the usual instructions to experiment with the dose. Alas, dextro isn’t available in a time-release, so I have to remember to take it every four hours through the day. (Remember? Hah! That’s what Outlook calendars are for.) But on the good side, insurance didn’t make a peep about my prescription for 180 tablets — just went ahead and filled it. After the grief filling 60 tablets of the Adderall, that’s a welcome change.