The Design Review – Only the Strong Survive

snaggle-toothed-dogLike a 10 year old heading to the dentist, the design review stage of a project is one of those areas that will drive a series of heebie-jeebies in even the most iron stomached software engineer or designer.  You’ve spent time with your users and business analysts.  You’ve diagramed all of the ins and outs of your solution.  Now you have to present your design to others and convince them why your design is the best approach to solving the problem within the constraints of your project.  Let the stomach aches begin!

When considering your upcoming design review, there are a few questions that you need to ask yourself.

  1. What is the target audience for this review?
  2. Has the audience spent the needed time reviewing your documentation?
  3. Are you prepared with answers to those reviewers that want to provide alternatives?

What is the target audience for this review?

Archery_TargetFor a successful design review you must understand your audience.  A strong designer will understand the technical level, responsibilities, and motivations in their design audience.  For example, if you are presenting your design to other senior technical leads within your immediate organization, you will want to structure your presentation to a level of technical review that is much deeper than if you are presenting to a group of architects.  Each type of audience will bring its own challenges.

Keep in mind that there is no design that at least one person can’t review and claim the opportunity for improvement.  Suggestions for change to your designs are occasionally motivated by technical philosophy instead of the merits of the design itself.  A well prepared presenter will use their understanding of the audience to work through these conditions.  As a rough example, sometimes a reviewer will believe that object oriented design is the answer to all solutions no matter the complexity of indirection and/or misdirection that object oriented design offers.  That person will likely challenge your designs on your use of data encapsulation, inheritances, and state if they are not all encompassing.  The more you are prepared to justify your design decisions for this review meeting in those low-level technical areas – they better you will be able to respond.  Just remember that a design review is not about finding a “different design” but to find the “best design” that meets the goals of your project.

Has the audience spent the needed time reviewing your documentation?

800px-Booster-LayoutThe single most time draining failure in a design review is if your audience has not reviewed your documentation before the meeting.  No one usually wants to sit in a two hour meeting listening to you read through your design document line-by-line.  Heck, I don’t even like having to read through my designs line-by-line.  To ensure your audience is prepared for your reviews, make the effort to give each participant the time to complete the review.  I also like to elicit a response from each participant before my design meetings where they are asked to confirm that they have read the design and are coming to the meeting to ask questions about the design itself.

At the beginning of the presentation, inform the participants again that the review meeting is an opportunity for them to ask questions about the design’s approach to solving the problem.   Good meeting management by the presenter is critical in preventing the meeting from turning into a document read-along.   If your project schedule and company culture allows, stopping the review for rescheduling if it becomes obvious that the review was not done by the majority of participants is sometimes a good peer-pressure trick to ensure the participants understand their role in the effort.

Are you prepared with answers to those reviewers that want to provide alternatives?

“Defence is our best attack” Jay Weatherill

The most effective tool a designer has in their arsenal is that of alternative solution investigation.  The designer must spend the time needed to explore the alternatives that may come out of a design review before the review occurs.  As quick on their feet as many designers believe that they are in answering a technical challenge with partially correct answers, I’ve seen situations where the reviewers that actually do know the correct answer to the technical challenge begin to doubt the designer’s credibility.  If you don’t know the answer to the feasibility of an alternative solution – just say so and take it off as a follow-up action.

Remember that the design review is not about you.  The review is about the proposed solution – not the person presenting it.  Assume your reviewers are looking for the best solution for the problem – not attacking your ability to design it.  In the end – if your design is well thought out and you’ve considered all of the possible fallacies of the approach – your design will only be improved by the combination of minds reviewing it but will usually enjoy more support from those that accepted the design.

720px-A_01_Audio_compact_disc_collection

I’ll provide a personal example to this topic.  I had worked on an application for two years of design, development, and maintenance.  The application had been reviewed over and over by at least 15 difference architects, senior developers, and designers over that period of time.  A new person joined the group and in about 45 minutes of reviewing the design suggested a hole in our solution that had been leaking memory for the entire two years.  We had been lucky enough to have loaded maintenance releases often enough to not have seen it – but sure as heck – it was there.  It never ceases to amaze me how just a single person can sometimes find something that the larger group never recognized.

In summary, embrace these design reviews.  Conducting a series of reviews taken in a positive manner and demonstrating solid understandings of risk analysis and thoughtfulness has propelled many developers into high-level roles and responsibilities.  Look at each design review as an opportunity for you to learn something new.  I assert that if you do – not only will you gain personally through your learning – but the designs you produce will be more solid and less prone to failure…and everyone like to support that kind of software.

Designing Long Term Solutions in an Iterative World

http://en.wikipedia.org/wiki/File:Development-iterative.gifIn this world of cost cutting and temporary resourcing, the importance of looking at the long term strategy when defining a solution’s design can get lost with the pressures of implementation deadlines.  How many times has a team been asked to shorten their design time in order to “get on” with the development effort and get something out to the market?  As a designer, how many times have you been told to worry about the fine grain details later – aka when we work on the low level designs for the developers?

Take an honest look at your project resources.  During requirements gathering we have; technical leads, business analysts, product owners, architects, project managers, and many others reviewing every single word in the requirements.  However, when the requirements are done, the team drops to a few technical leads and possibly some architects trying to push out a design with enough information to get the development effort started.   Who is inspecting every flow, component, and rule in the design?  Who is making sure that the design meets the basics of solid design fundamentals?

A respected VP and Director I know once told me that there are few things that are more important than a great design to make great solutions.  The analogy that was given is roughly repeated below:

“A good design is like a blueprint for a house.  Many designers can design a three bedroom house since the same blueprints usually work with a few tweaks on similar houses.  They know how to put in the plumbing, build a standard foundation, and where to put the doors.  However, I assert that the blueprint must be evaluated against the long term needs for the final solution.  If the blueprint is for a three bedroom single story house, they you should never expect that house to turn into a five story apartment just for the desire of making it one in the future.”

I’m a big fan of Agile and Iterative development methodologies.  These methodologies have moved development to greater flexibility and delivery capabilities in many ways.  However there is a catch…as there is usually a catch in all good things.  If there is not a blueprint for the final condition (or at least a review that ensures that the final condition can be supported) then no number of iterations or sprints will ever be enough to reach the final goal.

Let’s go back to the blueprint analogy and explore some of the detailed examples that came out from the analogy above.

Let’s say that the requirements from the new property owner describes a single story building that will support three people and will provide those people security from robbers and weather conditions.  Those owners know that at a later date they will be asking for something that will house 200 people, provide a gated security system, and contains a pool and tennis court.  However, since they really just want to get that single story house out there as soon as possible and start getting revenue from renters, they tell everyone that they will deal with those larger requirements “later.”

The designers look at the requirements and start building a blueprint for a house that  Designing Long Term Solutions in an Iterative World a Single Story House Viewhas a couple of bathrooms, a single-story-rated foundation, and standard deadbolt locks on the door.  Everyone likes the simple design, so the development teams start implementation and celebrate the completion of the single story house with great fanfare.  The owners have renters move in and praise everyone for the modest income they are seeing.

Later, the owners meet with the designers and ask them to add few more stories and 20 more apartments to the building so that they can get more tenants into the building and make some more money on an already winning income source.  After some tears and anger – the designers agree to give the owners what they want.  The designers decide that they will need to kick out the current tenants so that they can build a stronger foundation.  Then they realize they need to change the entire security model to include key card access and large gates to keep the strangers out and the tenants secure.  Finally, they are surprised to find that the city’s current residential sewer line will never support the new needs, so they design a new commercial-level sewer system for the property.

The construction crews that worked on the single story house are livid that they have to Designing Long Term Solutions in an Iterative World a Apartment Viewredo so much of their original work.  However, at least it is paying work!  They don’t have a lot of time to completely rebuild the foundation, so they decide that maybe they’ll just add some more concrete and hope that it will hold the weight.  They deliver an updated building and great fanfare is made of the new delivery.  Then the city inspectors are sent in.

The city inspectors find that the foundation is sinking under the weight of the new floors.  The sewer line could not be ran to the area because it was in a residential zone and commercial lines cannot be ran into the property unless they spend millions on rezoning and new city infrastructure.  Finally, after much finger pointing and lost money, the effort is shut down due to permit violations, zoning violations, and budget overruns.

So why spend so much time on the analogy above?  Because, this cycle is seen over and over again in the software design process that most teams work within.  How many times have we implemented software only to find that the initial authentication mechanisms were not adequate and we needed to implement complex single sign-on features using expensive third-party systems?  How many times have we seen software that was not thread safe and highly scalable because the development team thought they were building a 1 TPS solution vs. a 1,000 TPS solution?  For the operations folks – how many times has a team asked you to place a piece of software on your low transaction network only to find out that it was really supposed to be running across a highly redundant and highly scalable network?

How do we keep this from happening?

  1. Project owners need to insist that the teams (including themselves) do not get into a cycle of “we’ll figure out that complex feature later.”
  2. Designers need to understand the end state of their designs and implement solutions that allow for the migration from starting iterations into their final conditions without major foundation rework and redesign.
  3. Finance needs to ensure that they provide budget for efforts by giving the design team the resources and budget to ensure that they can understand and design for the end-point solution.
  4. Reward those teams that save time, rework, and funds by having a solid plan of how to get from state A to state G.
  5. Re-train those that feel that the measure of a good design is how many fancy window coverings, cool colors of walls and carpet, and number of awesome garden tubs that they can put into that single story house instead focusing on the long term goals.

The ideas above sound easy to do.  However, I am always amazed on the number of stories I hear at gatherings for development managers, designers, and technical leads across industries where they same comment is made over and over: “If I would have only known that they wanted it to me like that then I would have done everything differently.”   That said, over-engineering is also another challenge for good designs – but I will cover than in future posts.

In the end, give your design teams the tools and information that they need to create a design that meets the true needs of the solution and they will amaze you with the results.  Trust me – a few extra weeks in design can save thousands in development re-work.

Review: MongoDB Applied Design Patterns

MongoDBPatternsMongoDB Applied Design Patterns by Rick Copeland (O’Reilly Media) is another in a series of patterns books that I would highly recommend for the implementer that knows the technology but is trying to discover if a previous solution (via a pattern) has been found for their problem.

As to the reader, MongoDB Applied Design Patterns is not for the MongoDB “Hello World” level implementer.  There is a basic assumption that the reader understands how to implement basic MongoDB solutions and is now ready to implement more advanced solutions using established patterns.  The Use Cases in the second half of the book were probably the most useful for me.  It not only gave me ideas of how to solve certain patterns of problems, but allowed me to explore features of MongoDB that I had not had a chance to explore.

I appreciated that Copeland explored several important topics at the beginning of the book.  For example, he takes time to explain how important it is to MongoDB solutions for optimization to be considered at the beginning of the design vs. afterwards.  Along with those lessons, Copeland provides detailed examples of the “why” instead of leaving the reader to just trust his statements.

I’d highly recommend MongoDB Applied Design Patterns to the implementer that is ready to move beyond the basics and move into highly viable and scalable solutions using MongoDB pattern as their initial template.

Disclaimer: I received a free electronic copy of this book as part of the O’Reilly Blogger Program

Review: Head First Design Patterns

I picked up Head First Design Patterns by Eric Freeman, Elisabeth Robson, Bert Bates, Kathy Sierra while working through some particularly difficult design/code reviews.  In these reviews, I found that very few developers actually knowingly use design patterns beyond the most simplistic of forms.  In fact, during several interviews, I asked candidates what design patterns they could name and most could not name a single one.  However, when I asked them if they had heard of the Singleton Pattern, they immediately began giving examples of writing code to meet this pattern.  With this discovery, I quickly began recommending this book to java developers of all levels as a way to renew why we design code the way we do.

Head First Design Patterns quickly gives the reader exposure to some of the most common patterns and why they work.  Does this book cover every possible pattern and the intricacies in its use?  No.  However, it brings to the reader a mode of thought that begins to look at design patterns as a way to solve common problems without “reinventing the wheel.”  The examples are relatively simple to understand and the writing style straightforward and logic in its flow.

I recommend Head First Design Patterns to any entry through advanced level developer or designer in the object-oriented world that desires to find a solution to common problems in a way that allows your design/code reviewer and maintainers the ability to understand why the design/code was “done” the way that is was “done” in a less-than-four-hour line-by-line review meeting.