My Takeaways: Fernando Alegre’s talk on CodeWorld in Louisiana

On Wednesday evening, Fernando Alegre spoke to the New York Haskell User Group about using CodeWorld to teach Haskell to high school students in Louisiana. Most of the students have no prior programming experience, and he’s been very successful at quite a large scale. The talk is on YouTube.

Fernando Alegre, speaking to New York Haskell User Group on CodeWorld in Louisiana

You should absolutely watch Fernando’s talk yourself. But here are the big points I took away from it.

The sheer scale of what Fernando is doing is staggering here. They have expanded from one high school in Baton Rouge in 2016 to more schools than we could count on his map. They are reaching about 800 students this school year, and it’s been doubling every year. Next year, with increased funding from several grants, they plan to triple the number to close to 2500 students per year. This is the major leagues, here!

There’s one big problem here: finding and keeping that many teachers is hard. Fernando mentioned that their number of students has been doubling every year, but the number of teachers has been growing linearly. Some of the issues here are:

  • Professional development costs money. While they’ve been able to fund teachers to attend so far, that has its limits. This is not a one-day retreat, either! LSU’s teachers attend a 6 week intensive training program, along with continuous online support after the main training session.
  • Teachers lack technical background. Because so many teachers are required, LSU cannot have too many prerequisites. The teachers often lack any past computer science experience, and don’t necessarily teach math, science, or anything technical. Some are afraid of math coming in! Fernando mentioned at one point that while the students are the ultimate goal, he sees teachers as his main challenge.
  • Teacher attrition is an issue. Louisiana schools also face a shortage of math and science teachers, and those who complete LSU’s training program for computational thinking often still find themselves back in math and science classrooms, instead. Several teachers have also left teaching to use their new skills themselves in the software industry.

There is also a lot of support work needed for a project of this size. Fernando mentioned they are looking to hire an entry-level software engineer, preferably working in Haskell, to help with the infrastructure needs of the project.

Fernando talked for a while about their EIR research grant (search for Louisiana State University here for details), which is connected to the What Works Clearinghouse. What Works Clearinghouse is a database maintained by the U.S. Department of Education about which educational techniques do or don’t have research-supported impacts on student achievement.

A lot of approaches to teaching K-12 computer science have been studied in the past, and the results have not often impressed. Logo, Scratch, and others all have most research showing small to no gains in student achievement. Bootstrap, which is similar in many ways, has published research showing gains in student achievement on certain math word problems, but it was a smaller study with limited scope. In general, this problem is hard, and many have failed.

If the results here are different, it could make a big impact. This could be a large-scale research project demonstrating both success and transfer learning from computer science and functional programming to other fields (especially mathematics), and it could have a major impact in education. On the other hand, if the study produces no evidence of learning, that could matter as well!

Fernando told a powerful cautionary tale about Logo and Seymour Papert. Papert captivated a large part of the education community with his Logo language, which I even learned in my own elementary school education. Roy Pea followed up with empirical research, which showed little to no measurable learning gains to support Papert’s claims about its educational benefits. Fernando suspects that the problem here was that the curriculum was too open-ended. Pure discovery learning, with little or no direct instruction or guidance, tends to only work for students with a lot of confidence and background knowledge, and Papert was a consummate believer in discovery learning. Yet, the results tarnished not just Papert’s own teaching style, but also Logo as a language, and even computing in the elementary classroom in general.

Similarly, this study is about whether LSU’s computational thinking curriculum works. But the results are likely to be cited for broader questions. Does CodeWorld work in K-12? Does Haskell work in K-12? Does functional programming work in K-12?

And there are definitely challenges here: The teachers are not experts, the curriculum is new and in flux, and there’s not even a standard way to measure student achievement in computational thinking in the first place! Answers to these questions are now more urgent than they were before.

Fernando laid out how LSU is building a full set of four “STEM pathways” that high school students can follow to earn endorsements on their high school diplomas. The four pathways include pre-engineering, computation, digital design, and biomedical sciences. Each of these pathways will include some technology classes and often their own programming languages and tools — whether that’s JavaScript and Unity for digital design, or R for statistical analysis in biomedical sciences, or Arduino for building smart devices. The decision was made to add one class at the beginning that’s a common introduction to computational thinking before splitting into domain-specific directions. And that’s where Haskell and CodeWorld come in.

Fernando noted that they have seen the expected resistance to the choice of Haskell for the introductory language. Some of this resistance comes from familiarity, as stakeholders wonder what’s wrong with just using Python like “everyone else”. Some comes from more substantive objections, as well, and Fernando talked a bit about how CodeWorld’s functions are sometimes harder to read than object-oriented dot notation because of how they separate operations like translation and rotation from the data they use. Despite the objections, though, they’ve seen some surprising support:

  • Most teachers in their 6-week summer training program panic around week 2. By week 6, though, they’ve become huge fans of the tools, and advocate strongly for them.
  • Students, too, fall in love with it. Fernando shared a story of a teacher who first taught computational thinking with Haskell & CodeWorld, then later an AP Computer Science Principles class in the same school, using MIT’s Scratch. Students set up protests and chanted “CodeWorld! CodeWorld!” at various points in the class, begging for a return to the Haskell tool.

Another key part of the decision was a desire to integrate with mathematics education. Louisiana schools are struggling with math achievement, and LSU specifically designed the curriculum to include a lot of mathematical thinking as well. This was great to hear, since building math skills was my fundamental goal in the CodeWorld project in the first place. A big part of the EIR grant is to observe and quantify this effect. My choice of Haskell for CodeWorld, in the beginning, came from the observation that writing Haskell feels like writing mathematics in a way that’s true of no other language or tool that I know.

One of the best moments of Fernando’s talk, and one that drew spontaneous applause, was the progression of generating a star from overlapping triangles. The progression (which I’m modifying a bit) goes like this:

Punchline: Suddenly, you can change the number of points!

The point here (pun intended) is that by communicating the structure behind numbers with an expression, you can capture repeated reasoning, generalize it, and then extend your generalizations. By removing that information from your notation (for example, by simplifying arithmetic), you lose the opportunity. This is similar to John Mason’s writing on tracking arithmetic, which I’ve blogged about here in the past.

Fernando also talks about how he uses randomness and interactivity to prompt students to generalize and parameterize their thinking. This is all good stuff.

One thing that became clear as Fernando finished is that he’s still struggling with how to convey some ideas. Interacting with the outside world is difficult from CodeWorld’s purely functional models. Students and teachers alike find CodeWorld’s stateful activities to be too difficult to use.

The good news here is that for an introductory course, these things aren’t as important. But they matter eventually. How do we help the teacher who wants to build complex demonstrations, or do statistics with outside data sets, or build stateful models of economics or physics systems? What does an “advanced” computational thinking course with Haskell or CodeWorld look like? These are open questions, and Fernando presented some compelling (and controversial) ideas.

Hope you have the chance to watch, and share your thoughts.

Software engineer, volunteer K-12 math and computer science teacher, author of the CodeWorld platform, amateur ring theorist, and Haskell enthusiast.