Computer Coding With Processing

Coding is the hot topic in education these days, so I decided to teach myself a computer language. I chose Processing, because it creates nice computer graphics, which I think will appeal to my students. I’m using Daniel Shiffman’s book, Learning Processing, which is very entertaining and understandable. He assumes the reader knows nothing about coding, and that’s a good thing in my case!

Processing uses simple commands like ellipse(centerX, centerY, width, height), or line(X1, Y1, X2, Y2). If you’re familiar with coordinate geometry, then coding in Processing is a piece of cake. And did I mention it’s open-source, which means it’s completely free? The Processing website (linked above) has a fantastic reference that covers all of the commands and their parameters.

Here is my first project, which is the result of working through the first three chapters. I think I’ll call him Hypno-Dog, because I made his eyes change color.

Advertisement

Summer Reading For Math Teachers

My school had graduation yesterday, so I can look forward to having some extended periods of time to do some reading. Here are three books I’ve enjoyed recently and you might find interesting (clicking on the titles will take you to their Amazon pages):

Love and MathLove and Math: The Heart of Hidden Reality, by Edward Frenkel. This is a terrific book about Frenkel’s struggles to overcome institutional anti-Semitism in his native Russia and become a world-class mathematician. He is currently a professor of mathematics at UC Berkeley. He intersperses autobiographical details with explanations of how his mathematical research helped physicists develop their theories of quantum mechanics, as well as unite seeming unconnected branches of math. Along the way, he shares his love of the Platonic world of mathematics: “Nothing can stop us from delving deeper into this Platonic reality and integrating it into our lives. What’s truly remarkable is mathematics’ inherent democracy: while some parts of the physical and mental worlds may be perceived or interpreted differently by different people or may not even by accessible to some of us, mathematical concepts and equations are perceived in the same way and belong to all of us equally. No one can have a monopoly on mathematical knowledge; no one can claim a mathematical formula or idea as his or her invention; no one can patent a formula!” (pp. 235-236) Frenkel delves into some very deep and advanced mathematics, but he manages to explain it terms most everyone can understand.

Program or Be ProgrammedProgram Or Be Programmed: Ten Commands For A Digital Age, by Douglas Rushkoff. My daughter gave me this book after she read it for a coding class in college. It is in the vein of Neil Postman, asking users of social media to be aware of digital technologies’ inherent biases. It’s relatively short, but very powerful. Rushkoff’s main point is that unless users understand basic coding principles, they will be at the mercy of an élite who create the social media platforms that can manipulate them. The ten commands are:

  1. Time: Do Not Be Always On
  2. Place: Live In Person
  3. Choice: You May Always Choose None of the Above
  4. Complexity: You Are Never Completely Right
  5. Scale: One Size Does Not Fit All
  6. Identity: Be Yourself
  7. Social: Do Not Sell Your Friends
  8. Fact: Tell The Truth
  9. Openness: Share, Don’t Steal
  10. Purpose: Program or Be Programmed

Favorite quote: “In a digital culture that values data points over context, everyone comes to believe they have the real answer and that the other side is crazy or evil.” (p. 65)

Brain on Music

This Is Your Brain On Music: The Science of a Human Obsession, by Daniel Levitin.

This technically isn’t a book about math, but if you’ve ever wondered why humans are the only animals to create and appreciate music, then you will enjoy this. Levitin knows what he’s talking about: he’s been a record producer of very successful rock artists, and he is now a neuroscientist at McGill University, where he runs the Laboratory for Musical Perception, Cognition, and Expertise.

Levitin spends the first few chapters explaining what music is, and what terms like pitch, timbre, rhythm, and tempo mean. He also discusses the mathematical relationships in tones and octaves.

Levitin spends the rest of the book explaining the latest research in how the brain processes music, and what is involved in creating, performing, and enjoying it. No other activity involves as many parts of the brain as performing music does. He laments the separation between performer and audience that has happened in western cultures. In earlier times, everyone played some sort of instrument or sang. The easy availability of recorded music has caused a decline in music performance, however, to the detriment of us all.

So, three books with three very different foci, but I believe teachers of mathematics will find all of them interesting and enjoyable. Have a great summer!

The Mathematician As Artist

For this year’s Winterim (a three-week period between semesters when Harpeth Hall offers an alternative curriculum), I am teaching a new course: The Mathematician As Artist. I’ve already asked our library to purchase a copy of Lynn Gamwell’s new book, Mathematics and ArtGamwell Math and Art

My plan is to begin with the most basic tools, i.e. straightedge and compass, and work our way up to computer-generated art. Ideally, I’d like to have my students use the Processing language to code their own original works. Along the way, we’ll use TinkerCad to design sculpture that we’ll print out in Harpeth Hall’s Design Den.

For the straightedge and compass art, I’ve discovered a fantastic resource: Dearing Wang. He has an YouTube channel with lots of instructional videos for creating intricate designs with only those two tools. I’ve worked through four of them, and they are a lot of fun:

3 Fish In A Pond Octagon Zoom 5 Circle Mandala Geometric Eye

As the course develops, I’ll post updates on the lessons.

 

The Future of Coding? Check out Wolfram Language

Earlier this year, I taught a mini-course in computer coding, and it rekindled my interest in that science. I just came across a video where Stephen Wolfram (of Mathematica fame) previews a new language he’s been developing for 30 years. Here’s the official description:

Designed for the new generation of programmers, the Wolfram Language has a vast depth of built-in algorithms and knowledge, all automatically accessible through its elegant unified symbolic language. Scalable for programs from tiny to huge, with immediate deployment locally and in the cloud, the Wolfram Language builds on clear principles—and 25+ years of development—to create what promises to be the world’s most productive programming language.

It looks to be relatively easy to use, while incredibly powerful. In fact, I’ve never seen anything like it. From what I can tell, in many cases the coder can simply type what he or she would like to see, and Wolfram Language converts the text into code:

Wolfram1

 

It links to the cloud, and data from WolframAlpha or any other site can be incorporated into it.

The video is 13 minutes long, but well worth your time if you’re interested at all in the future of coding:

Here is a link to the reference guide to Wolfram Language.