Monday, May 26, 2014

Gateway Drugs

In the summer of 1993 I taught my first graduate course at Rensselaer in Hartford. It was the math course required for all incoming mechanical engineers in pursuit of a Masters degree. I had gotten my Ph.D. a year earlier. I thought this would be a good way to find out if I could teach. I was a placeholder for a friend who taught the course on a regular basis. He didn't want to teach summer school; he didn't want to give up the spot. He asked me if I'd be his proxy, knowing that I'd willingly give it up when the fall rolled around.

The course went well. It was hard work. I created all my own notes from scratch. Sometimes they worked out. Other nights I'd go home wondering what I was thinking. The homework was a good guide: if their responses went off the trail, it meant that I'd led them there.

At the end of the course I got a nice check as adjunct faculty. The money was burning a hole in my pocket. I had another objective besides exploring my suitability for tenured professor-ship: I wanted to buy my first personal computer. I'd spent my career working with and programming computers for engineering analysis. These were usually Unix workstations from Sun Microsystems - powerful machines for the time, probably less than the iPhones of today. What would I do with a personal computer running Windows 3.1?

I excitedly called Gateway 2000 to place my order. I don't remember the specs anymore. I know it had a 3.5" floppy drive. I believe it had a CD ROM drive. The processor might have been the Intel Pentium. I'm fuzzy on the hard drive and RAM: 100MB and 2MB, respectively? In any case, it wasn't much. It has Microsoft Word running on it. I wanted to program, but I didn't know Basic. I got ahold of a Pascal compiler, which was the closest thing to FORTRAN I could find. I found it frustrating to try and do any serious calculations on it. As a result, it sat idle most of the time.

I finally hit upon a use that would force me to sit down to use the machine daily: I started keeping an electronic journal on this day 20 years ago. I wrote most days for many years: a lot at first, less as time went on. I've had a few stretches where the thread was broken and I didn't write for months at a time. But I've never let it die off entirely.

It's interesting to go back and read it now. Some of the entries are detailed and wonderful. Happy times either aren't documented because I'm in the midst of them and can't be bothered writing, or preserved after the fact. I used it as therapy when things were troubling me. Those can be difficult.

My equipment has improved a great deal over time. It's possible to do incredible things nowadays. We're awash in computing power, software, and data. It's fun to reflect on how far we've come in a very short time.

profile for duffymo at Stack Overflow, Q&A for professional and enthusiast programmers

Saturday, May 3, 2014

Toastmasters Advanced Leader Bronze

It's been a good year for Toastmasters. The fiscal year runs from 1-Jul through the following 30-Jun. During 2014 I've knocked off three designations: Advanced Communicator Silver, Competent Leader and Advanced Leader Bronze. A club earns the Distinctive Club designation by meeting 10 milestones. I'm 30% of a Distinguished Club all on my own.

I haven't suddenly become a person of great energy and ambition. It's partly an accounting trick, like boosting sales for a particular quarter by forward or back dating other sales. The Advanced Communicator Silver was earned in this fiscal year. I prepared and presented 12 speeches to fulfill the requirement. The Leadership side of the house has been sadly neglected by me for years. I didn't know how it worked, so I never kept track even as I fulfilled the requirements. The Competent Leader can easily be had by diligently attending meetings and volunteering for roles. The Bronze Leader requires that you become a club officer. I did that a few years back, but never thought to get credit for it because I hadn't bothered with its predecessor.

There are two hurdles left to becoming a Distinguished Toastmaster: Advanced Communicator Gold and Advanced Leader Silver. The former is "get a shovel stuff": prepare and deliver ten more speeches. If I can do it, I'll have written and delivered around 50 speeches since I first joined in 2008. The latter means I have to serve as area or division governor. I'm hoping to become area governor for the term starting on 1-Jul-2014. If I can manage it, I think I can achieve both by 30-Jun-2015 and become a DTM.

I don't think this makes me the best speaker. I still have issues with formulating, rehearsing, memorizing, making it a performance. But there's never been fear. Some people fear public speaking more than death. I'm not one of them.

There are only three DTMs in our club. I never would have guessed that I could be one of them. It'd feel good to achieve this milestone. Let's see what this year brings.

profile for duffymo at Stack Overflow, Q&A for professional and enthusiast programmers

Saturday, April 19, 2014

Rotator Cuff Update

I had surgery on my left shoulder back in January. I thought I'd post an update in the hope that it might help some other middle aged person who's facing a similar situation.

I hinted at the problem in my 2013 retrospective. I did my best to manage it as a chronic condition. I even went back to swimming, albeit at a greatly reduced effort, frequency, and intensity. But by the time my surgery date approached, I noticed that the muscles behind my left scapula felt markedly worse. I was grateful to be on the surgical calendar.

It was the first time I've ever been under the knife. I tried to remain calm, but when they took my heart rate and blood pressure on arrival at the surgery center both were sky high. The anesthesiologist put some valium in the solution when they prepared me for the nerve block "to take the edge off". I found out later that I had fibrillation again when they intubated me. They were worried enough to send me to a cardiologist for an echo cardiogram after I returned home. All was well. It was fear!

I was wheeled into surgery at 11:15 am. I believe it was 3:30 pm when I woke up in the recovery area. They found out that I had a bone spur on my collarbone that was abrading my labrum. Some time with power tools took care of everything. The nerve block worked wonders for 36 hours - I had no pain at all. I took the pain medication to stay ahead of it, but I hate taking pills. I weaned myself down to one at a time, then off completely after a few days. I never experienced any pain at all.

I was in physical therapy the day after surgery. The exercises were little more than moving and stretching, but they were key for avoiding excessive scar tissue buildup and stiffness. I went to physical therapy faithfully three times a week and did the exercises on my own at home. At first they were difficult and frustrating. One of the worst was the 1 kg medicine ball. I had to put it on a spot on the wall at shoulder height, then rotate the ball about that point ten times in each direction, three times each. Those small muscles in my shoulder needed to control the ball simply weren't firing. I could barely keep the ball on the spot, and just a few reps left my shoulder exhausted. But I stayed with it, going so far as to order a ball of my own so I could do those exercises at home along with the hand weights.

The physical therapist was terrific. He said there's a controversy in the field over when to start physical therapy. If the surgeon lacks confidence in his repair s/he's likely to recommend remaining in a sling and immobile for up to five weeks. The typical repair technique calls for drilling two holes in shoulder bone and inserting pins to hold the stitch and muscle to the bone. Pulling the pins out is catastrophic. My surgeon drilled all the way through the bone and looped the stitch through the holes. The only way to pull it out is to destroy the shoulder. The more reliable attachment, combined with arthroscopic minimally invasive cuts, made it possible to start on therapy right away.

The therapy room was always filled. Old and young: the former because of long use and the latter from sports injuries. One afternoon I was doing my exercises next to a man my age who was struggling with a range of motion exercise that I'd endured eight weeks earlier. "What are you here for?" I asked. He'd had his elbow repaired. When I told him I'd had my rotator cuff fixed, he said "I had that done last year by another surgeon. I was in a sling for five weeks; I couldn't drive for five weeks; I slept in a recliner for five weeks. I started physical therapy after discarding the sling and endured it for six months, and it's still not right. You look like you're doing pretty well." His eyes popped out of his head when I told him I'd had my procedure just eight weeks ago.

I was in a sling for ten days. I was driving once I left it behind. I started on physical therapy the day after. Seven weeks after surgery did my first lengths in a pool. I was discharged after eleven weeks and feel almost 100%. I'm still doing the exercises on my own at home once or twice a day. I'm working my way back to regular swimming, including Masters. I'm back out on the road running and feeling good.

So if you're reading this and considering a procedure, take heart. It's possible to come back. I'm on my way.

profile for duffymo at Stack Overflow, Q&A for professional and enthusiast programmers

Saturday, April 12, 2014

Heartbleed and Passphrase

The news has been filled with stories about Heartbleed, a flaw in OpenSSL that puts web sites and information at risk. We're told to change passwords immediately.

What a pain! I've got usernames and passwords all over the web. Changing all of them, keeping track, and remembering later will be incredibly difficult. The Internet has a password problem. I can't wait until I have my own quantum cryptographic key generator so I don't have to remember.

So what to do? I came across a nice site called Diceware that spells out a recipe for generating pass phrases. I have a backgammon board in the house, which means that I have four dice handy at all times. But a fifth? I can't use the doubling cube very easily, can I? The idea of manually rolling dice to generate a key, going to the wordlist to look up a word, and recording that pass phrase for a given site seems like too much work, too many steps. So low tech!

Being a computer programmer, I'd rather spend a day coding a solution to a problem that would take five minutes to do by hand. So that's what I started working on last night. I finished it today and uploaded the result to a Github repository. It includes the source code for two Java classes: Die (a six-sided die that uses a random number generator to produce rolls) and PassphraseGenerator (a command line app that generates a random pass phrase using the Diceware recipe), the Diceware word list, and an executable JAR that makes execution in a command shell easy.

This exercise recalled the wonderful xkcd comic about password strength. I always loved the entropy calculation that gave a measure of password strength, so I incorporated the calculations into my application. I also gave a way to calculate the entropy of a given pass phrase using command line arguments. The first argument is the pass phrase, surrounded by double quotes if it contains spaces, and the second is the alphabet size used to generate the pass phrase. I've been using simple pass phrases on my work computer for years now. I put the one that I currently use in to see what its entropy was. It has 42 bits of entropy. At 1000 guesses per second, it would take 241 years to crack if my calculations are correct.

It was a fun and fruitful exercise. It made me happy, like my Mandelbrot solution from a few years back. I need to do more of that.

The last remaining problem is that most sites have ridiculous rules for passwords (e.g. "between 8 and 15 characters; must include one capital, one number, one special character") that actually make them weaker and harder to remember. I'd much rather generate some four word pass phrases and use those!

I'm struggling with software development lately. I'm trying to swallow a lot of new techniques. It makes me happy when I can solve a small problem like this once and for all. Uploading it to Github lends an air of permanence that I love: "Don't have to think about that problem anymore!"

Maybe that's the answer to all hard software problems: Decompose the big problems into lots of small ones that you can solve and upload to Github. Solve and forget that problem, make yourself happy, and move on to the next.

profile for duffymo at Stack Overflow, Q&A for professional and enthusiast programmers

Tuesday, December 31, 2013

Another Year Looking Back

Goodness, has another year gone by already? I've written a couple of these retrospectives, including last year's effort. I was feeling pretty good after finishing my first half marathon. I had logged 313 miles on roads and trails, the best running total I've ever had. I swam 243,000 yards - subpar compared to my average 346,000 per year, but I was happy about learning how to run again. I had every intention of running another half marathon in 2013 and perhaps trying my hand at a full marathon. I had my training plans all set. I signed up for a half in Simsbury in June and planned to re-enter the Hartford Marathon again in October.

Unfortunately, I hit a couple of snags.

I was swimming an IM set during the second week of January when my left shoulder started hurting me. I'm not sure, but I think I was splitting a lane with another swimmer. I remember ticking the lane marker with my left hand when my left arm recovered over the water. Is that when it happened? I tried again the next day and found that it was still sore. I stopped swimming butterfly for 4-6 weeks before trying it again in Mar. I couldn't even complete a length: my shoulder was hurt. I went to see my general practitioner about it. When I told him I did it swimming butterfly he said "Are you crazy? A guy your age shouldn't be swimming that stroke!" He suggested that I had a partial tear in my rotator cuff. He said he could spare me a bunch of co-pays at the physical therapist by recommending rubber band exercises to build up my shoulder.

I was doing fine until I went out into the yard in April to clear some brush. I started experiencing pain in my neck and numbness in my left thumb. I've had cervical spine issues before: C6-C7 disk bulging caused incessant pain in my right shoulder, down to my elbow. This time the symptoms suggested C5-C6 disk problems. I resigned myself to a visit with an orthopedic surgeon. An MRI confirmed the initial diagnosis. It's not uncommon. It's likely that a random sampling of men my age would turn up several torn rotator cuffs.

I've never had surgery before. I wanted to do all I could to avoid it this time, too. I went to physical therapy with the goal of managing it as a chronic condition. I gave them a tough task: they had to sort out my neck issues before tackling my shoulder, but I made enough progress to make it back into the pool in August. I decided that I wanted a second opinion, so off I went to another surgeon and physical therapy team. I heard something there that changed my view. The surgeon was an accomplished swimmer (far better than me) who understood my love of the water. At the first session the physical therapist said "If I had a condition that I knew could be sorted out, I'd want to take care of it." That flipped the switch for me. I did all the exercises and planned to add my name to the surgical calendar in 2014.

So my totals weren't so impressive this year: 220 miles running, none longer than 8 miles; 131,000 yards swimming, my worst total by far since I started keeping track in 1996. I'd like to improve on both next year. It'll start by getting my shoulder sorted out. If it's a simple cleanup operation, I'll be immobile for a week or less. I'll be able to start on regaining full range of motion right away. If things are unstable, and stitches are required to make the shoulder stable again, I will be immobile for a longer period and the therapy will be more difficult. I'm optimistic for a good result. I feel good in the water now. I don't do butterfly anymore, but I can still do a modified version using the dolphin kick and alternating each arm. I don't know if I'll ever have that wonderful feeling again where I'm flying over the water. We'll see!

One goal for the year was to dive into on-line courses and deepen my knowledge of statistics. I hit a home run there. I completed an intro statistics course at Udacity early in the year. I wanted to learn something and see if online courses suited me, so I didn't commit to a certificate. The next three courses at were a great success. I earned two certificates with distinction and have hopes of meriting a third. I loved the courses and learned a ton. I plan to add more in 2014.

I had a great year reading, both technical and non-technical. It's not often that you can say you've discovered a favorite poet, but I did this year. Read Billy Collins' Aristole for one reason why.

I signed up for Twitter. I'm not sure that's a positive. It's a time sink, one that I cannot afford. I've spent too much time reading stuff that makes me laugh, think, and fume. I micro-blog and argue with trolls far more than I should. I rise to the bait easily. This is one habit that I hope I won't embellish in 2014.

I'm grateful to still be working. It's a year-to-year thing nowadays. We're all temporary employees, all at the pleasure of our employers. The world seems less stable than it was when I was younger.

I'm still married to the same wonderful woman. We're outliers by a long way.

My children are both out on their own, laying the foundations for their adult lives. They're still within a car and train ride, which is a great thing. I love seeing them.

My mother is still with us and doing well.

I still have plenty of technical goals. I need to write more applications and dive deeper into data analysis. Bayesian analysis and multi-chain Monte Carlo are at the top of my book pile this year.

I'm glad to still have that sense of optimism and anticipation at the turn of the calendar.

profile for duffymo at Stack Overflow, Q&A for professional and enthusiast programmers

Monday, December 23, 2013

Favorite Poet

I love to read, but poetry has never been my favorite. I've dipped my toe in the water, but I've never dived in with gusto.

I had a great AP English teacher in high school who fanned the embers of my love of reading into a roaring blaze. He seemed to have read everything. Whenever he'd recommend something I'd run to the library and devour it. More often than not he was right. Why else would I have read the Studs Lonigan trilogy? (Go get it - it's great.)

But he couldn't duplicate the trick for poetry. He taught us about different meters. I remember iambic pentameter and Robert Frost snippets, but little else. I confuse the names with guitar scales: "Did Shakespeare use mixolydian, or was that Stevie Ray Vaughn?"

My indifference to poetry persisted until one Saturday morning when I was out and about with the dog, listening to "Wait Wait, Don't Tell Me!" on NPR. The guest was Billy Collins. He was so entertaining to listen to that I resolved to give his stuff a try. My local library had a copy of his "Sailing Alone Around The Room". It's the best poetry I've ever read: beautiful, not dry or boring, modern and fresh. I can't stop reading the guy. I take a few in every day, re-reading the ones that I like. I've read them aloud to my wife, because they demand to be given voice the way great songs have to be sung. Poems that I like! I'm astonished at the thought.

profile for duffymo at Stack Overflow, Q&A for professional and enthusiast programmers

Wednesday, December 18, 2013

Best Coursera Yet

I finished my third Coursera course tonight: Data Analysis, eight weeks of learning R and its application to statistics problems. I've enjoyed all three, but this one topped them all. It was a difficult eight weeks. I spent a lot of hours at night after work and weekend time poring over assignments. It's been tiring but worth it. I've remembered the statistics I'd forgotten, learned a lot of new things like generalized linear models, and deepened my knowledge of R. It's exactly what I set out to accomplish when I started taking on-line classes a year ago at this time. I wanted to see if I could adapt to a new style of learning and self-education. I wanted to prove that I could still absorb challenging material. I'm at an age when it's easy to sit back and tell yourself that you already know it all, that you're too old a dog to learn new tricks. Did I still have it in me? I think I succeeded on all counts.

The professor was Jeff Leek, who's on the faculty of the Johns Hopkins biostatistics department. They claim to be pre-eminent in the world, and after sitting through this course I believe them. His graduate students are fortunate.

I've earned certificates with distinction for the two other classes I've taken. I calculated my point totals for quizzes and assignments for 'Data Analysis'. I think I squeezed out another distinguished certificate. I'll have to wait a week or two to see if my numbers match those from Coursera, but I'm confident that it'll turn out well.

I've got a lot of other tasks lined up. I want to take more of these classes next year, but I'm uncertain about what to take. I want to go further with R and statistics, but there's no clear choice listed in the catalog. I might start haunting and applying these new skills to problems. I've got some development tasks to get back to.

I found out that I'm two speeches away from achieving the Toastmasters Advanced Leadership Bronze designation. I'll fulfill those easily in the next few weeks. That would be three awards in one fiscal year. I'll only have ten speeches to achieve Advanced Communicator Gold and the Advanced Leadership Silver to become a Distinguished Toastmaster. Who would have thought it'd culminate in this when I started in 2008? Maybe I can do it by mid 2015.

I plan to relax a bit over the holidays. It's been a nice way to end the year.

profile for duffymo at Stack Overflow, Q&A for professional and enthusiast programmers