Book Review: The Five Dysfunctions of a Team

by alanlok 27. June 2008 23:15

As I've mentioned numerous times in my blog, I'm a huge fan of continuous self improvement and being a student of your chosen profession.  One of my favorite ways to constantly improve is to read books.  I find that my favorite topics nowadays aren't necessarily technology or API specific, I tend to be drawn more to principles and practices that can be applied across any programming language (design patterns, agile development practices, etc.).  For API specific type information, that sorta stuff changes so fast I find the information on the web to be much more useful and current.  A good recent example would be my foray into Linq to SQL the past few months, I never bought a book on it and instead used Scott Gu's and other folks' blogs to get up to speed on it.

So this leads me to today's book review.  This isn't a programming specific book or even technology related, but I think most developers would find it a really good read anyway, at least if you've ever worked,  currently working, or will work in a team environment (I think that's 99% of us).  The book is titled The Five Dysfunctions of a Team by Patrick Lencioni.  The majority of the book is a fictional tale (although you'd swear you've been in situations and know people exactly like the ones in the book) that illustrates the five dysfunctions in a real world manner.  The book is a very easy read (I finished in a couple of hours one evening) and really puts into words exactly why some of the teams I've been on just didn't feel right.  I now more easily understand why we never achieved our full potential as a team and while there's no easy solutions, at least by now knowing the why, I can start monitoring future teams for these five dysfunctions and nip them in the bud as early as possible.  The book has also changed some of my views regarding conflicts (or lack thereof) and the collaborative process.

So there you have it, the first (of many, hopefully) book review on this (somewhat) technical blog isn't even about a technical book!  But that just goes to show that self improvement doesn't necessarily mean technical skills improvement, it's also about improving processes that you're involved with (in this case, improving the team process).  That may be the reason why I find myself so drawn to agile software development, it not only focuses on improvement with one's technical skills (applying standard OOP principles, TDD, KISS, etc.) but also improving outside processes (iterative development, constant communication with the customer and within the team, etc.) as a whole.

Currently rated 5.0 by 3 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: ,

ReliableSite.net? Not so much!

by alanlok 26. June 2008 16:43
My website host decided not to live up to its name and was down for close to 2 days.  While I'd like to think it's the incredible traffic my blog creates that brought their server to its knees, their poor support and customer service has left a poor taste in my mouth.  Time to look for a new host, anyone want to chime in with their recommendations?

Currently rated 3.4 by 5 people

  • Currently 3.4/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Software Development and Programming Podcasts

by alanlok 19. June 2008 12:41

I've decided to break my rule of 1 blog post every 2 months and post 2 blog entries in 1 day.  You get a bonus today, don't spend it all in one place!

As I've mentioned in an earlier post, I moved to Keller, TX about a year ago.  It's a fast growing suburb north of Fort Worth and was ranked by Money Magazine as the top 50th place to live in America for 2007.  While I enjoy my new home and the area and I think it's a great place to raise my son, it's pretty much in the middle of nowhere.  My commute stinks (someone needs to expand 820 between 183 and 35 please!) and typically runs anywhere from 35 minutes on a good day to over an hour on bad days. 

At first I was getting by listening to local sports radio but then I thought of all that wasted time I could be using to improve my skills and expand my knowledge.  I'm a huge fan of continuous improvement and being a student of your chosen craft, so I decided to start listening to relevant podcasts on my commute instead of listening for the nth time why the Pacman Jones signing was the devil's pact or how Avery Johnson gave a thumbs up/thumbs down/thumbs sideways on the Jason Kidd trade.

So I looked at what available podcasts were out there for general programming, .NET development, and agile practices and here's my list below.  If you know of any other that I may have overlooked, by all means leave a comment with your suggested listenings.

  1. Hanselminutes - A weekly talk show with Scott Hanselman that goes over not just .NET topics but also other random geeky subjects.  This is probably my favorite podcast right now and even his non programming shows are really interesting.  I loved his "making the impossible possible" show and how the guest stated that you have a short 6 year window to get your kids passionate enough about science to pursue it further before peer pressure and interest in the opposite sex kicks in.  I'm already making plans for what to do with my son during that window ;)
  2. .NET Rocks! - Another weekly show that focuses on the .NET stack
  3. Polymorphic Podcast - Focuses on the .NET stack
  4. Alt.NET Podcast - I'm a huge fan of the Alt.NET movement and actually just listened to the first podcast yesterday during my drive home.  Their first podcast really drove home the need for developers to have a passion for what they do and to continuously improve.
  5. ASP.NET Podcast - Geared towards the Microsoft .NET Framework and ASP.NET, I haven't listened to this one as much yet.
  6. Radio TFS - Podcast dedicated to Team System, I haven't listened to any episodes yet so can't really give an opinion.
  7. Software Engineering Radio - This one isn't .NET specific but still interesting nevertheless
  8. stackoverflow - This one is pretty interesting. stackoverflow.com is the brainchild of Jeff Atwood of Coding Horror fame and Joel Spolsky of Joel on Software fame.  They're starting a website for developers by developers that aims to be the definitive resource for technical help.  The podcast kinda chronicles their journey.  I've only listened to the first show so far and it's like listening to a really cohesive and tight knit programming team discussing topics during lunch.   (An interesting side note: If you go to Joel's website and look at that image of the Manhattan skyline, I actually lived in the 2nd tall red building right above the "S" in Software during most of my childhood years.  275 Cherry Street, Apt. 21G baby!  And now back to your regularly scheduled bonus blog...)
  9. The Thirsty Developer - Another .NET oriented podcast with some interesting topics
  10. ThoughtWorks - IT Matters Podcast - ThoughtWorks is a highly respected consulting company and their podcast covers a variety of topics and is not .NET specific.  Any company that Martin Fowler deems ok to work for is ok in my book :)
  11. Agile Toolkit Podcast - Podcast focusing on agile development practices, some good topics
  12. Ajaxian Podcast - (Added 6/27/2008) Podcast from my favorite Ajax focused site, I have yet to listen to any episodes, I'll give my review after a few episodes.
  13. Herding Code - (Added 7/28/2008) Started listening to this one recently, it's a round table discussion of .NET topics.  There's some awkward parts where people just ramble or there's complete silence, but for the most part it's a good listen.
Wow, that's quite a list.  I didn't even realize I've been following 11 podcasts, no wonder it seems like I can never get caught up on episodes.  Remember to leave a comment on any you recommend!  I'll update my post as I run into new and interesting podcasts.

Currently rated 5.0 by 7 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: ,

Updated Ext JS example for ASP.NET MVC Preview 3

by alanlok 19. June 2008 09:27

Tim Farmer has graciously updated my example Ext JS/ASP.NET MVC application I posted a few months ago to work with the new Preview 3 bits.  I've already compiled and played around with it, so it seems to be working fine, but any bugs or issues should be aimed directly toward him :P

On a more serious note, this example application wasn't really meant to be an ASP.NET MVC tutorial, I originally posted it more to show how Ext JS works with the .NET stack.  I remember when I first started playing around with Ext JS what a learning curve it was, so I would consider it to be more of an Ext JS example that happens to use ASP.NET MVC.  There is already plenty of ASP.NET MVC information out there, but not much on using Ext JS with ASP.NET.

If you want to learn more about ASP.NET MVC, I recommend taking a look at Rob Conery's MVC Storefront webcast and blog series.  It's actually a pretty fascinating look at how someone new to Test Driven Development approaches building an MVC application in an agile manner.

Download updated Ext JS example for ASP.NET MVC Preview 3

Currently rated 4.5 by 4 people

  • Currently 4.5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: ,

Public Service Announcement: Backup your data!

by alanlok 14. April 2008 13:34

Well, it's been a while since I've updated ye olde blog, summoning up the motivation and thinking of interesting topics for a blog on a regular basis is pretty hard.  I have no idea how folks like Jeff Atwood and Scott Hanselman blog so much!

One important issue I wanted to bring up today though is the importance of backing up your data.  I keep all my important data on my home file server within a hardware RAID5 array composed of a Promise RAID card and four 250gb hard drives.  Well one day the card decided to stop recognizing one of my drives.  Ok, no big deal, I actually keep a spare drive around specifically for rebuilding this RAID5 array in case catastrophe ever strikes.  After I swapped the offending drive out with the spare drive, the card decides to not recognize TWO of the drives.

Uh oh... there's no way to rebuild a RAID5 array if more than 1 drive decides to go bad.  After a few days of fiddling around with the card and drives in different configurations and different motherboards, I finally give up and accept the fact I lost all my data :(   The good news is I discover that my spare drive actually contained a half year old copy of the data I lost (I had used it to temporarily store my data when I expanded the RAID array from 3 drives to 4).  The bad news is I lost all of my newborn baby son's pictures that I had taken in his first few weeks of life.

So let this be a lesson to the faithful reader (all 2 of you!).  No matter how reliable you think your storage medium is, MAKE A BACKUP!  I've now dumped the RAID5 array and just use backup software that syncs all my important data to a separate physical drive on a nightly basis.

Currently rated 5.0 by 2 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Ext JS and ASP.NET MVC

by alanlok 2. February 2008 00:05

We've been looking for a nice Ajaxy grid for our web applications at work to replace a very slow and ugly system that made obscene usage of UpdatePanels, GridViews, and some controls from the Ajax Control Toolkit (I'm talking viewstates that were over 500k being sent back and forth across the wire!).

We did our research and tried out a few products, and we really liked the Nitobi grid since it offered ASP.NET integration and seemed pretty flexible. However there were some nagging issues and when we ran into an issue that was at least 7 months old and still not resolved with no further company response, we abandoned it.

A month later, we decided to tackle the finding a grid again and this time found a gem of a JavaScript library - Ext JS. What I love about this library versus Scriptaculous, jQuery, and other competing libraries are the number of usable, high quality built-in UI widgets, in particular the grid.

As a low risk proof of concept, I was given the green light to go ahead and implement the grid on a project I was ahead of schedule on. After overcoming a bit of a learning curve, I came away impressed with how flexible and well documented the library was. The forums were also a huge help as I was able to piece together what I needed from other users' posts. We released the new application for user acceptance testing this week and our customers loved the look and feel of the application. I think we got a keeper!

As I worked with the library, it struck me how little of the ASP.NET WebForm model I was using. I was not doing a postback or using viewstate at all, all data was being sent back and forth via JSON to a custom .ashx handler. Since I had some downtime before starting my next project, I decided to create a spike using the Ext JS library with the upcoming ASP.NET MVC framework. This is the first code I've written with Visual Studio 2008, let alone with the MVC framework so forgive me if the code look horrendous (which it does...).

The entire solution took about a day to finish. Basically it uses the ubiquitous Northwind database, dumps a list of customers into a dropdown, you select a customer to view their orders in the top grid, then select an order to view its order details in the bottom grid. Nothing fancy, but gave me enough insight on how Ext JS (or any JavaScript library really) ties in with the MVC framework and also allowed me to play around with Linq to SQL.

I'm not terribly pleased with how my unit testing of the controllers are being handled (need to research that some more), and also not too fond of how the view (specifically the Ext JS record object) is dependent on the properties of the model object being serialized to JSON. If I add/change/remove a property on my view data transfer object in C#, I'd also have to remember to change it in the view's JavaScript... clunky at best, a violation of the DRY principle at worst.

So while I work those issues out, I've decided to go ahead and post the source code of what I have so far for public consumption. As I mentioned before, I reaped a lot of benefit from others posting their code on the Ext JS forums, so I'm paying it forward and hope someone else will find this code beneficial.

I should mention it's also pretty easy to adapt this code to an ASP.NET 2.0 solution if you came here looking for an ASP.NET 2.0 example with Ext JS.  Just replace the Linq to Sql entities with business objects hydrated from your choice of storage mechanism, and replace the controller with an .ashx handler that Response.Writes the JSON Ext JS needs.

NOTE: The source code below was created using the initial version of the ASP.NET MVC framework and so will not work with newer preview versions.  If someone wants to update the example with a newer version, I will gladly host the source code. 

To build the solution, you will need the following:

  1. Visual Studio 2008
  2. ASP.NET 3.5 Extensions Preview
  3. Download Source Code for this Project
Screenshot of application below:

Currently rated 4.5 by 8 people

  • Currently 4.5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , , , , ,

MSDN Events, Books, and Foundations of Programming

by alanlok 29. January 2008 23:12

I attended my second local MSDN Event this year and while I was more interested in last month's agenda of new features in Visual Studio 2008, this month's session on IIS 7, ASP.NET 2.0 Application Services, and Security was pretty informative and touched on a few things I've been curious about, so they're always worthwhile to go even if the main agenda's subject doesn't interest you too much.  If you're in the Fort Worth, TX area, I highly recommend you attend these events so that Microsoft will know that hey, there's .NET developers west of Dallas too!  Besides, Zain is always good for a few laughs as well and he also gave a shout out to one of my favorite books, Head First Design Patterns.

If you're not familiar with the Head First series, they take a different tack than most other books in getting you to actually LEARN the material.  Using a combination of humor, casual conversational tone, and offbeat images, they're not as dry as most other technical books and so you're not forced to focus all your energy trying to concentrate on the material, it comes easily.

Since we're on the topic of books, another book I enjoyed was Applying Domain-Driven Design and Patterns: With Examples in C# and .NET.  This was my first foray into Domain Driven Design (DDD) and was a pretty big paradigm shift for me.  My mindset had always been that "data is king" and so I had been developing from the database up.  While most of the apps I do nowadays don't necessarily need the complexity of a full domain model, I find alot of the DDD concepts beneficial and so I try to incorporate some of the DDD practices such as focusing on persistent ignorant objects so I can delay working with the persistence layer as long as possible and using a ubiquitous language.  I also just recently bought a copy of the Eric Evan's original DDD tome I'm hoping to start reading soon.  The C# book I thought was a little light on the details of the why's and how's of DDD, so I wanted to go straight to the source.

I think I've rambled long enough, I'll end my post with a link to a great series of articles : Foundations of Programming.  Karl pretty much nails it on the head in the first article and all the things he mentions are things I've been incorporating into my own development practices the past few years.  These are concepts that transcend languages and make you a better "programmer" period, and not just a better ".NET programmer".

Currently rated 5.0 by 2 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , , ,

RhinoMocks - What is something I wish I had used sooner?

by alanlok 27. January 2008 23:14

As I mentioned in a previous post, I've been wanting to use RhinoMocks for a while now but somehow never got around to it.  I finally converted some of my existing tests for a project from using hand coded mock classes to RhinoMocks and I'll never go back!

I use the Model View Presenter design pattern (or probably to be more accurate the Supervising Controller pattern) for my ASP.NET applications to promote testability (it's really a poor man's fix until the ASP.NET MVC framework goes RTM) . 

So to illustrate how much rosier life will be now that RhinoMocks has entered my life, here's a before and after of the unit test (code has been genericized).  The gist of the application is a web page that consumes a collection of Employee objects (either to use as a dropdown list or to bind to a GridView) and also needs to know if the current user has edit permissions.

First the code common to both unit tests (interfaces and presenter class):

   1: public interface IModel
   2: {
   3:     bool GetCanUserEdit(string name);
   4:     IList<Employee> GetEmployees();
   5: }
   6:  
   7: public interface IView
   8: {
   9:     bool CanUserEdit { set; }
  10:     IList<Employee> Employees { set; }
  11:     string UserName { get; }
  12: }
  13:  
  14: public class Presenter
  15: {
  16:     private IView view;
  17:     private IModel model;
  18:  
  19:     public Presenter(IView view, IModel model)
  20:     {
  21:         this.view = view;
  22:         this.model = model;
  23:     }
  24:  
  25:     public void InitializeView()
  26:     {
  27:         view.CanUserEdit = model.GetCanUserEdit(view.UserName);
  28:         view.Employees = model.GetEmployees();
  29:     }
  30: }

Now the code for my original test fixture and the corresponding mock classes I had to hand write:

   1: [TestFixture]
   2: public class OldSchoolPresenterTestFixture
   3: {
   4:     [Test]
   5:     public void ShouldInitalizeViewWithPermissionsAndListData()
   6:     {
   7:         // Create mock classes
   8:         MockView view = new MockView();
   9:         MockModel model = new MockModel();
  10:         
  11:         // Setup mock model with fake data
  12:         model.CanUserEdit = true;
  13:  
  14:         List<Employee> testEmployees = new List<Employee>();
  15:         testEmployees.Add(new Employee());
  16:         model.Employees = testEmployees;
  17:  
  18:         Presenter presenter = new Presenter(view, model);
  19:  
  20:         presenter.InitializeView();
  21:  
  22:         Assert.IsTrue(view.CanUserEdit);
  23:         Assert.IsTrue(view.Employees.Count > 0);
  24:     }
  25: }
  26:  
  27: internal class MockModel : IModel
  28: {
  29:     private bool canUserEdit;
  30:     private IList<Employee> employees;
  31:  
  32:     public bool GetCanUserEdit(string name)
  33:     {
  34:         return canUserEdit;
  35:     }
  36:  
  37:     public IList<Employee> GetEmployees()
  38:     {
  39:         return employees;
  40:     }
  41:  
  42:     public bool CanUserEdit
  43:     {
  44:         set { canUserEdit = value;}
  45:     }
  46:  
  47:     public List<Employee> Employees
  48:     {
  49:         set { employees = value; }
  50:     }
  51: }
  52:  
  53: internal class MockView : IView
  54: {
  55:     private bool canUserEdit;
  56:     private IList<Employee> employees;
  57:     private string userName;
  58:  
  59:     public bool CanUserEdit
  60:     {
  61:         get { return canUserEdit; }
  62:         set { canUserEdit = value; }
  63:     }
  64:  
  65:     public IList<Employee> Employees
  66:     {
  67:         get { return employees; }
  68:         set { employees = value; }
  69:     }
  70:  
  71:     public string UserName
  72:     {
  73:         get { return userName; }
  74:     }
  75: }

Yuck... that's a lot of extra code just to be able to get testability.  If interfaces change, all the mock classes will also need to be updated.  While refactoring tools like ReSharper make it less painful, it's still extra code you have to maintain.  It's also pretty mind numbing to write and it's not terribly exciting.

So now let's look at the spiffy new RhinoMocks version of the unit test!

   1: [TestFixture]
   2: public class NewSchoolPresenterTestFixture
   3: {
   4:     [Test]
   5:     public void ShouldInitalizeViewWithPermissionsAndListData()
   6:     {
   7:         // Create the mock classes dynamically, no more hand coding!!!
   8:         MockRepository mocks = new MockRepository();
   9:         IView view = mocks.CreateMock<IView>();
  10:         IModel model = mocks.CreateMock<IModel>();
  11:         
  12:         Presenter presenter = new Presenter(view, model);
  13:  
  14:         // Setup test data
  15:         string userName = "Bart.Simpson";
  16:         List<Employee> employees = new List<Employee>();
  17:         employees.Add(new Employee());
  18:         
  19:         // Setup what we expect to happen 
  20:         Expect.Call(view.UserName).Return(userName);
  21:         Expect.Call(model.GetCanUserEdit(userName)).Return(true);
  22:         Expect.Call(view.CanUserEdit = true);
  23:         Expect.Call(model.GetEmployees()).Return(employees);
  24:         Expect.Call(view.Employees = employees);
  25:  
  26:         mocks.ReplayAll();
  27:  
  28:         // Run the code and verify all our expectations happened
  29:         presenter.InitializeView();
  30:         mocks.VerifyAll();
  31:     }
  32: }

Much nicer!  I've cut the number of lines of total code to pass the unit test by 1/3 by not having to write the mock classes, and I don't have to worry about maintaining all that extra code!

I have to admit, at first glance it seems strange because I'm testing the behavior of the code and not the implementation.  But upon further review, what I'm really doing is separating concerns, a good thing!  I'm testing the presenter is doing what it needs to be doing (relaying information back and forth between the view and model) and nothing else.  I can write a unit test for a concrete IModel class that implements the database calls at a later time (and by the way I'm still trying to figure out the best way to run integration/unit tests against SQL Server).

Well, I hope my faithful readers (all 2 of you!) enjoyed my introductory foray into RhinoMocks and as I continue to use it more, I'll post more meatier and juicier examples.  I'm still giddy I don't have to hand code mock classes!

Currently rated 5.0 by 2 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , ,

I <3 FIOS

by alanlok 21. January 2008 22:04

I recently moved to Keller, Texas which is actually the first city ever to get Verizon's fiber optic service, FIOS.  My street originally wasn't wired for it, so I had to make do with 10mb DSL with a local company.  When Verizon notified me FIOS was finally available for my house, I jumped on it.  I've now had it for a couple of months and I haven't had a single outage, and check out my speed below!

The reason I bring this up is because I noticed Scott Hanselman just posted about getting FIOS tv and in an earlier post, he actually ditches his DD-WRT router and goes with the Actiontec router Verizon provides.  Like him, I refused to give up my Buffalo router flashed with DD-WRT but a couple of weeks ago, I replaced DD-WRT with Tomato because I was having wireless connection issues in my living room.  While the signal remained strong according to Windows XP, my throughput was less than 1mb.  I replaced DD-WRT with Tomato hoping it would solve the issues, and it did. 

But after I read Scott's blog, I decided to give the Actiontec a try and it actually surprised me with the amount of features available.  Everything I used DD-WRT for (QoS primarily), the Actiontec provided.  Not only does it seem faster than the Buffalo with DD-WRT/Tomato firmware, the wireless signal seems to be alot stronger as well with nary a deadspot in my living room.

So I guess the moral of this story (aside from showing off my swanky broadband connection) is don't be a software/hardware snob.  My initial resistance to using the Actiontec was because I figured it was generic junk that ISP's provide for their users, and that the freeware DD-WRT and Tomato firmwares (with source code available) were superior products.  This is akin to only using open source .NET software tools and refusing to use Microsoft provided ones even if maybe... just maybe... the Microsoft version may be better! 

Currently rated 5.0 by 2 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , ,

Background

by alanlok 16. January 2008 22:42

I thought I'd write up a quick post about my background and why I'm starting this blog.

I first got introduced to agile development methodologies a couple of years ago by a new co-worker.  I still remember him explaining this new fangled test driven development, design patterns, iterative development, paired programming, and I was thinking "Huh?".  Fast forward a few months later and I had drunk the Kool Aid and was converted for good.  Since then I've been consuming as much OOP and agile development information as possible.

I now work as part of a small development team where I have the opportunity to guide us to do things the Right Way™ and help shape the team into a top notch band of agile ninja coders.   The previous regime was a typical chaotic cowboy coding environment.  I've been here a little bit less than 3 months and we've already setup a development lab, started doing weekly iterations, created a story board with story and task cards, engaged in some paired programming, and had our first try at Planning Poker.

To be sure, there's alot more left to do but I really like the steps we are taking.  So this blog will serve as a historical document of our journey so that others may learn from our trials and tribulations.

Currently rated 5.0 by 2 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: ,

Powered by BlogEngine.NET 1.4.5.0
Theme by Mads Kristensen