Behind the Scenes of TI Codes
This is a saga of a (nearly) career-long passion to promote computer programming in school. First, some history. ...
I always found mathematics “easy” because it made sense and decided to become a mathematics teacher in high school because I could explain things to classmates better than the teacher. I had no computer programming experience going into teaching high school mathematics in 1970. Some students in my classes were bringing in long sheets of paper with computer printouts and I was intrigued with what I saw, so I dipped my toe into the computer world using acoustic modems, paper tapes and decks of cards with holes punched in them, noisy teletype machines, time-sharing systems, minicomputers and mainframes. I found the strict structure and logic demands of programming really satisfying. I took some programming courses at a local college with a desire to learn more about programming. Before long, I took over the responsibility of running our school’s educational computer system, an HP2000 minicomputer with 32 CRT terminals in the early 1980s. The district quickly jumped on the personal computer bandwagon with Radio Shack TRS-80s and then IBM PC Juniors. I bought my own computer in 1984 — an Atari 800 — and used a cassette recorder for storing programs, and the passion kept me up very late many nights. The disc drive cost as much as the computer, and each 5¼" floppy disk held about 88 KB. Life was good.
In the beginning
I was coaxed into attending a summer workshop in June 1991. CalcNet was hosted by Greg Foley, Ph.D., at Sam Houston State University in Huntsville, Texas, with about 40 other teachers from all around the U.S. It was my first exposure to a graphing calculator. We were provided several graphing calculators, but almost everyone preferred the TI-81 for the calculus topics over the two weeks. The instructors were Foley, Frank Demana, Ph.D., Bert Waits, Ph.D., and Tom Dick, Ph.D. I had no idea who these folks were, but the institute was life-changing, not just for me, but for everyone attending. Little did we know we were about to change the world of mathematics and science education. When I discovered that these calculators were easily programmable, I was hooked (along with many others). That September, I got my first classroom set of TI-81s and eagerly put them to work in my AP® Calculus class.
The following summer, I worked as a “counselor” (gofer) for some of the Demana-Waits summer workshops. I also got hooked on presenting at conferences such as AMTNJ, PCTM, AMTNYS, NCTM, and The Ohio State University/TI-sponsored national and regional conferences (it was not called T³™ yet). I was invited to become an instructor for some of the following year’s summer workshops.
The mission
Over the years, one of my still-favorite conference presentations is called “The Power in the Palm of Your Hand” and addresses the programming capabilities of the TI graphing calculators (TI‑81, TI‑82, TI‑83, TI‑84, TI‑85, TI‑86, TI‑89, TI‑92, and, eventually, the TI‑Nspire™ handheld). The core programming languages they use are similar and are now referred to collectively as TI‑Basic.
My mission was, and still is, to promote calculator programming both as a tool for understanding and exploring mathematics and science and as the focus of instruction itself. Many schools had classroom sets of calculators but no computer labs for teaching programming, so the calculator became their platform for teaching and learning programming. My relationship with the TI Education Technology development teams (even as far back as 1991, but that’s another story) gave me an inside track on new features and products.
Birth of a concept
After about 25 years of hearing and seeing me preach the value of calculator programming and realizing the attraction of “coding” in the online communities, Texas Instruments Education Technology got the message (remember “Teachers Talk, TI Listens”?). I was charged with developing “10 Minutes of Code,” a set of short, easy lessons that teachers could use as extensions to their mathematics and science curricula. And so, TI Codes was born in 2015. Using TI-Basic, I wrote the general programming and then the TI-Innovator™ Hub and Rover lessons for both the TI‑Nspire™ CX and the TI‑84 Plus CE graphing calculators. The activities are based on my 40 years of teaching and promoting computer programming using BASIC (in its many flavors), COBOL, Pascal, C++, and Java and studying Pl/1, and a bit of Assembly.
The dual presentation modes of the TI Codes materials (online slideshows and offline documents) are available thanks to TI’s web team. I wrote the lessons and TIers created the online UI. The format gives teachers a lot of flexibility in the manner of instructional delivery. The fact that all these materials (and much, much more) are freely available is a measure of Texas Instruments’ commitment to providing high-quality classroom materials. Did I say for free? What are you waiting for?
Along comes Python
About two years ago I was presented with the challenge to learn Python, which was by then a well-established (from the 1980s) programming language of which I knew nothing. But it was a brand new tool being added to the TI‑Nspire™ CX II and the TI‑84 Plus CE graphing calculators. I found that it was easy to acquire enough skill in the extremely versatile language to be able to deliver useful instructional content while helping the development teams by providing feedback on features, functionality and bugs. The teams created custom Editors and runtime Shells for Python independently but cooperatively for the TI‑Nspire™ CX II and TI‑84 Plus CE Python platforms and updated the computer software to match and assist in Python file management and movement among platforms. Under the hood are special, customized third-party Python implementations: MicroPython on the TI‑Nspire™ CX II graphing calculator and CircuitPython on the TI‑84 Plus CE Python. The smart developers also created custom Python modules and components that take advantage of the unique features of each device. Now TI Codes contains lessons in both TI-Basic and Python covering general programming topics and TI‑Innovator™ Hub and Rover for both the TI‑Nspire™ CX II and TI‑84 Plus CE platforms. In fact, the lessons for the TI‑84 Plus CE Python with TI‑Innovator™ Hub and Rover were just recently released. And we are not done yet — be sure to check back often to see what new content has been added since your last visit.
Throughout my relationship with TI, having access to prototype devices and early (pre-release) versions of the operating systems gave me experience with both the Python language and the TI-developed interfaces of the Python Editor and Shell and the accompanying Python utilities. (Tip: If you are ever given the opportunity to become a part of a TI Educator Feedback Team, jump on it! Not only will you be on the inside track to a new product, but you will also learn a great deal about the product development process, and you may just have your handprint in sculpting the outcome.)
Enough history; back to the future: Python on a graphing calculator. If you are new to the Python programming experience, it is best described as “simple and deep.” It is very easy to get your feet wet using the traditional procedural/functional approach — print(“Hello, World!”) — but Python also supports custom libraries and modules as well as object-oriented programming (OOP) which is utilized in some of the TI-developed modules such as ti_hub, turtle and microbit. Python uses common English keywords (print, for, if, while …) and relies on simple indentation to control program flow and structure. The TI developers facilitate the indentation rules with special “space symbols” that are easy to see and count. The modular nature of Python makes it a powerful and far-reaching platform for all sorts of software applications. By itself, the core language is light and fast, and you add components to your project as they are needed by importing the appropriate modules.
Python belongs in your classroom
Your students, whom you are preparing for a high-tech workplace, will be well-served to have some programming skills, especially in the hard sciences of mathematics, science and engineering but also in a wide variety of other careers.
Here are three short anecdotes from my family regarding programming:
- A young lady who barely graduated high school is now a paralegal for a law firm and is responsible for maintaining a database of the cases. She is often writing (coding) macros for the database to automate various tasks.
- A young man went to college and grad school majoring in art but, through a series of fortunate events, is now a software engineer for a large media company. Go figure.
- Another young man could not handle college, worked for years in retailing, then landed a position as a “Customer Solutions Engineer” with an IoT (internet of things) developer.
The TI-Nspire™ CX II and TI-84 Plus CE Python platforms mirror very closely the Python API (Application Program Interface). After over 30 years of graphing calculator experience (do the mathematics), I am eagerly anticipating the next generation of handheld classroom devices, and I am still looking forward to the continuing ride. Stay tuned for more exciting programming activities coming soon to a website near you. In fact, if you have not yet noticed, there are also Python activities under TI’s Math Nspired activities, Explorations with Coding.
I’ll wrap this up with a tech tip for those of you still reading (thanks!) and using both the TI‑Nspire™ CX II and TI-84 Plus CE Python graphing calculators: The programs are nearly 100% compatible. You don’t have to code the same program twice.
To port a Python program between the two devices, use the *.py file format on your computer.
- To go from TI-Nspire™ CX II to a TI-84 Plus CE Python graphing calculator: In your TI‑Nspire™ computer software, select your entire program (ctrl-A ctrl-C) and paste it into any computer text editor (I use the free Python IDLE development platform). Save the text file as a *.py file. Then, in the TI Connect™ CE software application or TI‑SmartView™ CE emulator software, just drag the *.py file in. The emulator software wraps the code into a CE AppVar for you and makes the file available in the Python App (if it is stored in RAM).
- To go from a TI-84 Plus CE Python to TI‑Nspire™ CX II graphing calculator: In the TI Connect™ CE software application or TI‑SmartView™ CE emulator, right-click the file and select Send to Computer. Be sure to save the file as a *.py file. Once on the computer, open the file in your text editor, then select, copy, and paste it into a Python Editor page on your TI‑Nspire™ software.
About the author: Hanna is a retired teacher splitting time between sailing in New Jersey and mountain biking in Florida (did he get that backwards?), still getting kicks out of working with TI to provide feedback on new products and developing meaningful programming content for mathematics and science... and still having fun with all the graphing calculators and the accompanying toys.
AP® is a trademark registered by the College Board, which is not affiliated with, and does not endorse, TI products. Policies subject to change. Visit www.collegeboard.org.