A new series to share some of our ongoing learning with you.
At Carnegie Learning, we consider ourselves lifelong learners. Every day, we work on continually developing our knowledge in order to make the best possible math solutions for teachers and students. What We're Reading/Watching/Listening To is a new series to share some of that learning with you.
Review by Matt McHenry, Senior Software Developer at Carnegie Learning
Usually we think of math and computer science as only generally related—they’re both under the STEM umbrella, and people who like one often like the other. But the LambdaCast podcast goes further. It explores functional programming.
Functional programming is a style of programming grounded in formalized rules for reasoning about what our programs mean and how they work. It turns out that the same concepts that we’ve used to formalize our understanding of math—things like the associative property or an operator’s identity value—are also at the core of how computer programs are structured.
Many kids know they can tackle a problem like 3+16+7+4 by reordering the operations: 3+7 = 10 and 16+4 = 20, and then 10+20 = 30. As mathematicians, we formalize this by saying that addition is commutative and associative.
Most internet users know that Google has an uncanny ability to put the single best website at the very top of its search results. These users have a vague idea that there are big data centers full of computers that make that happen.
As computer scientists, we know that web search is a problem that’s decomposable in the same way as that addition example above. Each computer in those big data centers knows about its own little corner of the internet, so each one hands back the best site it knows about (along with a score). Those results are accumulated upwards, gradually encompassing more and more of the entire internet. In each round, the better site wins out, and the final winner is the best ranked site from across the entire internet.
Google’s computer scientists know that the code they’ve written for this process satisfies exactly the same laws of commutativity and associativity that addition does. So just like the kids who rearrange their addition problems are guaranteed to still get the correct result, Google is guaranteed to always find the best website, no matter what order that highly complex roll-up process happens in, or how it’s spread across all the computers in all of Google’s data centers.
Here at Carnegie Learning, we keep our eye on commutativity and associativity in our code too. For example, the code that summarizes all of our fine-grained data about individual student performance to create our Leadership Reports is written in a very functional style, which has paid off for us in terms of its maintainability and scalability.
As we work on launching Proto for computer science students, we’re interested to hear from educators in the field. How do you tie mathematics and CS together in your classrooms? Are functional programming concepts making their way into your K-12 CS courses? Let us know in the comments!
Matt is a Senior Software Developer on Carnegie Learning’s Intelligent Tutoring Systems team. He’s been with Carnegie Learning for 18 years, and has worked on pretty much every part of the MATHia platform at some point during that time. He enjoys spending time with his family, biking, coding, and swing dancing in his spare time.Explore more related to this author
How do you tie mathematics and CS together in your classrooms? Are functional programming concepts making their way into your K-12 CS courses?
Matt McHenry, Senior Software Developer, Carnegie Learning