Wednesday, March 14, 2007

Quick Googler Updates

byte-order marker viSince you didn't leave a comment, I'm guessing you want to know how to write or view a BOM in vi. If you want to view/edit a file in hex in vi, use the [esc] :%!xxd command. Add the "-r" switch to get back to text.

To read in a Unicode file, you can specify the format by specifying a value for the infileformat variable. If there's no BOM you can use the -U option or the TK_STDIO_DEFAULT_INPUT_FORMAT and TK_STDIO_DEFAULT_OUTPUT_FORMAT environment variables to force any file to be treated in a given format (e.g., UTF-8, UTF-16 BE).

When writing files, vi uses the value of the defaultfileformat variable. The default value is determined by the -U option (if an output format is given) or the TK_STDIO_DEFAULT_OUTPUT_FORMAT environment variable. When writing to an existing file, vi uses the same format that was used to last read or write the file.

my employer doesn't use a punch clockLucky you, unless you have to fill out time sheets. Flextime rocks.

"i hate phone calls"Ditto, especially the incoming ones since it's inevitably some clueless fuckwit who wants to have a long discussion with you about things he knows nothing about yet argues with you when you try to set him straight.

animated gif of smashing head into wallI tried to upload that as well as the smashing-into-keyboard one, but Blogger keeps converting them to PNG format. If someone knows how to get the AniGIFs up intact, please let me know.

Monday, March 12, 2007

It's the End of the World! Oh noes!

In the run-up to Y2k there was no shortage of doomsayers. Systems would shut down. Banking software would go tits up and fortunes, if not lost, would be reduced to their 1900 or 1970 values. Planes would drop out of the sky. Software everywhere would crash.

And then came January 1, 2000. The world didn't end. It wasn't even thrown back into the stone age. Planes didn't fall from the sky. Systems didn't shut down. Banking software kept working. The worst problems most of us saw were nuisances, dates like "January 4, 19100" and old calendar apps mistakenly adding a February 29th to the year. The doomsayers disappeared and the IT industry was mocked by a flood of fuckwits chiding us for having made such a big deal about Y2K.

But for the alarms three years prior, it could've gone very differently.

Until the late 1990s, most of the public didn't realise that an awful lot of infrastructure software was as old as dirt, much of it written in ancient (to the point of obscure) languages, some of it loaded on old IBM 3430 tape drives to this day. Up until 1993, the FAA's TRACON was controlled by ARTS-III software written in Ultra for a 1960s UNIVAC processor. These days it's running on PowerPCs and the language is C, but the conversion from Ultra/Univac to C on LynxOS/Motorola 68000 was long and difficult, and with only nine months to go before Y2K, the GAO issued a rather harsh report on the FAA's status.

If you COBOL, 1977-1999 were very lucrative. The now-defunct AccuCobol made a fortune selling their software to programmers trying to refresh their COBOL skills and to companies via the generated binaries and libraries for converted or modernised COBOL systems which were, truth be told, less than efficient. Thousands of programmers pored through tens of millions of lines of code, reaping as much as $0.50 per line for their efforts.

Banks and insurance companies were the first to realise the problem since they pay attention to what might happen with rates, values and tables seven to ten years in advance. The rest of us rarely look at things more than a few years ahead, and so we were unprepared. Microsoft didn't have Y2K updates for Windows 95 and NT until October, 1999. Their office applications weren't completely fixed for months after that.

UNIX was a little better since the OS keeps track of the number of seconds since 1970, but in the midst of all the finger-pointing at Microsoft, UNIX people realised that they had their own NTP time bomb set to blow in the year 2036. There were other bugs, like RFC 822 which used 2-digit years for mail headers.

The programmers worked furiously. And, as always happens, in the rush to repair the known problem, new bugs were introduced. In the rush to release the fixes not all of these new bugs were caught.

And we learned nothing. Here we are seven years later and we're going through the same shit.

On August 8, 2005, US Public Law 109–58 -- the Energy Policy Act of 2005 -- went into effect. Section 110a designated new, longer Daylight Savings Time (DST) periods. Worse, Section 110d allowed a right to reversion in as little as nine months. And no one did anything.

Granted, the problems caused by the one-hour change were relatively minor in comparison to some of the mess that could've happened after Y2K, and the Daily Show rightfully took the piss.

On the surface, yeah, it's a minor inconvenience. For many businesses, however, it's a bit more expensive. Many industries are required by law to keep extremely accurate audit trails. An hour makes a world of difference: either you're compliant or you're not. Scheduling, conferences, payments... businesses face a lot of problems if this problem isn't resolved. So while being late for a doctor's appointment isn't terribly drastic, $LargeTelco's inadvertently not running an entire day's reports is.

It wasn't until shortly before DST reverted back to Standard time in 2006 that anyone really started mentioning the upcoming changes, and with those changes the realisation that the complexity introduced by the changes which were more or less ignored in Israel and Australia in years past could no longer be ignored. DST problems were coming home to America.

Time zone information had normally been stored as a flat look-up. Check the zone, check the date look at the GMT offset and apply. No longer. Change a zone to the new value and all your historical data will be off: programs will apply the current DST info to dates prior, except that March 12, 2006 was Standard Time, not DST.

There's a full magnitude of complexity introduced in dealing with the problem. A flat file can't be used; a 3D table is necessary to account for years. Microsoft didn't have a fix until December, 2006. Companies including $MegaCorp came up with stopgap measures and temporary fixes, themselves buggy or quirky. And we'll ride out the storm for the three weeks between the old dates and new, hoping that most customers don't notice their jobs running an hour late or appearing to be scheduled two hours early.

A lot of customers tested. Those who tested complained. Those who complained kept me very busy. Every department involved, taking cues from upper management's decision regarding releasing the latest version with this time bomb bug in place, adopted a laissez faire attitude and little was done. Documentation was delayed, conferences ignored for "more important" tasks, and the few robe-wearing, long-bearded hippies carrying their signs reading "The End of the World is Nigh" were mostly ignored. That didn't stop us from trying.

We hounded our third-party suppliers for info and fixes. We tested as much as we could. I wrote documents. These documents had to be continually updated as we discovered new information, such as the fact that all version 3 systems were affected and not just 3c and 3g. Oh, and version 4b would be hit, too. A week before the expected changes it turned out that Sun's JREs which also had to be fixed, contained a major bug (ID 6530336) which broke the Eastern Time Zone functionality. The only fix: manual changes. That'll be fun for 20,000-seat call center admins.

Final documents with even more information weren't made public in a timely manner and required a lot of hounding and escalation to initiate their release to our Knowledge Base. Customers had been given incorrect information and had to be informed of our new discoveries. I escalated and called and screamed and bitched until the idea was finally accepted: every monkey had to go through every one of his own tickets to find those which had asked about DST, then send updated information. The cost of that? About 30-60 minutes per monkey on average.

Some of us did special weekend duty, ready for the onslaught of tickets from fuckwits who didn't read our Urgent Notices, pay attention to our direct mails, or who didn't follow our instructions.

It never came. Only a couple tickets related to the subject showed up and these dealt with unexpected problems which we hadn't had the time to test.

My manager Vera walked by this morning and asked how bad it had been. "Only two tickets for us and five for the US." "Well, you see? It wasn't a problem. You were so worried about this for nothing."

They said the same thing in January, 2000 as well. We have the testbeds. We proved that without our work things would've gone very differently, but no one wants to hear that. Shit's working now and that's all they care about. And because I didn't spend all day on the phone Sunday, instead of a few hundred in cash for being available Sunday, I got a T-shirt which is three sizes too small.

Friday, March 09, 2007

Thirsty

It was 10:30p.m. I was out with some workmates having some tasty Kölsch beer. My cell phone rang.

"REC, this is $GeneralSupportManager. Can you join a conf call with $LeadResourceManager, $DocManager, $PM-Guy and $OtherSeniorManager? We're discussing the Daylight Savings Time issues."

I had to go outside since the bar was too loud, in part due to a couple of my cow-orkers feeling some need to be especially noisy.

There's been a deluge of mail about this subject over the past few weeks. I've come into the office this week to find as many as 90 mails over four threads on the subject. Everyone else working on this is in California.

I've written a couple Urgent Notices, answered hundreds of cow-orker questions, discussed the issues ad nauseum, and now we have to have another conf call while I'm busy trying to get as much tasty Kölsch beer into me as possible so that I can, for a few minutes, forget the idiocy that is this DST change.

"Yeah, I can join."

I went outside in the cold an waited for the join.

The questions started coming, niggling details and references to mail from last week and there I stood in the cold with a small glass of beer, trying to remember what the hell they were talking about. And when one was finished hammering me, the next started. And every one of them was born to be mild, preferring to be "safe" and take as little action as possible.

Twenty minutes later, Stevie-boy came out with a sausage and a beer refill. The sausage was ice cold inside 10 minutes as I continued to explain how shit works and how it won't work on Sunday morning if things aren't done the way I say.

After an hour of this I took over, started telling each one of them what to do. I explained that while the newest document includes much uncertainty, it's the best we have so far. Failure to publish it immediately is guaranteed to have more repercussions than not publishing it. Likewise, I explained again to $GeneralSupportManager the importance of having every single monkey open up every single ticket that ever referred to DST and send a boilerplate I wrote explaining what steps must be taken. "You need to send that out NOW," I told him, "This minute, while we're still on the phone." If he'd had 15 minutes to mull it over -- as he did six hours earlier when I explained the reasoning in a long mail response -- he might've again decided to wait.

I got confirmation from $DocManager that my latest Urgent Notice would indeed be published immediately. That gives the US the last bit of Thursday and all of Friday to fix stuff. Asia and Europe only have Friday.

This morning I went to check my Urgent Notice in our Knowledge Base so I could finally start referring customers to it. Imagine my surprise when it wasn't there. Fuckwits. Utter, complete, total, fuckwits. I expect it from customers. I expect it from some of the cow-orkers. I don't expect it from a group of top management decision-makers, although that might help explain why $BigCorp got bought up by $MegaCorp, itself a steaming pile of inefficient bureaucracy... but that's the subject of another post.

I'd already expected to be available on Sunday to answer questions and problems which will come in, and I'll get a nice chunk of change. Thanks to these fuckwits not releasing the docs I'm actually going to have to work my ass off for the cash, all day and all night.

Thank fuck for Mini-Me. He's updating my customers so that I can leave this place, hop a plane to London, and get as much tasty Kölschbitter beer into me as possible so that I can, for a few minutes, forget the idiocy that is this DST change.

Monday, March 05, 2007

Doing it the Hard Way

She'd stayed at the party much later than I. At 4:00 a.m. I was finished, especially after such a long day of work which started around 5:00 a.m. for me, though not intentionally. I'd woken up after three hours of sleep and had a sort of panicky feeling for no good reason, the one that makes it impossible to get back to sleep. And so I went back to unpacking and setting up the computer room. The bedroom is a mess, with boxes everywhere and oversized wardrobes still in their component parts awaiting my decision on how to reconstruct their six meter length to fit in the new and smaller bedroom with a four meter wall.

It was around 10:00a.m. I'd gotten back into bed after a couple hours of unpacking and furniture-building because I knew I needed a bit more sleep. Just as I was drifting off she got up and started moving the heavy, 2.2 meter high wardrobe panels away from the wall, leaning them precariously against a small wooden wardrobe from Ikea in which my small ration of clothing was stored.

"What the hell are you doing?" I asked her."I have to go to the bathroom!"

To be fair, she was headed in the right direction.

The toilet is on the other side of the wall. Of course the wall is about a foot thick and one of its more prominent features is the complete lack of anything remotely resembling a door. While it might be possible to install a door, the room on the other side isn't even five feet wide; it would require some interesting acrobatic moves to get past the pipes as well as actually use what they're connected to. And so we walk all the way around the apartment to get there.

Not her. Not this day.

"Sweetie, stop. There's no door there.""Yes there is," she grunted back while shifting another 40kg side panel."No, honestly. There's no door. You have to go into the hallway and around.""No, I have to go to the bathroom!""You can go to the bathroom but you have to go out of the bedroom first.""But the bathroom is right here! I have to go badly!"

I got up and led her out of the room and she went down the hallway, returned two minutes later, then slept for the next 12 hours, during which I'd managed to almost completely unpack and set up the computer room after leaving around noon to pick up another free 19" monitor (Samsung SyncMaster 950 plus). When she was up I showed her the panels in their new position and asked if she remembered how they got there.

"Were you working in the bedroom, too?"No, sweetie," I replied and then told her the tale that I just finished writing above this. Though at first she showed some disbelief, she wasn't really that surprised.

"I was tempted to let you keep going just to see what you would've done next.""I would have kept trying to get through the wall."You what?""I would have kept trying. It happened before. I kept smashing my head into the wall which shouldn't be there."

She should work for $BigBank and get paid well for doing the exact same thing.

Hello REC,

We read the Notice about the increase in the German VAT to 19% and that we have to make a change to the "Germany" field of the BaseTable.TaxRates table. In December when we filed a ticket to ask about this you said that to account for the increase starting in January we had to make these changes but they are made to BaseTable and we are not sure that this is what is meant. One is not normally supposed to make changes to the BaseTables and then you are telling us that we are supposed to make this change. In February you wrote that this change must be made but we are not so sure about this.

While the answer seems to make sense we have not implemented it because these tables are not supposed to be changed. Please tell us the ramifications of our not making this change. We need to inform you that all our tax rates are being incorrectly calculated as 16% instead of the proper 19% which it needs to be and we have attempted to correct this by scripting. This is having a serious performance effect on the system.

How can we account for the changes to German VAT rate to 19% and update our applications to function correctly?

The wall is 40cm of stone and mortar. There's no door. You're going to shit your pants long before you make any progress. Listen to me. Do what I say. It might not sound right to you at the moment but you'll find that things are easier and work a lot better if you just do what I say. Unlike fucknuts at $BigBank, Sweetie didn't actually ask for my help, something which generally confirms the person being asked has superior knowledge of the subject.

When will we finally implement my Root Cause: 17-Fuckwit? I've given more than 100 examples of its appropriateness over the past nine months alone, and those are just my own tickets! For comparison, Root Cause 8-Future Product Information is only cited an average of 12 times a year throughout the entire division.

In compliance with $MegaCorp's general policies as well as my desire to
continue living under a roof and not the sky or a bus shelter, I add this:

DISCLAIMER:The views expressed on this blog are my own and
do not necessarily reflect the views of $MegaCorp, even if every
single one of my cow-orkers who has discovered this blog agrees with me
and would also like to see the implementation of Root Cause: 17-Fuckwit.