Teaching LINQ

Share:        

At work, I’m involved in a few things:

  • I’m the scrum master of one of our development squads
  • I’m a LINQ and functional programming evangelist
  • I’m a co-sponsor of the weekly development Lunch and Learn meetings
  • I’m moderating our software engineering book club

In this post, I’m going to talk a little about LINQ and the challenges I’m facing teaching LINQ to Objects to the team.

Our weekly Lunch and Learn sessions involve some preliminary discussion, then we turn the keyboard over to the audience. Our development staff consists of good programmers who largely learned the craft by rote, so few if any of us have formal computer science backgrounds. Hence, introductory sessions start at the very beginning.

The first LINQ session covered extension methods, because LINQ makes heavy use of them. We presented as an example nUnit’s Assert.AreEqual(expected, actual) method. We showed how an extension method could make this read expected.AreEqual(actual). Then, we had our volunteer do the same for strings.

We pointed out that this could get tedious, as AreEqual supports lots of types. So, we asked a volunteer to solve the problem in general. This proved challenging, and we discovered a hole in the team’s collective knowledge base: generics.

Once we got that straight, we had a volunteer implement a generic extension method for nUnit’s IsInstanceOfType(type) test method to illustrate type inference.

The remaining 20 minutes, we introduced the Select clause. Folks were confused about Func<T, bool>, and about lambdas. We didn’t have enough time to cement the concepts, but we’ll continue from there next week.


Introductions Are In Order

Share:        

I work for a medium-sized company on a public-facing web application. My former company was firmly entrenched in older development methods, though they tried to apply some agile ideas. It was my first crack at Scrum.

At the new company, they were very receptive to the idea of Scrum – they’d tried and failed just prior to my hiring, so I was able to get the entire team using Scrum. The product is saddled with an extensive legacy code base (100,000 lines), written back in the .NET 1.0 days. Needless to say, there are many places within the code that will benefit from .NET 3.5 constructs! Also, many of the developers here don’t have a background in computer sciences, so I’ve been conducting lunch and learn sessions educating about design patterns and domain-driven design.

In this blog, I’ll be talking about my experiences as I go along. Hopefully, it will be of interest. If you have any topic suggestions, please leave me a comment!


Review: Peter Pan

Share:        

It’s inconceivable that I didn’t mention Peter Pan in this blog at all. I was the Stage Manager for the Gaslight Theater’s production of Peter Pan and Wendy.

The show got good reviews (YourHub) (MetroNorth News didn’t have an online version of their full-page article), and the show sold out consistently towards the end. I’m proud of the notoriety we were able to bring to the theater.

The next show is Blithe Spirit, for which I’ll be doing set construction. If you see it, I’d recommend calling for reservations.


Backyard Washers

Share:        

My friends had a summer bash over the July 4th holiday, and introduced our family to Backyard Washers. It is a low-budget game with some similarity to horseshoes, in that it’s played outdoors and involves some skill throwing an object. Players compete in teams of two.

It requires two “washer boards”, which are made from some plywood for the bottom, some 2x4 pieces for the sides, and a PVC pipe mounted in the middle. Two pairs of washers are also required – 3” in diameter, I believe. They are painted to distinguish them. Oddly, their site doesn’t appear to contain instructions for constructing your own set up.

The scoring makes the game. There are four scoring zones: inside the PVC ring in the center of the board (5 points), inside the board (3 points), on the lip (2 points), and within a beer or soda can of the board (1 point). The team whose washer lands in the highest scoring zone is the only team to earn points in a round. Washers in the same zone cancel, which adds some drama. If I land a washer in the box (3 points), the other team can cancel my score by placing a washer in the box themselves. Combined with the victory conditions (you must earn exactly 21 points to win; if you go over, the target score increases by 10, but only for your team), and each throw is eagerly watched by the opponents and bystanders alike.

It’s well worth an afternoon to learn to play this game.


Long overdue reviews

Share:        

I have a few reviews I’ve been meaning to write.

The first was the latest concert by the Denver Women’s Chorus, “Girls Rock IV”. I felt this show had more energy and enthusiasm than some of their more recent outings. “Girlfriend” was particularly memorable, as was Take Note! with “Don’t Forget the Mexican Spices” and “Flashdance”. It wasn’t all rock and roll, either; “Lullaby” was appropriately somber. My only negative comment was the sound. The acoustic guitar amp and drums drowned out the ladies, at least on my side of the room. Fortunately, the band was only employed in a few songs.

Sound also marred an otherwise excellent presentation of “Jekyll and Hyde” by Performance Now at the Lakewood Civic Center. The choreography, stagecraft, and acting communicated the story quite well, which compensated for the distressing sound issues. They used wireless mics, and the feedback, popping, and other technical challenges made me and my compatriots wonder why they bothered. The acoustics in that theater are wonderful, as my wife pointed out. As a result, the dialogue was nigh unintelligible. At times, the poor chorus drown out the leads, most notably Hyde during “Alive”. Thus, despite the wonderful visuals, I can’t recommend it.

I also saw “God’s Favorite” at the Gaslight Theater. Gaslight is always such a treat; they make so little go so far. Britt Lafield was inspired as Sidney Lipton, and Ed Schoendradt brought Joe Benjamin to life. Kudos on a job well done! I volunteered to work concessions one night, and found that helping people get brownies and drinks during intermission added a wonderful new dimension to the theater-going experience. I’m really looking forward to “Blithe Spirit” this fall.