Posted by Elecia White.
Humans are fantastic model makers.
I don’t mean those painstaking models where you cut and join until the results look like the box (though Chris did a great job on the metal Falcon). I mean the mental models we make for how things around us will occur. Experience tells me that if I throw a ball up, it will come down. On the other hand, my mental model of mechanics tells me that if I could throw the ball five miles per second, it would go into orbit around the earth (until it hits something, like air molecules).
On embedded.fm’s episode 97, we spoke to Dr. Paul Fishwick, Distinguished University Chair of Arts & Technology and Professor of Computer Science at the University of Texas at Dallas about models and analogies, particularly about their place in education and art.
In his Creative Automata course, Professor Fishwick has students represent time series data (e. g. weather information) with LEDs, motors, and piezo buzzers. They model the data by translating it from the numerical domain to another, more tactile domain. This makes a lot of sense given his philosophy:
“We experience the world through our senses so it is only natural, only human, to want to understand everything through some sort of mechanical analogy. We may document all of our science knowledge in equation form. But we crave that which we experience.” [18:45]
I liked this idea. Chris called it formalized synesthesia; this twisting of how we look at a problem gives us a different way to think about it. I didn’t realize before we spoke to Dr. Fishwick that I’d been working on a model of sorts. I have a project over at Hackaday called North Star.
Some people find inertial sensors confusing. They work like magic, measuring unseen forces. Of course, accelerometers measure accelerations. I dare you to tell someone that and not have one of you feel like an idiot. The eye-glazing should be well on its way by the time you get to magnetometers and how they measure magnetic force.
I wanted a gadget that I could use to explain the differences between accelerometers, gyroscopes (angular rate sensors), and magnetometers. I hooked these up to an Arduino, a smart LED, and a button.
In accelerometer mode, the system shows 1G of X acceleration as red light, Y as green, Z as blue. Mostly it shows how the largest component of acceleration is gravity. Sure, when I move or vibrate the device, it changes a little. But accelerometers mostly measure gravity. And taps (tapping the device emits a spark of mostly white light, taps are neat).
In gyro mode (button presses move between modes), the LED is off when the system is motionless. Gyros are boring unless they are moving. Rolling or turning the device shows the same colors (XYZ -> RGB) with the intensity proportional to speed. Gyros are great for measuring change.
In magnetometer mode, the light is white if you are pointed north, green if east, red for west and off for south. It lights your way north (hence the project name: North Star). In most systems, magnetometers are used to orient the device to the real world.
The ability to see how the sensors differ is important to explaining which one someone needs for a product. Sure, there is more to it: how these sensors work together is amazing but I can’t get there until the basics are well-understood.
Understanding comes in different forms. Good models can help people understand systems, beyond the numerical representations we are accustomed to. With the right model, it is possible to gain intuition without needing to learn the equations (because, sadly, it is all too easy to know the equations without having any intuition about what they mean).
Models are excellent for demonstrating a concept to someone who doesn’t know the idea. However, they go far beyond that in a classroom setting. For a student to create a good demonstration model, they need to understand the subject. The act of creating the model will sneakily help them gain a much deeper grasp of the subject. Teaching is a way of learning.
I like this idea. I can’t say I learned much making my North Star project. On the other hand, if I had never worked with inertial sensors, it would have been illuminating. It wasn’t a difficult build (especially as I used the Adafruit 9 degrees-of-freedom module and their excellent orientation code). So the temptation to suggest this as a school project is high. It lets coding be a tool to get somewhere more interesting.
Who needs to write, say, a linked list implementation when you can make physical models of problems that surround us? I agreed when Dr. Fishwick when he said that project-based education encourages a thirst for learning. Such projects may be more work but, hopefully, it is more engaging, possibly even fun.
Of course, software engineers need to learn the standard algorithms and tools. But letting that information be earned through self-driven (ideally curiosity-driven) projects makes it far more valuable to the student.
Such project based CS education develops many skills beyond the core requirements: modelling, teaching, information presentation, etc. It also allows for different learning styles and more personal expression. Students can creatively explore their own representations of concepts.
Creativity is another huge advantage for project based learning. Professor Fishwick spoke of students creating art projects out of computer science algorithms and mathematical concepts. At the end of the course, the students demonstrated the projects in a gallery setting, inviting the public to see the beautiful results (tricking them into looking at CS and math models! Ha!).
I know that science, technology, engineering, and mathematical (STEM) careers do not lack creativity. Engineers are not robots, seriously focused on our slide rules and pocket protectors. Inside the career, we know our jobs are fascinating but outside it, there is often a different stereotype. We can show the public (and reminding ourselves) that there is true art in an algorithm (or code or equation).
In a tangent, we spoke to Professor Fishwick about his recent trip to Mountain View, California where he saw the Computer History Museum’s Babbage Difference Engine. The motion of the device is an excellent example of the mesmerizing poetry in calculation algorithms (video).
I don’t think my North Star model is art. The device adds a visual and tactile way to look at inertial sensors. It is a demonstration tool for teaching, possibly for learning if someone else wants to build it. But I’m strangely pleased that it is pretty to look at.
Models also have a place beyond education; they can be used for actual discovery. When I was in college, I was inadvertently part of such a discovery. I had a part-time job working on a chemical database (Fortran on a Vax). The system was used to predict the way complex chemicals interact based on their hydrophobicity and folding. My job was to do code clean up and essentially babysit the code for the chemists who used it.
One day, I was going through the code, trying to understand it and trying to simplify it. I noticed that two cases in a state machine could be made equivalent with very little effort. I could optimize this piece and get rid of a whole section of if-statements. (I love deleting code.)
I was cognizant that I didn’t comprehend the code and not confident in making the change. The chemist had put a lot of thought into the algorithms and I wasn’t willing to slash and burn without supervision. I brought it up in my weekly meet-with-the-scientist status update. I explained how the code was structured and how I wanted to reduce some redundancy in the code to make it easier to maintain. I thought his response was strange: he seemed annoyed. I figured I’d done something wrong so I didn’t dwell on the change. I said I’d leave it and go on; we’d talk in a week.
At our next meeting, he’d regained his good cheer and asked if I wanted to write a paper about my discovery. (Err, no, I was a senior in college, I did not want to sign up for anything that didn’t involve graduating.) Also, it wasn’t a discovery, I was just optimizing code. But the code was a model for how the molecules worked. By optimizing the code, I was making a chemical discovery (though not one I ever understood).
I’m glad we spoke to Professor Fishwick, he reminded me that changing how we look at problems is an excellent path toward solving them.
The North Star project uses: