It's wonderful to be back. I awoke this morning as I did yesterday morning: awake, refreshed, ready for the day. Unfortunately, this morning, like yesterday morning, it was still morning, as in 3 am. Sigh, I hate jet lag.
After a long but uneventful trip, Anthony and I are back in Japan.
We took off from Cleveland a bit after 10am Saturday, and after an hour an a half in the plane, and an hour in the terminal in Chicago, we were on a flight for Osaka.
13.5 hours later, we arrived. The flight took off at about 1:30 in the afternoon Eastern time (noon-thirty Central time, as we were in Chicago, but my body was on Eastern time), and arrived at about 2am. It was a long, long flight. Anthony slept for an hour or so a few hours after takeoff, and for three or four hours toward the end of the flight. The rest of the time we looked at books, or played with stickers, or watched cartoons on the seat-back video monitor.
Unusually, the lines at immigration were long and it took the better part of 30 minutes to clear. Then, even after that, it took 20 minutes more for my two checked bags to show up. Customs went quickly, and we were into Japan where Fumie and her mom awaited us. After a month's absence, Anthony and I were both happy to see them.
We loaded up the car seat and luggage into the car, and they made the two-hour drive home while I remained at the airport. We'd planned that I'd stay at the airport hotel for one night to “decompress” from the flight, and try to get a jump on my jetlag. It was a fantastic move.
I checked in at 4:30 pm Sunday and by 5:00 I was asleep. I woke at 3:30am, but after a Benadryl and a bit of TV, I was asleep again until 9am. Perfect!
After putzing around the hotel getting ready to go, and lunch and a massage at airport shops (the massage was more torture than anything else), I made the hour-long train ride to Kyoto (which ended up being an hour and a half due to a rare delay, due to some kind of auto accident which affected all the service earlier in the day). After a subway ride from Kyoto station, I showed up at home at about 2:30pm.
I had the most interesting peek into my past recently, when the Rootstown Water Company asked me to look at a small issue with their billing software. I originally wrote it back in 1986 (19.5 years ago!). They're still using it, unaltered except for one bill-formatting routine which needed to be updated for a new printer some years back.
It's really pretty much in the state I left it, except that the machine is running Windows 3.11 now (it had been running only DOS 2.11 when I was there — I know the version number because they still have the original “IBM DOS 2.11” manual). Yes, they still boot Windows 3.11 every day (with win at the end of autoexec.bat — remember those days?)
My code was written in C and compiled with the Mark Williams C compiler version 3.0.6 (has a copyright date of 1982-1985). You really got a lot with this compiler. It was modern enough at the time to be on 5.25" floppies instead of 8" floppies. Everything came on two 5.25" floppies, including all system header files, the pre-processor, compiler, assembler, linker, all libraries, a debugger, some Unix utilities (make, egrep, banner, etc.), and even an editor — MicroEMACS. In fact, they even had enough room (on the two 5.25" floppies, mind you) left over for the source to MicroEMACS. My, how times have changed.
The problem that had cropped up in the software was reduced functionality in a non-critical reporting area due to some integer overflow. They shouldn't have run into the problem in the first place, but had neglected to run some maintenance programs for a few years. A log file grew unchecked, and its size eventually eclipsed the 16 bits the compiler alloted to an INT. (Had I had the foresight to make it an UNSIGNED INT, the problem would not have shown itself in my lifetime, so I accept some of the blame 🙂 )
The fix — making one variable UNSIGNED — would have been easy except that for whatever reason, the compiler no longer worked properly. They had moved everything to new hardware from backups after a disk crash some years back (to the 333MHz Celeron 64-meg of memory they're using now), and perhaps that has something to do with it. The build process would end with:
LD: \bin\libc.olb(printf.o): bad reloc type 41
Although the compiler's two-volume hardcover manuals have 20 pages covering build errors, I could find nothing about “bad reloc” of any type, much less type 41.
They still had the full backup of the C: drive that I made on 9/6/86, on nine floppies, and in theory I could have pulled the compiler from that, but either the 19-year-old floppies no longer worked, or the floppy drive didn't work. After inserting a floppy into the drive, seeing that the drive reported an error, and pulling it back out, it was hard not to notice the thick layer of dust the process had imparted onto the disk. Even after putting in many floppies, they still came out with somewhat of a layer of dust, making me wonder if the “dust” is really disk material flaking off.
So, I decided to move to a more modern OS where I could use modern tools to rebuild things. They had some Win2K computers for other reasons, so that was good enough. I installed the wonderful DJGPP system (gcc, gmake, and lots of GNU tools like bash and emacs) and recompiled there. Considering that my source was written in pre-ANSI C, and considering that I had written it when I had no considerable programming experience, well, there were a lot of little things to clean up. I used many of gcc's command-line options to turn on a lot of warnings (including -Wall), and so spent a few hours going through everything updating to ANSI-C and cleaning up unused variables and dangerous typecasts.
In doing the heavy linting, a few bugs turned up and were fixed, although I seriously hesitated to change anything about how things worked, since they'd been using it as is for 19 years. My brother suggested PC Lint would be more insightful than gcc, as he says it's unparalleled in its ability to point out “issues”, but the aforementioned desire not to change much — combined with my limited time and energy — caused me to set this idea aside.
It's always a little scary to look at old code, but this is by far the oldest code that I know to still exist. (I wrote some very nifty stuff, in FORTH no less, to control a flow-cytometer during the early 80s when I worked at a medical school, but I don't think it's still being used.) It certainly felt odd to look at it, since I knew I wrote it all (the one formatting routine aside), yet I remembered nothing about it.
In once sense I was pretty happy with the code. Even though it was written in 1986 before “Y2K” was on anyone's mind (or, at least not yet on my mind), I still engineered it to work fine through the end of 2079. The DOS on the system now (likely the version that came with Windows 3.11) isn't so graceful about dates: files I edit today show up with the date “7-20-105”.
In some other senses, I shake my head about some of my programming decisions. The way I grouped things into files was very dorky, particularly WRT header files. Rather than have FOO.C's declarations in FOO.H, I tended to replicate the needed declarations in each file that needed it. And my use of global/extern variables was... unsound.
People tell me “hey, but it works”, and the current issue aside, it has been working quite well for more than 19 years, but “it works” has always been only the most basic starting point to measure success, not the ending point. I would certainly do it quite differently now, but then, I'd charge a lot more than $5/hr to do it!

My dad normally watches TV on his computer, so doesn't really know much about the TiVo in the living room. But when I was out today and he was on babysitting duty, Anthony asked to watch Dora. Dad fumbled with the TiVo remote control not really knowing what to do, until Anthony (not yet 2 years 8 months old) told him “top button”. Indeed, that's the button used to pull up the main TiVo menu, and from it Dad was able to cue up a Dora episode.
Last night my dad and I went to BW3's in Kent to play NTN Trivia. The main game last night, played simultaneously by 10 to 20 thousand people in bars across North America, covers science, geography, “shows” (plays, TV, movies), history, sports, and the arts.
Dad is excellent with history, science, and, in particular, geography. I am worthless with everything but the occasional science and Japan-related question. We sat with trivia regulars Ted, Bill, and John, who are truly awe-inspiring in their depth and breadth of knowledge. They can effortlessly deal with questions on 1960s American TV, ancient mythology, who won what kind of literature prize when, and for what, famous (and less famous) painters, anything about Broadway, the most arcane details of middle-ages British royalty, and most everything else. If such a depth of knowledge were limited in scope (e.g. as with a film buff, etc.) I would be less impressed, but it covers pretty much everything.
The main hour-long game consists of 36 questions covering the six subject areas. By themselves, Ted, Bill, and John would have done just outstanding, but since Dad and I were there, they (and hence, as a group, “we”) were able to do just a bit better. Dad helped out on quite a number of questions, but my highlight was to be able to help out these luminaries with two questions that they would not have otherwise known (I could match up six Asian countries with the names of their currency, and I happened to know that the name of the big ferris wheel in London is called “the London Eye”). These two answers (along with the 34 that they knew) allowed us, as a group, to be the #1 group in the nation. As individuals, none of us had the best score in the nation, but we had #2, #3, #4, #5, and #6 (among more than 10,000 players).
It was fun.