Trees, Dictionaries, Pickles, and Loops: Part III

In the last few posts, I talked about the relationship between math and computer science. Here are some musings on their differences, and about how math culture and computer science culture work. It’s not authoritative in any way, just based on my experiences trying out both types of activities and talking to people in both fields.

I’ll start with math.

Strange as it is, when someone works on a challenging mathematical question, they often appear to be doing nothing. When I’m trying to work out a tricky idea, I tend to sit down, put my feet up, and stare at the wall. I might frown or press my fingertips together. Or write down some equations and sentences and make some sketches– and then sit and think quietly again. Even when people talk about math, if they’re trying to figure something out together, the conversation is punctuated by lots of long silences.


A mathematical question might be about something purely theoretical or something with physical applications. But either way, the result won’t be tangible like a video game, or a sculpture, or a tomato plant. Mathematicians produce ideas. In a way, ideas are what math is “made” of.

Sometimes that makes math a whimsical and lighthearted experience, since it can be fun to mess around with interesting ideas. Sometimes, though, this intellectual abstractness can make math seem distant and serious. It’s ancient, almost philosophical work.

In contrast, programming can feel like doing a puzzle. It’s fun. You build things. You try to make your code nice, neat, readable, and fast. You tell a computer to do something, maybe something complicated, and it will do it exactly as you have instructed it to. That’s pretty cool.

Rubik Invaders

To understand the culture around programming, it helps to understand the process itself. When you’re programming, you spend a certain amount of time planning, and a certain amount of time writing code. (Writing code means that you write out instructions in a format that computers can understand.) The next step is to test what you’ve done: you run your code. That means you tell your computer to follow through with the instructions you’ve written. Depending on how complicated these instructions are, this can take a while.

As I mentioned in Part I, I worked on a programming-heavy project this summer with several other students. Our offices were littered with things to do while code was running. A friend of mine had a Rubik’s cube handy to fiddle with. Another folded tiny origami roses. The notebook on my desk had a page full of weird, twisty doodles.

Kawasaki Rose 1 (with base)

One part of this playful “feel” of computer science shows up in the cute way some things are named. Listening to programmers talk, you might hear the phrases “pickle a Python dictionary,” “build a tree,” and “find a bug.” I don’t know whether a playful attitude towards programming leads to these cute names, or the cuteness helps foster the playful attitude. Probably both.

Programming can also be super frustrating. Frustrating in a different type of way than math is. Imagine that instead of writing a program, you were baking a cake. As you mix and measure, the cake batter looks all right, and seems to bake fine… and then when you take it out of the oven, it turns hard as a rock. Or melts into a puddle on the floor. Or just disappears. And the only way to make things right is to figure out where exactly you messed up the recipe.

That’s what happens when code doesn’t work. Sometimes bugs– issues or mistakes in a program– are easy enough to find. Sometimes it takes you and your co-worker and your boss and your best friend two days to figure out what’s gone wrong. And sometimes the entire problem lies in the fact that someone used “=” instead of “==” on the two-hundred-and-fifty-third line.

2 :

When you find the simple bug that’s been messing you up.

Anyway, those were a few things I’ve observed about the culture and experience of the two fields. Have I missed anything important? Is there anything about math or computer science you’d still like to know about? Let me know!

One thought on “Trees, Dictionaries, Pickles, and Loops: Part III

  1. “…someone used “=” instead of “==” on the two-hundred-and-fifty-third line.”

    A pleasant idealization. In real-world software engineering, replace the above sentence with:

    “…someone used “<=” instead of “<” on the two-thousandth line of an inner class of a class in our old C++ framework, which isn't really maintained since the guy who wrote it fled the country and didn't document the code; this took 30 expert programmers many weeks to recognize since this situation doesn't generate a compilation error or any warning whatsoever, and required a step-by-step debugging (of 100,000 lines of code). In the mean time, we had deployed the application, causing massive irreversible crashing on every one of our user's devices."

Comments are closed.