Posts
58
Comments
103
Trackbacks
10
April 2007 Entries
Jean Paul Boodhoo on Abstract Factories and Singletons

I caught this yesterday in my RSS reader.  JP manages to take some procedural code and refactor it to the abstract factory pattern.  It's not his usual TDD style but serves as a good introduction.  I always learn something when reading or watching his stuff.

Jean-Paul Boodhoo on Demystifying Design Patterns Part 1

I'm guessing Part II is out next week.  Here's his blog in the meantime and links to a couple really good posts:

Build A Solid Core
Read Any Good Books Lately?

It was the following two TDD videos that got me started down the Agile/TDD/OOP path.  If you are like me and pride yourself on knowing your craft inside out, don't say I didn't warn you if they kick your ass.  There's a lot of meat in these screencasts (even if he doesn't describe it all).  I watched them more than once before all the lightbulbs clicked on.

Jean Paul Boodhoo on Test Driven Development Part 1 of 2
Jean Paul Boodhoo on Test Driven Development Part 2 of 2

Jean Paul Boodhoo on Model/View/Presenter

posted @ Tuesday, April 24, 2007 9:51 PM | Feedback (0)
Eat Your Own Dog Food

This is a simple technique.  Avoid the ivory tower speak and put your ideas into practice.  Notice I didn't say to have your team put your ideas into practice.  The best leaders are those who lead by example.  The rest are simply managers.

It's pretty easy to sit back and draw a few diagrams, quote a few principles.  It's harder to implement those diagrams and follow those principles in practice.  Don't fall into the trap of thinking you are better than those around you.  It doesn't matter how much you think you know, you sink or float with your team and are only as strong as your weakest developer.  Remember, it only takes one really nasty bug to derail an entire project.

Be creative and be edgy, but never forget where the rubber meets the road.  Architecture is worthless until it is implemented.  Be a coder and lead by example.

“No one has yet figured out how to manage people effectively into battle; they must be led,” wrote John Kotter in ‘What Leaders Really Do’. He notes that leadership is about helping people cope with change, while management is about coping with complexity. Leaders set direction, managers plan and budget. Leaders align people, managers organize and staff. Leaders motivate, managers control.

The Leadership Paradox

Always remember to practice what you preach, and eat your own dogfood.

posted @ Monday, April 23, 2007 10:42 PM | Feedback (1)
TDD and OOP are Complementary

This has been hammered into my head over and over again recently.  Once you get past the stage where you "know" object-oriented programming, and really begin to learn what OOP is really about (and can recognize the status quo procedures with objects), things get tough--real tough.  Trying to leverage your newly learned OOP principles into day-to-day development, you will want to go into one of two directions.

Following your old style of development, your first reaction is likely to try for the Big Up-front Design.  This can get messy.  Trying to figure out the "proper" place to put something and deciding when to add a new object can be quite the task.  If you are like me, you will also end up trying to plan for future development.  You hear yourself saying, "Wouldn't it be useful down the road if.."

Stop!  Hold it right there.  There's a much better way.  Unfortunately, it involves another shift in thinking.  Test Driven Development is a great way to get started in the land of OOP.  It forces you to think about the consumer of your code before you write it.  It also allows you to bite off a little piece of functionality at a time.  Instead of trying to build the "one object to rule them all," you end up with a much cleaner api for your object model (along with smaller, more cohesive classes).  Oh, and you can tell your boss your code comes with the quality "baked in."

Another thing which can help are Class Responsibility Collaboration cards (CRC cards).  Quickly jotting down the name of the class along with a one or two sentence description of it's responsibility will help answer those sticky questions on whether to add a new method to an existing object or to add a completely new object (sometimes it seems really gray and you end up twisting an older class with high cohesion into a smelly wart).

In short, while TDD and OOP are completely separate concepts, they really go hand-in-hand.  It seems that learning one without the other would be quite a bit harder (at least for those of us without mentors standing behind us, correcting us as we go).  So, if you are in the middle of really learning how to program properly (as I am), I strongly encourage you to give TDD a try.

[Update:  Here's a great link for reading more about CRC cards if you are interested.  It's the original paper written for OOPSLA written by Kent Beck and Ward Cunningham way back in 1989.]

posted @ Thursday, April 12, 2007 10:58 PM | Feedback (0)
SOA and Messaging

As if learning object-oriented analysis and design, test-driven development, and a large number of design and analysis patterns wasn't enough.  I've recently moved into studying messaging patterns.  This was done more out of need than desire (at least for right now).  Integration seems to be the major headache for the team I'm working with currently.

Getting back to messaging, if you're not sure what messaging is or how it differs from it's cousin RPC I would strongly recommend picking up a copy of Enterprise Integration Patterns.  I'm finding that between it and lots of reading on Udi's blog, I'm quickly picking up lots and lots of new ideas (most of which I can't take credit for).

Udi's blog holds a wealth of information and at this point, his ideas seems nothing short of revolutionary from my perspective.  His generic messaging implementation using a simple interface, IBus, along with a marker interface, IMessage, seems like quite the elegant solution.  It isolotes the application from both the actual communication transport/protocol (soap, http, msmq, etc), the communication infrastructure (wcf, asmx, etc), as well as from the application(s) it communicates with.  Pairing those concepts with task-based messaging for concurrency, asynchrounous message processing for performance, and competing consumers for scale out seems like a very hard-to-beat combination--and this is just the tip of the iceberg. 

I will also mention that I recently heard Juval Lowy give a presentation on WCF, and some of the items both in his presentation and on the IDesign website seem to follow closely to both Udi and EIP.  From where I am now, I can already see the huge learning curve I'm on, but that's ok, the work is fascinating and rewarding (both personally and financially).

posted @ Thursday, April 12, 2007 1:07 AM | Feedback (0)