Professional
Personal
Site
Profiles
Since 2008 I write more on Facebook, but you can still read these older entries.
Add to My Yahoo!: Add to My Yahoo! RSS Feed: RSS feed link
Christmas Light Display
While visiting Elise's parents, we saw this local light show. A 5 house, 75,000 bulb display of Christmas lights, set to Handel's Messiah. Note to Crazy Christmas Lights Lady: the gauntlet has been thrown down!
Permalink
Test-driven development with Christmas lights

This year my wife decided to make multi-colored Christmas light strands by changing the individual light bulbs on solid-colored strands. The task seemed simple, if tedious, enough:

  1. Get 100 bulb strands of red, white, green lights.
  2. In each strand, skip one bulb, remove two and place into bins, repeat until end of strand.
  3. In each strand, take bulbs from the other two bins, replace lights in order, repeat until end of strand.
  4. Plug in each light strand.

We followed this process, and after an hour we were ready for step 4. Veteran Christmas decorators know what happened next.

Two bad strands.

Christmas light bulbs are wired in series, meaning that one bad bulb will prevent the strand from lighting. For one more hour, we worked up and down the faulty light strands, looking for the bad bulb. We checked each bulb for a tight fit. Then we pulled each bulb out, furiously examining the connections, occasionally tweaking them. Every time we'd test the strand, we did not see any lights. Finally, we were able to fix all the strands. In total, we spent two stressful hours to create three multi-colored strands.

That night I laid in bed thinking about our experience. When we started, I felt great! We had an efficient plan. We would do the jobs in batches: finish one task (pulling out lights) before moving onto the next (putting in new lights). With no task-switching, it felt like we'd get done in no time. Unwittingly, we had followed the waterfall process of doing Christmas lights.

Our downfall, and the waterfall's downfall, was not knowing where we introduced the errors. In that second hour, testing the lights like crazy but never certain that we were making things better instead of worse. In both hours, we were so busy that our perceived productivity was high, but our actual productivity does not. We did not introduce any testing until the end, like a software team that does not test until development is done.

I realized an agile, test-driven development process would be the way to go. We would introduce regular testing into our process. Instead of time-boxed iterations we used lightbulb-boxed iterations. On the next set of strands, we stopped and tested each of the strands every three bulbs. While we had a lot of task-switching, we also had a high degree of certainty. Each test, either the whole strip worked, or one of the last two changed bulbs was faulty. Progress was slow but steady. We finished and had three working strips in 90 minutes.

In the waterfall process of Christmas lights, we sped through the bulb changing (development) but got hung up in test. With the agile approach, our bulb changing (development) time increased 50% but the final test was a breeze. In each case, we made the same total number of mistakes, but in the agile approach we caught and corrected them faster.

Test-driven development is a powerful concept. In the past several months, it has made me a better software developer. My wife's Christmas lights showed me how powerful agile techniques are outside the compiler.

Permalink
Programmer jokes!
Some great programmer jokes at StackOverflow.com!
Permalink
Men's soccer: Playoffs, round one

Last night #5 Yuengling squared off against #4 Stoppage Time, in a rematch of their regular season tilt won 3-1 by Stoppage Time. Yuengling had to put away their traditional green jerseys as we were the lower seed and Stoppage Time also wears green. It was pretty strange to see us all in white. I yelled "come on green!" a few times before catching on!

Yuengling dominated early, scoring an early goal and maintaining good ball possession and pressure. Lawrance chipped a beautiful set shot to the upper right hand corner for what should have been a 2-0 lead, but their goalie Arnett just barely tipped the ball off the post, probably the best save of the game. After the ensuing corner kick, Stoppage Time went on the offensive, culminating with a goal off of a corner kick of their own. Immediately the halftime whistle blew. 1-1 tie.

We came out of the gates ... flat ... and Stoppage Time dominated in all aspects. They had several good scoring opportunities but did not capitalize. Eventually the tide turned and things were more even. I started going over overtime and penalty kick scenarios in my head. Then, somehow, we forced a goal on a shot from a terribly narrow angle. With only a few minutes remaining, this lead should be enough to seal the deal.

The Stoppage Time offensive resumed! For the rest of regulation, there was nothing but offensive pressure from them. They got a free kick a few yards outside of the 18 yard goal box, and I screamed for a 4 man wall to guard the near post. I set myself up towards the far post. Incredibly, the shooter looped the ball around the wall and towards the near post! I got my hands on it but not enough, coughing up a rebound. I dove for the rebound. Rolling, with my hands on the ball again, an opposing player was winding up for a big kick. I pulled the ball to my chest and ended up rolling into him, and he crashed over top of me. Phew.

The referee signaled there was one minute remaining. Stoppage Time got another corner kick. The kicker blasted a low, knuckling shot towards me, and I barely got my hands on it and pushed it out. Unfortunately, right back to him! He took another low knuckling shot, and again I could not contain it. It bounced around the goal area. A Yuengling player cleared the ball to the sidelines, intercepted by the opposition again! But, they failed to settle the ball and it bounced out of bounds. And then we heard it -- that sweet, sweet sound of the game over whistle!

It took one playoff game for us to match our regular season win total! In typical Yuengling fashion, we will face the #1 seeded team in the 2nd round. As far as I remember, this is the exact script we follow almost every season. The only difference this year is that the #1 team is not our nemesis, the Lions but rather FC DTWC, a strong team but also the team we tied in the regular season finale. Our next game should be interesting. We have next week off, so you'll have to wait two weeks for the next one!

Permalink
My hero: A Mandelbrot set implemented in SQL
If you take enough math you'll encounter a cool concept known as fractals, and a specific one known as the Mandelbrot set. If you are a big computer science nerd who likes to abuse your tools, you might ask your database to run this ridiculous query to generate a Mandelbrot set. Here's the resulting image, too.
Permalink
Dominos!
Here's some pretty interesting footage from an event called "Domino Day"
Permalink
Shooting hot dogs at people
Here's the history of the Hatfield hot dog launcher that they use at Phillies games!
Permalink
How much information is out there?
John Baez at the University of California, Riverside calculates how much "information" is in a raindrop. The thrilling conclusion is this: "... 100 times the information in every word ever spoken by human beings throughout the course of history. We would need to talk for much longer to completely describe a raindrop."
Permalink
Hooray for fun family visits!
We just had a great visit from my parents, sister, brother-in-law, and our two nieces. What a great time! Everyone enjoyed themselves except for Scout who was a little nervous about the commotion. We got to do Brigs, Sweet Tomatoes, and the Apex Park, as well as some bargain-bin movies (The Worst Witch and Clue). Lots of good memories all around!
Permalink
Men's soccer: Regular season over
In a winnable game, we made just enough mistakes to end up with a 1-1 tie. Still, our 1-5-2 W-L-T record is good enough for 5th out of 7 teams, giving us a doable 1st round matchup against the #4 team.
Permalink

Archive (619 total entries)

2010-08-12 to 2010-10-21
2009-12-27 to 2010-08-04
2009-09-29 to 2009-12-01
2009-08-19 to 2009-09-26
2009-08-01 to 2009-08-18
2009-07-24 to 2009-07-31
2009-07-20 to 2009-07-23
2009-07-07 to 2009-07-20
2009-05-29 to 2009-07-02
2009-04-06 to 2009-05-22
2009-01-30 to 2009-03-18
2008-12-03 to 2009-01-29
2008-11-06 to 2008-12-01
2008-10-24 to 2008-11-06
2008-09-18 to 2008-10-22
2008-08-19 to 2008-09-11
2008-08-01 to 2008-08-19
2008-07-14 to 2008-07-30
2008-06-27 to 2008-07-13
2008-05-31 to 2008-06-24
2008-05-08 to 2008-05-29
2008-04-23 to 2008-05-08
2008-04-07 to 2008-04-22
2008-03-21 to 2008-04-03
2008-03-11 to 2008-03-21
2008-02-15 to 2008-03-11
2008-01-04 to 2008-02-08
2007-12-12 to 2007-12-26
2007-11-26 to 2007-12-10
2007-11-06 to 2007-11-26
2007-10-29 to 2007-11-06
2007-10-11 to 2007-10-29
2007-10-01 to 2007-10-11
2007-09-13 to 2007-10-01
2007-08-24 to 2007-09-12
2007-08-06 to 2007-08-20
2007-07-24 to 2007-08-06
2007-07-08 to 2007-07-24
2007-06-17 to 2007-07-08
2007-06-02 to 2007-06-15
2007-05-18 to 2007-05-31
2007-04-09 to 2007-05-16
2007-03-19 to 2007-04-06
2007-02-12 to 2007-03-11
2007-01-21 to 2007-02-08
2006-12-08 to 2007-01-19
2006-11-22 to 2006-12-06
2006-11-05 to 2006-11-21
2006-10-12 to 2006-11-03
2006-09-29 to 2006-10-12
2006-09-15 to 2006-09-26
2006-08-17 to 2006-09-12
2006-08-01 to 2006-08-13
2006-07-18 to 2006-08-01
2006-07-10 to 2006-07-18
2006-06-26 to 2006-07-09
2006-06-08 to 2006-06-26
2005-05-10 to 2006-06-07
2005-02-06 to 2005-04-07
2004-08-23 to 2005-02-06
2004-06-17 to 2004-08-12
to 2004-06-11

Blog entries by category

personal fun interesting computer misc running prosports softball soccer football swimming cycling classic IBM