Zhangsan unmasked

[note: this is my first linguistics qua linguistics post here, as opposed to on Descriptively Adequate. i'll keep those old posts archived there, but i think everything new will live on ecormany.com] 

anyone who's read more than their fair share of syntax articles knows about John and Mary, the dull protagonists of every English example sentence. John kissed Mary. Mary was kissed by John. *Mary was given by John the book.

read even more and you'll figure out that several languages have their own stock characters. Italian has Gianni (who keeps making telephone calls). Japanese has Taroo and Hanako. Mandarin has Zhangsan and Lisi.

i never quite knew what to make of these names. does Zhangsan have all the same connotations of plainness as John? out of curiosity, i turned to Google Translate. i remember some old Language Log posts [1] [2] on how to fool the software into giving you odd "translations" for proper names that reflected parallel uses. for example, Austria is the Ireland of Germany, apparently. to do this, you had to be crafty or happen upon it by accident, since you had to input English text but tell Google that the source was in fact German. the possibilities for things going wrong when you ask a computer program to translate English to English with a German-to-English algorithm are rife.

anyway, back to Zhangsan. to query GT on him, i had to play some tricks too. as far as i can tell, GT doesn't take romanized input for either Chinese or Japanese, so to get his name in characters, i had to  "translate" the string 'Zhangsan' from English to Chinese.


next, those two characters back into the Google Language Mangler to get our English equivalent! drumroll for… 

Joe Smith.jpg

…Joe Smith. i think he'll get along  great with John.

gradebook automation with TextExpander and Keyboard Maestro

i'm teaching my writing seminar course for the fifth time this semester. you would think that would mean that the class is running at peak efficiency. in terms of what goes on in the classroom, it is. but there's one big difference behind the scenes: the last time i taught the course (in 2011), i hadn't yet been converted to TextExpander, Hazel, or Keyboard Maestro. and now i have them all at my disposal.

the old system: a sliding rubric spreadsheet


i teach a writing seminar, so the bulk of the assignments are essays. i give letter grades on these, but don't assign points to them. however, by the time the semester is done, students have written 6 or 7 short essays. i could eyeball 6 letter grades and try to come up with a fair average for everybody, but i know it wouldn't come out equal. so for equanimity and ease of computation, i convert all the letter grades to numbers on the back end. i could just apply a fixed rubric and be done, but i like to have a little bit more control over the grade distribution — again, without inadvertently creating bias towards one student or another.

to accomplish this, i set up a two-table spreadsheet in Numbers, one with students' scores, and one with a rubric. last year i waited until the entire semester was over and then ran a bunch of manual find-and-replace commands to link each grade cell to the corresponding rubric cell. the result is the only actually useful implementation of Numbers' slider cells that i've ever found. as you can see easily from the conditional formatting that i've put on the "paper average" column, tweaking individual paper grades triggers related changes in the course grades.

the automation: enter TextExpander

this semester, i decided that i didn't want to wait until all the papers had been collected and graded to be able to see the quantitative results. to do that, i needed a fast way to create a reference to the rubric cells. there's a mousey way (select the grade cell, type =, click the rubric cell, type enter), but it's slow and error-prone. instead, i decided to write a quick TextExpander script snippet that would give me a fill-in field where i could just type in the grade and have the cell reference generated automatically. it's not the prettiest thing ever — just a manual lookup in a hash — but it's fast and effective. if i accidentally mistype a grade, it returns no output, which is better than mis-clicking a rubric cell or bringing down the wrath of Numbers' formula editor in more creative ways. now i just type "gbg" (for gradebook grade) and i get this form:

gradebook snippet.gif

in testing, i can enter a full column of grades for my 18 students in 60–90 seconds. way better than waiting until May to sort it out.

more column-filling: attendance

i also keep a separate Numbers spreadsheet for attendance. i admittedly print this spreadsheet out (blasphemy, i know!) because making tickmarks with a pencil as my students enter the room is still the quickest, least intrusive way of keeping track. at the end of each week, i transfer the information back to my spreadsheet, which counts up absences and tardies and counts them against my students' allowable absences (3 per semester; tardies count as 1/3 of an absence).

again i was looking for the fastest way to transfer this information. that involves marking absences X and tardies T and then filling in the rest with checkmarks ✔. the simplest manual solution is to fill the whole column with checkmarks and then insert the X's and T's, but all the extra symbols are pretty visually distracting. then i wind up doing a lot of copy-pasting and working with Numbers' very finicky drag-to-fill operation.

it's almost certainly overkill, but i decided to build a Keyboard Maestro macro to do the filling for me. the method is simple:

  1. grab the contents of the current cell
  2. see if it matches T or X
  3. if not, fill it with ✔
  4. move down one cell
  5. repeat until it hits the bottom (current cell = ✔)

the format of the macro is below. i'm sure there's a better way (perhaps involving Applescript?), but i was happy for the practice building some more complex macros. and i'm guessing that it could be adapted to several other data-entry scenarios where the application isn't directly scriptable.

km attendance macro.gif

it's all about repetition

teaching and learning are all about repetition. for the instructor, there are always tasks that have to be iterated across students, or across class meetings. the best we used to be able to do was build muscle memory. now we can build tools.

a couple other things that i've automated so far this year that i may post on later include exporting Keynote slides to PDFs and sharing them, and batch-processing assignment files downloaded from course management software. even if i'm not coming out time ahead, it keeps the process fresh.

made connections

yesterday i did something that used to be impossible.

i shuffled down a line of people waiting to order food, scanning faces. i stopped at someone, head-down, tapping (a message to me, it turned out) on a white iPhone.

"Diana? nice to see you!" we hugged. to the best of my knowledge, Diana and i had never before been in the same room at the same time.

that's how i met an old friend for the first time. describing it that way makes it sound paradoxical, oxymoronic, …impossible. but in the moment it felt natural, comfortable, real. that the first words out of my mouth weren't "nice to meet you" surprised neither of us. we already knew each other. you don't need to stand on ceremony with friends.

how do friendships build to that point? the answer is a little bit of the real world and a lot of the internet. in this case, our lives both orbited around Ann Arbor, MI at roughly the same time. we acquired mutual experiences, mutual friends…spirals and concentric circles, never crossing. but we became aware of each other's existence, and followed our subsequent revolutions around the country and around twitter, the web, soundcloud. because we followed each other, we were able to realize that our paths finally, serendipitously were passing very close to each other. only a minor course correction — negotiated over twitter DM — and we landed in Cambridge, MA, at the same organic cafe, on the same afternoon.

a generation ago, ten years ago, hell, probably even five years ago, we would have just been one long string of missed connections. yeah, that person i heard about a while ago. no, dunno what they're up to now. but in 2013, we connected. frequently it's difficult to explain to people on the outside what you get from twitter. when you tell them that it connects you with people you care about, their faces usually scrunch up with skepticism. but the internet isn't just a TCP/IP connection, a handshake of packets and bits…it's also a satisfying human handshake, the kind where the webbing of your thumb presses tight and for a few seconds, subliminally, you feel the other person's pulse and another flesh and blood creature becomes part of your life experience.

regardless, i'd be lying if i didn't point out the touch of surreality around an otherwise lovely afternoon that led to wonderful conversation. Diana was the third of my twitter friends that i'd met in the course of the weekend (hi Arika and Heather!). when people i knew from words and pictures kept materializing in front of me, i got the unnerving sense that Some Magic was going on. the fabric of reality seemed to have a little pinhole in it, and i was standing on its frayed edge.

in normal circumstances, i'm convinced of the firm reality of the world…to bend and break Decartes, cogito ergo sunt — "i think, therefore they are." i experience the world, and therefore it's either objectively real or i'm inventing the whole thing as i go, and i feel that the latter is a bit beyond my skills. but words are so close to thoughts, and despite the internet's connective power, it tends to reduce to words. if i were uncareful about how i strung those facts together, i could fool myself into thinking that i was conjuring people out of nothing.

but the only magic that really happened this weekend is that the world got smaller. or, perhaps not smaller — since everyone involved had traveled distances more or less great to arrive in Boston — but denser. i've said before: the internet is like living in a big city. it pushes and pulls people together and lets us create and share and laugh and talk and become friends. it's possible.