Transcription

Tangible Programming Bricks:An approach to making programming accessible to everyonebyTimothy Scott McNerneyB.S. Music and Computer Science, June 1983Union College, Schenectady, NYSubmitted to the Program in Media Arts and Sciences,School of Architecture and Planning,in partial fulfillment of the requirements for the degree ofMASTER OF SCIENCE IN MEDIA ARTS AND SCIENCESat theMassachusetts Institute of TechnologyFebruary, 2000 Massachusetts Institute of Technology, 1999. All rights reserved.Author . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Program in Media Arts and SciencesOctober 29, 1999Certified by . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Fred MartinResearch ScientistThesis SupervisorAccepted by . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Steven A. BentonChair, Departmental Commitee on Graduate StudiesProgram in Media Arts and Sciences

Tangible Programming Bricks:An approach to making programming accessible to everyonebyTimothy Scott McNerneySubmitted to the Program in Media Arts and Sciences,School of Architecture and Planning,in partial fulfillment of the requirements for the degree ofMASTER OF SCIENCE IN MEDIA ARTS AND SCIENCESat theMassachusetts Institute of TechnologyAbstractThanks to inexpensive microprocessors, consumer electronics are getting more powerful. They offer us greater control over our environment, but in a sense they are gettingtoo powerful for their own good. A programmable thermostat can make my home morecomfortable and save energy, but only if I successfully program it to match my life-style.Graphical, direct manipulation user interfaces are step in the direction of making deviceseasier to program, but it is still easier to manipulate physical objects in the real worldthan it is to interact with virtual objects “inside” a computer display. Tangible, or graspable user interfaces help bridge the gap between the virtual world and the physicalworld by allowing us to manipulate digital information directly with our hands. Tangible Programming Bricks are physical building blocks for constructing simple programs.In this thesis I provide technical details of the Bricks themselves, demonstrate that theyare useful for controlling a variety of digital “everyday objects,” from toy cars to kitchenappliances, and set the stage for future research that will more rigorously support myhypothesis that tangible programming is easier to understand, remember, explain to others, and perform in social settings, when compared to traditional programming mechanisms.Thesis Advisor: Fred Martin, Research Scientist

Tangible Programming Bricks:An approach to making programming accessible to everyonebyTimothy Scott McNerneyThesis CommitteeThesis Advisor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Fred MartinResearch ScientistMIT Media LaboratoryThesis Reader . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Hal AbelsonClass of 1922 Professor of Electrical Engineering and Computer ScienceMIT Laboratory for Computer ScienceThesis Reader . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Hiroshi IshiiAssociate Professor of Media Arts and SciencesFukutake Career Development ChairMIT Media LaboratoryThesis Reader . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Mitchel ResnickLego Papert Associate Professor of Media Arts and SciencesMIT Media Laboratory

AcknowledgementsIt’s hard to know where to begin and where to end when it comes to acknowledgements.This project couldn’t have been done without the support of my friends and colleaguesat the MIT Media Lab, the insightful suggestions from my advisor and readers, and thegenerosity of LEGO, who manufactured the indispensible plastic casings that made theTangible Programming Brick possible. Last-but-not-least, I offer a special acknowledgment to my wife Eve, who gave birth to our beautiful twins, Miriam and Noah, right inthe middle of my efforts to finish this thesis.My advisorFred MartinThesis ReadersHal Abelson, Mitch Resnick, and Hiroshi IshiiMIT Media LabRick Borovoy, Rich Fletcher, Neil Gershenfeld, Chris Hancock, Jofish Kaye, BernardKrischer, Bakhtiar Mikhak, Maggie Orth, Rehmi Post, Matt Reynolds, Brian Silverman,Carolyn Stoeber, and Brygg UllmerLEGOErik Hansen, Camilla Holten, Torben Svingholm Jensen, and Gregg LandryDragon SystemsJonathan YoungMy WifeEve Leeman4

Table of ContentsChapter 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 91.1The promise of programming “for the rest of us”91.1.1Programming is not just for professionals101.1.2Kids as programmers111.1.3User interfaces of digital “everyday objects”121.1.4Information appliances131.2Overview131.3Organization of this document15Chapter 2. Motivation and Context . . . . . . . . . . . . . 162.1Scope: What is programming?162.2What is tangible programming?172.3Why tangible programming?172.42.3.1Collaborative Programming182.3.2Gender differences192.3.3Debugging192.3.4Limitations of “visual” programming languages19Related Work202.4.1Tangible User Interfaces212.4.2Direct Manipulation User Interfaces212.4.3Visual Programming Languages222.4.4Logo and its descendants232.4.5TORTIS button box and slot machine232.4.6Logo Blocks242.4.7LEGO Mindstorms255

2.52.62.4.8Other languages for children262.4.9Ubiquitous computing27Hardware History272.5.1Programmable Bricks282.5.2The Handy Board282.5.3Crickets and Thinking Tags292.5.4Tiles30Setting the stage312.6.1The tangible programming challenge312.6.2Magnetic Programming Kit and ammable toy trains332.7Tangible Syntax342.8Programming Styles362.8.1Imperative programming362.8.2Functional programming362.8.3Rule-based programming372.8.4Behavior mixing with priorities382.8.5Database queries38Chapter 3. The Implementation . . . . . . . . . . . . . . . . 403.1The Tangible Programming Brick Hardware403.1.1The early 4x2 design403.1.2The 6x2 Brick design423.1.3The Cards443.1.4The Evolution of Intra-Stack Communication466

3.23.3The Tangible Programming Brick Software473.2.1Firmware473.2.2Application code48The Tangible Programming Brick Demonstrations493.3.1Dance Craze Buggies493.3.2Kitchen appliances503.3.3Toy trains (revisited)50Chapter 4. Discussion . . . . . . . . . . . . . . . . . . . . . . . . . 524.1Design Issues524.1.1Communication g and power: To multiplex or not?544.1.5Optical issues544.2A Design Critique554.3User testing55Chapter 5. Future Work & Conclusion . . . . . . . . . . . 575.15.2The near term575.1.1Formal user testing575.1.2Expanding beyond linear stacks575.1.3Issues of size and shape57Alternate implementation mechanisms585.2.1Bar Codes585.2.2RFID tags595.2.3Specialized work surfaces595.2.4Reusable/Re-printable blocks607

5.35.4Applications615.3.1Music synthesizers615.3.2Robotic vehicles and “spatial” programming615.3.3Tangible interfaces for the visually impaired62Conclusion63Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65Appendix A. Schematics and Drawings . . . . . . . . . 69A.1Schematics69A.1.16x2 Brick – Top board69A.1.26x2 Brick – Bottom Board70A.1.3IR/Bus Card70A.1.4EEPROM Card71A.1.5Display Card71A.2Engineering Drawings for LEGO Plastic Casing71A.3Proof Drawings faxed back to me by LEGO75Appendix B.Software . . . . . . . . . . . . . . . . . . . . . . . . . 76B.1Kitchen Brick (Logo)76B.2Microwave oven controller (Logo)77B.3Device Driver for Timekeeper bus device (Logo)80B.4Cricket Logo interpreter/OS firmware (Assembly)828

Chapter 1 — IntroductionI began to see how children who had learned to program computers coulduse very concrete computer models to think about thinking and to learnabout learning and in doing so, enhance their power as psychologists andas epistemologists. For example, many children are held back in theirlearning because they have a model of learning in which you have either“got it” or “got it wrong.” But when you learn to program a computer youalmost never get it right the first time. Learning to be a master programmer is learning to become highly skilled at isolating and correcting“bugs,” the parts that keep the program from working. The question to askabout the program is not whether it is right or wrong, but if it is fixable. Ifthis way of looking at intellectual products were generalized to how thelarger culture thinks about knowledge acquisition, we all might be less intimidated by our fears of “being wrong.” This potential influence of thecomputer on changing our notion of a black and white version of our successes and failures is an example of using the computer as an “object-tothink-with.” [38, p.23]Seymour Papert, Mindstorms1.1The promise of programming “for the rest of us”If a machine is to serve one very specialized role, such as providing mechanicalpower, it ought to be hidden and of no concern. But if the purpose of the machine isflexibility and personal adaptibility, we had better figure out how to give users maximum control. Expressive power and nuance are incompatible with invisibility andinaccessibility. [9]Graphical User Interfaces (GUIs) designed for programming are still in their infancy, somost professional programmers use text-based programming languages and editingtools for their work. For the novice programmer, text-based languages can be daunting,fortunately visual programming languages “for the rest of us” have enjoyed some success.1 The premise of this thesis is that constructing and modifying programs using eventhe most modern GUIs is an unnecessary obstacle to programming. We can do better.1. In some ways, “visual” is a misnomer, especially given that, when Microsoft says “visual” theyreally mean textual augmented with a direct manipulation GUI builder. Perhaps “graphical” is abetter term.

When experts in human-computer interaction (HCI) say “direct manipulation” whatthey really mean is indirect manipulation using a mouse and keyboard to control “cursors” which act as our proxies. To the rescue comes the emerging field of tangible userinterfaces where virtual objects inside computers are represented by physical “manipulatives” in the real world. To the lay person, the most elusive of virtual objects are programs themselves, the invisible building blocks that makes all computers function. It ismy goal to de-mystify the art of programming by making programs as tangible as a stackof LEGO bricks.1.1.1Programming is not just for professionalsProgramming in the broad sense is no longer a task relegated solely to professional programmers. Accountants use electronic spreadsheets to build business models. Musiciansprogram their MIDI synthesizers to accompany them in performance. And a host of consumer electronics demand rudimentary programming skills from the general public:VCRs, microwave ovens, bread makers, thermostats, and cameras, just to name a few. Itis in these consumer products that existing user interface technology shows its greatestweaknesses. VCRplus was successfully introduced in the U.S.1 after studies showedthat even intelligent, well-educated people found it frustrating to program their VCR torecord their favorite TV shows, preferring instead to type a single multi-digit numberlisted in their newspaper that encodes the program’s time, duration, day of the week,and channel. But this approach gets the job done at the expense of taking creative controlaway from the consumer. “One touch cooking” might do a great job at baking a potato,but what about creating my own recipes?1. G-code in Japan.10

Inventors Workshop at San Jose Tech Museum1.1.2Kids as programmersWhen computers were first introduced into schools, what we now call “computer literacy” often meant learning how to program “turtles” using the Logo programming language [38]. Nowadays, learning computer literacy is more likely to mean learning to usecanned programs like word processors, paint programs, and educational computergames. Less and less computer science is taught to school children.1 My goal is to reversethis trend by making programming a hands-on activity and by making it enjoyable to lit1. Though I am delighted to see that Brian Harvey’s Computer Science Logo Style [19] is back in print.11

erally “toy around with” fundamental concepts of computer science in a playful environment.Fortunately, today we can still find children programming in Logo. In addition toinstructing virtual turtles to draw geometric shapes on a computer screen, kids can program whole colonies of virtual termites [44], give behavior to toy robots, and build science experiments. These programs, written by children using, for example the LEGOControl Lab, do not take anywhere near full advantage of the potential of the computer,and, like the early days of Logo, these projects require supervision and guidance fromteachers and mentors. Logo’s syntax is partly to blame, but it is my claim that the mainproblem is that the mechanics of building, fixing, and downloading programs are necessarily complicated by even the best screen-based software construction tools. In this thesis I tackle this problem in particular, and hope to inspire researchers to go one stepfurther by developing programmable toys which encourage children to modularize,abstract, and reuse the software components they build.1.1.3User interfaces of digital “everyday objects”The comprehensibility of user interfaces in household appliances and handheld ele