Driver’s ed should teach error recovery

I live near a one-way street, and drivers keep turning into it the wrong way by mistake. Most react by getting flustered and backing dangerously into the arterial, perhaps following an instinct to “undo” the error. The safer solution (in my eyes) is to park the car, wait for traffic to clear, then use a driveway to point yourself in the right direction.

Unfortunately, driver’s ed doesn’t teach you how to recover from mistakes like this—at least, mine didn’t. Instead, driver’s ed teaches the rules of the road and how to follow them. Once you have violated the law, even if by accident, you are in undefined territory. Hence, drivers develop a strong impulse to immediately “reverse” errors rather than identify a safe course of action.

Read more →

Sports idea

A footrace, but the objective is to run as far as possible in a fixed amount of time rather than speeding through a fixed distance. The catch is that the time limit is drawn randomly at the start of the race, so you cannot strategize around it being a sprint or distance event.

I think a good choice of distribution would be an log-normal distribution with a mean of around four or five minutes and a fairly high variance. Perhaps we could clamp the maximum time at eight hours, out of respect for the athletes’ work-life balance.

I ran (ha) this idea by a friend who is a competitive marathoner and he said, “That sounds like hell.” This makes me think I am really onto something, because many popular sports sound like hell to those who are not yet good at them.

New logo

I created a new logo for the site today:

New logo: A stylized letter "M" formed by joining four segments with colors drawn from the site theme

The old one was just a square with my initials, MK, which seemed a little too self-indulgent (not to mention that I share these initials with half of my extended family, so I can hardly claim them as my own):

Old logo: The initials MK in green on a yellowish background

The new logo still kind of forms a stylized letter m, if you imagine the three theme-colored vertical segments as hanging from the horizontal segment on top. It also kind of recalls the shape of the word Ill, which spells the start of the blog title and doubles as a fun bit of retro slang.

The best thing about fish

The best thing about fish is probably the lateral line, which sort of like ears for underwater that enable fish to sense and locate predators even in dark or murky conditions.

The best thing about the fish command-line shell, on the other hand, has to be its “fuzzy” completions. In most other shells (like Microsoft PowerShell, which I use every day at work), you can tab-complete a filename like by typing blog (the first part of the filename) and pressing Tab. If there are multiple matches, you use the arrow keys to scroll through them until you get the one you want.

This works fine if you put the most-unique part of your filenames at the beginning. But I like to begin my filenames with ISO dates, so to tab-complete in PowerShell, I have to type 2024 and then jab the arrow key a bunch of times, which is like using a phone book that is sorted by phone number. In fish, I can just type blogpost (even without the underscore) and it will autocomplete to

Similar completions work for the options of most command-line programs, and it’s (relatively) easy to extend the built-in completions with your own configuration files (but I’ve never needed to).

Why I put ISO dates in filenames

I am one of those obnoxious people who begins his filenames with an ISO date, like I know that file metadata already tracks creation and revision dates, but I don’t like those: The creation date is misleading when you duplicate a file to reuse its format or content, and the revision date is all but meaningless because modern software modifies files on disk in all kinds of spurious ways. I put an ISO date in my filenames to assign them a canonical date. The canonical date means something like “the last date at which this file underwent a significant change,” and I alone (not software) can determine what that means.

Read more →

New old device

On a recent visit home, I dug this 2007 Sansa Clip out of a box.

An image of an Obama-era Sansa clip (released in late 2007, probably manufactured later) running the Rockbox custom firmware

It’s battery life is shot, but everything works, and I unearthed some critical throwback jams from the built-in 4GB of flash memory (among other things, the first four Brad Paisley albums in .wma format). As the picture shows, I also installed a bit of custom firmware called Rockbox.

Read more →

Recent reading

Mostly novels this time:

  • 조남주, «82년생 김지영», a 2016 novel about (I have struggled to phrase this in a way that isn’t too dead-on) why it is so hard to be a woman in contemporary Korean society.

    The movie version from 2019 is better known, perhaps thanks to the sanitized resolution in which the title character learns to channel her resentment into creative energy—and writes the novel that the movie is based on. In the novel, however, the final chapter reveals the narrator as 지영’s therapist, and he comes within inches of a feminist awakening as he weighs different diagnoses for her, then reverses course. Witholding spoilers, I suspect that much of the hand-wringing around the book turns on its withering, cynical last sentence.

  • 장강명, «한국이 싫어서», a novel about a woman’s decision to migrate from Korea to Australia, and for reasons that are no surprise if you’ve read the book above. This one has a happy ending.

  • Mishele Maron, “Anger Management” (paywall), a memoir by a psychologist whose job was to “goad men with a history of violence into wanting to punch me” and create the opportunity for them to examine their feelings in group counseling.

  • Greg Egan, Permutation City.

  • Philip K. Dick, The Man in the High Castle.

I am looking for Korean bookstores that deliver within the US. So far 반디북US has proven reliable, but I’d like to have a backup option in case their rickety website finally gives way. Write if you know of any others.


Completed some overdue site maintenance over the past few weeks:

  • RSS feed styling: With help from a template found on GitHub, I created a stylesheet for the RSS feed so that it looks nice when viewed in the browser. Ctrl+F “via RSS” on this page to find the link, or just scroll all the way to the bottom, or maybe try this link.

    I am not a big consumer of RSS feeds myself; I prefer to just bookmark blog URLs and read posts in their original context. But RSS is an important bit of plumbing for the indie web, and probably covers accessibility use cases that I haven’t anticipated.

    (Technically, I am serving an Atom feed rather than RSS, but people use the terms interchangeably.)

  • Upgraded to Jekyll 4: Jekyll is a tool for building a static HTML site out of Markdown files. The built-in GitHub functionality for hosting a Jekyll blog uses an old version of Jekyll which has some end-of-life dependencies, and they are stuck searching for an upgrade path that doesn’t break existing sites.

    I followed this wonderful guide to switch my publication workflow to a GitHub Action that lets me manually manage my Ruby and Jekyll versions. It’s a great tutorial that also helped clear up several misunderstandings about Ruby, Gems, and rbenv.

  • Removed embedded YouTube videos: I replaced embedded YouTube videos with simple links to improve page load times and user privacy.

A handy class of submodular functions

In this post, we will show that functions of the form

\[f(X) = 1 - \prod_{i \in \Omega \setminus X} (1 - p_i) \prod_{i \in X} (1 - q_i)\]

are submodular for \(p_i, q_i \in [0, 1]\) where each \(p_i \leq q_i,\) and examine an application of this small result that demonstrates its practical value.

Read more →

Recent reading

Finished reading, but still thinking about:

  • 정유정, «종의 기원», a thriller.
  • 김연수, «이토록 평범한 미래», a collection of short stories.
  • 권여선, «레몬», a thriller.
  • 신경숙, «엄마를 부탁해», a classic.
  • Cory Doctorow, The Internet Con: How to Seize the Means of Computation, a tinkerer’s manifesto.
  • Paul Abel, “I thought I wanted to be a professor. Then, I served on a hiring committee.”
  • From the September issue of The Sun, “No Small Wonder” (paywall), an interview with psychologist Dacher Keltner, a student of awe. It pairs nicely with Bewilderment below.

Currently reading:

  • Richard Powers, Bewilderment, a novel of astrobiology, biofeedback, and conservationism.
  • 정유정, «내 심장을 쏴라», a thriller.

Guitarix troubleshooting

For the past few updates of Guitarix, I have been having issues where changing the JACK server latency causes the audio output to go crazy. This seems to stem from changes that the developer has been making to the config files, because the following commands usually get things working again:

mv ~/.config/guitarix ~/.config/guitarix.backup
mkdir ~/.config/guitarix
cp -r ~/.config/guitarix.backup/banks ~/.config/guitarix/banks

These commands backup your amp/effects presets from ~/.config/guitarix/banks (which are the hard part to restore manually), and let the default settings take over the next time the application is launched.

I’ve been using the following fish alias fzl (“fuzzy list”) to run fzf (“fuzzy find”) in the current directory with a bat preview. It’s just a couple of light tweaks to the examples listed in the fzf README.


function fzl
    # `bat` is aliased to `batcat` on Debian
    if type -q batcat
        set -f bat_command "batcat"
        set -f bat_command "bat"

    # Set the overall width of the `bat` preview to
    # 50% the width of the current terminal
    set -l bat_width $(math ceil $COLUMNS x 0.5)

    # My preferred `bat` options
    set -f bat_command \
        $bat_command \
        --style numbers \
        --color always \
        --italic-text always \
        --wrap auto \
        --terminal-width $bat_width

    fzf \
        --preview "$bat_command {}" \
        --preview-window right,$bat_width,nowrap

Example below.

Read more →

Learning Korean idioms with UNIX fortune

fortune is a classic UNIX program that displays random fortunes, pithy quotes, and the like:

$ fortune
If you think last Tuesday was a drag, wait till you see what happens tomorrow!

Today, I repurposed fortune (really fortune-mod) as a language study tool by scraping some Korean idioms from Wikiquote from Wikiquote):

$ fortune korean
“쇠귀에 경 읽기.”
    아무리 좋은 말을 하면서 가르치려고 하여도 그 뜻을 제대로 헤아리지 못하는 사람을 두고 하는 말.

This one says “Chanting sutras into the ears of a cow,“ defined as “A phrase used when someone fails to understand what you are trying to teach them no matter how well you choose your words.”

I set fortune korean (with some gentle text styling) as my fish greeting, so I can learn a new idiom every time I open a terminal—see below.

Read more →

Applying the KISS principle to amp modeling

I’ve been playing electric guitar using only computer modeling software (without a physical amplifier) for about five years now. I started out with Garageband and Mainstage, then briefly experimented with Amplifikation Vermilion, and for the last year and half have turned to a free, open-source package called Guitarix and a small collection of impulse response files culled from guitar forums. In my experience, a good impulse response file fed into a basic convolver does a lot more for your sound than trying to optimize the countless parameters on an expensive simulator.

Read more →

This year’s reading

A subset of the books I enjoyed this year:

  • Barbara Kingsolver, The Poisonwood Bible, a novel about evangelical Christianity and cultural arrogance.
  • 손원평, «아몬드», a novel debating whether or not emotions are a distraction.
  • Walter Isaacson, The Codebreaker, a biography of biochemist Jennifer Doudna.
  • Michael Lewis, The Undoing Project, a biography of behavioral economists Daniel Kahneman and Amos Tversky.
  • 황보름, «어서 오세요, 휴남동 서점입니다», a slice-of-life novel about a bookstore owner overcoming the loneliness of urban life.
  • Ayoko Sono, Ningen no Bunzai, a “collection of writings” (according to Wikipedia, and I cannot come up with a better description). I read the Korean translation «약간의 거리를 둔다» by 김욱.
  • 김애란, «달려라, 아비», short stories about the legacy of childhood experience.
  • Jia Tolentino, Trick Mirror, essays about identity, authenticity, and social media.

In progress:

  • 김금희, «너무 한낮의 연애», short stories about people at the margins of society.
  • David Foster Wallace, Infinite Jest.

Two truths and one lie

A puzzle based on the icebreaker game.

Two truths and one lie:

  1. I have a twin.
  2. I used a random number generator to decide whether to place a true or false statement in #1.
  3. I do not understand the rules of “two truths and one lie.”

Solution inside.

Read more →

New job at Booz Allen Hamilton

I’m happy to share a somewhat belated bit of good news: This month, I began a new job as an operations research analyst at the consulting firm Booz Allen Hamilton. To fulfill this new role, I have moved to Arlington, Virginia, a suburb of DC with a mild climate and lots of natural beauty.

On this blog, I will continue to post short essays and notes about economics, math, and Korean. Please understand that any opinions expressed here are my own and do not represent those of my employer.

On my way out of Korea, I was able to make a celebratory trip to Naju and say farewell to my friends and coworkers at Geumseong Middle School and hike up to my favorite spot on the mountain. I have a tradition of listening to the Brahms Piano Trio in B Major at transitions like this. Here’s one of my favorite interpretations.

Master’s graduation and two free optimization courses

On September 29, I received my master’s degree in industrial engineering from Seoul National University!

A photograph of Max wearing his cap and gown at Seoul National University.

It’s been a wonderful two years. Despite the challenges of social distancing, I was able to take a diverse assortment of courses in optimization, economics, and human factors; participate in research projects in two different labs; present at a conference in Jeju; and write (in both Korean and English) a thesis I’m rather proud of.

Read more →

Apply to fifty colleges

In this post, we’ll use fake numbers and a simplified model to argue that the most college applicants should apply to far more colleges than they actually do. You can probably extend the argument to job applications and the dating game. I’ll also compute a few fake comparative statics and speculate about why real students don’t apply to more schools.

Read more →

Grading multiple-selection questions

Consider the following test question:

Which of the following are US States? (select multiple)

  1. Washington
  2. Delaware
  3. Frankfurt
  4. Memphis

This is a multiple-selection question, so the correct answer is a and b. How would you grade a question like this on an exam?

Read more →

Mulberry: A college application strategist

I recently created Mulberry, a web app students can use to compute their optimal college application strategy. It is a free, open-source, user-friendly interface to Algorithm 1 from my MS thesis.

The Mulberry logo: a magenta berry and a green leaf

Read more →

Python utility for manipulating subtitle timings

One of my current projects involves editing several hours’ worth of subtitle files in the .srt format to accompany an online course in numerical optimization. Because we haven’t decided exactly how we want to break up the videos, I needed an efficient way to delay or advance all the subtitles in time, so I wrote a small Python program called today to help me with this task.

Usage examples below the cut, or you can just go straight to the README in the GitHub repository.

Read more →

Opening Pandora’s Box

A harrowing thing that happens in research is that occasionally, you stumble upon a paper from 1979 (paywall) that appears to solve the exact problem that you’ve been working on for months, but that escaped your attention because it used different terminology or notation.

That almost happened to me this week, but mercy was on my side. The paper linked above, Martin Weitzman’s “Optimal Search for the Best Alternative,” considers a problem called the Pandora’s Box problem that resembles my college application problem except for one crucial difference: The Pandora’s Box problem has a time dimension, whereas the college application problem is static.

The unusual thing is that the static problem appears more difficult.

Read more →

Migrating to Jekyll

After reflecting on my unsustainable dependency on Google services, I have decided to bite the bullet and migrate my blog from Blogger to the open-source Jekyll, with hosting provided by GitHub. In the full version of this post, I explain some of the technical reasons for making this change.

Read more →

Thesis defense

This week, I defended my master’s thesis at Seoul National University. My thesis concerns an NP-hard portfolio optimization problem that I call the college application problem. My slides, presentation script, and the thesis itself live on this GitHub repository, and all are provided in both English and Korean versions. I also have a very brief deck of reveal.js slides introducing the problem, and I recently wrote some documentation for OptimalApplication.jl, the Julia implementation of my solution algorithms.

The defense process was relatively painless: I received some very helpful comments and reference suggestions from the professors on my committee, and I was pleased that they were persuaded by my argument that the model of the college admissions process I have chosen represents the best tradeoff between realism and tractability.

I also was able to give a brief presentation about my research at a conference in Jeju at the end of last month. Here’s a terrible photo for Mom:

Max giving a presentation about the college application problem at a conference in Jeju

The college application problem, presented in Korean

I gave a brief presentation about the college application problem at a research fair hosted by our department. English subtitles are included.

“College Application” on arXiv

In advance of a conference I will be attending with my labmates next month in Jeju, my thesis advisor and I have posted a preliminary version of “The College Application Problem” on arXiv. Here’s the abstract:

This paper considers the maximization of the expected maximum value of a portfolio of random variables subject to a budget constraint. We refer to this as the optimal college application problem. When each variable’s cost, or each college’s application fee, is identical, we show that the optimal portfolios are nested in the budget constraint, yielding an exact polynomial-time algorithm. When colleges differ in their application fees, we show that the problem is NP-complete. We provide four algorithms for this more general setup: a branch-and-bound routine, a dynamic program that produces an exact solution in pseudopolynomial time, a different dynamic program that yields a fully polynomial-time approximation scheme, and a simulated-annealing heuristic. Numerical experiments demonstrate the algorithms’ accuracy and efficiency.

Rolling updates to the paper as well as various slideshows presenting the research are available on GitHub.

The school location problem

I’ve spent a few days thinking about a facility location problem that we might call the school location problem. The goal is to place \(n\) schools to serve \(m\) families, such that the furthest distance between any family and their nearest school is minimized. This problem is almost a \(k\)-means or ellipsoid fitting problem, but its unusual “minimin” form makes it computationally challenging.

In the video below, and associated Jupyter notebook (GitHub, HTML viewer), I discuss the formulation of this problem, show to express it as a mixed-integer second-order convex program, and then solve a small instance using the Julia/JuMP/Juniper/SCS stack.

Here’s the video link.

Administrative vs. allocative efficiency

This fall marks my final semester of coursework, and penultimate semester overall, of the master’s course in industrial engineering here at Seoul National University. I’m taking courses in combinatorial optimization and advanced microeconomics, as well as continuing my study of college admissions markets as a research assistant in the Management Science/Optimization Lab.

Recently, I have been focusing on risk-averse behavior in college applications. In an ideal universe, college applications are completely standardized and there are no constraints on students’ ability to apply to many schools or on schools’ ability to assess a large number of applicants. In reality, many highly qualified students fail to apply to top schools because they doubt their ability to get in or receive a sufficient financial-aid package. For these students, the time and money required to submit an additional application to a so-called reach school takes away from time that could be spent refining an application to a target school. This opportunity cost is not trivial, because modern admissions offices strongly prefer students who tailor their personal statement to the characteristics and interests of the target school or program.

Read more →

An economic view of the Korean college admissions market

Existing computational models of admissions markets tend to fall at one of two extremes: Either they envision a centralized admissions process in which the school board runs an algorithm that says which students go where, or a decentralized process in which colleges compete for the best students. But the Korean college admissions process cannot be adequately described in either of these terms.

Read more →

Stable matching on Planet Money

Planet Money, an NPR show about economics, recently ran an episode entitled “The Marriage Pact” that deals precisely with my research topic. It’s a great episode that discusses both the basic ideas behind stable assignment as well as its applications in organ donation, job placement, and (my area of focus) school choice.

The episode begins with an interview with a Stanford econ student who designed a marriage market for his peers and managed to get 4111 of them to sign up for it. What a cool project! The student makes a few minor misstatements about the Gale–Shapley proposal algorithm that Planet Money leaves uncorrected. In this post, I want to offer a few corrections, not just because I can, but because in my opinion these marginal details are what make stable assignment an interesting and profitable research topic.

Read more →


They say that we perceive time by the accumulation of novel experiences, so that if you want to have a subjectively long life, you ought to do many spontaneous and hard-to-repeat things, but if you want to have a happy life, you ought to find one or two high pleasures that you can enjoy on a spiritual level and repeat the hell out of them, because they also say that on average, people derive more happiness from repeating a good experience than from trying something new.

You could write a linear program that targets your ideal mix of longevity and happiness and it would tell you exactly how many times to do this or that activity before moving onto something new. But what this calculus leaves out is the feelings of uncertainty that stain the transitions.

I am leaving Naju, after having grown accustomed to this routine, this commute, these faces, and I cannot say with any confidence that I have reached a joy plateau. Every week of teaching here has been better than the last: my skills have improved, my confidence has grown, and the teachers and students have become only more important to me. I could be happy like this for a long time. But.

A picture of the school I taught at in Naju on a sunny day. The bleachers feature a newly painted mural in spring colors.

But too much comfort has a way of smearing all the time together, so that the things that take place in a given day feel less like events and more like footnote references to proto-events hovering in the firmament of the distant past. I have already seen the river clog itself with duckweed; I have already looked down the street from all four of the intersection’s corners, trying to make the buildings line up with the trees. Upon inspection, a more sensitive man might look at these rhododendrons and see something more than last year’s blossoms in a different configuration, but I am a pattern-matcher by nature, too easily bored to remain a recluse. It is time for a new challenge.

As I wrap up my Fulbright grant, I am delighted to share that I have been accepted into the Government of Korea Scholarship program, through which I will be returning to Korea in the fall to pursue a fully funded master’s degree in industrial engineering at Seoul National University.

Thank you to all who have encouraged me.

Accidental signals

It is a well-known result in psychology that measures of intelligence correlate across domains. If you are good at math, you are probably also good at verbal reasoning, and vice versa. Therefore, if a company is hiring for a position that requires a variety of skills (as most jobs do), it should pick a candidate who has demonstrated impressive skill in one domain over someone who has demonstrated middling proficiency in a number of different domains.

Read more →

What you learn in a humanities degree

The more I learn, I find myself with fewer and fewer things to say.

A Reddit post reading, "What to do if i have theories? I contacted a college and they ignored me"

As a humanities student, I studied many “theories.” One theory is historicism, which says that things are the products of their historical settings. Example: At a career mixer, a well-dressed alumnus, class of ’70, approaches a sophomore journalism major. “The first thing you should do once you’re financially independent and you’ve got some money saved up is make a down payment on a house. Nobody will ever stop needing houses,” he says. The advice is a historical artifact, extruded from a certain moment in American politics and a certain set of assumptions about credit scores and work contingency and citizenship status. The student may react with with doubt; her doubt is also historical. It encodes her upbringing, and a different relationship with houses and banks and the word independent.

Read more →

Houseplant measurements

I have been measuring the leaves of my houseplants.


Read more →

Using data to understand ELL students

In August, I surveyed my students about their motivation for learning English, their opinions about our class and my teaching style, and what resources they were using to study English outside of class. By analyzing the results using some of the statistical tools I’ve taught myself this year, I came up with some effective strategies for reaching the disengaged students in my classroom.

At the moment this post goes up, I’ll be giving a presentation about that project at Fulbright Korea’s fall conference in Gyeongju. Here’s a digital version of the talk.

And here’s a detailed write-up of my survey design and results.


Fun fact: the most-viewed post on this blog, by a long shot, is the one where I shared that I’d received a Critical Language Scholarship from the US Department of State to study Korean in Gwangju. Today, I’m pleased to announce there will soon be another addition to the State Department–mandated disclaimer at the bottom of this blog.

Beginning early this July, I’ll be spending a full year in South Korea as a Fulbright fellow. I’ll be serving as an English teaching assistant at the elementary level. After our six-week orientation in Seoul, I don’t yet know the city I’ll be working in. That said, though Korea isn’t a small country, it possesses an excellent transportation infrastructure. If you’ll be there at all during the next year, send me an email so we can catch up!

Here’s a spotlight on the website of the Thornton School of Music about me and my friend Geetha, also a new Fulbright fellow.


We pretend stability by tracking our life’s progress as a series of marginal changes, so that from each day to the next we can see that we are still ourselves, changed perhaps in substance, but never in identity.

But sample two days, say, ten or twenty years apart within the spread of a life—could you recognize the images as of the same person? Over time the marginal changes penetrate to the being’s core. The transformation becomes comprehensive.

Read more →

First week of class at CNU

I’ve just finished my first week of class at Chonnam National Universty here in Gwangju with CLS and everything is amazing! I am staying with a host family in a suburb about 40 minutes from school by bus, so I get to practice my Korean 24/7.

Speaking in a new language can feel like doing the dishes with chopsticks. One of the conditions of the CLS scholarship is that students use only the target language when they are on campus, even outside of class, which is both exhausting and rewarding. Listening and speaking are my weakest language areas, and trying to explain a multi-step process in Korean or politely make a request of my host family often leaves all parties frustrated and confused. I am committed to the language policy, but it seems to worry my host family that I come home each day exhausted of my Korean abilities rather than more fluent.

Life in Gwangju is really nice. Gwangju is the sixth largest city in Korea, so although most people here have interacted with foreigners, we are by no means common. I certainly feel the preen of cautious eyes turning toward me when I get on the bus or enter a restaurant. The questions I most often receive from strangers are whether or not I can eat spicy food and whether I know how to use chopsticks.

CLS Korean

I am blessed and honored to have received a Critical Language Scholarship from the US Department of State to study Korean language this summer at Chonnam University. This will be my first visit to Korea, and I am incredibly excited as well as anxious about becoming a study abroad student for the first time.

I feel very grateful for the professors who wrote my references for this program and all of those who provided me with guidance during the application. I am fortunate to live in a country that values the study of foreign languages enough to sponsor students like me using public funds. Thank you for paying your taxes.

As many of you know, visiting Korea is a dream I have been cultivating for years. That dream has now come true. Although this is mainly my poetry blog (and I will continue to post poetry), when I am in Gwangju this summer I will also share about my experiences and thoughts in a traditional blog format. Thanks for reading.

Older posts

“Where did the old blog go?” On June 25, 2022, I moved by blog from Google’s Blogger service to a Jekyll blog hosted on GitHub (which you are currently viewing). I have copied over all the posts from the old blog that I think are worth reading. Nonetheless, the original Illusion Slopes, whose content runs back to November 2015, is still accessible at