Metacognition with Python - Directional Idea Maps

Computer programmers in general spend a fair bit of time engaged in algorithmic thinking. The idea of metacognition is basically “thinking about thinking”, with an implied agenda of improving our thinking. It stands to reason then that metacognition could be of use to programmers, as it provides the opportunity to improve our algorithmic thinking.

However, it doesn’t stop there. Once we become interested in thinking about thinking, a whole world of possibilities opens up, and if are open to the possibility that our thinking could be improved, then great things are possible. Programmers are probably better placed than many to recognise the need for improvement in our thinking, as we are generally in the habit of learning new things on a very regular basis. After all, we would not get far as developers if we weren’t comfortable with the idea that we don’t already know everything. This is perhaps a less common attitude outside of the programming world.

There had been a great deal of work done in the area of metacognition. Much of the foundational work was done by Edward de Bono. He has authored many books and designed courses of learning and tools which are in widespread use in many institutions around the world. I like to think of him as “the Grandfather of Metacognition”, but to be fair I don’t know enough about his influences to know whether this is a deserved title.

A common issue with de Bono’s work is that people coming across it often fail to recognise its significance and power. Many of the ideas are so simple that they are often dismissed as trivial. There is also the cultural trait of intelligent people often not recognizing the need to improve their thinking. If de Bono’s work is something which interests you, you will have to judge its value for yourself. In my personal opinion, it is nothing short of revolutionary, in that it is the biggest step forward in human reasoning since the time of the great Greek philosophers such as Plato and Aristotle.

Directional Idea Maps with Python

So what does this have to do with Python programming?

I want to share with you a metacognitive tool written in Python for exploring the relationship between elements in a situation. It is inspired by Edward de Bono’s flowscapes. You can get the code from my GitHub account. The way the tool works is that it creates a directed graph where the nodes represent different aspects of the situation under consideration.

Once a graph is created, it gives us a visual representation of the connections between elements. There is no one correct interpretation of the resulting graph, but instead you will notice certain features such as loops and gravity wells which may give you unexpected insight into the situation you are exploring.

Usage:

  • List the elements present in the situation you want to explore
  • For each element, choose just one element it flows most naturally towards, based on any definition of “flow towards” you like.
  • Hit submit and see a visual representation of the relationship between the elements
  • Interpret at will
  • You can save/load previous sessions if required.

Metacognition with Python - Directional Idea Maps GUI

The application can save and load previous sessions in json format for future use. Note that you have to produce a graph by clicking Submit before you can save a session. Also note that there are some validation rules which mean you won’t be able to submit your form under certain conditions (e.g. one node flowing to multiple other nodes).

Python Code for the Idea Maps Metacognitive Tool

I have provided the Python code for this application below for reference. A couple of things to note are:

  • Tkinter and Matplotlib do not play nicely together. For this fairly simple application, I didn’t need to use matplotlib.backends.backend_tkagg but for anything more complex, you will need to explore that approach to working with both libraries together. You can see an example here.
  • The networkx package (which you will need to install using pip) needed a slight modification to position the nodes correctly when the graphs is not connected. That is what the my_reingold.py files is for, and it overrides the original networkx version.

I hope you find this application interesting and helpful.

Happy computing and cogitating.

Leave a Reply

Your email address will not be published. Required fields are marked

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}

Join our mailing list

Join our mailing list to receive awesome articles about learning Python and Computer Science in a fun and accessible way, straight to your inbox.

 Take your Python skills to the next level!

with our free email course on object oriented programming with Python