Category Archives: Rehabilitation

rehabilitation technology

Forth: A Syntonic Language

Educators sometimes hold up an ideal of knowledge as having the kind of coherence defined by formal logic. But these ideals bear little resemblance to the way in which most people experience themselves. The subjective experience of knowledge is more similar to the chaos and controversy of competing agents than to the certitude and orderliness of p’s implying q’s. The discrepancy between our experience of ourselves and our idealizations of knowledge has an effect: It intimidates us, it lessens the sense of our own competence, and it leads us into counterproductive strategies for learning and thinking.¹
– Seymour Papert

People are sentient and we know that we are sentient. We are also social creatures. The human mind is aware of ‘agency’, in both itself and others. Since the beginning of recorded history, and probably long before, we have even ascribed agency to objects and events in the natural world. Once we attain consciousness, it becomes powerful and efficient to reuse this mind machinery to understand the world around us in familiar terms. Mirror neurons in the human brain enable us to read or infer intention in others. They do not merely form patterns of thought – they reflect them.

Syntonic is a word sometimes found in music theory, but in psychology, syntonicity means having a strong emotional connection with the environment. It is understanding something through identification with it. It is achieved by putting oneself “in another’s shoes”, and it is key to human learning. One form of this is imitation, and children do this all the time, with everything from trees and animals to teapots and airplanes. Another form is metaphor, where an established understanding is substituted for a new and unfamiliar thing. See Ancient Metaphors for examples from the IT world.

When we mature, many of us discover computer programming and would like to use the same built-in learning method that allowed us to develop ‘common sense’. However, most programming languages and their text books are so abstract, formal, and doctrinal, that it’s nigh-on impossible to get very far this way. As a result, computational thinking recedes off into the ivory tower, and the world is much worse off because of it.

This type of learning is well suited to therapeutic applications due to its natural, informal flow. Starting with the ‘hard wired’ facilities we all have, ‘bootstrapping’ (discussed below) is a very individual and non-doctrinal process.

An interesting and more in-depth exploration of syntonicity in programming languages was written by Stuart Watt.²

 

Forth words

I have found Forth to be a very syntonic language.

Syntax and structure are the first face that we see of a new language. Some are fairly natural (e.g. BASIC), most are verbose and intricate, and some are at the extreme end of mathematical formality (e.g. Haskell). Forth is positively Spartan by comparison, with the majority of keywords being three letters or less, and the ‘: … ;’ pair providing most of the structure and context. Some long time users of Forth do not even like its syntax and quickly override keywords (a trivial task in Forth), inventing their own to craft the language to be more in tune with their way of thinking. Ironically, this makes them love Forth more, not less. It is an extremely simple language. At its core, Forth is just a mechanism to reduce the cost of calling a subroutine to merely referring to it by name. But this is not what makes Forth syntonic.

“syntonicity is not directly a property of the syntax, or even the semantics or pragmatics of a language, but a property of the stories that we tell about it” (Watt p.5)

Forth is a stack-based, threaded, concatenative language with a tightly coupled interpreter and compiler. To explain these terms, and thus ‘tell a story of Forth’, we’ll use a metaphor:
Forth – a hiker (named ‘Arkady’ for convenience)
Stack – her backpack
Thread – the trail
Interpreter – her mind (neurology)
Compiler – her logbook

Notice that there is no clear distinction between traveler (Forth) and journey (program). Arkady’s journey is of more interest to her than is her destination. She is open to distraction, side-trips, and unexpected eventualities. Even mistakes are sometimes learning opportunities. This is the way of Forth – less focus on design and protocol, more on exploration, discovery, and emergence.

Life is not a problem to be solved, but a reality to be experienced.
– Soren Kierkegaard

While most languages are applicative (functions are applied to data), Forth is concatenative, which is a much more natural and emergent process. There are also few safeguards in Forth; the entire environment (machine) is wide open. This freedom is anathema to authorities of language design, which might partly explain why Forth-like languages are not more widespread. It’s much safer to clone an application from an existing template and/or framework than to invent a new one. Of course, the result is a copy, not an original. Incidentally, in much research funding, the outcome must almost be predicted along with careful metrics and timetables (ask anyone who has prepared a grant application). This squelches creativity and serendipity. It also puts a premium on positive results over negative (and perhaps greatly informative) ones. In fairness, just so we don’t make the mistake of assuming that everyone agrees that doctrine is a bad thing, there has been a large and successful effort to come up with a more standardized, ANS Forth.

Her backpack (the stack) is a readily available, last in, first out (LIFO) pile of items that she adds or removes as required. As a good hiker, Arkady is always aware of what’s in her backpack. She keeps often-used items (tools, map, compass) near the top. Longer term necessities (food, tent) are towards the bottom.

She walks along the trail (thread), step-over-step. Some steps are short and obvious, like avoiding big rocks and snakes. Some are more complex and subtle, such as crossing streams and staying downwind of bears. Many are actually composites of smaller steps. Some require more items from the backpack than others. At each step, she has the same backpack, although the exact contents may vary. She may sometimes just take the top few items, drop the pack, and head off down an interesting side trail. This is how a Forth program is built up. New ‘words’ are written to accomplish tasks. These words are then threaded together as higher level words invoke a series of them. Eventually, a single, highest level word is the starting point for the whole program, which is just a chain of subroutine calls.

Using all of her neurology, from senses to brain to common sense, logic, and rationality, she ‘interprets’ her world. She learns new facts and skills as she walks, gradually ‘bootstrapping’ a deeper understanding of her environment and more powerful and efficient use of resources (food, energy, time). To learn if and how something works, she prods it and observes the results. If she finds an unfamiliar mineral, she could bring whatever tools she is carrying to bear. Or, she could invent an entirely new tool. She could craft a crude microscope from the magnifying lenses and rolled up map in her backpack. If she has time, a mass spectrometer may be suitable. In Forth, quick tests and trials are inexpensive and easy. There is no odious edit-compile-run loop to get in the way. For example, to find what OVER does, put a few numbers on the stack, type OVER, and examine the stack to see the result. Stumbling around with her nose in manuals and books would perhaps cause Arkady to miss a fossil or patch of berries. It is also a good way for her to become lunch for a mountain lion.

A word about bootstrapping. Sometimes, when a skill is applied to produce a result, new knowledge (or a new tool) is gained in the process. This new knowledge opens the door to skill-set improvement or refinement, which enables hitherto impractical or unseen possibilities. In turn, even more new knowledge is obtainable, and the process repeats. The result is flint knife to bow and arrow to alchemy to chemistry to electronics to spaceflight. Bootstrapping is the essence of Forth. Sadly, multitasking, object-orientation, dissociation and data-hiding, and that ultimate chestnut, ‘leveraging’ are all much more in vogue today. Multitasking in human thinking is greatly overrated. Deeper, syntonic thinking enables more creativity and innovation. If Forth was more widely used and understood, you might well be reading this on Mars right now. If it had been invented earlier, you might be reading this on Triton.

From time to time, Arkady considers new observations, knowledge, thoughts, and ‘steps’ to be well-established and important enough to jot down in her logbook. This log serves as a permanent record of all she has learned on her journey. It is in fact, a purified, corrected, ‘frozen concentrate’ of her trail.

Arkady eventually arrives at the end of her journey. It may have been cut short for various reasons or maybe her destination is different (maybe even better) than she originally intended. This is a function of her curiosity as much as weather or circumstance. In any case, she still has her logbook, for her or others to use as a future guide (be they human or machine).

Some would say that it’s wrong to argue for Forth going forward. After all, it’s an old language, and was originally created for control of machinery in an era of sparse computational resources. As programs and systems grow ever-more complex, capable, and intelligent, such a language has outlived its usefulness. However, I must disagree. The future is not just about frameworks, big data, and augmented reality. It will be at least as important to build new, ad hoc, ‘micro’ systems rapidly and locally in a time of dizzying acceleration of technology. Creating, testing, and problem solving starting from first principles will always be valuable.

Understanding the world requires thinking in new languages. Forth is to computer science what math is to physics. Computational thinking, syntonicity, learning-by-doing*, and good old human common sense are not headed for the dust bin of history any time soon. Here are some further thoughts on learning.

 

Greek Pattern 1

 

 

* I am, however, perhaps not a very good constructionist, try as I might.
I once tried (unsuccessfully) to acquire a minor Logo implementation.
I believe in learning-by-doing something else !  A wide, diverse search is
often the most efficient (just ask the ants).

(1) Papert, S. (1980). Mindstorms: Children, Computers, and Powerful Ideas. New York: Basic Books
(2) Watt, S. (1998). Syntonicity and the psychology of programming – Psychology of Programming Interest Group 10th Annual Workshop.

Microsoft, Minecraft, and STEM

Microsoft recently bought Mojang AB, the Swedish company that makes Minecraft, for a reported $2.5 billion. It was not Microsoft’s first attempt to woo Mojang, and many thought they would never be able to close the deal.

In 2009, Markus Persson (‘Notch’), an unknown independent Swedish game developer, released the first version of his creation, Minecraft. It was not a normal ‘game’. It had no defined sequence, no milestones or levels of achievement, and most curiously, no end goal. What it did have was a charming, simplistic world in which a player could ‘mine’ and ‘craft’ for hours (or days) (or weeks) according to their own desires. In fact, the game could be played without any other mobile agents (‘mobs’) at all, leaving an entire world to explore and terraform with no limits. In 2010, maps became truly infinite, growing automatically as the player’s avatar (‘Steve’) approached an edge. The fact that no one else ever has or ever will live in, or even see, your privately created world gives one a compelling, almost haunting feeling.

It reminds me of the 1967 Star Trek episode “Arena”. Captain Kirk is locked in mortal combat with a frightening alien creature on a deserted and barren world. He must find or craft weapons from whatever materials he can find. He finally succeeds by assembling the raw materials for a crude cannon. We have all imagined ourselves cast back to a more primitive environment, where our own imagination and gumption are nearly all we have at our disposal. Interestingly, the goal of many advanced Minecraft players is to populate their world with coffee shops, restaurants, and villages.

Over time, Minecraft has expanded to include many characters, tools, and landscape features, but it has always maintained its minimalist look and feel. That’s the secret to its success – this is a world that is understandable to everyone, from children right through to seniors who grew up before the computer age. While the richness and physics of this world have evolved, the quaint, blocky look of it hasn’t.

The game has since sold many millions of copies, inspired LEGO sets, books, films, and has a huge and active fan base on YouTube. Conventions are held regularly, and Notch achieved rock star status years ago. Minecraft is the very definition of viral Internet success, massively disrupting traditional corporate and marketing models. Without shrink wrap or advertisements, it took over the gaming world.

minecraft block

 

So, many folks were left scratching their heads over this Microsoft acquisition. On the surface (pardon the pun), it seems like an unlikely fit. However, I don’t think that at all. I see it as the happy marriage announcement of two dear old friends.

Around the turn of the millennium, I was a corporate trainer, with MCT & MCSD certifications (the ‘M’ is for Microsoft). I often found myself sticking up for Microsoft amidst the disdain of my colleagues. I would use Bill Gates’ early years as an example of out-of-the-box thinking, like the Tandy Model 100, the first true notebook, and the last machine that he programmed personally. The best Christmas present I ever got was DOS 3.0, and QuickBASIC was one of the best languages I ever used (and I’ve used 50 or more). Maybe Apple and others were more stylish, but it was Microsoft that really put the excitement into personal computing.

Microsoft hopes to gain leverage in the mobile and youth markets. I cannot think of any better vehicle than Minecraft. Far from seeing it as the death knell for Minecraft, I see Microsoft’s acquisition as a renaissance and a real chance for positive, imaginative, and compelling games to get the much larger piece of the pie that they deserve.

“If you talk about STEM education, the best way to introduce anyone to STEM
or get their curiosity going on, it’s Minecraft”

– Microsoft CEO Satya Nadella

Also, there’s Microsoft’s augmented reality headset – HoloLens. There appears to be a plan coming together:
Minecraft + HoloLens + ElementaryProgrammingSkills = Syntonic Learning

If this is what Microsoft has in mind, it could be the most disruptive technology yet.
Well done Redmond, and best wishes to Notch in all his future endeavors.

 

Forth words

 

Morse Code and Minecraft

Several clever machinations have been implemented for the game Minecraft. These often include circuits and devices that mimic their real-world counterparts. They even include complete calculators and computer sub-systems (eg ECC memory and ALUs). Perhaps one of the more compelling inventions is the addition of Morse code operations. There are numerous implementations, all of which are interesting and a few are excellent.

I have a particular fondness for Morse code. See “Morse Code and Me”.

 

Telegraph Poles

Often in the 18th and 19th centuries, ‘semaphores’ or codes were played with in an attempt to communicate over longer distances than the human voice could carry. With the rapid development of electricity and magnetism theory and practice in the early 1800s, the time was ripe for the telegraph. In 1837, Samuel Morse et al demonstrated a working telegraph setup in America (there were earlier versions in Europe). The principle was that codes tapped on a mechanical key would be converted to electrical signals, then sent along a wire to another key at the other end which would receive (repeat) the code. Since this transmission happened at almost the speed of light, communication at a distance became essentially instantaneous. Later refinements to and extensions of this principle led to the telephone, radio, television, and of course the Internet.

Why is Morse a good fit for Minecraft ? Basically, it is in keeping with Minecraft’s quaint and minimalist nature. Crafting rudimentary equipment and stringing telegraph wires matches this game (it’s simple and fun). Minecraft already has support for elementary circuits and power via “Redstone”. Morse code is at home in a rustic world of dirt, stone, and wood. You can’t get much more binary and ‘blocky’ than a string of dots and dashes. In contrast, popup chat windows are harshly anachronistic. Telegraphy also fits in well with Minecraft’s ‘bootstrapping’ model; you don’t absolutely require it, but it speeds gameplay and opens up new possibilities once the technology is achieved.

Educational use of Minecraft benefits greatly from this bootstrapping model. Finding, crafting, and mastering tools and gadgets, and thus learning as you go is half the story. Exploring endlessly rich and surprising 3D worlds is the other half.

Also, learning a language is never a bad thing, and Morse code is one of the simplest ‘languages’ there is. Telegraphy is laden with historical significance, another opportunity for learning.

What are the possible uses for telegraphy within Minecraft ? First, as I said, it’s a more primitive alternative to text chat windows in multi-player modes. Next, it would enable the transfer of information across distance, for example maybe a crude sort of ‘fax machine’ for maps, books, signs, etc. Next, automated beacons could be built, perhaps they might even show up on maps. Next, remote control of processes and apparatus would extend the player’s reach. Next, short messages could be written right into the landscape (for example dirt for dots and stone for dashes). How about time capsules or ‘notes to self’ ?

So, Morse code would fit very well into the Minecraft world and mindset, with many novel and fun uses. The educational benefits of this addition would be welcome and easily realized.

MC Morse

Morse Code Therapy

Some years ago I had speech therapy for dysarthria. The therapy consisted mainly of breathing and vocal exercises, aimed at strengthening and enhancing the many components of physiology involved in speech. It was very successful and the professionals who helped me have my eternal gratitude. Along the way, I noticed that I was having some small trouble with initiating speech. Although a thought would form quickly and lucidly in my mind, actually triggering the vocal machinery to convert it into spoken words was sometimes problematic. It was like using a computer with a slow, damaged printer as the output device. Having been a computer designer and programmer for many years, it seemed to me that what was needed was a second output device, perhaps even a full two-way communications channel.

It’s certainly nothing new for people to compensate for one shortcoming by drawing upon one or more other senses or faculties. For example, there is Braille for the visually impaired and sign language for the hearing impaired. Even for someone without any such disability, learning a new language has profound benefits.

“To have another language is to possess a second soul”
Charlemagne

If I could open such a second communications channel, I could link my mind to the outside world while bypassing speaking altogether. This would allow me to work on both problems, the dysarthria and the imperfect speech initiation, as two processes in parallel (my inner geek again). However, another spoken language would not help here, and sign language required another person for learning and practice. Additionally, I wanted to keep it in the audio realm because working on neural audiology would reinforce my other therapy. I needed something that was audio-based, flexible enough for real communication, and simple enough to learn quickly, perhaps even with automated help.

Back in high school, I had belonged to the amateur radio club, mainly due to my interest in electronics. We built circuits, from oscillators to amplifiers to modest radio transmitters and receivers. The really keen members of the club (which did not include me) went so far as to obtain their amateur radio license. One of the requirements for this was proficiency in Morse code, that dih-dah-dih beeping from a bygone era sometimes featured in movie plots from the Old West to air and sea.  Aha – I had found the answer.

morse eureka

I assembled a few resources – a Morse code chart, an inexpensive key, an audio oscillator and speaker, and even a few text snippets encoded as Morse audio files from the Internet. Surprisingly, a bit of my old familiarity with Morse had stayed with me across the years. I keyed a few short phrases and found to my great joy that there was no delay or difficulty in initiating them. It also provided good fine motor control exercise for my right hand – another therapy which I needed but had not taken up as yet. I quickly improved at both writing and reading Morse, and soon began tapping out thoughts even if a pencil or fork was all I had available.

After a few weeks, I noticed a marked improvement in my speech initiation too, although I cannot say for sure whether this was the result of Morse practice or normal therapy and recovery. I like to think it was a combination of both. It could also be that any kind of learning, even just passive reading, is beneficial during this type of recovery.

The biggest surprise is the one that comes with any new comprehension of previously unknown words or language. Now, whenever I hear some innocuous Morse in the background of a film, I read it without even trying; usually it’s meaningful, but occasionally, it’s just gibberish !

 

Adaptive

 

“I see no reason why intelligence may not be transmitted instantaneously by electricity”
– Samuel Morse

We sometimes give ourselves too much credit for all that’s new and shiny. Staying with telegraphy, here’s a prediction of cell phones (in regards to Marconi’s “Syntonic Wireless Telegraphy”) from 1901!

 

 

I found a few other tools helpful in the course of my rehabilitation. The concept of ‘syntonicity’ was important, that is, the idea that learning is a subjective, experiential process. I revived my old interest in the Forth programming language, as well as Minecraft and similar exploration & strategy games.