Better Mind Mapping Helps Better Coding

image

As a software developer and editor of prominent programming magazines, Andrew has frequently discussed the benefits of making notes while coding to deliver clear, reliable code. He finds that recording observations and tasks to be done in a structured document as he's coding helps him keep track of where he is in a project and where he needs to go.

After trying various ways to record these notes in an intelligent way, he found that mind maps were an elegant solution. He could lay out the part of the project he was working on in a mind map and decorate it with notes and to-do tasks, which then were easy to find.

This approach clears mental space for him to enable him to focus on the code he's working on, while not losing any of the contextual information he needs. He also uses mental maps for analyzing code as explained in the following interview.


Please tell us a bit about yourself.

For the last five years, I've been the editor of Java Magazine (from Oracle). Earlier, I was the editor in chief of Dr. Dobb's Journal. And in earlier lives, I've been the editor of several programming publications. I started my career as a software developer and have continued programming as a side activity contributing to various open-source projects and working on projects of my own.

What do you do for fun?

I study the piano. It's far more difficult than programming. The road to expert on piano is arduous indeed. I think most programmers tend to be overconfident in their programming skills. I know that I am until I'm brought back to earth by looking at old code and wondering how I could ever have written that! But with piano, there's humility all along. You're constantly aware of how much more there is to learn and how unattainable the level of the great pianists is. How does mind map help with your life or your work? I use mind maps in two different areas:

  1. Brainstorming tasks and projects for myself or with family and friends;

  2. Programming. As I describe later, I use mind maps for three primary purposes in software development.

How long have you been using XMind?

It's probably been six or seven years; maybe longer.

How did you come up with using XMind on coding, since it's not usual for developers?

It originally started with Kent Beck (the father of Agile) who once suggested that it was a good habit to keep track of all the decisions you make when programming. (Both important ones such as: "I'll keep the maximum value for this variable at 70." "I'll make sure users can enter fractional values in their orders." and smaller ones, such as "I need to expand the integration tests to cover this new code." And so on.) What I found was that simply writing these decisions down was not enough. But putting them into the project task/defect tracker was overkill. So, I began with a mind map that I developed of the part of the project I was working on and I would decorate it with these micro decisions and notes, such that I could find and review then when working on some other part of the project. I found the mind map representation to be very useful for quickly finding notes, such that I could find and review them when working on some other part.

I also use mind maps when working on the design of a feature. I'll start with the new feature as the top topic and then I'll spin off branches for sub-features and then attach decisions to those branches, as well as implementation notes, reminders, and possibly even things like proposed names for objects and methods. This allows me to think in detail about the code long before I've written a single line. Many times, I'll move some branch containing several methods to another branch, which allows me to change things easily and gives me a higher confidence in where I'm going when I begin to write the code.

This is a case of a new feature - an addition of HTML to an existing tool:

image

Finally, I've begun using mind maps when reading unfamiliar code. Most programs have a hierarchical architecture, which is surprisingly amenable to representation in a mind map. This is an analysis from a library called iText 7, a little-seen use case but practical.

image

This way as I'm working my way reading the code, I can see on the mind map, where I've been and how I got to where I am now. I can see that the path that leads to my current place. In addition, as I'm reading, I'm developing documentation that I can refer back to later on. I'm still experimenting with this use case.

What is your favourite feature/features in XMind? Why?

Honestly, it's the ease of use. I can move quickly and put into the mind map what's in my head. I like that a lot, because very often time is of the essence when you have something you want to capture. How do you keep productive? Any other productivity apps you're using? I've written a lot on this topic in various editorials. I find eliminating distractions, using good tools, and listening to classical music are all helpful.

Coffee or tea?

Coffee to get me going in the morning. Then tea most of the day. As to other binary options: Dogs rather than cats, spaces rather than tabs, Brahms rather than Wagner, Monet rather than Manet.

Notes: Photo Courtesy of Bob Adler

We use cookies to provide, improve, and promote our service. We do not leak or sell the collected data to third parties. By continuing, you consent to our Privacy Policy.