Wednesday, February 8, 2012

INALJ


Did I mention that my eldest, my first-born is newly employed? (Why yes, I did.)

Her first weeks are going very well, indeed.

She was interviewed as a success story by I Need A Library Job, the listserv where she found out about her employer. It's a great interview. It hints at the enthusiasm and thought she brings to everything. It choked me up to read the reference to "Cholera", knowing the source.

She has made herself into the one thing that every parent longs for: a self-motivated, internally driven, responsible for themselves adult.

Mostly I feel very proud of her. Is it wrong to gush in public on the Internet? (Who cares? I can't help myself.)



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



Saturday, February 4, 2012

An Old Allegiance





The championship of American football will be played in Indianapolis IN tomorrow at 6:30 pm. It's the New York Giants versus the New England Patriots, a rematch of the epic 2008 game. The Patriots were undefeated coming into that game. They were hoping to become only the second team in history to go undefeated and win the league championship. The Giants were huge underdogs. It was thought that the record-setting Patriots offense could name the score. but the Giants hung in and won an improbable victory, 17-14.

The state of Connecticut lies between New York and Massachusetts. Its capital city is Hartford: "Halfway between Boston and New York City!" It hasn't had a major sports team to call its own since the Hartford Whalers hockey team left for North Carolina. Needless to say, it is the Mason-Dixon line of local sports affections. Yankees or Red Sox? Giants or Patriots? Knicks or Celtics? Rangers or Bruins? One has to tread lightly for fear of offending.

I grew up in south western Connecticut. I could walk from my parents' house to a railway platform and be standing in Grand Central Station 45 minutes later. I watched New York news on television, read the Daily News and New York Times newspapers. I could not have named the governor of Connecticut was, but I always knew the mayor of New York City. I was far more New York than Boston.

I've never cared for hockey. I can't skate. I used to go to a pond down the street with my sisters and skate during the winter. One day I fell flat on my face and lay on the ice. I looked down and was eye to eye with a fish, frozen in place. "That's it!" I said to myself. I took off my skates and walked home. Hockey never had any interest for me.

I was a terrible baseball player. The Yankees fell into decline when I was young after decades of dominating the sport. The Red Sox were irrelevant. But the St. Louis Cardinals had fantastic teams and the best pitcher ever: Bob Gibson. My love for the Cardinals came in handy years later: it kept peace between me and my father-in-law, a lifelong Yankees fan.

Basketball was the game I loved once I reached my teens. I started playing the game at the end of the Bill Russell era, so I was a fan of the Celtics. There were a couple of years of adjustment after the sublime Russell retired, but Red Auerbach quickly surrounded John Havlicek with enough talent to pick up the torch again. Tom Heinsohn was their fiery coach, leading them into battle with the next great team in the NBA: the New York Knicks. They played a beautiful style that emphasized passing, moving, and finding the open man. All my friends were Knick fans. I had to stand alone, a minority of one. It was agony when they lost to the Knicks in the Eastern Conference finals in 1972 and especially 1973. They won 68 out of 82 games that year, but lost when John Havlicek hurt his shoulder running into a pick while guarding Bill Bradley, the Knicks' perpetual motion machine.

But before basketball, I was obsessed with football. There was no good reason for it. I was a skinny little kid. I had one uncle who was 6'2" and a big man; he had a great throwing arm in his youth (or so he told me). Another was 6'4" and a legendary basketball player until he lost his left leg in WWII. I prayed every night for their genes to pass down to me so I would grow to a size better suited to the game I loved.

My team was the Giants, but they were never very good. I suffered through year after year where the best I could hope for was a season where the wins balanced the losses; more often than not the character-building losses came in waves. But I loved the team. I had a red plastic helmet that I'd wear out to play with my friends. We'd head over to the nice football field at a nearby private school, put on helmets and pads, choose up sides, and have at each other in 3-on-3 games. My sister Mary always had an artist's eye. She offered to paint my helmet a replica of the Giants. She did a magnificent job! It looked beautiful - I loved it.

A friend of mine offered to bring me to the Giants training camp one summer. I was so excited! I drew up a play with complex X's and O's and lines running all over the place. I put it in an envelope with the intention of offering it to Allie Sherman, the Giants head coach. We had a great time that day: watching practice, following the players around, getting autographs. When I saw Mr. Sherman I sprinted over, introduced myself, and offered my envelope for his inspection. I don't remember much about the conversation.

That following Saturday night the Giants were in Green Bay playing an exhibition game against the mighty Packers. It was a hot night. My father's sister, my Aunt Bea, was visiting from California for two weeks, as she did every other year. Of course we had the game on television. The Giants took the opening kickoff and marched down the field. I cheered when Joe Morrison, their stalwart running back, scored the first touchdown of the game. As the players lined up to kick the extra point, the yellow wall phone in the kitchen rang. My mother answered, listened for a moment, and then turned to me: "It's for you!" I heard an unfamiliar voice on the other end of the line: "Michael Duffy? This is Allie Sherman. We just scored a touchdown on your play!"

I don't know if it was a hoax, but if it was the timing had to be the most perfect of all time. (How did he get my phone number? Did I put my address on the envelope?) All I knew was that I was one happy, believing boy, and the Giants would be my favorite team forever.

The Giants eventually accumulated enough good players and coaches to win their first Super Bowl in 1986. They won it again after the 1990 season, beating the Buffalo Bills to win their second just six weeks before my father passed away. They had another chance in 2000, but they were steamrolled by the Baltimore Ravens that year. The victory over the Patriots in 2008 was their third triumph.

My nephew Gavin is a Patriots fan. He asked me who I'd be rooting for on Sunday. He didn't know my history; I had never told him about my trip to training camp. But knowing that, how could it be otherwise? I'll be hoping for another Giants victory at this time tomorrow night.



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



Wednesday, January 11, 2012

First Job




I got a phone call tonight that I've been anxiously awaiting. My oldest daughter called from New York City to share happy news: She accepted an offer for her first full-time job. She'll be working for a small firm in New York City that advises clients on how to preserve and archive audio-visual collections.

I'm so proud of her. She graduated with a bachelor of arts degree from a small liberal arts college in May 2008 as the economy in the United States came to a crashing halt. Friends who graduated one year earlier had several offers to choose from, but months of applications and pounding the sidewalks turned up nothing. She had to come back home to live while she continued her search.

She hustled. She was a tutor at the high school in town. She coached her beloved cross-country and track teams. The girls loved her for it, but she was biding her time until the economy improved. She lived frugally, saved her money, and made plans for two years. She went to New York City to get a Masters degree from Queens College, completing it just a few weeks ago in December.

I've worried that her efforts might not be rewarded. We've always believed in the promise of education. What would happen if a second degree, paid for out of the money she squirreled away for two years, failed to deliver a job that could provide independence? All that dissolved when the phone call came at 6:20 pm. She was asked to come in at 6 pm tonight for a second interview to meet the founder of the company. It wasn't a long conversation. They liked her. I imagine a scene that looked something like this:


I saw a great link "14 Do's and Don'ts Upon Taking A New Job", with advice for anyone starting a new job, be it their first or one in a long line. I think it's spot on, worth keeping in mind.

I've had a lot of first days on new jobs. I can't wait to hear how her first of first days goes.

Congratulations, my love. Well done; well deserved.



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


Sunday, January 8, 2012

Speed



That new computer that I assembled in 2011 (read here and there) is screaming along now.

My original idea was to install the operating system on my first SSD. When I placed my order at Newegg.com, only a 40GB SSD was available in my price range. I found that the disk was almost full after installing Windows 7. Not good! I put the OS up on the 1TB mechanical hard drive so I could get the machine up and running.

But my delay and procrastination had one benefit: it gave Moore's Law time to work its magic. The size of SSDs has been going up while the prices have come down. I see rough prices of $1.50 per GB for SSDs now; I can get 120 or 240GB disks without too much trouble.

I decided to spring for a 120GB SSD and start again. I had invested in a lovely two-disk tray that makes installing a new one as easy as inserting it into the drawer and snapping it into place. Now I have two: the operating system is installed on the 120GB SSD, while the 40GB drive houses data and software projects.

It's amazing to see how responsive this machine is. I have 6 CPUs, 8GB of RAM, and a Nvidia video card. I still have a 1TB internal hard drive and an external 1TB drive that connects via USB. I use the external drive as a backup.

What to do with that 1TB internal drive?

I decided to install Ubuntu on the mechanical hard drive and set it up to dual boot with Windows 7. Now I have a Unix machine with gcc available to me. I'd love to install the CUDA SDK and start writing C++ to exercise their linear algebra and FFT libraries. It's one of the projects that I have in mind for 2012.

I've installed R and Tinn-R. I've begun working my way through "Doing Bayesian Data Analysis" by John Kruschke. It's been a revelation; I'll be writing more about that soon. That's another project for 2012.

2011 was a decent year for technical learning, but I need to step things up quite a bit. This new machine will be a great platform for doing so.


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

Thursday, December 29, 2011

The First Law



No, this isn't a posting about thermodynamics. I've been on a fantasy reading streak in 2011. It started when I went to my local library one Saturday morning and saw a copy of George R. R. Martin's "Game of Thrones" on the shelf. I don't subscribe to HBO, so I've never seen the series. I'd heard enough about it to kindle a spark of book lust in my heart. When I went back to work, I found out that some friends were already deeply into it. Buy.com was selling a four-book boxed set for cheap. Soon I was off and running.

"Game of Thrones" was great fun to read - think "Lord of the Rings" with lots of sex and violence. The characters are memorable. The plot lines are tangled and convoluted. There are bogeymen still waiting behind the wall to jump out and scare all of us in future books. I was very happy when the fifth book, "A Dance with Dragons", came out just as I was finishing the fourth book. The first book was published in 1996. Long-suffering fans had to wait six whole years between the fourth and fifth books; my wait was as long as finishing the last page of "A Feast For Crows" and then downloading the newly-minted book onto my Kindle.

But I found that there were problems with the series.

Each book is a daunting task - they average 800-1000 pages each. That means a lot of characters to keep track of, a lot of balls for the juggler to keep in the air, and a lot of filler material. There were times when some of my favorite characters (Jon Snow and his sister Arya) got short shrift, while others that I cared about less dominated the story line.

Repetition has been with us since Homer's Iliad : it's wasn't enough for Odysseus to go sailing; he had to do it on the "wine-dark sea". Homer knew that repetition would help lengthen the story and make it easier for the poet to memorize all those lines. George Martin knows it, too. It's always "Myrrish lace" and "Valyrian steel".

There's more than a passing nod to J.R.R. Tolkien and his "Lord of the Rings" - still the greatest fantasy work I've read. Tolkien made up maps, history, languages, and whole alphabets to flesh out his stories. You're a true fan if you've read his "Silmarillion", the detailed pre-history to the trilogy. He's famous for stopping the story to tell you about people, places, and events that seem to be well-known to all his characters, but you haven't a clue. George R. R. Martin - are those initials real or an affectation? - takes this to another level. He's obviously a Grateful Dead fan: "Too much of everything is just enough".

Most of all, there were several times when I thought Mr. Martin could have used an editor. The books would have benefited from having a detached, objective adviser to tighten things up. I felt like the odd numbered books were all excellent. The even numbered books dragged a bit by comparison. There's a lot of set-up material that pays off eventually, but it's a long time coming.

Joe Abercrombie obviously had an editor when he wrote his "First Law" trilogy: "The Blade Itself", "Before They Are Hanged", and "The Last Argument Of Kings". The books are more manageable in size - 500-800 pages - but the characters are equally vivid as Mr. Martin's. I had some trouble getting started with the first book, because I had some distractions that kept me from focusing. But once it grabbed me I was hooked.

The thing that I liked best about Joe Abercrombie's writing is that he takes timeless elements and gives them a twist. There are standbys like a small group that journeys to a remote location in search of a precious artifact. The group faces dangers that alter characters for better or worse, that bind or split them apart. There's conflict and war and long odds to be overcome. But there's always a perturbation that sets his take apart. For example, there's a wizard named Bayaz who may appear to be Gandalf-like at first, but there's deep, dark water underneath.

I've finished my non-technical backlog. It's time to jump back on my technical stack. I received John K. Kruschke's "Doing Bayesian Data Analysis". I'll be writing about it as soon as I manage to make some headway.





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

Wednesday, November 30, 2011

How Do Your Get To Carnegie Hall?






It's an old joke:

A man stops a New Yorker on the sidewalk and asks him, "How do you get to Carnegie Hall?" The native answers: "Practice, practice, practice!"

Except it's not quite true. Practice is necessary, but not sufficient.

It's perfect practice that makes perfect. It won't do to simply burn bad habits into your muscle and brain memories. You have to repeat the right behavior to be able to recall it at a moment's notice.

I knew this after years of doing scales and arpeggio studies on the classical guitar. Sometimes I felt like I was practicing in my bad habits, because I wasn't focused enough on what I was doing.

Peter Norvig made me aware of the rule of 10,000 hours in his "Teach Yourself Programming In Ten Years". He presents five citations, including Malcolm Gladwell.

Now the Freakonomics guys have added their two cents: "The how of learning is deliberate practice."

This is true in sports, music, math, programming - everything. Technique matters; it's how you do it.

I've found that to be true in my new running venture. My new-found techniques learned by running barefoot have made it possible for me to run the Manchester Road Race without pain or stiffness. I was able to run the next day without any discomfort, although I will confess that my legs were tired. The only after-effect that consistently follows a run is tiredness in my feet. They're finally waking up after years of slumbering in their shoe cocoons. I think I've succeeded in learning how to run injury-free in middle age.

I have to remember that more when I work on my programming skills. I need to identify objectives better and be more aggressive about conquering them and making them mine.





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

Wednesday, November 23, 2011

Clocks and Roulette Wheels


I've studied a fair amount of math during my education. Engineers were required to take four math classes: two semesters of calculus, differential and integral; multivariate calculus; ordinary differential equations. A fifth course in partial differential equations was recommended but optional. The engineering courses reinforced and built on this base. The prevailing wisdom was that the engineering department taught the same stuff as the math department, but better. I guess we all liked it better when the engineering department presented the material because it came with a context that fixed the ideas in your head.

I took all those and kept going. I decided to sign up for complex variables and linear algebra, just because I liked math. There were also two grad classes that presented integral transforms, calculus of variations, differential geometry, and generalized tensors. The numerical methods that I studied followed the same track: linear algebra for solving large systems of equations and eigenvalues; numerical integration; evaluation of special functions.

I never took a formal course in statistics or probability. The last two graduate classes that I took were in the statistics department: analysis of variance and design of experiments. I was glad to have taken them, but it certainly didn't turn me into a statistician.

I recount all this because it's finally occurred to me that I've missed out on something important. When faced with quantum mechanics and the loss of determinism, Einstein said the God did not play dice. I can't claim to know the gaming habits of God, but I can say that probability and statistics imbue everything around us. They're stand-ins for ignorance, an expression of what we don't know or are uncertain about.

Classical physicists, like Newton, Laplace and Einstein, viewed the universe as a clockwork. Anything could be predicted, given enough information. This is ironic in light of the great service that Laplace rendered to Bayes' theorem by putting it on such a firm mathematical footing. Quantum mechanics killed this idea in the small; non-linearity did the deed in the large. It's all a roulette wheel. Does that mean the universe is really a big casino?

I became aware of two schools of thought in statistics: frequentists and Bayesians. I read hints about the food fight that has been going on between the camps for two centuries, but I didn't understand exactly what it was about - until I read "The Theory That Would Not Die" by Bertsch MyGrayne. The writing style was a bit repetitive, but the story was wonderful.

There were two bits that I especially liked. The first was a quote from Jerry Cornfield to his two daughters as he lay dying: "You spend your whole life practicing your humor for the times when you really need it."

The second was from a section about Jimmie Savage and Dennis Lindley. As the amount of data increases, subjectivists move into agreement, the way scientists come to a consensus as evidence accumulates: "That's the way science is done."

I recently saw "Doing Bayesian Data Analysis: A Tutorial with R and BUGS" by John Kruschke on Amazon. I was intrigued. I knew Bayes and R; what was this BUGS thing about? But now I know, thanks to "The Theory That Would Not Die": it stands for Bayesian Inference Using Gibbs Sampling. There's even an open source project that implements it as a framework. I hope to check it out in the coming months.

I'm planning to add a few items to my must-read list. Probability will be on the list. So will Kruschke's book.





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