Coming Back Around to Racket/Scheme
In my previous posts that outlined some of the work done in coding and education, I did not mention Racket/WeScheme/Bootstrap World. It was not that I was unaware of the work. I watched this video many months ago. I was drawn to the video because “functional reactive programming” is in the title. This was something that caught my eye as I researched the Elm language. Toward the end of the video, Shriam talked about Scheme/Racket as the language of choice. I don’t know much about programming languages, but I do know that Lisp (Racket and Scheme are in the same family) is an old language. I surmised that they have to be out of date and irrelevant to the new programmer. Besides, who wants to deal with all of those parentheses. I was more interested in the value of functional reactive programming, and the video served to justify my choice in Elm for my capstone project.
As my project is coming to a close, I am spending more time thinking about what I have learned. I am not so confident in Elm’s ability to fulfill my needs. That is not to say Elm is a bad language. I find that learning HTML, CSS, and the JavaScript framework du jour to program for the Web is needlessly complex. In that regard, Elm is quite useful; it simplifies the whole process by needing only to write in Elm. This would be a great starting point for new programmers looking to code for the web. However, I am still getting used to functional programming. Some of the concepts I understand, others no so much. Then there are the signals. Signals are vital to Elm. Like functional programming, I only understand a few signals. Other signals are still out of reach, and this leaves my programs lacking functionality. As such, I could not use Elm as an effective teaching tool today. I should also state that Elm is a young language and I am still new to functional reactive programming. I will continue to learn, and I hope that Elm will develop better documentation and tutorials to help beginners such as myself.
Part of the problem is that I am approaching the language as an educator. When I look at the computers in the lab, I see twenty locked down machines. Fortunately, I have admin privileges and can install whatever I want on the machines. Not all labs are like this. Elm has a wonderful playground for new users. There is nothing to install. Any computer lab can access this site. Students can use the language at home or at school. There are no USB keys to lose or forget as students bring their work home and back to school. I found using the Try Elm site was a joy. There is no need to switch between text editor, the command line, and a browser showing the local host. While the playground is just a place to try out the language, I spent a majority of my time coding with it rather than the “official” text editor + elm-reactor in the terminal + browser method. I only moved away from Try Elm when I needed custom buttons and graphics. Sometimes I still use Try Elm and ignore the invalid image icons. For me, the best coding experience for using Elm is this site. However, the site is only for trying the language. You cannot save your work. You cannot share your work. Users are encouraged to code with the more cumbersome text editor and browser method. Having a website that allows you to code, save, and share is a useful tool. In some cases, it is a necessity when the computers are locked down. I would like to see Elm have these same features.
Another issue that I encountered with Elm is the documentation. To be fair, the documentation is quite good. There is a handy search feature to sort through how to do things with Elm. There is a central collection of user created libraries. There are plenty of examples, syntax reference, videos, and, most importantly, friendly and helpful users on the Elm mailing list. As I stated in a previous post, if not for the mailing list, I would not have been able to complete this project. The Elm website has a FAQ that tries to explain the language to those users who come from a JavaScript or Haskell background. Missing from this page is an explanation for those users who come to the language with little to no coding experience. I needed material aimed at beginners. I needed something to read, reread, and then play with the examples until I finally start to understand. I need something that doesn’t read like a dry textbook. Elm, as of now, does not have this.
All of this leads me back to Racket/Scheme. These languages still offer all of the benefits of functional reactive programming, but with a, hopefully, an easier learning curve. Racket/Scheme has a history of being an entry point for new programmers. It has been used in college classes, and with middle school students. Another great selling point is WeScheme, a complete online version of Racket/Scheme. With a Google account, students can code, save, and share. WeScheme can even look at your Google Drive account for images you want to use for programming. Racket, a near offline equivalent to WeScheme, has a beginner mode that simplifies the error messages to more applicable and more easily understood. Bad error messages are a major factor in shaping how I created my program. I want to avoid them at all costs, and that is why my program provides prewritten code.
For my money, the most compelling reason to use Racket/Scheme is their pedagogical track record. Racket was designed to be a teaching tool, and WeScheme moved the language to the cloud. Computer scientists and educators, not coders with VC money, put forth the time to create a language and pedagogical materials. Bootstrap World is a repository for students, teachers, or anyone looking to begin programming. The organization provides student lessons and teacher manuals to help individuals get a programming initiative off of the ground. Matthias Felleisen, the creator of Racket, enlisted some of his freshmen students to write Realm of Racket, a book that taught fellow students how to begin programming. It is not a textbook, but rather an illustrated story that teaches the reader how to program using games, something I tried to incorporate into my capstone project. All of the programs in Realm of Racket are included with the Racket download, so you can start playing with and modifying already functioning code. Again, I took a similar approach with my capstone. As an educator, it is hard to ignore this: Research on the work of Bootstrap World shows that the ideas behind functional programming transfer over to algebra. The Bootstrap World curriculum also aligns with Common Core, if that sort of thing floats your boat. I could go on, but if you are interested in Bootstrap World, take a look/listen to the latest episode of Triangulation. Bootstrap World founder Emmanuel Schanzer talks about his experiences as a programmer and educator, and how that lead to the creation of Bootstrap World.
So where does all of this leave me? I’m not really sure. I think I should give Bootstrap World a serious look this summer for the introduction to programming class that I teach. This does not mean, however, that I should abandon Elm. I am proud of the work that I have done, and I believe in Elm because I believe in the open Web. I need more work with functional programming in general and with Elm in particular. The current trend of Elm development is to make it a more widely useful (and thus accepted language). If I want Elm to be more closely aligned with educational needs, then I guess that falls on my shoulders. I hope that I am up to the task.