Jeremy Kun

∈ Mathematicians ∩ Programmers

Read this first

Why don’t mathematicians write great code?

In the discussion surrounding a series of recent articles on the question of how mathematics relates to programming (one of my favorite navel-gazing topics), the following question was raised multiple times

If mathematics is so closely related to programming, why don’t professional (research) mathematicians produce great code?

The answer is quite a simple one: they have no incentive to.

It’s pretty ridiculous to claim that a mathematician, someone who typically lives and breathes abstractions, could not learn to write well-organized and thoughtful programs. To give a simple example, I once showed my advisor a little bit about the HTML/CSS logical flow/style separation paradigm for webpages, and he found it extremely natural and elegant. And the next thing he said was along the lines of, “Of course, I would have no time to really learn and practice this...

Continue reading →


Programming is not math, huh?

You’re right, programming isn’t math. But when someone says this, chances are it’s a programmer misunderstanding mathematics.

I often hear the refrain that programmers don’t need to know any math to be proficient and have perfectly respectable careers. And generally I agree. I happen to think that programming only becomes fun when you incorporate mathematical ideas, and I happen to write a blog about the many ways to do that, but that doesn’t stop me from realizing that the vast majority of programmers completely ignore mathematics because they don’t absolutely need it.

So when Sarah Mei argues in her article “Programming is not Math” that math skills should not be considered the only indicator of a would-be programmer’s potential, I wholeheartedly agree. I’ve never heard anyone make that argument, but I’m much younger...

Continue reading →


The world never need more than five quantum computers

I have been gradually making my way through Scott Aaronson’s wonderful book, “Quantum Computing Since Democritus.” The book is chock-full of deep insights phrased in just-technical-enough language (the kind which I want to relay to the world through an internet megaphone). Scott really has learned how to apply the good and bad attitudes of the past to the problems of today.

For example, did you know that originally computers had so many problems with errors that many people argued fault-tolerant computers would never exist? This was before the transistor, of course, but it was believed that the external world would always have such an adverse interference with the physical machine that one could not reliably use the outputs. John von Neumann proved to the contrary that even with the error-prone hardware of the time it was possible to design perfect fault-tolerance...

Continue reading →


Reductions are the Mathematical Equivalent of Hacks

Though I don’t remember who said it, I once heard a prominent CS researcher say the following:

Reductions are the lifeblood of theoretical computer science.

He was totally right. For those readers who don’t know, a reduction is a systematic way to transform instances of one problem into instances of another, so that solutions to the latter translate back to solutions to the former.

Here’s a simple example. Say you want to generate a zero or a one at random, such you’re equally likely to get either outcome. You can reduce this problem to the problem of generating a zero or a one with some biased probability (that’s not completely biased).

In other words, you can simulate a fair coin with a biased coin. How do you do it? You just flip your biased coin twice. If the outcome is “heads then tails,” you call the outcome of the fair coin...

Continue reading →


My New LinkedIn Summary: Breaking the Fourth Wall of a Resume

LinkedIn is a weird niche in the internet: it’s a place for recruiters to reach out to candidates without a completely cold-email approach, along with a smattering of other relatively unimportant things going on (lots of “congrats” notes and the occasional unsubstantiated endorsement).

It’s not clear whether it’s a good niche or a bad one, but what is clear is that the most likely person to get their first introduction to me via my LinkedIn profile is a recruiter. So I can target my resume more effectively. I know exactly where to aim in terms of the reader being familiar with me and my work. With that in mind I recently rewrote my profile summary:

If you’re looking at my LinkedIn profile (as opposed to my academic CV [1] or my blog [2]), then chances are you’re a recruiter at a software company. Chances are also good that you haven’t...

Continue reading →


What “Counts” as a Mathematician?

The “Best Job” of 2014

A few days ago the website CareerCast (Adicio, Inc) released a list of the top jobs in 2014 which put “Mathematician” as number 1. Most news sites have used this as a platform to discuss the centrality of mathematics and technology in the world economy, or the importance of STEM (Science, Technology, Engineering, and Mathematics) in education. I’m not against such discussions — indeed I spend a large fraction of my time writing long and detailed posts explaining mathematics to anyone who will listen — but I do suspect the ranking is misleading.

As every mathematician knows definitions are extremely important, so I wonder how mathematician is defined for the purpose of this ranking. After a bit of snooping it appears at least part of their analysis comes directly from the US Bureau of Labor Statistics website, which in turn uses an...

Continue reading →


I often forget I’m hungry

I’ve never heard of anyone else who has this problem. When I’m working, specifically when I’m doing mathematics, I won’t notice I’m hungry until I stop.

When I was a child my mother used to joke about how I’d get hungry every two hours. During my undergrad I regularly engaged in hours-long coding sessions, but I always noticed when I was hungry. But now as a graduate student, I can eat lunch at 1pm, start thinking about math at 5, and not realize I’m hungry until midnight when I decide it’s time for bed.

I have no idea if it’s healthy or if it’s really because of mathematics, but it’s the weirdest thing.

I think it’s because, when you start to do mathematics at a graduate level, you’re trained to think about the big picture, and you can always think about the big picture. In the shower, on the train, while...

Continue reading →


Mathematicians are chronically lost and confused (and that’s how it’s supposed to be)

A large part of my audience over at Math Programming are industry software engineers who are discovering two things about mathematics: it’s really hard and it opens the door to a world of new ideas. In that way it’s a lot like learning to read. Once you’re mildly fluent you can read books, use the ideas to solve problems, and maybe even write an original piece of your own.

Many people who are in this position, trying to learn mathematics on their own, have roughly two approaches. The first is to learn only the things that you need for the applications you’re interested in. There’s nothing wrong with it, but it’s akin to learning just enough vocabulary to fill out your tax forms. It’s often too specialized to give you a good understanding of how to apply the key ideas elsewhere. A common example is learning very specific linear algebra facts...

Continue reading →


What would math class look like if it were a fine art?

Wahoo Public High School in Wahoo, Nebraska is by all accounts a school with ample opportunities for their students. They have the standard array of English, history, and science courses, with enough money left over for band, drama, fine arts, many sports teams, and a couple of very surprising electives (zoology, web design, and fashion design to name a few, see their current curriculum guide for the whole list).

And Wahoo HS has given some truly unique opportunities for their students to do things like watch a live heart surgery and visit the video control room of the Ralston Arena event center. Wahoo seems to treat its teachers right, too: in 2008 they sent a group of teachers to DC to learn more about its history.

I don’t bring all this up just to praise Wahoo HS for its quality (though they clearly deserve praise), but also to use it as a platform for a thought experiment:...

Continue reading →


On the Social Value of “Programming for All”

Bret Victor recently published an infographic, which appears to be his own creation, pointing out some aspects of an essay written by Seymour Papert (the inventor of the Logo programming language), and contrasting those points to the claims made by famous people about the value of learning programming.

The gist of it is that Papert believes programming is a useful tool for conveying ideas (specifically mathematical ideas). So if students struggle to learn a concept with pencil and paper, they might instead try to understand the concept by writing programs that elucidate it.

Apparently the whole world mistook Papert for saying, “Programming makes you smart,” and that became canon. So people who don’t know anything about programming (and a lot of people who do) are preaching that “everyone should learn to code” for the wrong reasons. This is the focal point...

Continue reading →