## Occasional reflections on Life, the World, and Mathematics

### Killing the braces in order (technical)

I just noticed a funny tic that I have in programming (or writing LaTeX, which is sort of similar): When I remove brackets, I always look to remove the matched pair, even when they’re functionally equivalent, and even when it costs extra effort. For example, I have a text in LaTeX that goes something like

$\frac{1}{e^{x}}$.

I decide to change it to $e^{-x}$. So I remove the \frac{1}, and then the open brace, leaving me with $e^{-x}}$, and my cursor is right at the x. The simplest thing (measured in keystrokes) would be to shift over and remove the brace directly following the x. But there is mental resistance to removing the “wrong” brace, which I resolve by making the extra keystroke and removing the final brace. Not a big deal, but it occurs to me that there’s probably interesting work to be done (or already being done) in the psychology of programming, and the conflicts between the logical deep structure that programmers need to work with, and the surface structure that is all the computer gets to work with.