Tuesday, July 9, 2013

Nodes, Links, and Quanta

In an attempt to organize my code and keep it DRY, I've added a new class which is a super of both Links and Nodes. Links are very much like Nodes in themselves, but there's enough distinction to inhibit inheritance directly from the Node class.
One of the main reasons I didn't make the class sooner is because I couldn't think of a name for it or ultimately conceptualize it. What is more fundamental than a Node?
I found my answer in physics. Just as people somewhat erroneously think of the most fundamental pieces of matter as "particles" even though matter is also energy and elementary "particles" can also be wavelike and make up all forces, I was thinking of the most elementary piece of Thinker data as "nodes" even though the links that connect nodes were a distinct kind of "node" themselves.
Thus enter the proper concept and name: the quantum. A quantum in physics can appear as a piece of matter or a piece of a force field connecting matter, as a particle or as a wave. Likewise, a quantum in Thinker can appear as a particular Node or as a connecting Link.
It's a great example of cross-disciplinary insight!

The Quantum class hierarchy concept depicted in Thinker. 

I've also created a stringifier to go with my new data parser. This format is tentitavely known as Quantum Thinker Data (QTD), and now replaces JSON as the data transport format of choice for Thinker.