Friday, September 28, 2012

Wednesday, September 26, 2012

Moneyball, by Michael Lewis

Moneyball is a quest for something as elusive as the Holy Grail, something that money apparently can't buy: the secret of success in baseball.

If you've seen the movie Moneyball, a lot of the broad strokes of Lewis's book will seem familiar.  There's Billy Beane getting angry.  There's Billy Beane trusting numbers and his Harvard educated assistant over his scouts who say a player has a "bad body".  There's the improbable 2002 run with Scott Hatteberg at first base and a 20 game win streak.

The difference in each version is the focus.  Moneyball the movie is a dramatization of the real-life story, so it's focused on the who and when.  Moneyball the book is focused on the how and the why.

After reading the book, you start to realize that it took someone like Billy Beane to apply Sabermetrics to baseball.  Beane was a top prospect for the Mets in the early 1980s (some thought was better than Darryl Strawberry).  He had a plus arm, plus power, plus bat, plus everything.  And he looked like a ballplayer.  He tore through the minors, but ended up being a journeyman for 5 years before calling it quits and getting a front-office job in Oakland.  The "can't miss" prospect touted by all the scouts missed big time (career average .219, 66 hits, 29 RBI).  If the scouts were wrong about Billy, how could he trust their advice when he was now the guy picking players?

Enter Bill James. A baseball writer and statistician who wrote a popular series of baseball abstracts from 1977-1988, James wrote about stats and trends rather than recount the stories of great games and great plays. He wanted to quantify what separates "good" players from "bad" players.  Essentially, he wanted to know why some teams won and some lost.  When Beane assembled his team of advisers and assistant GMs, they were guys who grew up reading Bill James and ended up getting degrees in things like economics and statistics.

The book is well written and well researched.  There are a lot of colorful stories from the athletes we meet that will keep any baseball fan entertained.  Lewis's prose is clear and direct, which you would expect from an experienced reporter like him.

Moneyball, both movie and book, are recommended.

Monday, September 17, 2012

Song of the Week: Sense

This week's band looks to be another one-off like Silvertide.  Tenpenny Joke is/was an Australian band formed in 1997, released a good album in 2005, and announced a brief hiatus in touring in 2010.  I stumbled across this song over the summer and immediately had to seek these guys out.  I couldn't put my finger on one band to describe their sound.  They have bits of Stone Temple Pilots, Tool, Sponge, and then there is their own unique sound - something I've only heard in the handful of other Australian bands I've heard.

Favorite songs are "Sense" (embedded below) and "She".  The interesting thing is they're not even representative of the overall sound of their album.  Most of their tracks are available on YouTube, so if you dig their sound, I recommend listening to the others.

Friday, September 14, 2012

MST3K Friday: Quickies

Here are some random clips.

"Good God where?" "In the water."
"Time for go to bed."

Wednesday, September 12, 2012

Code Complete by, Steve McConnell

In this post, I'm going to break two of the rules I typically follow for this blog.  I'm going to talk about myself and I'm going to talk about work.  If you don't care about programming, you're not going to get much out of this review.

Here's a little about me to set the table.  As my bio states, I'm a senior software engineer for a smaller company (150 employees).  I have a couple Microsoft certifications and am about a decade into my career (how'd that happen?), so I'm certainly no newbie when it comes to software development. That this is the first time I've read McConnell's seminal Code Complete 2 is a travesty and a tragedy.

This book should be every professional developer's Bible.

McConnell writes about the process of development in clear, straightforward language without proselytizing a specific strategy.  What he cares about more is making developers more thoughtful and preaching the idea of developing your own software development heuristics.  For me, his advice falls in to three categories:  things that underscore things I've pieced together instinctively over my career, things that are common sense, and new ways to combat the thorny issues that arise during the development cycle of any program.

One of my favorite chapters is Chapter 9:  The Pseudocode Progrmming Process.  This process is one that I've used on many occasions for ultra-complex methods, so it was validating to see it in print.  After reading the chapter, I wanted to make photocopies and give it to all the junior devs on my team and make them read it before we start on the next big project.  The term "pseudocode" refers to an informal, English-like notation for describing how an algorithm, a routine, a class, or a program will work.  The PPP defines a specific approach to using pseudocode to streamline the creation of code within routines.  The idea is to write pseudocode at "the level of intent".  Describe the meaning of the approach rather than how the approach will be implemented in the target language. (McConnell, 218)

Other sections I'd like to call out are Chapter 18 on Table-Driven Methods (something I was unfamiliar with), Chapter 21 (especially 21.3 on Formal Inspections, something I may try to implement at my company), and Chapter 34 - Themes in Software Craftsmanship (basically a high-level review of the major topics in the book).

McConnell draws on quite a few other books and papers to buttress his ideas with hard data about how even mundane things like variable naming and commenting can improve software development and maintenance.  One of the things that shocked me, though it shouldn't have considering my experience with QA departments, is how many more defects are found though code and design reviews than are found in testing.  The idea set forth in Chapters 20-23 is that it is more cost-effective to find bugs upstream (earlier in the process) than downstream (after coding).

I've always said programming is an art; anyone can do it, but it takes a certain natural talent to be a good programmer.  McConnell's idea is that it programming is a craft - a point between art and science. (McConnell, 848)  Code Complete is about taking the steps you need to become a master craftsman.

This book belongs on any serious developer's bookshelf.

Monday, September 10, 2012

Song of the Week: Ain't No Rest for the Wicked

Tomorrow night, Sons of Anarchy begins its fifth season.  A kick-ass show, even with some of my past disappointments with it.  If you aren't watching it, you're missing out.

Here's a nice fan made video to promote the show.  The song is Cage the Elephant's "Ain't No Rest for the Wicked".

Friday, September 7, 2012

MST3K Friday: Diabolik

Danger: Diabolik was the last movie riffed by MST3K and it was always one of my favorites.  A goofy Italian spy movie from the 1960's?  What could be better?

"She's a GREAT Samaritan."
"Is that Stud coming?"

Monday, September 3, 2012

Song of the Week: Rapunzel

I was never a real big Dave Matthews Band fan.  Lots of my friends were/are.  I know some guys who eagerly anticipate each new album and have seen him in concert, no joke, 25 times.  That's not to say they don't have some great songs.  "Rapunzel" is one of my faves. The opening riff is catchy as hell and I really like the tonal shift around the 3:20 mark.