“Diagrams?”

Yes, diagrams. All of us use diagrams in one way or another. Mostly, diagrams are used to enhance communication and to illustrate what exactly one is talking about.

“But that’s it. Diagrams are sketches which are meant to be thrown away without deserving a second look.”

Now that’s where you’re wrong. In fact, diagrams are more useful than they appear to be. Yes, diagrams often become outdated fast in the software development industry and that tends to lead to people having a biased view against them. They often quickly assume diagrams are useless.

But we should not be too quick to judge. There are many ways to use diagrams in some initially unexpected ways. I have compiled some of the more interesting uses for diagrams in the process of software development, based primarily on the research done by Cherubini et al. at Ecole Pollytechnique, Microsoft Research and Carnegie Mellon University.

Diagrams for Brainstorming

Common opinions agree that diagrams are a great tool for visualizing design, but are unable to express the incentives behind those design decisions. Diagrams answer the “what” but not the “why”. However, it is in fact this “flaw” in diagrams which brings us a hidden advantage of diagrams.

The lack of detailed elaboration in diagrams lets diagrams be free to be interpreted in any way the viewer wishes to. They open the imagination of the viewers and do not restrict the viewers to conform to the ideas portrayed by the creator of the diagrams. According to the study, this could mean that new ideas to solve the same problem “can unintentionally be thought of”.

Besides, sketches are not hard to do and they are informal. This lets developers focus on the concepts and ideas when modelling and designing software, instead of worrying about syntax, implementation or other details. Furthermore, there is something about a drawing that cannot be captured digitally; the act of making and annotating an illustration can help one understand a subject better.

Diagrams for Refactoring and Design Review

Refactoring can go beyond staring at your code line by line or running that metric software which analyses your design and returns a list of suggested parts of the code where you need to refactor. The study found that architectural diagrams help identify design problems or potential candidates for refactoring. Often, the core architecture of a software is abstract enough and diagrams can help figure out the holes in design logic during design review.

In fact, currently there are many tools available that help developers do this. For example, we can use layered diagrams to detect code cycles during design review. Dependencies like code cycles can easily be detected in diagrams, but they are not so easy to find directly from the source code.

Diagrams for Hallway Art

Using diagrams for hallway art is one of the techniques that can be used to make developers in a team to be on the same page, something which is encouraged in Agile Methodology. The resulting drawings and sketches along the hallway and whiteboards serve as visual to-do-list and help developers oriented in the “big picture” when implementing the details of the design.

Personally, I feel that having a row of whiteboards as office decoration is ingenious; not only do they save money and space, they are useful functionally as well. Besides, having plenty of whiteboards and flip charts came up on the list of “The Ultimate Software Development Office Layout” to optimize software development.

Other Uses for Diagrams

I am sure that there are other interesting uses of diagrams that I have not mentioned in this post. Have you used diagrams in more ingenuous ways while coding? Let us know about it.