Tech Books I’m Reading Right Now

This article also appears in Canadian Developer Connection.

I’m reading a couple of tech books right now, and I plan to publish more in-depth reviews of them in the next couple of weeks. In the meantime, I thought I’d give you some quick reviews to give you a taste.

Pro ASP.NET MVC Framework by Steve Sanderson (Apress)

pro_asp.net_mvc_frameworkThe first book is Pro ASP.NET MVC Framework, published by Apress and written by Steven Sanderson. It’s been available in “beta” form as a PDF for the past couple of months, and as of this afternoon, the final PDF version has been released. I expect that the dead-tree edition should be hitting the shelves of your favourite bookstore, real or virtual, in a week or so.

This book covers the new  way of developing ASP.NET applications, the MVC way. If you’ve read the “Gang of Four” book or any other book on design patterns (or any of Rocky Lhotka’s books on business objects), you know that MVC is short for “Model-View-Controller” and a pattern for separating an application into its business logic, presentation and interface. Perhaps you’ve looked longingly as the “cool kids” have used frameworks like Ruby on Rails and Django to build applications with greater speed and fun, and fewer errors and less futzing around with tedious development minutiae. You might have heard Scott Hanselman and Phil Haack talk about their work on ASP.NET MVC, or maybe you’d heard that Jeff Atwood’s Stack Overflow is implemented in ASP.NET MVC.

I myself come from the world of Rails and have noodled with Django. As such, find that I’d rather use an MVC-style framework in most cases. That’s why I’m happy that ASP.NET MVC has hit the official “1.0” stage – it’s available for download right now and will be included in Visual Studio 2010 as an official alternative to old-school ASP.NET.

The book is a great introduction to the concepts of MVC web frameworks in the context of ASP.NET. It starts by showing you how to get the ASP.NET MVC tools and templates onto your system and then walks you through the development of a sports store ecommerce site. The middle part goes into the features of ASP.NET MVC in greater detail, covering REST and routing, controllers and views, testing and adding Ajax to your MVC applications. The last section covers the goodies that ASP.NET gives you – authentication, members/roles/profiles, caching/compression and WebForms – and how to use them in the context of ASP.NET MVC.

It looks like a pretty promising read on a topic that I’m very interested in. Watch this blog for a review, and eventually, some code examples based on what I learn from the book.

The Passionate Programmer by Chad Fowler (Pragmatic Bookshelf)

the_passionate_programmerRegular readers of this blog will know that my favourite developer book of 2008 was Pragmatic Thinking and Learning: Refactor Your Wetware. They also know that there really wasn’t much about software development in particular, but developing the most important tool for software development: your mind.

The publishers of Pragmatic Thinking and Learning have just put out a “new-ish” book, The Passionate Programmer, written by Chad Fowler. I say it’s “new-ish” because it could be considered a second edition of his book My Job Went to India (and All I Got was this Lousy Book).

The problem with My Job Went to India was that the title implied that it was largely about saving your job from outsourcing. In a recent podcast about the book, Chad said that the book’s title influenced the way he wrote it, and it ended up not being quite the book he wanted to write.

The Passionate Programmer is different; you could consider it a “refactoring” of My Job Went to India, and a good one, too. Rather than focusing on saving your job, it’s more about two very important things:

  • Finding fulfillment and happiness in your career
  • Cultivating the desire to live a remarkable life

Those are two pretty tall orders for a book, but I’ve met Chad at a couple of conferences, and I know he likes to think big. I’ve just started into The Passionate Programmer and so far, I’ve thought “damn right!” at every bit of advice he’s given. As with Pro ASP.NET MVC Framework, watch this blog for the full review of this book.


Pragmatic Thinking & Learning: My Favourite Geek Book of 2008

Cover of

This article also appears in Canadian Developer Connection.

It’s easy to point to books on understanding and improving the inner workings of your code, the software and hardware platforms on which it runs and even the processes used in developing it. It’s much harder to find one on understanding and improving the programmer, or more specifically the programmer’s “wetware” – that is, the brain and mind. A few books aimed at programmers give a little space to the topic: Tog on Interface has a section and exercise on building your intuition, the first edition of Code Complete devotes a small chapter to character, and Cocoa Programming for Mac OS X reminds the reader that getting extra sleep when learning new material is essential. For a whole book on the topic, we’ve had to wait until Andy “The Pragmatic Progammer” Hunt’s Pragmatic Thinking & Learning: Refactor Your Wetware.

The first few chapters of PT&L form a quick introduction to the theories of cognition, learning and neuroscience on which the rest of the book is based. Among these are the Dreyfus Model, which explains how we progress from novice to expert and the steps along the way and a model of the brain in techie terms, shown below:

Diagram showing a "Dual core" model of the brain

Once PT&L has laid out these foundations, it dives into the brain-refactoring, including:

  • Taking advantage of R-mode (often called the “right brain” in pop psychology), which often gets ignored because of its non-linear, non-linguistic, unpredictable and even “artsy” nature. It’s actually an amazing problem-solver, so much that PT&L suggests that you should “lead with R-mode and follow with L-mode”, or more colloquially, “write drunk; revise sober”.
  • Working around the bugs in your brain. And there are many, from the primitive “lizard brain” that likes to override our higher cognitive functions to cognitive biases to generational affinity.
  • Learning deliberately: what learning is and isn’t, how to plan to learn, figuring out what your learning style is and how to best take advantage of it, and harnessing mind maps, documentation and teaching in order to learn.
  • Gaining experience, which includes understanding the importance of fun and how pressure kills cognition, learning the “inner game” and why your mantra shouldn’t be “learn to build”, but “build to learn”.
  • Managing focus, a very important topic since there are so many things vying for it, from office interruptions to the siren song of the internet, with email, IM, Twitter, Digg, Reddit and LOLcats. One of my favourite bits in this section was some research whose results indicated that constantly checking your email lowers your effective IQ more than smoking a joint.

PT&L does a great job following its own advice by presenting its material in ways that best take advantage of how our brains work, reinforcing its with anecdotes, metaphors and visuals and using the enjoyable style for which Andy Hunt’s other projects, such as The Pragmatic Programmer and his various training sessions have become famous.

As with any book that proscribes a new way of doing or perceiving things – think of books on Agile programming or “Getting Things Done” methodologies – you’ll have to pick and choose which ideas and techniques work best for you. In his review, O’Reilly editor Nat Torkington found the section on generational affinity a little too “Malcolm Gladwell”-ish in the way that it treats anecdotes about generations as data (personally, I think there’s some truth to the generational affinity thing). I do agree with Nat that some of the exercises, such as “Morning Pages” that seem a bit too new-agey/hippie even for me – and I’m the kind of guy who’d go to Burning Man.

This is the only book of which I’m aware that covers how to improve the tool that really develops code: not your platform, language or editor, but your mind. It’s worthy of several readings, first straight through and subsequent dives into specific sections. I took it with me on my flight from Toronto to TechDays Calgary and found it both not only informative, but engaging and entertaining as well. Best of all, barring some quantum leap in cognitive science that invalidates what we know today, PT&L will probably have a much longer shelf life than most of the tech books in your library.

It’s my favourite geek book of 2008.

Pragmatic Thinking & Learning is available in both dead-tree (US$34.95 direct from the publisher, CAD$30.69 from Chapters/Indigo online) and PDF formats (US$22.00). It’s a finalist in the “Books General” category of the 19th Annual Jolt Awards.

Would you be interested in hearing more from PT&L’s author, Andy Hunt, himself? Let me know either via email or the comments, and I’ll see what I can do about arranging an interview in some format with your questions!


“It Looks Like You’re Trying to Stank Up Your Code. Would You Like Some Help?”

Gojko Adzic points to this photo taken at QCon San Francisco 2008 by John Grae. It’s a slide featuring YAGNI, the Development Assistant, the programmer’s answer to “Clippit”, a.k.a. “Clippy”:

Photo by John Grae.
Click the photo to see its Flickr page.

YAGNI, short for “You Aren’t Gonna Need It” is a development maxim that suggests to programmers that they shouldn’t add features or functionality to applications that aren’t necessary at the moment, but might be in the future. YAGNI has the DRY (“Don’t Repeat Yourself”) Principle has a cousin and among its ancestors are Occam’s Razor and the KISS Principle (as in “Keep It Simple, Stupid” and not “I Wanna Rock and Roll All Night (and Party Every Day”).

YAGNI, the Development Assistant comes from Bunk and Rambling, a blog by Darren Smith, where he put it forth as an IDE feature request back in May 2006, when he wrote:

While pair programming helps you to write high quality code in an efficient manner there are times that a pair of programmers will end up going off on a tangent and working on something that ultimately ends up not being necessary. To counter the unbridled enthusiasm that usually causes this to occur I give you Yagni, the Development Assistant.

YAGNI is meant for developers who believe strongly in test-driven development, so here’s how it would hypothetically pop up if you tried to create a class and started entering non-test methods first:

YAGNI, the Development Assistant: "It appears that you are creating a class without a unit test. Would you like to * discard code? * create unit test?"

I’ll leave it to other people to argue over whether or not you always have to have unit tests. 

Here’s another notice from YAGNI:

YAGNI, the Development Assistant: "This development spike appears to be going too long. Would you like to * discard code? * go longer?"

And finally, what I feel is YAGNI’s most important message – a warning that you’re in danger of embarking on a long, “let’s reinvent the wheel” project:

YAGNI, the Development Assistant: "It look like you're trying to write a framework. Would you like to: * discard code? * find an open source framework instead? * find a new job?"

Since YAGNI’s not likely to appear in any IDE soon, you, your pair programming partner or whoever does code reviews with you will have to play its role for the foreseeable future.