Archive

Archive for June, 2009

Stop Refactoring

June 19th, 2009

Eric Evans provides this interesting commentary while he discusses refactoring targets:

When you encounter a large system that is poorly factored, where do you start? In the XP community, the answer tends to be either one of the these:

  1. Just start anywhere, because it all has to be refactored.
  2. Start wherever it is hurting. I’ll refactor what I need to in order to get my specific task done.

I don’t hold with either of these. The first is impracticable except in a few projects staffed entirely with top programmers. The second tends to pick around the edges, treating symptoms and ignoring the root causes, shying away from the worst tangles. – Domain Driven Design, Eric Evans

I can think of many times where developers (myself included) have really just been gold plating under the guise of refactoring, or other times when refactoring activities contributed superficial cosmetic changes while the real mess lies beneath – getting to the root of the problem requires significantly more time and work than we’re often allocated and the cosmetic changes give us a sense of motion without moving. Then there are the occasions where seemingly superficial refactorings lead to an insightful break through.

Of course Evans isn’t suggesting that we stop refactoring altogether, instead he suggests that we think about what we’re refactoring, and that we focus on the parts of our software that provide the most value – in the context of Domain Driven Design this would be our Core Domain.

Author: Adam Kahtava Categories: DDD, Software Tags:

Book Reviewed: Domain-Driven Design: Tackling Complexity in the Heart of Software by Eric Evans

June 15th, 2009

Eric Evans Domain Driven DesignIn Domain-Driven Design: Tackling Complexity in the Heart of Software Eric Evans shares his extensive development and consulting experience as he outlines his approach to software development and design using Domain Driven Design (DDD). Evans’ writing style is easy to read as he maintains a comfortable conversational tone while pragmatically guiding us through the many patterns and concepts that encompass DDD. However; be-warned the concepts that lie within are occasionally dense, abstract, but ultimately enlightening as Evans’ forces us to look at development from a new perspective.

It’s also fair to mention that this book has been charged as being just another patterns book, and while I can see this perspective, some of the concepts do come across as being overly abstract without clear implementations (code) to reference, but this books is much more than another patterns book. As a developer you don’t want to overlook this book, it’s an insightful snapshot into the mind of an experienced developer. From my experience the concepts and patterns surrounding Domain Driven Design frequently crop up in Service Orientation, MVC/MVP structured Web Applications, Object Orientation, Test Driven Development, Model Driven Development, and other modern staticly typed best practices. If you do find yourself grasping for more concrete implementations then you’ll want to read Jimmy Nilsson’s Applying Domain-Driven Design and Patterns: With Examples in C# and .NET book too – Nilsson’s book provides many code examples while directly referencing Evan’s text.

I highly recommend this book, it’s a great reference to have alongside Steve McConnell’s Code Complete, Facts and Fallacies of Software Engineering by Robert Glass, and the Martin Fowler blessed books too.

A group of us reread this book as part of The Calgary Book Club. View my review on Amazon.

Author: Adam Kahtava Categories: Book, DDD, Review Tags:

Training for a Half Marathon

June 5th, 2009

I ran my first half marathon this past weekend. Finding training resources online was difficult so I’m passing the tips that I found useful.

How to train for a half marathon:

  • Ensure you can maintain 30 minutes of moderate running at least a month before your running date (this is the most important step)
  • One month before your race, run 18 kms (6 easy, 6 moderate, 6 hard, don’t worry about how long it takes)
  • 7 days later run 20 kms
  • 7 days later run for 90 minutes hard
  • 7 days later run for 60 minutes at a moderate pace
  • 1 day before the race run for 20 minutes at an easy pace

Running with 3000+ people for the first 16 kms was an amazing experience, after the 18 km mark I was questioning my sanity, and when it was over all the race participants were on top of the world. I highly recommend doing a half or full marathon. I raised some money for Team Diabetes and managed to finished in 1:58.  Next year I’m planning to run the full marathon.

Author: Adam Kahtava Categories: Calgary, Personal, Running Tags: