1 Character

An interesting bug.

One of our programs has a 90-day limit on passwords, and for passwords set on October 2, that limit would be reached on December 31. For some reason, passwords switched on this day were getting marked as expiring in 12-31-09, which violated the 90-day limit, and blew up the user’s account. This caused something of a panic amongst the sysAdmins.

I had a hunch, as I am paid to do after working 2 years on a program, and correctly determined the cause related to our 90-day rule and the new year, and the fact that the bug was effectively only a bug on this one day. Some further digging by one of our developers revealed the bug to be due to the usage of Gregorian time rather than “regular time”. The perl documentation describes the differences like:

%G – The ISO 8601 year with century as a decimal number. The 4-digit year corresponding to the ISO week number (see %V). This has the same format and value as %y, except that if the ISO week number belongs to the previous or next year, that year is used instead. (TZ).
%Y – The year as a decimal number including the century.

I never understood why a program would support different algorithms for calculating time. then again, I majored in philosophy and not computer science. You would think if anyone could find uses for different versions of time, it would be a philosophy major and not someone trained to think in 0s and 1s, but i digress… Much discussion, relaying and allaying of concerns and messages ad nausea up and down the food chain ensued, ending in a decision to change the constant we use for time management in this program. Its no small thing when you alter time.

The pressure was on QA to make sure this change was safe. After 10 years and an inflated title, i took this in stride, and showed why its worth having me instead of two junior engineers. Rather than use a shotgun and splatter an entire work-week across my monitor like a Robert Rodriguez film, testing the entire program and numerous date combinations, I searched the codebase and found this change affected 14 different features. At a unit level, the time calculation would be the same for every one of them, meaning I only had to test the specific piece of code once. It worked as planned on new years, which I was able to test by hacking the code base to check for a 68-day-old password. Next was to determine the risk in the event my testing was wrong. I found two uses of the time constant to be for a different program using the same library code and now the happy recipient of a free enhancement request, three occurrences that were informational only and would have no impact if wrong, eight that were straight expiration dates which at worst would be simple edits, and the one bug due to the application of the 90-day business rule which i provided steps to work around.

The analysis of the fix and risk took about an hour and a half for me, it took about 10 hours at least of various other people’s time, more if you included all the email. The code change was 1 character.

Before: STRFTIME_NLS_DATE_TO_CHAR_FMT => ‘%G:%m:%d:%H:%M:%S’;

After: STRFTIME_NLS_DATE_TO_CHAR_FMT => ‘%Y:%m:%d:%H:%M:%S’;

Xtreme Dog Park

This is something that would have been amazingly cool with a video camera. Sorta. Except it was dark. And backlit from the lights on the 202. And every time something exciting happened, a cloud of dust went up. Really all I could see were blurs of dark and slightly-less dark, and hear the occasional whimper or jangle of Kila’s tags, and some more puffs of dust.

Kila spotted a coyote behind the Boulder Mtn park at the bottom of Las Sendas. Clued in to Kila’s body language, i found the grey blur moving in the open tract next to the highway, then just hung out and watched for about 15 minutes as Kila and the coyote ran and parried and did whatever it was that they were doing for quite such a long time. It never got hectic, which was weird. Kila never got bored, which was weird. The coyote never growled at Kila, nor showed its much meaner side, nor tried to lead her off, which was weird.

A couple times I whistled for Kila to come near me, just so she didn’t get too carried away or do anything stupid. I kept thinking the coyote was gone, but a short while later Kila would run out to discuss things with it further. She never got much more than 50 yards away from me, also weird that the coyote minded me so little. The entire saga was like and extended meet and greet, where no one knew who the alpha dog was. It was quite civilized really.

The only time I’d seen a coyote be that interested and that patient with Kila was the spring of ’02 after we first got her, and a large coyote persisted in following us across Longbow golf course, even when i stopped several   times and approached it menacingly. Soon after that I realized Kila was not fixed, after a dog spent several games at Uomo Donna trying to hump her, and she spotted a little on our white tile floor. Tsaina and I once tailed a coyote for a while in the riverbed behind Fort Lowell Park in Tucson, and it eventually led us right into 3 of its mates who were waiting for us.

No such thing was happening here. It was just two dogs trying to get on the same page for a very long time. Maybe the coyote was young, or was used to seeing Kila as we spot them regularly in that park, and hear the same pack howling just over our fenceline at night frequently.

This was Kila’s version of riding gnar.