Home » Software Dev

Mental Modelling

11. June 2009 by Martin Rue 2 Comments

thinking_monkey Over the last 10 years I've worked of a number of both small and large projects. Until recently I hadn't really evaluated my approach to a new project. I hadn't really thought much about how I decided on a design, how I began the implementation and how I generally managed the project.

Over time it became more obvious that my approach was certainly different to some of the people I worked with. Often colleagues would hit the whiteboard first or grab a pen and paper before doing anything at all. I remember one particular case where my colleague would try to solve every problem by first identifying C# interfaces that could be used in the solution.

My approach was always different. For me, having a bit of paper or a whiteboard didn't help. Sure, they're both tools used within the design process, but standing there at a whiteboard or sitting with a bit of paper feels like skipping a step. Instead I would mentally map out the problem and invent entities that form the solution in my mind. Later I may write these down on paper, but not until I had a firm understanding of the problem and some ideas about the solution.

Some people use a whiteboard or paper for this initial step. Mapping out their thoughts and ideas on some medium helps them, but I always found that I do that best in my mind. The shapes, arrows and lines distract me from actually comprehending the overall problem and I feel slowed by the use of such tools.

An excellent article by Robert L. Glass explains the results of a study done by researchers at the University of Michigan and the Microelectronics and Computing Consortium which examined the thought process of established software designers.

The designers, mentally and at lightning speed, were doing the following things:

  1. They constructed a mental model of a proposed solution to the problem.
  2. They mentally executed the model — in essence, running a simulation on the model to see if it solved the problem.
  3. When they found that it didn't (usually because it was too simple), they played the inadequate model back against those parts of the problem to see where it failed, and enhanced the model in those areas.
  4. They repeated steps 1-3 until they had a model that appeared to solve the problem.

Looking through the 4 identified phases of the mental design process, it's clear to me that they accurately represent the approach that I personally take. The article continues to explain the results:

What we see here is a mental process, a very rapid process, an iterative process, a process in fact of fast trial and error. The mind forms a solution to the problem, knowing that it will be inadequate because the mind is not yet able to fully grasp all the facets of the problem. That problem solution, the mind knows, must be in the form of a model, because it is going to be necessary to try sample input against the model, run a quick simulation (inside the mind) on the model using the sample input, and get sample outputs (still inside the mind) from that simulation.

The essence of design, then, is rapid modeling and simulation. And a key factor in design is the ability to propose solutions and allow them to fail!

Incremental prototyping should be a familiar methodology to most developers. Incremental prototyping allows us to continually release and revise the solution until it reaches the desired level of quality, functionality and reliability. Mental modelling is the same process performed in our minds as a means of finding a solution. In mentally modelling a solution, you are quickly creating and evaluating every possible construction of components that might result in a system that solves the problem.

I find this process becomes quicker and easier the more often it is practised. The experience of your prior solutions allows you to build up a mental library of common patterns and apply them to new problems you encounter.

If you think about it, this mental process is not exclusive to software development. When you decorate your house, do you immediately go out and buy the new wallpaper and paint, or do you first try to mentally simulate the room with particular colours and styles until you find the one you like the most.

We don’t talk about it much and in some cases it’s seen simply as a reluctance to embrace tools, but I believe that mental modelling is a very powerful design skill which is limited only by your own imagination.

Comments

Ed McPadden
United States Ed McPadden said:

Another great post Martin!  This is exactly what I do.  I've never given much thought to it but I've always found that I approach the beginning of a project/problem differently then my peers.  I don't like going right up to a white board.  I first need to create and then run the model in my mind.  The model always feel a bit 3d (if that makes sense).  I can walk through the problem.  After I get a general comfort, I can only then go to the white board and start stubbing out code.  Thanks again for this post...very insightful!

Martin Rue
United Kingdom Martin Rue said:

It's great to hear that someone else knowingly uses this method, and that it's not just me Smile

Add comment




  Country flag

biuquote
  • Comment
  • Preview
Loading