I’m working on developing a programming workflow so that I can begin teaching programming to students. I’ve studied a lot of programming myself, and while I’ve never developed an ‘app’, I feel pretty confident in my ability to solve problems, especially those dealing with simple math operations, string manipulation, and basic logic.
When I learned programming it was always at the command line. We opened up pico or emacs, edited our code, saved, quit out of pico, compiled, and then ran. It was a simple workflow, and beyond including the standard libraries (in C/C++), there wasn’t much more to focus on than the actual program itself.
Fast forward a few years, and there I am with XCode installed on my MacBook, trying to follow along in an Integrated Development Environment. In XCode and Interface Builder, you can still work on your code (of course), but you also have to build window elements, and buttons, and there’s app delegates, and all sorts of different things to get confused by. Things get even more confusing when you realize that Apple is updated XCode almost constantly, and so not only is the language framework changing, but the development environment changes along with it. Apple updates things incessantly, constantly, and if you’re not right on top of that stuff, it can be very hard to follow along.
Sure, other languages and compilers and environments get updated. Python is in version 3 dot something now, but many people are still using 2 dot something. There are IDEs available with Python and there’s any number of modules and builds of Python. I don’t know exactly, but I’m sure this is the case with most languages and development platforms.
But, there’s no denying that at the command line, everything is simpler. If you’re developing simpler programs, then that’s probably the best thing to stick to. I eventually want to be able to whip up an iPad app in a weekend, but for demonstrating simple programming concepts to students, a simpler environment is going to be better each time.
I’ve decided upon Python as my direction for integrating programming into the math curriculum. Lots of people are using Python, and with languages, it’s wisest to go where there’s lots of support and documentation. Ruby is an option as well, but Python just seems more integrated to me.
So, in developing this workflow I’ve been experimenting with a bunch of different options. I was initially using TextWrangler and its own build window, but then I started needing the Terminal. I tried Coda, and a plug-in that I found that lets you build python right in the app. I tried doing it on the server where I host my websites, but they didn’t have very good support around python. I’ve tried Pythonista on the iPad, and Sublime Text 2 and its built in interpreter, as well as its terminal plug-in SublimeREPL.
There’s more traditional IDEs, like Eclipse, and NetBeans, and JetBrains. Of course, Python offers their own IDLE, but I found that to be fairly limited.
One of the things that has made this search slightly more difficult is my thought that I should figure out a way to have my students using PyLab. The truth of the matter is, we’re not really doing intensive stuff, it’s just that I want to have access to the various mathematics functions in those libraries. Plus, with matplotlib, I want them to be able to graph. Essentially, I’d like to replace the TI-83 altogether and have them using Python/PyLab instead.
I think it could work really well because Python runs live as well as through scripts. The live python could act as an in-the-moment calculator. You see the >>> prompt and you type in 100.4*6 and it spits out an answer, no programming knowledge necessary. Meanwhile, slowly, and awesomely we could start getting the computer to perform repeated operations for us, using programming. I want my students to walk out of the class knowing a new skill that can actually be used later for other things (Django anyone?). The TI-83 is a dead-end for students who see it as a tool only to be used in a math classroom, and even then they don’t know half of the features available.
Here’s the problem. Imagine, day one of class. “Class, I need everyone to come to the next class with PyLab installed on your machine.” Look, I’m pretty savvy with this stuff and I found it very tough to figure out how to install scipy, numpy, etc. You have to compile things on the command line, and it’s not easy.
It’s so difficult in fact that I wasn’t ever able to do it. If someone showed me how to do it, I could understand it, but even finding good tutorials is tough, and trust me, I looked. So, what’s the alternative? I found a few: The Enthought Python Distribution, SAGE, and the SciPy superpack. I found the EPD pretty easy to install, and everything you need is there. I haven’t played around with SAGE or the superpack yet.
Perhaps I could have my students install the EPD, and we’d all be happy. There’s one problem: not everyone has a computer, or wants to bring one to class everyday. Some students have iPads, and there should be a way to let them participate as well. Unfortunately, numpy/scipy/matplotlib isn’t yet available on the iPad (as far as I know). This makes me want to figure out a way to do this without using the scientific libraries.
There’s one more alternative that I recently read about. Fraser Speirs is attempting to do something similar, and what he’s done is set up a Linux server on the Amazon cloud services and have the students essentially SSH in. Cool. I would need to spend some time myself to get that all set up, and hopefully the server would support a full installation of PyLab, and I’m not sure if I could run the plotting software through that. Hmm. It may work with a little work, but if I want to get this started soon, I’m looking for the easiest solution first.
Right now, that’s going ahead without the scientific stuff and just using a plain vanilla Python. And it means going back to basics. I like Sublime Text 2, but students could find the text editor that works for them, BBEdit, TextWrangler, something on Windows. We’ll edit our code in the editor, and we’ll run it at the command line, just like how I learned. No IDEs, no fancy applications, just code and command line. For those on the iPad, Pythonista is the best option (it’s really nice).
I want to get more complex eventually, both for myself and my students. But, that might be a few years down the road. The first attempt has to be the simplest possible setup, so that any student can set it up and feel comfortable working with it from day one.