Sunday, December 30, 2007

IdeaJam -- I Needs This

Tuesday, December 25, 2007

A Tale of Two Christmasses

It was the best of times, it was the worst of times.

Let's talk about the worst first, shall we? I had planned a nice Christmas dinner with friends, but things worked out just a little bit differently. I spent my Christmas in the emergency department of St. Michael's Hospital after having fallen unconscious in the shower for a couple of hours. There was much testing and poking and prodding and removal of blood and insertion of intravenous lines. After about seven hours, the conclusion was that I was merely dehydrated -- two and a half litres of saline and a "lovely" "roast" "turkey" hospital meal later, I was discharged to the ongoing care of my general practitioner, cardiologist and neurologist. I should be fine and dandy, but it would be nice to know why I was a half-gallon (Imperial) short of a full tank.

Then there was the best of times. It seems a few members of our dear Lotus community got together to give me a Christmas present that will see a lot of use, and which should go a long way towards getting my life back on track. I am composing this entry on a wonderful new Thinkpad T60 with all the trimmings -- 2 GHz Core2Duo, 2 GB RAM, 120 GB hard drive, mungo road-warrior battery, DVD/CD-RW combo optical drive, XP vice Vista, et cetera, et cetera, et cetera (always loved that line when Yul Brynner said it). It actually runs some of my favorite Eclipse-based programs without seeming like a VT-101 emulator (complete with wait-for-it screen echo). Aptana goes like stink, and there's a Lotus offering that failed miserably on the borrowed PIII-800 with 128 MB I should be able to play with now. I'll be toting that around in what is definitely the best-organised backpack-style laptop case I've ever run across. Data backup (and files of questionable business use) will go to a dead-quiet 500 GB LaCie external USB 2.0 HDD. And I'll be printing and scanning on an HP OfficeJet 5610 MFP. Pretty damned sweet setup altogether, and a lot more than I could ever have imagined.

I have to thank the following people for their contribution and generousity:

  • Eileen Fitzgerald
  • Kevin Pettitt
  • Rob Novak
  • John Head
  • Francie Whitlock
  • Vince Schuurman
  • Christopher Byrne
  • Andre Hausberger
  • Mac Guidera
  • Bill Buchan
  • Charles Robinson
  • Richard Schwartz
  • Declan Lynch
  • Julian Robichaux
  • Ben Langhinrichs
  • Ben Poole
  • Warren Elsmore
  • Joe Litton
  • Thomas "Duffbert" Duff
  • Jess Stratton
  • Vitor Pereira
  • Rob McDonagh
  • Bruce Elgort
  • Gregg Eldred
  • Pete McPhedran
  • Paul Mooney (added -- thanks, Ed)
  • and, of course, Ed Brill

Your gift to me has been the basis for a new life. My gift to you will be what I do with that life. There's still a bit of cleaning up of the past to do, but it's starting to look like I won't just find another mess underneath.

Wednesday, September 19, 2007

More than a nerd. Really.

Let's break out the booze
And have a ball
If that's all
There is...

I've spent a lot of time lately contemplating the larger meaning of life. Most of that has been in the context of the recovery community, and that's been because a handful of poor lost souls have gathered under my wing looking for guidance. I could let something like that go to my head, but if I choose to believe that they've decided that it is far better to learn from my mistakes than to make their own, I can maintain some of the humility that keeps me alive.

Writing about this part of my life here hasn't been an easy decision. There is a very important tradition in the Twelve Step community, all springing from the A.A. experience, that says we need to maintain our anonymity at the level of press, radio and films. A blog certainly counts, since it is as public as a community newspaper or a low-power broadcast, so bringing this part of my life to light is, strictly speaking, a no-no. There are a couple of reasons why we value anonymity so highly. The first, and most obvious, is that there is still a stigma attached to addiction, and newcomers need some assurance that nobody will "out" them. A little less obvious is our need to divorce the program of recovery from the people. We are all fallible, and the validity of the twelve steps as a program of recovery should not be judged on the success, failure, flaws or foibles of any one person.

My readers, though, are not the public at large for the most part; they are friends I have made, mostly in the professional community. Since I have been both occupied and preoccupied with my work in the recovery community, almost to the exclusion of everything else, that leaves very little to tell my online friends. I'll address the anonymity issue, then, by stating that I do not speak for A.A. or any other Twelve Step community, that my opinions are entirely my own, and that anyone foolish enough to take anything that might look like advice to heart without first consulting a sponsor or another member of your particular Fellowship who is familiar with your situation is likely to be setting him/herself up for calamity.

In any case, I have taken up the formal and informal sponsorship (mentorship) of a number of younger folk. Twentysomethings, mostly, but all are facing a similar problem — what to do after the plug's in the jug.

Addiction's a son-of-a-bitch. Nobody who has ever watched a loved one throw away a perfectly good life, behaving in the most bizarre and inexplicable ways, all the while failing to see the glaringly obvious signs of impending death, can have much of an argument with that. There is at least one proven solution, though, for the people who are willing to do the things that have to be done. It does have one small problem, though.

The Twelve Steps of Alcoholics Anonymous are the Program, but the implementation of those steps is largely based on the accumulated experience of the millions of people who have tried, successfully and otherwise, over the years to get and stay sober. Unfortunately, most of that wealth of wisdom is aimed at older folks, people in their forties and older who make up the vast majority of the membership of the A.A. fellowship. That is unavoidable. Young people with fully-developed drinking problems tend to die before they reach out for help, and far too many of the few who manage to reach the meeting rooms look around at the sea of grey hair and decide that they're in the wrong place for them. The few who do stay are mostly at the mercy of well-meaning people who simply can't fathom looking forward to fifty or more years of sober living.

That, I think, is where I come in. Although my drinking and drugging progressed very rapidly from zero to severe, I have been sober nearly half of my life now. I have been through enough careers in sobriety to fill a half-dozen lives, and I've had my share of ups and downs along the way. I also remember what it was like to have a couple of years of sobriety under my belt, attending a dozen or more meetings a week, keeping in the constant company of the "winners" and thinking to myself, "is that all there is?"

That's the world in which my new protègés live. All the larger A.A. community offers them is a way to cling to life. I'm not knocking that at all — first things first, after all, and keeping the inevitable end toward which active alcoholism leads at bay is Job One — but try to imagine being in your early twenties and thinking that simply not dying is as good as it gets. Doesn't leave a lot to look forward to, does it? That's a danger point for a lot of people.

So what's the secret to staying sober over the long haul? Simple. One merely needs to live a meaningful, purposeful life. Our collective experience tells us that a life led in service of a higher purpose rarely needs artificial enhancement to sustain. Ah, but there's the rub. What, exactly, does that mean? A.A. offers one solution in the box, and that is to work with other alcoholics. It works, of course, but it is a fall-back course of action, something that we do as an adjunct to an otherwise full life. Our "textbook", the book from which the fellowship of Alcoholics Anonymous takes its name, was written in 1939 and addressed to men of a certain age who were assumed to have families to look after and so forth. There is little in the book for people who have been living in oblivion since adolescence, and who still don't know what they want to be when they grow up.

It is tempting to think in terms of a life devoted to the service of ones fellow man, and there are some people who are of a temperament to set off on that journey. They are able to derive all of the satisfaction they need from the contribution they make to the lives of others. Most of us, though, are not of that temperament, and will eventually find ourselves wondering what's in it for us. While we may look like we are leading the lives of saints, we are actually seething cauldrons of resentment. Sooner or later we will boil over.

Most of us understand that we are not saints. Looking for something else, we dive into the kinds of lives and careers that seem to work so well for the normal folk around us. We are determined to be successful, believing that we can use the rewards of our success to develop and support families and maybe, just maybe, ease the way for some of the less fortunate out there. Some of us will dive so deep into that life that we become workaholic — slaves to our visions of success. Others will seem to find a balance for a while. Still young, and with a bit of sobriety under our belts, we may delude ourselves into believing we are just like normal folk. We forget about the things we need to do to keep ourselves alive. Before you know it we start trying to drink like normal folk. The lucky ones live to tell the tale. The lucky ones are also few and far between.

The real answer is as individual as we are ourselves. The Program tells us to seek guidance from a higher power (or "God as we understood Him", to quote the Eleventh Step). That, in itself, proves difficult for a lot of people. The word "God" carries with it a lot of baggage, as I'm sure you can imagine. Whether one is a follower of a religious denomination, an agnostic, atheist or what have you, the word itself will bring to mind a wealth of images, not all of them particularly useful.

As a sponsor (or mentor, if you prefer), it is not my job to be that higher power, but to help others to get in contact with the small, quiet voice within. Trinitarian Christians would call it the Holy Spirit. Jungian psychologists would call it the collective unconscious. Some new-agers might call it Gaia. Douglas Hofstadter would likely call it Ant Hillary (if he could suppress his prejudices long enough to realise that he proposed a perfectly plausible explanation for a God entity in Gödel, Escher, Bach). I am not particularly concerned with what to call it; I merely need to make it accessible.

In that spirit, I have been constructing and deconstructing that which connects us all. Dealing with hard heads has its advantages in this kind of game — I've reached a point where I can make mincemeat of the likes of Richard Dawkins (whose own arguments against anything beyond conscious interpersonal connection are based entirely upon prejudice and emotion). I do not claim to be able to prove the existence of a Creator God (and believe such proof to be impossible). I can, however, present a pretty convincing argument for an extrapersonal moral authority and for a mechanism by which those three-question-mark coincidences in life might arise.

The hard part now is arranging the arguments (and the background behind them) into a single, coherent work. I guess that the whole "nerd god" thing just might be true, since I have somehow managed to work talk of black holes into the text. (I was hoping that my engaging personality, my sense of humor willingness to burst into song at the drop of a hat, and my interest in the well-being of individual humans and mankind as a whole might have lost me a few points on the dorky/awkward scale.) Because the book is aimed at the recovery community, it will be published under a pseudonym: Oolon Colluphid. Some of you might know why.

Wednesday, September 12, 2007

Tuesday, July 31, 2007

Monday, July 02, 2007

Mired in quicksand

Okay, I lied. I didn't know it at the time, but it undeniably so.

I have never particularly liked delving into someone else's code. There's always that feeling of disorientation that comes from looking at a landscape that was apparently painted by the love child of Pablo Picasso and Salvador Dali while on heavy-duty psychedelic drugs, and that's when the code is fundamentally sound. Let's face it, at a certain level, code is more a matter of art than engineering, and each of us has our own aesthetic. My artistic sensibilities are easily offended, but I can usually make allowances for taste by gritting my teeth and muttering "chacun a son gout" under my breath.

The code I was going to "fix", though, is diseased to the root. Patternitis, and a fatal case of it, I'm afraid. I tried a simple Façadectomy, but I found that the unnecessary wrappers had metastacised throughout the entire body. Why do people insist on doing this:

function proprietary_do_something($param) {
 return generic_do_something($param);

Now, that kind of thing might be forgivable if one had created, say, a façade interface for a database connection and a particular database's class happened to correspond exactly to the interface. There is no trace of that kind of foresight here. For database activity, one basically has a choice between mySQL. And there is neither interface nor class to be seen — nothing but proprietary wrappers around native PHP functions. I have to be generous here and try to convince myself that the wrappers had once been necessary, but the fact that the only difference between the proprietary method names and the built-in ones is a prefix leads me to believe otherwise.

Then there are the multiple if statements in a single function that repeatedly test exactly the same conditions. To the Notes folk out there, many of these instances are the equivalent of:

 @IsError(@DbLookup("":"NoCache"; ""; "view"; key; 2);
 @DbLookup("":"NoCache"; ""; "view"; key; 2))

Yep, they're not just doing the same test over and over, but they're doing the same high-cost test over and over. Now, I ain't no PHP guru, but I'd'a thunk that doing the test once and setting a flag variable based on the result, then basing your conditionals on the flag woulda been the way to go. But what do I know? The last time I did anything in PHP, Rasmus Lerdorf was still in Toronto and PHP stood for "Personal Home Page Tools".

So the code that I once thought not too bad (if one ignored the HTML) goes from being the backbone of my project to a mere sketch of the functionality that I'll need. I'll grant that it works, but merely working is not enough. This thing does "thumbnails" by setting the width and height attributes on full-sized images (when PHP can easily do image resizing/resampling — not fast enough to create them on the fly, but they can be created and stored when the big image is uploaded and modified when the application is reconfigured). Even the database schema needs help (said the Notes guy), and so I'll need to include a conversion utility with the "installer". I kinda feel like Mike Holmes (of Holmes on Homes, whose claim to fame is fixing criminally shoddy home renovation work).

I've got a lot more work to do, but at least I can take some pride in what I'm doing. Shouldn't we all?

Wednesday, June 13, 2007

Let's see ... where were we?

Well, it seems I'm starting to get some of my smarts back. There's still the occasional bad day, but things are nowhere near where they were just a couple of months ago. The biggest problem now is an annoying tremulousness, but it's nothing I can't learn to live with.

Anyhow, I'm at the point where I can start to take on the occasional bit of work. Unfortunately, that work probably won't have a whole lot to do with Notes or Domino for a while — my health isn't yet good enough to take on the challenges of all-day, every day slogging, so I kinda have to stick to the world of lower expectations for a while yet. These days, I'm busy building online stores with PHP and mySQL. In a way, I'm glad for the opportunity to work on a different platform. It gives me the chance to see for myself that Domino developers, as a class, are not the only ones ignoring web standards for the sake of convenience.

This new adventure started when I was asked to set up a small site using the osCommerce open-source online store package. I thought it was going to be the proverbial piece of cake — FTP the package up, run the database installer to create the mySQL tables, configure some images and colours — right up until the point where I examined the underlying HTML. Don't get me wrong. The overall quality of the osCommerce package is pretty good, at least as far as the PHP and database code goes. But, my God(!) the HTML makes me shiver.

One of the things I was asked to do for the first site was to see about driving traffic to the site. That ain't gonna happen with code like this unless the site's owner is willing to pay HUGE for something like AdWords. There is nothing in the HTML to make the page discoverable. Tables control the layout, font settings are used to create headlines and such, bare-naked images are used to convey information to sharp-eyed users. Sound familiar? At least Domino developers have Designer WYSIWYG and Notes client coexistence as excuses. There's nothing like that here — the guys (and, perhaps, gals) who built osCommerce are developing exclusively for the web (and, being Open Source wonks, are probably using emacs or vi to do it all). Dammit, everybody ought to know better by now.

HTML is a text markup language, not a display description language. If your work tells the browser what the page looks like but never quite gets around to telling it what it means, then, as a developer or designer, you haven't really done your job. Yahoo! can't tell what the text you rendered into your logo image says, and it doesn't give extra importance to the alternate text no matter how big the picture of the words is. Google doesn't care much which words are rendered as 18 point bold text. Both do pay a lot of attention to the words inside your <h1> tags. Do I really have to bring up the visually impaired user again?

So that leaves me creating a "derivative work" under the GPL, re-writing significant parts of an open-source project for fun and profit. At least I hope there'll be some profit in it. Between cleaning up the HTML, making all of the data discoverable, adding RSS feeds for new products and specials, and eliminating scads of conditional code used to support PHP3 (think R4.5 in the Domino world), there's more than enough work here for me to do for now. And, need one say, more than customer number one can be expected to bear the cost of alone, so I've gotten another couple of pigeons lined up as well. "Template" pricing seems to be the order of the day in this world, so I've got to sell the work more than a couple of times to make it pay for itself. Luckily, the end result — clean, semantically-valid HTML and a versatile set of basic CSS layouts — mean that future sales will be a little bit more profitable. And, while the GPL (and, let's face it, the very nature of PHP) requires that I give them the source code, these aren't folks who are likely to modify or redistribute my work. I mean, these are people who are hiring a semi-disabled, self-taught, mostly-Domino-dedicated and kinda worn-out looking fellow like myself to create their killer online commerce sites. What are the chances that they're hiring out work they could have done for themselves?

Thursday, February 01, 2007

Oh. That explains a lot.

Seems we've found the root cause of things. Apparently, severely restricting the blood flow to ones brain can cause mood swings, memory loss, confusion and all kinds of other Alzheimer's-like symptoms. Who'd'a thunk it?

I knew my cholesterol was high. I wouldn't be allowed to attend any family functions if I weren't able to prove that I was at an extreme risk for sudden, catastrophic cardiovascular collapse. It's the closest thing to a heritage that we Rogerses have, you know. What I didn't know was quite how bad things had gotten in the last year.

For someone in my risk group, a total cholesterol level of 4 mmol/L is considered borderline (that translates to about 140 mg/dL for the Americans in the audience, quite a bit lower than the 200 or so that "normies" would be scared of). I knew I was high-risk, given my family history, so I'd been doing the good diet and exercise things. And I was getting regular checks. Somehow, though, my total cholesterol managed to drift a bit higher than I'd planned. To a point somewhere northward of 25 (that's around 900 on the American scale). My HDL level is normal, which means that my LDL (boo, hiss) is sitting at the "why are you still alive" level. And that's just the serum level — the metric tonne is probably a better unit of measure for the deposits on my artery walls.

If I hadn't been ignoring the chest pains, thinking them simply a consequence of the damage I did to my heart in my wild years, I'd probably have caught it sooner. As it was, it wasn't until my vision started to go and my hands and feet kept falling numb that I figured out that something was wronger (that should be a word) than usual. An optometrist was able to see rich deposits and stake a claim on my retinas — if there's a market for this stuff, he's going to be a rich man.

Needless to say, the pipes are being treated with Drano now (er, Lipitor, and rather a lot of it — thank God and the government of Ontario that I don't have to pay for it). It's a race to see if the clogs can be cleared before anything major fails permanently. But at least I know what's wrong. I wasn't going crazy. I was just dying quietly.