• The Recital (and Demorgan's Law)

    Even though I have only used one WHERE clause in a query (I don’t really do subqueries or anything like that; it’s easier for me to do complicated things in separate queries and then just combine them in R), SQL queries always remind me of the recital at the beginning of a legal document. WHEREAS, the first party… WHEREAS, the second party…

    At the end of the day yesterday I realized that I could take something that I was stupidly doing with two queries and fairly easily combine them into one by using AND and NOT and a lot of parentheses (and putting one more column in the SELECT). But it turned out not to be “fairly easy,” (was it a copy-paste error? An errant NOT somewhere? An inequality going the wrong direction? Maybe when I added that extra column to the SELECT, I accidentally wrote the name of a different column? These are all mistakes that I make), and now I am seriously considering making a truth table today to figure out why my query is not working.

    If I were making any meaningful pretence at shamelessly promoting my technical skills, instead of telling you about the errors I usually make, I would have a short tutorial here about DeMorgan’s laws. But no one wants that.

    (Also, despite my usual disdain for IDEs, I probably do need a spell-checker in my editor that will tell me when I type something in a variable-like grammatical context that is not actually the name of one of my columns or variables.)

    (And, yes, I also type these blog entries in an editor with no spell-checker.)

    When I grew up in New York State, truth tables and propositional logic were a required part of the high school math curriculum. On one of the Regents exams, you could choose between doing the logic proof and the geometry proof. Who would pick the geometry proof!? (Since I now work with some of the world’s leading experts on high school geometry, my lack of interest in geometry is not a problem. Any question that requires more than knowing that the measure of the inscribed angle is half the measure of the interecpted arc can be delegated to a real expert.)

    But clearly this is not the case everywhere. The last R-Ladies Meet-up that I was at, someone asked a question indicating that she hadn’t had formal training in combining logical predicates. I don’t think that any of our middle school or high school level courses have any lessons on formal logic. Maybe some of our intermediate classes have an aside or two about “for all” and “there exists”? But certainly not much. I think that we have some logic games in our elementary school curriculum, but I don’t imagine that we have 4th-graders intoning (p implies q) and p, therefore q. Other curricula might be a mile wide and an inch deep; ours is remarkably lean and efficient.

    I’m hoping that I’ve cleared enough off my stack that I can finish working on this (now moot) task from last week. Last week I was able to put together a “good enough” view of the situation, but with some noise from the special cases. This week things were somewhat better because a saved spreadsheet got old enough and a synced copy of the database got new enough that the spreadsheet didn’t know about a future that the database copy was unaware of. And the questions that I’m looking at will come up again, so it’s worth finally getting this code working correctly so that I can do simple modifications the next time this question comes up and give an answer that is both true (as, even with the special cases not quite right, the conclusion was correct) and accurate.


  • Miss White

    subtitle: another post that is nominally about someone who died recently but is really all about me

    Yesterday my dad emailed me that my kindergarten teacher, Miss White, died late last year.

    Miss White obit

    Some memories from kindergarten.

    1. There was a lesson about the now-debunked theory about how different parts of the tongue are specialized to different tastes. We tasted a bunch of things, and part of the lesson relied on not knowing what it was that we were tasting. I was anxious about tasting unknown things, and Miss White was quite willing to tell me what the things were when I asked.

    2. The kindergarten classes had three baby bunnies, two were black and one was orange. My class (morning kindergarten) got to name one of the bunnies, and the afternoon kindergarten class got to name the other two. I remember two of the names, Rusty and Clover, but I forget the name of our third rabbit. At the end of the year we were told that the rabbits went to live on a farm.

    3. At the beginning of the year Miss White made a display on the bulletin board in the hallway outside of her classroom with all the kindergarteners’ names and birthdays. The spring birthdays were on flowers; the summer birthdays were on suns; the fall birthdays were on leaves; the winter birthdays were on snowflakes. I looked at the bulletin board and was really upset: my mid-Septemebr birthday was on a leaf, when everyone should know that fall does not start until the 21st of September. (A LEAF!?!?) Miss White took down the leaf and made me a sun.


  • Joe Frank

    (Unrelated aside, for those who did not see my riff on a bad pun on Twitter, yesterday I forked a literal blockchain.)

    By now I am hoping that enough people have caught up with their podcast listening to have heard that Joe Frank passed away about a week ago.

    I first encountered Joe Frank’s work when I was splitting my time between Ithaca, NY and Long Branch, NJ. I was teaching in West Long Branch on Mondays, Tuesdays, and Thursdays, so I would drive back from Ithaca on Sundays. I timed my drive so that I could listen to Jolly Joe’s Bavarian Bandstand as I drove through Pennsylvania. And on Sunday nights, as I lie in bed, I would listen to Joe Frank on WNYC.

    I could have driven back on Monday morning, since I was teaching night classes. This was part of the department’s attempt to be family-friendly: People without children would teach only night classes, and people with children would teach only day classes. I was tenure-line faculty. Everyone was shocked and upset when I quit after a year for a non-tenure-track position at the University of Tennessee. But I drove back on Sundays, just so that I could hear The Other Side on WNYC.

    While the title of this post is Joe Frank, I have nothing more to say about him than all the public radio celebrities have podcasted out over the past few days. Secretly, this is possibly yet another post about neurology, as those drives across the middle Atlantic states were made possible by a chain of events starting with a head injury. But I did cut my weekend short—just about every week—just so that I could listen to his show.


  • Return to the Gym

    It’s been… a while since I’ve been to the gym. To be fair, some of my excuses are really innovative. For example, I have an unusual vascular feature in my brain that could start bleeding at any time (with a very, very low probability), and I didn’t want to go to the gym until the vascular neurologist said that it was OK. Also — and more importantly — I am a creature of habit, and I got out of the habit.

    1. The last time I went to the gym (late last year), I hurt my knee. Today I took it easy on purpose. Also, I wore the shoes that the gym-trainers hate but that were recommended by the physical therapist who treated my knee back when it started doing such stupid things.

    2. I did two exercises. I would have done a third, but you know how it is at the gym. I was going to do box squats, but all the boxes were being used as end tables. They were all covered with coffee cups and phones and towels and water bottles.

    3. Ugh. I am so unable to do any of the things that I could do six months ago. It is the worst.


  • Girl Power

    subtitle: and authoritarianism

    secret message: This is an attempt at satire.

    Authoritarianism has been getting a lot of play lately, so I’ve decided to add it to my mix of everyday strategies. Since we are so short-staffed at work (do you know over a dozen mathematicians and software developers looking for jobs? Maybe some generally competent people who would thrive doing office work? Marketing? Anything?), everyone needs to pitch in and do a little bit of everything. The task of moderating our online Community (message boards) has fallen almost entirely upon women, which I am taking as either an implicit or an explicit sign that management wants girl-style rules to be enforced in bringing everyone in line. In the words of Cecelia from The Virgin Suicides, “Obviously, doctor, you’ve never been a teenage girl.”

    First off, there needs to be a clear in-group and a clear out-group. That’s really the core of enforcing any sort of social norms. On Wednesdays we wear pink. The plan is to heap praise upon the students who behave the way we want them to (the currency that I plan to use is, primarily, upvotes from admins). Offending posts will be deleted. Those who can not conform to community norms will simply be denied the opportunity to participate. The cheaters? Gone. The posts that use weird mark-up to make their way past the language filter? Deleted.

    But to be truly effective, the rules can’t be simple. Enforcement needs to keep the “arbitrary” in “arbitration.” Back in the fourth grade, sitting at the table at the back of Mrs. Sicko’s (her real name) classroom (as we used plastic knives to carve mis-shapen seals out of bars of soap as some sort of way of commemorate the fact that an Inuit community far away carved seals out of soap stone), Dana Serowick told me the reason why I couldn’t join the rest of the group was because no one with black hair was allowed. I don’t have black hair. We have a team of moderators who all view the rules slightly differently. One feature of this situation is that there will always be small deviations in how the rules are interpreted and enforced.

    One of the tools that admins can use in our online community is shunning. We call it banning (or, more clinically, “temporary account restrictions”), but it is shunning. And, like shunning in the real world of schoolgirls, one’s social status is even more precarious when they are allowed back into the group.

    And while school cliques need to rely entirely on a traitorous lack of trust to gain information (and we have that, too, through the “report this post” button), our online community has far-reaching surveillance powers. Not only do admins have more access than other users, but I have access to (a copy of) the database. I know what you said. To whom. And how you edited it later. I googled the original version of the problem from your post, and I found it on a professor’s website, in a current assignment in a class taking place at a university whose network you logged in from. I’ll be watching your future posts.


  • From the Bug Reports

    More real and imagined homework bug reports.

    1. The answer space on this problem randomly submitted a number.
    2. just… no.
    3. I put 0.3333333333333333333333333 a lot of 3’s for the answer. Can you make that right for me?
    4. I said 4, but then it turned it into a different number.
    5. If we make a typo like writing 625 instead of 5, it should not be marked wrong.
    6. I had no idea that I had to answer the problem. That hadn’t even crossed my mind.
    7. I accidentally put 7 as my answer, but I didn’t mean it.
    8. Whenever I complete a problem, a non-negative integer taken from the ordered set \(\{0, 1, 3, 5, 7\}\) appears next to it, purporting to communicate some sort of meaningful information about my mastery of the material and my understanding of the concepts. Rather, grades are just an abstract construct, and the idea of using fewer than three bits of information per problem to describe my performance in this class is nothing less than farcical.

  • Staring at the Sun (Part 1)

    There was a total solar eclipse in North America on Monday, February 26, 1979.

    Somehow, before the Internet was an everyday household thing that consumed the lives of everyone, everywhere, people (including five-year-olds) learned information about things, including solar eclipses. For my five-year-old self, at the time, I am assuming that I learned about the eclipse from television because the television was on almost all the time at my house. I do not think that Miss White, my kindergarten teacher, said anything to us about the solar eclipse.

    As I have mentioned before, I am from Schenectady, which was not in the path of totality but which had a partial eclipse. I remember very serious and important warnings about the dangers of the eclipse. Do not look at the eclipse! The eclipse can ruin your eyes forever! There were instructions for building magical eclipse-watching boxes. I did not understand at all how these boxes might work. (I was five. It would not be until six years later at SAAC camp that Mr. Williams would turn his classroom into a pinhole camera that I would understand the concept. Ten more years later, I turned the bunkroom at Panarchy into a pinhole camera for one of our daytime open-house parties.) Keep in mind that 1979 was before you could buy eclipse glasses on the internet. It was hard to buy weird things.

    I don’t remember any people who I actually knew talking to me about this important but dangerous and vision-destroying eclipse. My construction of this event must have come entirely from watching television and listening to the radio. Maybe I read something in the newspaper? Do five-year-olds read the newspaper? I also don’t remember anyone mentioning the eclipse on the day that it happened. It likely would have started when I was at school and finished up after I came home. If you’ve ever lived in upstate NY during the winter, you know why no one cared much about this partial eclipse. It was completely and totally overcast that day. I don’t even need to look up the weather archives to tell you that.

    Several days or weeks after the eclipse of February 26, 1979, I saw a weird crescent-shaped feature in the lower part of my field of vision, just left of center. It was a color that I call greenpurple. I immediately decided that I had destroyed my vision in the eclipse. I knew that I couldn’t tell anyone, as they would be furious. The spot went away fairly soon after it appeared. It would come back from time to time over the years. I still think of it as the eclipse-spot.

    It was not until over thirty years later that it finally dawned on me that I experience migraine with aura.


subscribe via RSS