Sunday, December 21, 2008

How To Measure Things















I made a bit of personal history this past Thursday. I got up early and got to the pool before work, as is my daily habit, and logged another 3,000 yard workout. I've been spending some time with "toys" these days: 3x200 free w/ pull buoy; 3x200 free w/ snorkel; 3x200 kick w/ fins; 3x200 free w/ fins; 3x200 IM on 4:00. I felt great when I was done, as usual. I usually do 2,000 yards in the morning, but I cranked it up to 3,000 for three days to meet a goal. I've logged 520,000 yards for 2008. That's 10,000 yards each and every week, or 2,000 yards for each and every working day. My previous best total was 440,000 yards back in 2006. I've been keeping track since 1994. My average over all that time is 340,000 yards per year.

This isn't an extraordinary total for a really good swimmer. I think high school athletes can put in 6,000 yards per day, and Olympic athletes will do my weekly total in a single day. But it's something special for me.

How did this happen? There are a few important factors:
  1. Good health. I've blogged about the bulging disk in my neck that ruined my 2007. It helps that I've had no injuries or sick time.
  2. Availability of a pool. I've been fortunate for my entire career, because I've always been able to find a pool nearby wherever I've worked. And they've generally been staffed with people who make the opening of the doors and the arrival of a lifeguard as dependable as the rising of the sun.
  3. Consistency. Woody Allen said "Eighty percent of success is showing up." That's certainly true here. I've always managed to weave swimming into the day in such a way that it's relatively transparent to my wife.
  4. Swimming with others. For the longest time my ritual was to swim a mile of freestyle at lunchtime and get out. I never swam competitively, so I didn't know about workouts or intervals. I managed to figure out how to do butterfly on my own so I could swim the individual medley, but that was my only concession to trying anything new. In 2000 I finally worked up the courage to try Masters swimming. I was nervous. I didn't know if I could finish a longer workout, or keep up with the intensity. I found out that swimming with others makes all the difference in the world. The people I swim with are now among my best friends. The social interaction and better workouts have contributed greatly to my enjoyment of swimming.
  5. Measurement. My tracking system is simple: I have an Excel spreadsheet that acts as the database and does all the lovely plotting for me. I roll everything up by the week. I have "best month" totals. I can tell every week exactly how I'm doing. I derive a great deal of motivation knowing that I'm close to a goal of some kind. Sometimes that's the one thing that gets me out of bed early in the morning.
I'm already thinking about how I can top it. Just 10% more each day will do the trick. One more 200 to make my habitual daily total 2200 yards. They add up. I find that the snorkel is helping my lung capacity, so I'll work that in every day. And I'd love to learn how to tolerate butterfly for longer stretches. I can endure 100 yards of fly in relative comfort now. I'd like to work that up to 200 yards at a time in 2009.

I've been thinking a lot about that last bit, measurement. Tracking makes a big difference. I've been working on a star schema for a relational database to house my swimming data. I've learned more about data warehousing from that simple problem than I ever knew before. If it ever reaches a more finished state I may blog about that as well.

But it makes me wonder: How can I use measurement, metrics, and tracking to motivate the other important things in my life? My last blog talked about my frustration over lack of progress in learning Lisp and other things. How can I start tracking my progress through "Practical Common Lisp" to ensure that I end up at the desired destination?

What about measuring software development progress? If I could figure out how to do that, I'd be a wealthy man. Everyone in the software development industry laments the sorry state we're in. A large percentage of projects are never completed or fail to deliver the desired functionality. If we only had enough management, oversight, governance, and measurement!

It's not that those things haven't been tried before. You can't throw a rock without hitting a methodology that promises better results than the scorned "waterfall". Project managers have been around for as long as there have been projects. (You can see them in Egyptian hieroglyphs, holding Gantt charts on papyrus.) Analogies abound: "Software development is like building a building" - hence the love of the title "architect". "Software is like manufacturing" - hence the term "widgets".

Where I work, the conclusion is that if some hasn't worked in the past, more in the future will make things better.

Why hasn't any of this worked? What's so different about software development?

I think my swim tracking has a couple of key features that software lacks.

First, it has a well-defined time scale built in. I know exactly how long it takes me to swim those 2000 yards every morning. I have a metronome in my head for each lap, each 200 yards. (Unfortunately, it's a very slow timepiece.) The week closes every Sunday, and the workouts pile up in a steady drip, drip, drip as the year goes on. I can easily extrapolate to the goal at the end of the year: "Still averaging 10K per week, with two in the bank to anticipate that week's vacation in the summertime."

Second, the metrics are well defined. There's nothing fuzzy to account for, like "quality" or "maintainability" or any other "-ility". It's distance and time and frequency.

Third, the metric are additive. I swim in a pool that's 25 yards long. Laps roll up into sets, sets into workouts, workouts into weekly, monthly, and yearly totals. If I look at the plot of yards aggregated at the end of the month I can clearly see where I'm leading or lagging. I got up early to do 3,000 yard workouts last week because I wanted to cross the 520K line without having to worry about winter weather keeping me out of the water.

Fourth, it's just one individual. I'd imagine that it's harder for a coach to keep track of an entire team. There's an art to cultivating each individual to achieve their best and orchestrating a team to an end of year peak for a big meet.

Manufacturing has employed statistics to drive continuous improvement since Deming and Shewhart showed us out. There are any number of Six Sigma black belts running around applying these techniques.

So why does software development resist such improvements? I believe there's something different about it. Like Knuth said, there's an art to it. The social aspects of doing it in large, far-flung groups don't lend themselves to statistical measure. We've all heard about Dilbert-esque measures that reward those who find bugs ("Look at that! Found another one!"). We've griped about the scourge of unintended consequences caused by bad measurements. Measure success and progress by KLOC or number of classes checked in and you're likely to see your code base expand in size.

I'm going to spend some time seeing if I can extend my success at measurement in swimming to other things. If I make any progress, I'm sure I'll post it here.

Saturday, December 13, 2008

Overcoming Writer's Block

I've been suffering from terrible writer's block, as evidenced by this blog. It's not that there's nothing to say. Sometimes there's TOO MUCH to talk about. I'm stymied by a kind of shyness: "Why would anyone be interested in what I have to say?" I'm self-conscious about putting my opinions in public. The Web is wonderful, but I worry about how it breaks down our privacy.

I downloaded TiddlerWiki today, just to try it. It's supposed to have some nice features for linking and searching that might be useful.

I'm thinking about two applications for it. First, it'd be a great way to centralize little tidbits about software development (e.g., the stuff I have for setting up a MySQL database buried in my daily diary). Second, it might be a web-based alternative to my personal journal.

One thing I like about it is that I've downloaded an empty.html file to my hard drive. It's in my control. I'm still wary about putting stuff out there, "in the cloud", living on someone else's servers.

I also looked at a site called GoalsOnTrack.com. It's a nicely conceived and implemented site for establishing and tracking goals: simple, graphical, and elegant. Why didn't I write that? I signed up for a username and password, but first I read the terms of use. It was a real eye-opener. It's free now, but they actually have extensive language about billing and monthly charges and cancellation fees. The currency amount just happens to be $0.0, but it'd be easy to change. If the site is free, why add all that unless you plan to monetize it as soon as you reach a threshold number of users?

There's also language that says your data no longer belongs to you. The people who own the site can do whatever they bloody well want with it once you upload it. Woe be to you if you happen to have a goal of working through all the positions listed in the Kama Sutra by your next birthday! It could be dicey if your partner happens to be a co-worker or someone else who isn't your wife.

Anyway, both technologies are right up my alley. I've been keeping an electronic journal in Word since 1994, and I've been tracking my swimming yardage in an Excel spreadsheet since 1996. I've been looking for ways to improve both. The Word docs are nice, but I can't search them very easily. I thought about using Lucene to index and search the documents, but then I learned that my swim tracking got in the way. I started by embedding a spreadsheet into the Word doc at the start of every month. The POI library that I used to read the Word docs blew up over the Excel spreadsheets. So I had to move the Excel data out of the Word documents and into something better.

I became interested in data warehousing and dimensional modeling. I'm designing a data warehouse for my swimming data now. It's a surprisingly good demonstration for the problems of data warehouses and ETL. I'm guilty of "premature roll-up" (don't tell my wife). I aggregated my data by week, and now I'll have to work really hard to get back the finer grained daily results.

GoalsOnTrack seems like a great way to track all the other things that I need to get done. I've been pretty good about doing yoga on my own since I started taking a weekly class fifteen months ago, but actually seeing the hours spent in downward dog accumulate would be a great motivator. I'd love to brush up on the mathematics I've forgotten and learn the news things I need to take a new direction at work, but I'm a lazy man who tends to watch the Boston Celtics on television too much. Having a measure, like my swimming yardage totals, seems to motivate me.

How much tracking does one person need? After a while, the tracking activity consumes a great deal of your time. How anal.

Bloggers like Seth Godin and Jeff Atwood are my latest heroes. I don't know how they manage to be so insightful. Seth Godin posts every day. That old adage about writers having to write every day seems to be true. If I'm going to find a voice, I'll just have to start getting used to the idea of writing every day.

Sunday, September 21, 2008

Financial Meltdown - Unbelieveable







What a week it's been.

Is everyone else as incredulous as I am about the week's news? The US government, long the champion of free markets and deregulation being best for everyone, led by a Republican administration that styles itself as the champions of small government, has bailed out Bear Sterns, nationalized the mortgage market by taking over Fannie Mae and Freddie Mac, ponied up $89B to shore up AIG, and then promised to take on all the bad assets that were too radioactive for a rational investor to touch to the tune of $700B?

Each move was supposed to calm the markets and restore confidence, but the tonic never lasted more than a day.

I thought that Congress was the branch of government that controlled the purse strings. Now Henry Paulson and Ben Bernanke, neither of whom is an elected official, seem to be calling all the shots. Is this constitutional? Why aren't Congress and the Supreme Court weighing in on this?

George W. Bush must be hiding in a bunker, riding his mountain bike, or clearing brush somewhere. He's not much in evidence. I'll bet he sits silently in any meetings he's actually invited to. He's certainly doesn't appear to be a main player. Is this what degrees from Yale and Harvard get you?

Glass-Steagall was repealed in 1999 by Phil Gramm et. al, during the Clinton administration. Sandy Weill and his cohorts said we didn't need it anymore, so the wall between commercial and investment banks came down. We were so much smarter than we were in the 20's.

Eight years of Republican leadership have brought us to this. They actually controlled both the House and Senate for six of those eight years, so there's no one else to blame.

The Democrats have not distinguished themselves, either. Has there ever been a less effective opposition? I've lost count of all the times when they rolled over and died in the name of bipartisanship. From where I sit, there's not much difference between the parties. Democrats might be tax and spend, but Republicans are cut taxes and still spend. We'll have the largest deficits and overall debt in history at the end of this Republican administration. Our children and grandchildren will be left to survey the wreckage and curse their parents for what they've allowed to happen.

Henry Paulson used to be the chairman of Goldman Sachs. It feels like an inside job. The fix is in, and he can bail out all his cronies from Wall Street.

We can come up with three-quarters of a trillion dollars to bail out people who have been collecting bonuses that are more money than I'll make in a lifetime, but anything else is "fiscally irresponsible" or "liberal".

And all we can talk about during election season is Sarah Palin's hair, lipstick, and who's more of a Christian.

I simply can't believe it.

Saturday, July 5, 2008

Bicycle Riding, Past And Present





Last Saturday was a brilliant summer day, sunny but not too hot, with low humidity. I got my road bike out for a ride at 1:30 in the afternoon. My wife and daughter were out, so I had the afternoon to myself. When I turned out of the driveway I had to make a decision: which loop would I follow? I've been taking a familiar loop around a lake in the next town. It takes a little more than an hour, and there's a long, steep climb in the middle, but an hour in the saddle is not too difficult. I've gone out a few times this year, the first rides I've taken in two years after hurting my neck. But I haven't tested myself with a longer ride.

When I was younger I fell in with a bunch of bicycle riding enthusiasts at work. I rode my bike to and from work several times a week for as long as light and weather would permit. I'd put between 500 and 1000 miles on my legs in a good year. The season would end with a 100 mile ride to raise money for the Hemlocks Educational Center in Hebron. I trained all summer with the goal of finishing that ride. The first 25-mile loop took us south to Colchester and back to the center of Hebron. It was challenging, with a lot of climbing. I decided to attempt it, so I turned my bike to the left when I rolled out of my driveway.

I wasn’t sure that I was up for it when I left the house, but I wanted to try. I was worried about my neck, but it turned out to be just fine. I suffered on a lot of the climbing, but I surprised myself by doing pretty well. It took me 2:13 to cover 28.5 miles. That included a stop at the convenience store next to Butterball’s to get a cold Gatorade. I wanted to sit down and drink it, but there was a couple smoking outside the bar when I rolled up. The woman looked hard and worn. What the hell were they doing at a bar in the middle of a brilliant summer afternoon? How could beer taste better than Gatorade at that moment?

There’s one stretch in particular that I’ve always loved. A long downhill into Colchester has to be paid back, so there’s a fair bit of climbing after crossing the center of town. But once things level out you find yourself on a quiet, lightly traveled, two-lane paved road with a canopy of trees overhead to provide shade. You can get up on the biggest gear you have and fly along at an easy 20-25 mph. It’s a wonderful spot, one that makes me glad to ride a bicycle.

I started thinking back to twenty years ago during my ride. In 1988 I finished the 100 mile Hemlocks ride for the first time after several attempts that ended in pain and disappointment and after the metric century (63 miles). Michael Fraley, a young co-op who was working in the finite element group at the time was my companion.

I experienced “second wind” for the first time. I was spent and hurting at the second checkpoint. Every other year I decided that I couldn’t press on and turned for home, but this time I ate peanut butter and jelly sandwiches and bananas until it was time to go. I was in agony when I left the checkpoint. I could barely push the pedals down. I thought I would need a broom wagon to come and get me.

And then – like magic – the pain lifted. I felt a rush of energy through my body. The next loop was a hilly one, but I had no trouble getting up and down. I remember finishing the day in triumph, steaming up the road to the Hemlocks Educational Center feeling stronger than I had all day. It was wonderful!

I was the proud father of a two-year-old daughter. I was taking classes towards a doctoral degree that I never expected to finish. My father and brother were both still with me and in good health.

It was a good memory to carry with me on the ride. I wondered if extreme old age will be a blending of time? I felt like I was in the present and past all at once.

I was glad to be a middle aged man, still able to enjoy a long bike ride on a beautiful summer day.

Thursday, May 15, 2008

Changing The World

It's been a busy time of year. My oldest daughter will graduate magna cum laude from Wheaton College on Saturday. I'm very proud of her. I never got within shouting distance of having Latin on my undergraduate diploma. I've got a lot to do to get ready for the party on Saturday.

I stopped to watch some NBA playoff basketball the other night. During a time out I naturally surfed the channels to see what else was on. When I got to VH1, I saw that they were running a four-part history entitled "Sex and the Revolution". It had "sex" in the title, so of course I stopped to see what it was about. It was a documentary about sexuality in America from the 50s on. It featured Kinsey, Hugh Hefner, all the usual suspects.

The thing that struck me was the style. It interspersed still and moving pictures between commentary by "celebrities" and "experts", weaving them all together with a narrator on top.

The first time I saw history presented this way was Ken Burns' "Civil War" series on PBS. I was riveted during that presentation. I wasn't a Civil War buff, but that program almost turned me. Ken Burns has done a lot since then (baseball, jazz, World War II), but that first one was truly ground breaking and influential. Every document since seems to copy his ideas.

Ken Burns is a very talented man, but not every talented person gets to say that they changed the world for those that came after them.

What a great accomplishment. It started me thinking about how I've changed the world in my time on this earth. I can't come close to Ken Burns, let alone any truly ground breaking individual. I'd better get busy. Who knows how much more time I'll have?

Tuesday, May 6, 2008

Swim Tracking Application - Requirements




I do love to write, and the personal musings I put out onto the web from time to time might be fun, but I want this blog to be about technical matters. I hope that I'll learn something, and perhaps the things that I post will help someone else.

I've written about my love of swimming in the past. Since 1994 I've kept an electronic journal. I create a new Word document every month and write as often as time and energy permit. Each one includes an embedded Excel spreadsheet where I keep track of the number of trips I make to the pool and the yardage for each workout. I used to only swim at noon, 1800 yards at a clip. In 2000 I worked up the courage to swim with a Masters group for the first time. These workouts tend to be longer and more intense, so after 2000 I started breaking out Masters and noon workouts. At the end of each year I roll up all my yardage to see how I did.

2007 turned out to be an average year, in spite of my C6 disk problem. I had three months (Mar, Apr, and May) where I didn't swim at all, and I was still limited in June. By August I was back swimming with my Masters group. The last four months of the year were my best ever. I think that seeing the yards pile up and having a chance to get back to "average" were great motivations for working hard and not skipping workouts.

There are only two problems with this system.

The entry into Excel every month is very manual. I copy & paste the embedded spreadsheet from one month to the next, which is a bit of a pain. I manually transcribe the data into a second Excel spreadsheet that I use to roll up results and display lovely plots of yardage versus time. This is error prone and time consuming.

I would love to be able to index all those journal files with a search engine like Lucene. I have fourteen years of my life stored in Word files, and sometimes I find myself wondering when a particular event happened. I'd love to be able to type some search terms into a UI and have it return a list of files and dates when those terms appear. Since Word is Microsoft-proprietary I have to rely on a library like Apache's POI to read and parse the documents for indexing. Alas, the embedded Excel spreadsheets gum up the works. I get an exception when I try to read my Word docs, and POI isn't a very active project these days. There's a bug reported, and a promised fix, but it's been years since it was first posted. I won't hold my breath waiting.

So I'm proposing to write a swim tracking application for myself. If done correctly, this will give me more capability. As a bonus, I'll be able to remove those embedded spreadsheets and index my electronic journal files. That'll be another fun application to write!

I'd like to use technologies that I love and am familiar with, but would like to know better: Java 5, Spring, Hibernate, and MySQL or PostgreSQL for the relational database. I'll deploy on either Tomcat or WebLogic.

Should I think about an embedded database like Hypersonic? It'd be great to have a SourceForge or Google project that would allow someone to be up and running with a minimum of effort. If I follow that thought to its logic conclusion, should I also bundle it with Jetty? I'd like to have the lightest weight app server possible. Spring makes it possible for me to do robust Java EE development without EJBs, so that helps.

The user interface will be either straight JSPs, using JFreeChart for graphics, or Jasper Reports.

I'll use IntelliJ as my IDE.

I'll set up a Subversion repository for my source code.

Like any good software project, I'll start with my requirements.

Are there any good commercial or open source alternatives worth looking at? A Google search on "swim tracking software" tells me that there are some low-cost commercial programs available: Swim Shark, Jack Rabbit Swim, and Swim Log. But there are no open source alternatives out there. Maybe this will be a good niche for me.

I wouldn't mind stealing a peek at what they've done to see if I could duplicate any neat features. UI design isn't my forte, so having a few thoughts about how to lay things out might help, too. But the journey is as important as the destination, so I'll still be writing this myself.

This is a swim tracking database, but I could see where it might be possible to extend this to all sorts of activities. What about cycling? Running? I'm doing yoga on my own now. What if I had a nice calendar control to show me how frequently I was keeping up with daily yoga? Wouldn't a goal of 3-4 days per week be helped along by seeing a calendar tracking success? There's nothing like a string of "no yoga" days staring you in the face to motivate better effort.

I'd like to write it for multiple users. My daughters are both athletes, so maybe they'd like to track progress on their workouts. Security will be an issue. I'll have to have roles for different users and administrators.

I had a choice when I started tracking. Would I keep book yards on a monthly or weekly basis? I decided to stick with a weekly basis. The week ends on Sunday, because most of the swimming was done during the work week. If Sunday fell within a given month, that week would count against that month's totals. So a given month might be credited with four or five weeks of swimming, depending on when the Sundays fell. Would I continue with that system? Or should I switch to a true month accounting? It makes a difference when determining personal best yardage totals for a given month. Having a real relational database might give me some flexibility there.

So I account for total number of visits and yards each week, with a special tracking for Masters workouts and yardage. I'd like to keep that breakdown.

I've hit a lot of pools in the state. Most of the time these are 25 yard pools, but there are happy days when we're allowed into the 50 meter pool at the University of Connecticut. Unfortunately, those opportunities are rare. We haven't had a Masters workout in the big pool in years now. Should I maintain units, too? Or just leave everything in yards and convert in the UI when necessary?

I only keep track of total yards, but swimmers know that a workout can consist of different sets. Masters swimmers usually do all four competitive strokes in a single workout - butterfly, back, breast, and freestyle. Should my database allow me to break workouts down by set? Keep individual times? This is what a real coach would probably want. Maybe a database of workouts would be worth having. I could associate a given day's swim with a particular workout that way. It could be useful.

The payoff comes with the plots and reporting. I like knowing what my best total yardage is for a given month. So far in 2008 every single month has been either my best or second-best for total yardage. Sometimes I might feel tired in the morning, but knowing that I'm close to a best monthly total is all the incentive I need to get out of bed. I have plots of yardage versus month for each year, along with an "average" year curve. I could supplement that with theoretical curves for best and worst years, keeping track of all my milestone monthly totals.

Should I use a relational model, or explore a data warehouse-like star or snowflake schema? I'll have to think about what the pertinent dimensions should be. Since this is mostly a reporting database, there might be some advantage to going that way. I'm not sure how objects and Hibernate work with data warehousing schemas.

That's enough to think about for now. I'll have to see if Blogger allows me to post UML diagrams. I'll flesh out the design a bit more soon. But this is a fine start.

Saturday, April 26, 2008

First Toastmasters Speech




I presented my first speech at Toastmasters this past week. It's the icebreaker, and the topic should be a familiar one. The handbook suggests a speech about you. It helps club members know you better, and makes preparation easy.

I wrote my speech out - once, twice, three times. I practiced it in front of a mirror at home, timing myself to get an idea about the pace. I presented it in the car on the way into work. I felt ready on Tuesday.

I've always liked public speaking. I got over my fear early. My high school required two years of public speaking, so I had to take classes in my freshman and junior years. Both were taught by a rough and tumble man who was an assistant coach on the football team. He was a terrific speaker who knew how to prepare us well, but he wasn't above mixing it up with students who were unruly.

I had no problems in my freshman year. That was a time of "tracking", so I was in the highest track with a lot of students who were similarly serious minded. However, there was a scheduling conflict in my junior year, so the only section I could get was a class loaded with football players who were anxious for a shot at their coach. I learned to have no fear of the crowd there. I got to the point where I'd prepare on the way to the podium. My measure of success was how well I quieted the class. I began to think of myself as a pretty good speaker.

During my working career I had a few opportunities to speak. I had to present a paper to a large audience at Worcester Polytechnic Institute. The room was full when I explained my doctoral dissertation at a company conference. But I didn't get much practice or additional instruction. One day my boss decided to send me to a week-long class on public speaking. I was miffed when I heard it. Me? I don't need any help. I'm already a master! But I went anyway, and I was glad that I did. We were filmed during our presentations. I found it painful to see and hear myself. I learned a few good things from that class. The most important lesson was that I still had a very long way to go to be a good speaker.

All this went through my mind as I strode to the podium on Tuesday. I took a deep breath before starting. I could feel my voice shaking when I began to speak, but I remained calm and got into the rhythm of it. I had a problem with timing. The speech was supposed to be 4-6 minutes long. The red flag went up before I was ready to wrap things up. I didn't prepare enough; I'll have to spend more time on my next effort.

The club had an invited speaker join us: Douglas C. Comstock. He won the speech and tall tales contests at a recent regional competition, and he was gracious enough to come in and give his prize winning speech to us. I was knocked out by his skill. This is a man who knows how to imagine, prepare, and present a topic. He even had an encore: he had prepared a second speech for possible presentation in the next round, and he asked us to give him feedback on it. It was an emotional talk about the death of a beloved brother-in-law that had me choking up as I listened.

I was amazed by the feedback that the club gave. Even someone as talented as Doug Comstock was soliciting and receiving excellent comments. The suggestions were not fan boy fawning, either. Praise and encouragement were mixed in with points that were objective and pointed.

I got some great feedback from my reviewer. I have a very long way to go to become Doug Comstock. But I'm already thinking about a second speech. I sent an e-mail to the club president to ask how frequently people make speeches. Would I be hogging the podium if I gave four speeches this year? He said I should go for it. I'm going to start writing that second speech soon. I'd love to get 4-6 under my belt this year.

I'd like to ask Doug some questions. How often does he speak? Does he do this for a living or a hobby? What is the inspiration for his speeches? How does he prepare? He provided an e-mail address. Perhaps I'll send those questions along and see how he responds.

Saturday, April 19, 2008

A Pain In The Neck



I love to swim. It's been my primary form of exercise for my entire adult life. However, I learned late. I was terrified of being in water over my head when I was a kid. I was skinny, and the water always seemed too cold. I missed out on proper coaching, training, and competing.

After my junior year in college, at the tender age of 21, I was dumped by the woman I was seeing during the school year. I was home for the summer at my parents' house with little to do except go to work every day. I had dedicated my life to playing basketball during my teen years, but the hours of practice couldn't make up for the lack of height, hops, and skill. I would go running every night after work, but I noticed that my ankles and knees would hurt after long runs. I didn't think it would be a good idea to be running every day when I was old, like thirty. So I cast about for an exercise alternative that would be easier on my poor joints.

I decided to learn how to swim. The instructors at the YWCA were patient and did their best. I continued to work on being comfortable with going up and down doing freestyle, but my poor form necessitated a breathless stop at the end of each length where I'd hang onto the gutter for dear life and pant until the burning stopped in my lungs.

After graduation, I found a job and an apartment complex that had an indoor pool. It was a bathtub, not even 25 yards long, but it gave me the chance to practice my awful freestyle every day. I had a conversation about my difficulties with a friend who said "If you can do ten laps straight without stopping you should be able to do a mile." I took that advice to heart. I went home that night and tried it. He was right! I was hooked.

Somehow I've managed to work swimming into my daily routine. I'd put in my dutiful mile of freestyle every day at lunch. I learned how to do flip turns. I even learned how to do butterfly after I finished grad school. I started swimming with a Masters group eight years ago. Anyone who has been a competitive swimmer is better than I am. Winning high school times that I see in the newspaper are half mine in every distance and every stroke. I'm still glad to be in the water.

Fast forward to my 50th birthday. I'm in the midst of my best swimming year ever. I'm swimming before work in the morning and with my Masters buddies twice a week. The yards are piling up. I feel great! I tell myself that swimming is the best exercise there is, that I don't need anything else. I don't stretch; I don't lift weights; I don't cross-train. There's only swimming, and it's kept me fit for my entire adult life.

I woke up on 4-Mar-2007 with a stabbing, blinding pain in my neck. I iced it and took ibuprofen, but the pain only got worse. I called my doctor, who gave me some strong pain medication and sent me over to a chiropractor. The chiropractor recommended traction twice a day with an over the door traction device. But the pain progressed to the point where I couldn't bend over to put on socks. I had to stay home from work for two days, lying in bed.

Finally I had an x-ray and an MRI done. When my doctor sent me over for the MRI, he said that I should try to get an appointment with a spinal specialist now, because it would take a month for him to squeeze me in. He called me when the MRI result came back and said I had an appointment with the specialist the next day. The disk between my C6 and C7 vertebrae was bulging into my spinal cord.

I was worried when I heard that. It must have been serious if they had to rush me in so quickly. Could it be reversed? Could I end up paralyzed or permanently disabled in some way? Would I ever swim again?

The spinal specialist decided to take the conservative route. He didn't want to do surgery or cortisone shots. He prescribed a pneumatic traction device and twice-weekly physical therapy sessions. "I think you'll heal", he said.

When things were at their worst I turned to the Internet for research and comfort. I Googled for "swim c6 disk" to see if anybody else had ever written about a successful return to the pool after an injury like this. There were a couple of entries on swim forums, but not enough information to be sure. I had no idea how long it would take.

I didn't swim at all for the rest of March; April's yardage total was a big goose egg. When I slid back into a pool again on 11-May I couldn't turn my head to breathe and my right arm was still experiencing numbness and pain. I put on a pair of flippers and kicked on my back for 1000 yards. I found that backstroke wasn't too painful, so I started mixing that in with my kicking.

I ordered a snorkel from Finis that arrived in June. I could do some freestyle without turning my head to breathe. I continued with physical therapy until the end of July. Soon I was able to do freestyle again, turning my head to either side, without the snorkel. I worked my way back to being able to do butterfly and individual medley. I went back to my first Masters workout at the end of August and became a regular fixture again.

I still wasn't out of the woods. I was back in the pool, but the pain and stiffness were still there. I started taking a once-a-week yoga class in September. That made a big difference indeed. I would do an hour's worth at home several times a week to supplement the class. I found that my core strength and flexibility were both much improved.

The fourth quarter of 2007 and first quarter of 2008 have seen the best swimming yardage totals of my life. I keep track of how often and how far I swim so I can gauge how I'm doing. The pain has subsided as the yards piled up. The best indicator of my recovery comes when I sneeze. Last year I would experience searing pain whenever I sneezed or coughed. Now I'm myself again.

The time from first pain to recovery has been 13.5 months. The spinal specialist said something to me that I thought was funny: "All the traction, all the exercises, all the physical therapy is really just a way to take your mind off it. The one thing that heals this kind of injury is time."

I read that this is a common injury for men my age, and 70-80% of them recover fully. There were a lot of nights when I feared that I'd fall into the 20-30% of men who couldn't come back from this. I wanted so badly to find stories from people who were in my situation, who could tell me that it would be all right.

So if your neck hurts, your arm is numb down to the elbow, you can't lie down for a full night's sleep because of the pain, and you're wondering if you'll ever see the end of it, take heart. I'm feeling great now, and so can you.

Sunday, April 13, 2008

About My Blog Title

I've had two careers in my life. My education and 16 years of my working life were in the field of mechanical engineering. One of the best courses I took in graduate school had to do with fracture mechanics. One of the topics it deals with is predicting the likelihood of brittle fracture and growth of small cracks into larger ones. You'll see the term "crack propagation" in papers on the subject.

My father was born in Ireland and emigrated to America when he was a young man. He came here in search of better economic opportunities. He found that and more: he met my mother, married her, and had a raft of kids. He became a US citizen. He thought he'd reached the Promised Land. He had little to look forward to in Ireland at the time. He didn't want to be a farmer.

Now Ireland has become the Celtic Tiger of the EU. The population is young, educated, and staying home to work in high-tech industries that have sprung up. I was lucky enough to go back a few years ago and see the town where my father grew up.

One thing I learned while I was there was the Irish slang for conversation: "craic", pronounced like "crack". "Having a craic" means sitting around with your friends and having a lively discussion.

So the title of my blog is an attempt to be clever and pay homage to my former profession and my father's homeland.

Exposed In Public



I joined a local Toastmasters club recently. I started attending meetings in January and finally bit the bullet to become a member a month ago. I've always liked public speaking. I even fancy myself to be somewhat good at it, if not being terrified at the thought can be considered "good". Whether I'm as effective as I imagine is quite another matter; hence the new membership. I thought it would give me a chance to practice and to learn that craft from the bottom.

The meetings are fun. The club meets in a conference room where I work. There's an agenda for every meeting that is rigorously adhered to. There are roles to play, rituals to follow, rules to enforce. There's a portion called "table topics", where individuals are asked to come up and speak for 1-2.5 minutes on a randomly assigned topic. At the end of each meeting ballots are distributed, and best speech and table topic are voted on. I've spoken on a table topic twice, and both times I was voted "best table topic" for the day.

I'm going to give my first speech in nine days, and I have to admit that I'm a little nervous about it. It's not the speaking that concerns me, it's the topic. The first speech is intended to be an ice breaker. The new prospective Toastmaster-in-training should talk for 4-6 minutes about a topic that they know well: themselves.

I started writing out what I wished to say this morning, and I'm finding it to be a "naked in public" experience. I feel exposed! I don't know the audience so well. How far should I go? The two first speeches I've seen focused on family, education, and employment history. Everyone else in the club is so young. Will they laugh if I say that I remember when Kennedy was shot? I have vague memories of the image of the funeral on a black-and-white television in a neighbor's house. My friend's mother was weeping hysterically, but I didn't understand why.

I can hear their reaction now: "Black and white television!? Ted Kennedy was shot!? Dude!"

Will that expose me as a member of their parents' generation? As if my gray hair didn't give that away already. I feel the cold hand of ageism on my shoulder.

The Internet is making privacy harder to maintain. Blogging like this on the Internet feels like I'm on a soapbox, standing on Speaker's Corner in London, yammering away for an audience that could include the entire connected planet. I don't have a Facebook page yet, but most people in my family do - except for my older sisters and me. Is this a generational thing?

I don't know that I've had a single reader yet. I've told no one that I've got a blog. There hasn't been a single comment left. I don't know if Blogger makes it possible to find out how may views my page has had. I'm trying to find a voice for myself, and blogging on technical and personal topics seems like a good way to go.

But it sure feels cold out here.

Friday, April 11, 2008

Service Oriented Snake Oil



I don't like this service oriented direction that the world is taking.

I understand how it promotes REAL reuse. I see the benefits that eBay, Yahoo!, Amazon, and Google are gleaning from the technology. I like how it breaks functionality out of application stovepipes. It gives us a chance to write distributed components that can deal with clients written in Java or .NET or any other language that can be a web service client.

But does it have to be so bloody complicated?

I think corporate enterprise application development is markedly different from the demands placed on those Internet leaders I mentioned.

What is this buying us that we can't get with other technology?

Contract first XML helps some with the problems of brittle interfaces and promotes looser coupling, but it's not perfect.

Can you model the operation of a large financial institution using REST?

Transactions and ACID are the biggest problem that I see. I think services have to live between transaction boundaries. It's taken a long time for databases to be able to help us with managing units of work. I'm not aware of anything analogous for services. Compensating transactions break encapsulation, in my opinion. How long should an idempotent service wait to be sure that a PUT or POST will "stick"?

BPM, BPEL, and ESBs are leading us down the wrong path when it comes to maintaining ACID properties. It's a great marketing ploy to tell business people that they can create complex process flows using graphical tools to drag & drop a suite of available services onto a palate, connect them up using "simple" logic elements for branching and joining, and then deploying the whole thing under the watchful eye of The Bus. But the moment there's more than one transactional service in that flow you'll have to worry about ACID properties. If the first one succeeds and the second one fails you'll have a mess to clean up.

It's great for vendors to be able to offer wizards to make it easy to churn out services. It's no different from any other remoting technology in that sense. If I write a sensible interface and a solid implementation for it, it's easy to see how I can expose that using RMI, EJBs, servlets, SOAP, or any other remoting technology that I like. So what's so special about web services again? What's different this time?

And the real difficulty isn't addressed by the wizards. At its bottom, what we really have here is a design problem. I think part of the reason why REST is still not widely used in corporate enterprise solutions is that it's an architectural style, not a standard. There aren't tools and wizards and cookbooks out there to tell you how to run your enterprise on REST. You have to think about it and slog your way through a hard problem. It might have worked for the Internet, but I'm not Roy Fielding.

I'm spent my second career as a software developer using curly brace languages - first C, then C++, now Java. I'm sorry to say that I'm getting the nagging feeling that this has all become too hard. There's got to be a better, easier, faster way to develop n-tier web applications that deal with relational databases. I love Java and Spring, but it's still too damned hard. It might be time for me to try another language.

Maybe this is why Ruby and Python and PHP are gaining traction.

Thursday, April 10, 2008

SOAP versus REST



I've been working at writing web services for a large corporation. WS-* has been out there for a while - SOAP, WSDL, all the usual suspects. There are lots of web service implementations - Axis, XFire, WebLogic, all the Java EE app server vendors. There are tools built into every IDE - IntelliJ, Eclipse, NetBeans. With all this machinery in place it ought to be easy, right?

Why does all this feel like EJB 1.0 all over again?


We have Service Component Architecture and Service Data Objects from IBM and a host of others. Why are these such an improvement over session and entity beans?

Where is the simplicity in all this? What is all this complexity buying us?

The alternative is REST. The problem in making that argument is that it's an "architectural style", not a standard. There aren't any REST wizards out there. It's a tough sell when you're being asked to provide direction to a remote team, which is most likely outsourced. It's easier to put a wizard into their hands and tell them to start generating services. Won't that save the world?

The problem is that there's less time to think and design in this world of outsourcing. You can't iterate without change requests and lawyers being involved. Management would like to substitute process and wizards for craftsmen. They would prefer to reduce everything to the lowest common denominator. The perfect solution would be to make it so easy and automatic that secretaries could pump out code on their lunch hour.

Or, better yet, pre-packaged software.

Why is software so difficult? The analogies to buildings and manufacturing don't fit.