Tuesday, 23 March 2010

Book Review: “Linchpin” by Seth Godin

Overview

There has been a lot of noise over Seth Godin's latest book, "Linchpin".
While I have not read any other of Seth's books, I have seen several of his talks online, as well as hearing him speak on some podcasts. I was very impressed with what I heard, so thought I would grab a copy of "Linchpin".

"Linchpin" discusses the problems we are facing as modern workers. The "factory age" for most of the western world is dying. Mass production can take place elsewhere at a much cheaper cost. The old model of "get a factory with a simple process and lots of cheap people to fulfil simple roles" no longer holds fast.

We are now in a time where we need a new breed of worker to have a successful business. A worker that takes their work not only to "the next level", but to their level. We need "linchpins".

Good Points

  • Delivers a much-needed message that we ALL need to hear.
  • Easy to read/follow. Lots of small, succinct paragraphs make up the chapters that deliver clear messages.
  • TONS of anecdotes that make it easier to relate to the messages being conveyed. This for me helped validate the message as well as often making me go “oh yeah, I know that person”.
  • I get the feeling Seth genuinely cares about creating Linchpins.

Possible Pain Points

Not a lot to put here, I thoroughly enjoyed the book (or I wouldn’t be recommending it!).

  • The book repeats the same messages over and over again. Now, I have to say I personally agree with the way that it has been done in the book. The messages need to be drummed into our thick skulls. We have generations of brainwashing to overcome in order to become a linchpin. However, others may disagree/perhaps find it annoying.

Content Brief

Here is a quick run-down of what the book covers (or at least the areas that stuck in my mind):

The Linchpin

What is a “Linchpin”? Why does the world need them? Why is our traditional corporate/factory process broken?

The “Lizard Brain”

What is the “Lizard Brain”? How does it affect us? Why is it trying to stop me from becoming a linchpin?

Art

How to linchpins become valuable? How do they find and create their art? What does “art” even mean? Who should we share our art with?

Environment

What environments do people have to work in now? How does that support the linchpin? How does it hinder? How can we try and work around that? How should we really define “value”?

Summary

I was really moved by this book. I couldn’t put it down once I picked it up. Seth has hit so many nails on the head it is amazing. Having completed it, I felt the following:

  • Excited about what I could be doing.
  • Energised to think about how I could do what I am already doing better.
  • Confident that I will begin actively fighting the “Lizard Brain”.
  • Keen to share the ideas/concepts in the book with others, so they can feel the same.

So, a big “thank you” to Seth for writing such a great book. Grab yourself a copy here.

Wednesday, 10 March 2010

Book Review: “Screw It! Let’s Do It!” – Sir Richard Branson

Screw It! Let's Do It!So, this book has actually been on my shelf for AGES (actually purchased this book when it first came out).

For some reason, I never got around to reading it… Maybe it was because I was focused a lot more on my technical reading, maybe it’s because I didn’t feel like I needed “inspiration”.

Whatever the reason, leaving it on my bookshelf was a big mistake.

Once I started reading this, I couldn’t put it down – I thoroughly enjoyed this book from so many different angles.

To summarise:

The “Feel Good” Factor

I was overwhelmed by the “feel good” factor that Sir Richard creates when he talks about ventures current and past in the book. You can almost imagine him sat opposite you, with that trademark big smile on his face, talking you through them.

It’s Genuine

I didn’t feel like there was any “BS” factor, “edited for public viewing” or anything like that. I felt the highs and the (few) lows in the book were written “straight from the heart”. Something that takes real courage. Often in books like these you read a lot of “success”, yet the best lessons in life are learned from our failings.

It’s Relevant

Everything Richard talks about in this book actually happened. These are actual “tales from the trenches”, making the advice based on them 100% dy-no-mite. The advice given is timeless as well as transferrable to whatever challenges you face.

It’s a Role Model Worth Having

This isn’t some cheesy “get rich quick” book by some maverick who basically doesn’t give a crap about anything but money and only got where they are by treading on people. This book is by someone who:

a) Gives a crap about everything they do and the people they effect.
b) Has a real passion for creating change (for the better).
c) Spots opportunities and takes them.

If I was to be a hot shot billionaire, I would want to get there with Branson’s style, charisma and compassion.

It’s a Nice “See the Roots” Experience

One of the key aspects of the book that I really enjoyed was Richard talking about his family life and his upbringing. Richard obviously had some parents that did a fantastic job of supporting and raising him and there is clearly a lot of respect there.

I also really enjoyed reading about his “laddish” antics in his younger days, but how he has not lost his humour and style as he has aged (well!). :)

To Summarise…

Once I finished the book, I came away really energised. Completely re-thinking my strategy, my attitude, everything. In short, I distilled it down in to one “theme”:

If I think “that’s a good idea” – how do I make it happen?

Note, I don’t say “check my bank balance and see if I can make it happen” (a common answer).

As an example, Richard got the idea for Virgin Atlantic due to a cancelled flight - he then chartered his own flight and offered seats to other stranded passengers to cover the costs. At that point in time, there was no way he could start an airline. Decades later, he has one of the best airlines in the world. All the while, people were against the idea. Food for thought..

I couldn’t stop raving about this book and immediately lent it to a friend once I was done. Grab yourself a copy here

Sunday, 7 March 2010

ASP.NET MVC Filters and Model Binders Intro

I thought the next stop on my MVC tour would be Filters and Model Binders. Since I am still grokking some of these bits – nothing detailed here, but wanted to share what I have found so far.

Filters

Filters allow us to perform actions against Controller Action methods (i.e. requests from users).

Types of Filters

There are four “types” of Filters:

  1. Authorization – Performed before the action method or any other filters run. Allows you to grant/deny access before any other code is executed. Example: AuthorizeAttribute).
  2. Action – Can be run before and after an action method. Ideal for doing any model data manipulation etc. Couldn’t find examples in the core framework but projects like MvcContrib has them.
  3. Result – Runs after the action method has completed, but before the response is returned to the view. Ideal spot for last-minute changes to the response. Example: OutputCache.
  4. Exception – Runs after everything else, allowing you to catch any/all exceptions that occur. Ideal for logging scenarios. Example: HandleErrorAttribute.

Phil Haack (@haacked) has a great run down here. Naturally, check out the MVC page here as well.

Creating a Custom Filter

Dead easy – simply inherit from FilterAttribute (NOT Attribute, I ran off and did this and it does not work!) Then implement the appropriate interface for the filter you want to create (IAuthorizationFilter, IActionFilter, IResultFilter or IExceptionFilter).

Since Action and Result filters are going to be the most common filters, we actually get a handy base class for these, ActionFilterAttribute (no, the naming is not great here).

Things to Note
  • When creating authorisation filters – be sure to return HttpUnauthorizedResult if the user fails authorisation. This sets the appropriate HTTP Response code etc.
  • OutputCache implementation is pretty wrecked since it relies on the Web Forms output caching. This can have weird side affects on other filters. May be fine for you, just saying: “dragons be here”. Great overview here by Steve Sanderson (@StevenSanderson).

Model Binders

Model Binders essentially map data sent to an action method to a POCO type. This “data” might be FORM values posted in a request, or variables passed in the route/URL.

What to Inherit/Implement

To be used as a Model Binder, a class need only implement the one method in the IModelBinder interface. However, it is strongly recommended that you actually inherit from DefaultModelBinder since there are some “quirks” that need to be accounted for.

K. Scott Allen (@odetocode) has some great tips here.
Jimmy Bogard (@JBogard) also has a great run-through of creating a custom model binder here.

Things to Note
  • You don’t get a great deal of type and conversion support, so if you create you own ModelBinder, be sure to test thoroughly.
  • Don’t forget to update your Global.asax
   1:  ModelBinders.Binders.Add(
   2:      typeof(CustomType), new ModelBinderType());
  • These look really powerful and a great way to remove duplicate code etc. from your controllers. Also some cool stuff done by others (such as binding ORMs).

Some Code…

Naturally, I have had a poke and a play. I threw together some code and published to GitHub.

Rough sample code includes:

  • Basic authorisation filters.
  • Simple “random quote” action filter.
  • (Really) rough-round-the-edges model binder to bind full ARGB colour to a type (this is then consumed when rendering, setting an elements “opacity”).

As always, thoughts and comments welcome.