Monthly Archives: September 2019

First day of fall

My child is blessed to be born near the fall equinox, and so I found myself lying in the basket swing of his new swingset (a birthday present) yesterday morning, enjoying the first cool whether of the year, while he happily chattered and repeatedly ascended and descended his slide when a peculiar thing happened. I imagined that he might slide these tiny wooden cars he has down the slide where they would fly off into the grass, perhaps be to be forgotten, their tiny chrome hubcaps becoming flecked with minute patches of rust over which a finger could pass and feel a slight texture.

I’m tempted to say that this idle image became peculiarly vivid in my mind as I swung back and forth looking at the sky, but that is not accurate. It is more accurate to say that the image became suffused with a sense significance quite larger than the things in it and, in any case, disjoint from them. As though I was staring at a key or a door the use of which would remove me radically from the context in which I was currently living and transport me elsewhere, like closing a particularly engrossing book and being surprised to return to an entirely distinct sequence of events: your own life.

“Want to play in the sandbox,” Felix said, and so I got up to open it for him and, very gradually, the sensation diminished.

RMarkdown/knitr etc Considered Harmful

Typically, I write my scientific reports in Latex. A makefile orchestrates all my analysis in stages, and some steps produce latex fragments that appear in the final document. A typical step reads the previous steps’s appropriate data into R, performs a single calculation, model training or evaluation, or generates a figure while simultaneously writing out the appropriate fragment of Latex that describes the process, including quantitative details when necessary.

I like this because each step is simple to understand, its dependencies are clearly documented by the makefile, and the reporting on the step is located right where the code is. And Make automatically handles rebuilding the appropriate parts of my document when I tell it to.

Contrast this with RMarkdown, which encourages the scientist to pile state into the document willy-nilly. Steps which depend on one another can be separated by large regions of text and code. As you develop your Markdown file, the strong temptation is to evaluate fragments of code in your interpreter, which can lead to hard to understand bugs and unreproducible results.

Most notebook style authoring tools have this problem.

I suppose its a classic story of usability vs correctness and as usual, I don’t know why I expect correctness to win.

Being a Dad Rules

A few nights ago I dreamed that I was standing on the edge of a giant sunken waterway, some kind of vast floodwater system in which six inches or so of water flowed at a good clip over cobblestones slick with moss. In it, someone was running around, chasing an animal or other creature.

I was high above.

Suddenly they were down there with my son. They were horseplaying, and they swung him around by his feet and tossed him out into the deeper water. I screamed “He can’t swim you asshole” and desperately tried to plan the fastest route down (it was so far down) so that I could get to him before he drowned. I woke up in an awful panic, which took half an hour to go away.