Simplifying Architecture With The 2 AM Test

Simplifying Architecture With The 2 AM Test

A few weeks ago I was cleaning out the garage and disposing of some relatively large items. Our town has a size limit on items that can be picked up as curbside refuse so when I was telling my wife about all of the things I had gotten rid of, she looked at me and asked suspiciously, “How did those large items fit in the trash bag?”

I smiled smugly and replied “I have a Sawzall. Everything fits in the trash bag.”

Architecture defines the right tool for the job

A large part of architecture is about breaking down requirements, identifying patterns and defining strategies for addressing the requirements in a consistent and effective manner. Architects align these strategies, a.k.a. the tools, with the requirements so that problems can be solved efficiently and effectively. The choices an architect makes in defining these strategies will have a dramatic impact on the usability of the architecture and therefore the ability for developers to implement the architecture.

A consistent, predictable architecture can dramatically improve developer productivity and allow less experienced developers to be more effective than their experience would otherwise allow. A poorly conceived architecture has the opposite effect driving down developer productivity and causes unneeded complexity. The goal of any architect should be to make architectural decisions that address requirements and solve problems in the most simple and obvious way possible while balancing all other needs of the system.

The 2 AM test

All architecture decisions I make must pass the 2 AM test. Basically the 2 AM test asks the following question:

“Six months from now when I get a call at 2 AM and the system is down, would this decision make it easier to troubleshoot without my third cup of coffee?”

If the answer is “yes, this makes it easier” then the decision passes. If the answer is “no, it would make it harder” then I have to look pretty hard for alternatives and make sure the benefits of this decision outweighs the increased complexity.

Application Development Frameworks and the 2 AM test

Earlier this year, my company launched an application development framework called designed to accelerate and simplify creation of business solutions. This accelerator is a code-based software development framework that implements a proven, scalable, cloud-friendly application architecture. As we developed this framework, we paid careful attention to the 2 AM test in every decision that we made. We incorporated feedback from early pilots to make sure we were on target and we continue to tune to make sure we keep things simple.

Since the initial launch we have had the opportunity to use the framework on several different client projects and have received excellent feedback. Project teams have reported saving hundreds of hours in development and design and we have been able to shorten overall project durations by several weeks. In addition to the lift this framework provides in the startup phase of the project, developers are reporting at least 10% ongoing efficiency due to the consistent, clean architecture and programming model.

Based on this feedback it’s safe to say that this framework passed the 2 AM test with flying colors!

Albert Einstein would approve

Albert Einstein has often been quoted as saying:

“Make things as simple as possible, but not simpler.” 

The 2 AM test is a handy technique for architects to use when evaluating their own decisions as well as those of other architects. A certain amount of complexity is inherent in everything we do otherwise there would be no architects. By striving to keep things as simple as possible an architect makes a system easier to build, test and support. These systems live longer and provide more value to the business throughout their life.

The next time you have an architectural decision to make be sure to apply the 2 AM test. Your systems will get simpler as a result.

Kathy Sutherland

Senior Business Analyst

8 年

Well done as always, Zach.

回复
Curtis W.

COO @ Medical Informatics Corp.

8 年

Nicely done Zach - simple, and likely, scenario boiled down to a practical evaluation. That and Sawzalls - with great power comes great responsibility.

回复
Parag Parashar

Technology | Product | Management | IIM Calcutta EPGBM

8 年

nice article Zach

回复

要查看或添加评论,请登录

Zach Slayton的更多文章

社区洞察

其他会员也浏览了