Tuesday, December 9, 2008

Do real people actually use Windows Server?

Tonight I got one of many tech e-mails I get at school. In this case, the issue was related to a printer being down -- actually, a number of printers. If enough printers fail, it's a high priority issue, because it means teachers and students walking long distances to get print outs, and that's a lot of lost time at school (students may be thankful for the exercise and chance to socialize, but that's not really what we're aiming for).

Anyway, I decided it would be worthwhile to go into the server remotely and see what I could about the condition of the printers, so I could prioritize how important it was to get to fixing these printers soon. But the server is a Windows 2003 server. Our standard way of accessing it is over VNC or RDP, both of which can be really slow in the wrong conditions.

I've been waiting a good 30 seconds to get a response to each click remotely, which makes my "quick check" not so quick. This raises the question: why on God's green earth am I "clicking" anything?

There are lots of reasons why it doesn't make sense for a server to run a GUI. Among them is this: it's incredibly inefficient to transmit a picture of a whole desktop, and mouse events, etc., just to find out some basic information. If this thing were simply a *nix commandline, a 1200 baud modem would have sufficed to complete my inquiry in a few minutes. As it is, I'm giving up after a half hour (for what it's worth, I've been doing other things while I wait for responses from RDP). Do real people use this crap?

More and more I've been missing the commandline as I have to do admin work. I know that clicking is (theoretically) faster than typing commands, but between the ease of doing things remotely (I've spent hours programming on a remote system in emacs without noticing any difference from working locally) and the scriptability inherent in the commandline, I'm finding it hard to believe that people who administer machines for a living could ever do without a decent shell as their base of operations.

(Note: I know windows has a command prompt, but it's a pale shadow of bash, and as far as I know out of the box Windows Server does not have an ssh server enabled)

Sunday, November 30, 2008

Pronouns, by the numbers...

I start teaching students in the 9th grade, after they've had, ideally, a full 4 years of Spanish. One of the things I have to actively unteach is the overuse of subject pronouns. One of the things I have to teach and teach and reteach is the correct use of enclitic object and indirect object pronouns. For the 5+ years I've been teaching Spanish, this fact has driven me somewhat mad.

Below is a chart the explains why:

This chart lists a few common Spanish pronouns, followed by their rank in a word frequency list in Spanish, followed by the chapter in which they're taught in an online Spanish curriculum whose design mirrors most textbooks:
  • le - ranks 19th (3rd most common pronoun)... taught in chapter 44 (Unit 4)
  • me - ranks 33rd (5th most common pronoun)... taught in chapter 41 (Unit 4)
  • tú - ranks 554th (28th most common pronoun) taught in chapter 7 (Unit 1)

Needless to say, if we map the word frequencies of the English translations of the above, the chart seems much more logical...
This chart lists a few common Spanish pronouns, followed by their English translation's rank in a word frequency list, followed by the chapter in which they're taught in an online Spanish curriculum whose design mirrors most textbooks:
  • le - him - ranks 64th (10th most common pronoun)... taught in chapter 44 (Unit 4)
  • me - "me" ranks 76th (14th most common pronoun)... taught in chapter 41 (Unit 4)
  • tú - "you" ranks 15th (2nd most common pronoun) taught in chapter 7 (Unit 1)

There are a number of technicalities I could comment on here. Obviously, for example, translating "le" as "him" is not a simple equivalence. But nonetheless, the basic point stands. Also, it's worth noting that "you" (the #2 pronoun in English), is ranked 554th overall in the Spanish word frequency list. I'm quite sure that no living English pronoun ranks so low (we'll ignore "thou" and "thine" for obvious reasons). The reason, of course, has something to do with the fundamental structures of the languages (specifically, the fact that Spanish is a null-subject language), which is exactly why I have to work so hard to un-teach what is, traditionally, put front-and-center for students in Spanish 1 (chapter 7 of Unit 1 above, to be precise).

All of which begs the question, exactly which language do the textbook authors think we're teaching?

Friday, November 28, 2008

Struggling with the Rule of Least Restriction...

Two posts have me thinking about the construction of assignments.

First, Tom Hoffman wrote a nice post excoriating an assignment shockingly chosen as a "model" of good standards-based work:

Given that, for good reasons, we're normally much more polite when we talk about other teacher's work, it was nice to hear Tom let loose. How often do we really get a chance to take apart the tasks we assign to kids? How often to English teachers really define what rigor or analysis means and what it can reasonably mean to a student?

The assignment has me thinking about this post on "the rule of least power". What Dan calls the "rule of least power" I would rather call "The rule of least restriction" (oddly, for once, I'm turning town a computer science metaphor for a special education metaphor). The idea is that when you create an assignment, you should always impose the lease powerful (restrictive) frame on a problem possible. This allows as much re-use/re-interpretation as possible, including students taking things in directions you never dreamed of (just as web developers can take easily-scraped data in directions you'd never dream of).

Thinking back to the assignment Tom was attacking (which makes the standard five paragraph essay assignment look open-ended), I admit that it is more likely to get the kind of predictable essays on Anne Frank that some teachers (or some tests) seem to like getting. But, crucially, it doesn't invite the students to ask any questions themselves or to discover why they might be interested in doing so.

On the other hand, the kinds of open-ended tasks I would rather give students are much more open to failure. And that catch -- the fact that assignments that ask students to do real-world tasks or that ask students to think in an open-ended way are far more likely to end in messy, hard-to-grade work or in outright hands-in-the-air I-don't-know-what-to-do failure... well, that's the problem I've been unsuccessfully struggling with my whole teaching career.

Dan finishes his post by formulating his rule of least power in this way:

1. Tell no student to care.
2. Tell no student how to care.
3. Apply increasingly powerful frameworks to mathematical objects only as the class cares about them.

Please don't confuse this with hardcore, Waldorfian constructivism. I have an agenda, a standard to meet, a lesson objective. But I don't fence my students onto a narrow path to my objective. I instead pave the ground beneath them so that the path to my objective is the easiest and the most satisfying to walk.

It's a high bar he sets. It's hard to figure out how to "pave the ground" so that the path you want students to walk is "the most satisfying to walk". It also strikes me that the more authentic your task, the less control you have about how students approach it, ergo, the harder it is to make sure students reach a standard or meet an objective while carrying it out.

Nonetheless, I'll definitely be challenging myself to think about presenting grammar at least (the most mathy thing I do) in the terms he describes (i.e. set up a problem + least restrictive framework and let it lead the class to the learning I want). Meanwhile, I'll try to think about how this problem-solving framework can map onto the stickier world of open-ended humanities-type assignments.

Tuesday, November 11, 2008

Using data to remediate, teach, improve

I just found this inspiring math teaching blog, which has me somewhat down about my own teaching and classes. Dan's posts on keeping data in particular have me thinking quite a bit.

I've long maintained that traditional language programs simply ignore the fact that most students are learning virtually no conversational skills. You march the kids through a set of tests and drills designed to teach the language and assume it's worked (or it hasn't), but you don't measure whether they can converse. So what do I do -- I measure whether kids can converse. But that's costly in terms of classroom time and teacher resources, and so I can't actually do it nearly as frequently as I'd need to for it to be really effective.

Looking at the math blog has me thinking about the discrete skills that go into language -- whether that be recalling a piece of vocabulary of conjugating a verb or understanding how enclitic pronouns work. And I'm wondering whether it wouldn't be worth charting student's abilities with respect to these skills much as Dan does for his math students.

Of course, working toward that chart could start to look like that textbook march I was lambasting a paragraph ago... after all, having all the grammatical puzzle pieces that go into language is not the same thing as using language. However, if used with a linguistically informed approach to teaching the skills, and used alongside authentic assessments of actual linguistic skill (could answer comprehension questions on article / could converse for 2 minutes / etc), maybe just maybe something like what Dan's describing would be transformative in a language classroom (maybe, just maybe, in mine).

Does anyone know of any language teachers doing anything like this -- graphing student achievement, remediating quickly, making sure students have actually learned the concepts we think we're teaching... I'd like to think it would be commonplace.

Sunday, October 19, 2008

"Yo estoy" or "Estoy yo": word order, subject pronouns, and the sticky question of whether all text books take the wrong approach?

In my lovely grammar-book-in-progress, I make a point to put the subject pronouns after the verbs in all verb charts: hablo (yo) / hablas (tú) / habla (él), etc.

I do this for several reasons:

  • To break the speaker's habit (from English) of looking for subject pronouns before the verb

  • Because it is perfectly common in Spanish, as evidenced by the y-terminal "yo" forms (doy/estoy/voy/soy) which originated from "do yo / esto yo / vo yo / so yo/ etc.

  • To help avoid confusion when enclitic object pronouns are introduced, since "me quieres tú" is easier to parse if you're used to "quieres (tú)" than if you're used to "(tú) quieres"

  • Presenting "estoy yo" suggests, unconsciously, that the verb form ("estoy") determines the pronoun ("yo"), rather than that the pronoun comes first and the verb form second. I think this subtly helps prepare students for the fact that Spanish usually omits the subject pronouns, meaning that the verb form is the only source of subject information.

I consider these reasons sound. The only reason I can see for doing it the other way ("yo hablo / tú hablas / etc.") is that it will allow transfer from English. However, I see this as an anti-reason, and I wonder if teaching that focuses on drilling "yo amo / tú amas / etc" encourages other, incorrect transfer, such as "*ella hablas español" (there, the student has transfered both word order and the conjugation from English).

Given this, I'm sad to say I've never seen a Spanish text book that presented the subject pronouns as I do. Has anyone else? If not, are there reasons I'm not thinking of why teaching beginners to say "tú quieres" is a good idea?

Saturday, October 18, 2008

Spanish spelling errors in English, and viceversa!

One of the things I focus on in my Spanish teaching is phonetics -- I focus there partly because understanding the phonetics of Spanish will allow my students to have a better accent, but largely because I believe a better grasp of the Spanish phonetic system enables students to understand authentic Spanish much better.

I'm often excited when I see students make the very errors I try to warn them off of in their interpretation assessments, because it lets me reinforce that the phonetic patterns I'm teaching are real (they often seem to only half-believe me). For example, when a student transcribes a Spanish "r" as a "t", "d" or "l", and when they transcribe an intervocalic Spanish "d" as a "v", it's a great opportunity for me to talk about what the Spanish "r" and "d" actually sound like (the "d" being transcribed as "v" is particularly interesting -- the English phoneme that matches the sound is spelled "th", of course, but students know "th" is unavailable as a Spanish phoneme so they hear another voiced fricative -- "v" -- in its place, until, that is, they've internalized the pattern that intervocalic "d"s are like our voiced thorns).

Anyway, today in my geek blog reading, I read the following in a Spanish-speaking hacker's blog:
Benchmarking software is not an easy thing to do. It may look trivial, but it requires a bast amount of time and effort when you want to do it right.

Notice the "b" for a "v" there. What that tells me is that Alvaro almost certainly learned the word "vast" orally, rather than through writing, since his spelling is otherwise impeccable, and that, in spite of being literate in English, he is still hearing English with Spanish phonemes. Which is to say, he hears the voiced labiodental fricative ("v") as a voiced bilabial fricative (β), which he understands as the intervocalic allophone of the phoneme /b/.

Of course, one possible reading of this is to say that Alvaro appears to be a fully functional English speaker who has not internalized the English phonetic system... which suggests that the typical Spanish student who does not understand that, for example, the Spanish phoneme /d/ encompasses something very like our "d" as well as an allophone that is exactly like our phoneme /ð/, which we spell "th", may not be in such a bad situation.

Nonetheless, I think it does make a difference... a student who hears the phrase "de dónde eres" as "devonderes" is surely at a disadvantage (and that error is not that atypical in my experience, provided you provide students with actual examples of Spanish speech, and not with typical American-Non-Native-Speaker-Spanish-Teacher pronunciations.

Saturday, October 4, 2008

Dialect and the VP Debate, taken up by a real expert

Who better than linguistics-populizer Steven Pinker to take up my rambling thoughts after the VP debate in an articulate Op-Ed on the style and content of Palin's speech. He agrees that the "en" vs. "eng" is a conscious dial of informality, but clarifies that the accent is authentic (however much it annoys me).

Thursday, October 2, 2008

VP Debate

So I hadn't really seen much of Palin until tonight. My God, it felt surreal seeing her on stage with Biden. I also hadn't seen too much of Biden before, who was remarkably sharp. She seemed completely out of place.

I'm struck that I have no idea how affected Palin's speech was. The high frequency of "-in" (in place of "iŋ") for the "-ing" ending and the phrases like "you betcha" and "gosh darnit" are the obvious things about her speech, but she also has quite a strong noticeable accent.

Thinking about the "-in" vs. "-iŋ" distribution, I realize that there's an interesting intersection of accent and formality here -- in this case, (nearly) all speakers use both endings in informal speech and avoid "-in'" in formal speech. What this meant was that Palin's constant use of "-in'" seemed not just like her accent, but like a deliberate attempt to seem folksy, or, alternatively, like a failure to take the debate seriously.

This leaves me wondering about the rest of her accent — it also struck me as out of place in the debate. The question that leaves is, is that just prejudice against her accent, or am I right that her accent was not just non-standard but obnoxiously informal.

Regarding the content of the debate... I'm a bit shocked now to be watching the PBS talking heads suggesting that the debate was a wash... granted, expectations for Palin were low, but she looked rather incredibly outclassed, outsmarted, and outspoken to me.

Sunday, September 7, 2008

How I relax...

So if you know me, you know I've been working far too hard the last few weeks. On Friday, I got home and though I had a pile of work to do, I knew I couldn't do anything unless I let myself relax a bit first.

A bit of backstory — one thing I started doing this summer to relax was taking up guitar lessons again, which has been a good thing. One thing I've been working on is learning series of inversions. The thing I like about this exercise is that it allows me to generate a limitless number of new chords, which means I can now help myself get un-bored when I find myself in a guitar rut. Lately, for example, I've been taking some songs I wrote that have very simple progressions (just C and G basically) and playing with different inversions and voicings.

Anyway, I realized what I really wanted to do on Friday was to write a program to generate those series of inversions for me. Here's an example of how it works...
./inverter.py 3x043x
Printing inversions of 3x043x

In that case, there are three inversions generated because it's a three note chord. If I give it a chord with four notes, it will of course generate four inversions:
tom@hydrophax:~/Projects/chord_inverter$ ./inverter.py 3x443x
Printing inversions of 3x443x

I can also make it print out the notes so I can keep track of where the root is:
$ ./inverter.py --include-notes x3201x
Printing inversions of x3201x

And of course it can move down as well as up:
$ ./inverter.py --down xxx988
Printing inversions of xxx988

Finally, it handles alternate tunings -- here's the inversions of D in drop-D tuning for example (which, by the way, illustrate that not all inversions are pleasant to finger -- check out the second chord):
$ ./inverter.py --tuning DADGBE 0xx323
Printing inversions of 0xx323

This means it will work for any fretted instrument.

The next step would be to have it name the chords, but of course that's kind of complicated. One of the things that pops out of this sort of exercise are "oh duh" moments like when I generated this series based on Am7 and found that the 2nd chord was already fixed in my muscle memory:

It took me a second until I realized something I already knew: an Am7 has all the same notes as a C6, which is what I'm used to calling 8x798x...

The next step would be to cook up a web interface and make this into a handy tool for everyone. In the mean time, the full source code follows... (by the way, if anyone knows how to attach a generic file to a post or do the equivalent of an lj-clip on blogger, please let me know!)

#!/usr/bin/env python

import types
UP = 1
DOWN = -1
notes = ['C','Db','D','Eb','E','F','Gb','G','Ab','A','Bb','B']
synonyms = {'C#':'Db','D#':'Eb','F#':'Gb','G#':'Ab','A#':'Bb'}
x = None

def get_degree (note):
'''Return the numeric degree of the note named note.
return notes.index(synonyms.get(note,note))

def get_name (degree):
'''Return the name of the note from the degree'''
abs_degree = degree % 12
return notes[abs_degree]

def add_to_note (note, steps):
return get_name(get_degree(note)+steps)

def get_interval (a,b):
"""Return the interval in chromatic steps between two notes
a = get_degree(a)
b = get_degree(b)
if a > b:
b += 12
return b - a

def pad (txt, length, pad_char = '-'):
if len(txt) > length:
raise ValueError
elif len(txt) == length:
return txt
pad_with = length - len(txt)
left = pad_with / 2
right = pad_with / 2 + pad_with % 2
return pad_char*left + txt + pad_char*right

class String:

def __init__ (self, root='A'):
self.root = root
self.nroot = get_degree(self.root)

def get_note_for_fret (self, n):
return get_name(self.get_degree_for_fret(n))

def get_degree_for_fret (self, n):
return self.nroot + n

def get_next_fret_in_chord (self, start, chord, direction=UP):
for n in chord:
assert(n in notes or n in synonyms)
raise ValueError('Chord contains invalid note %s'%n)
if start is None: return start
n = start + direction
chord = [synonyms.get(note,note) for note in chord]
while self.get_note_for_fret(n) not in chord:
n += direction
return n

def get_fingering (fingering):
if type(fingering) in types.StringTypes:
fingering_ltrs = fingering[:]; fingering = []
for char in fingering_ltrs:
if char in ('x','X'):
return fingering

def fingering_to_txt (fingering):
s = ''
for f in fingering:
if f is None: s += 'x'
else: s += str(f)
s += ' '
return s[:-1]

class FretBoard:

def __init__ (self, strings='EADGBE'):
self.strings = [String(n) for n in strings]

def fingering_to_chord (self, fingering):
fingering = get_fingering(fingering)
chord = []
for fret,string in zip(fingering,self.strings):
if fret is not None:
return chord

def invert_chord (self, fingering, direction=UP, chord=None):
fingering = get_fingering(fingering)
if not chord:
chord = self.fingering_to_chord(fingering)
next_fingering = []
for fret,s in zip(fingering,self.strings):
if fret is None:
return next_fingering

def get_inversions (self, fingering, direction=UP):
chord = self.fingering_to_chord(fingering)
n_fingerings = len(set(chord))
fingerings = [get_fingering(fingering)]
for n in range(n_fingerings - 1):
fingering = self.invert_chord(fingering,
return fingerings

def print_inversion_series (self, fingering,direction=UP,include_notes=False):
fingerings = self.get_inversions(fingering,direction)
lines = []
for n,s in enumerate(self.strings):
line = '-'
for fing in fingerings:
fret = fing[n]
if fret is not None:
note = '(' + s.get_note_for_fret(int(fret)) + ')'
fret = str(fret)
note = ''; fret='x'
if include_notes:
line += pad(fret,3) + pad(note,4)
line += pad(fret,3)
for l in lines: print l

if __name__ == '__main__':

# If called from the commandline, treat our argument as a chord
# and print the series of inversions...
import optparse

parser = optparse.OptionParser(option_list=[
help='A custom tuning'),

optparse.make_option('--down',dest='direction',default=UP,action='store_const',const=DOWN,help='Print the series of inversions moving up the neck (down in pitch). Default is to move down the neck (up in pitch'),

(options,args) = parser.parse_args()

if False:
if options.tuning:
fb = FretBoard(strings=options.tuning)
fb = FretBoard()
include_notes = options.include_notes
direction = options.direction
for a in args:
print 'Printing inversions of ',a
import traceback; traceback.print_exception()

Thursday, August 28, 2008

Someone else agrees with me: learning styles don't exist!

So I've often said in an off-the-cuff way that I don't really believe in learning styles. More concretely, I've often said in my Spanish classes that I don't believe in visual language learners, because, well, language is auditory. I particularly hate diagrams like this, which are supposed to cater to visual language learners:

The reason I so hate that diagram is that it tries to use a visual clue to organize supposedly arbitrary information, disguising what is in fact a very simple auditory pattern (a pattern called dipthongization, which in fact exists in English as well as Spanish).

Anyway, today I noticed in a post on Tom Hoffman's blog that he linked to a video called Learning Styles Don't Exist. It's a little simplistic, but entertaining and, I think, right.

So, has anyone heard of this guy before? Is he right? Does anyone outside of the world of education take learning styles seriously? Is there any research to support them?

Or is the reason that the "different learning styles" line is so common in educational circles really that many teachers are (or are imagined to be) simply uncreative, and it's easier to tell them "cater to different learning styles" than to say, "be less boring", or "try out something new"?

Wednesday, August 20, 2008

Sysadmins are not programmers

In my new life as a technology liason/sometimes sysadmin, I've had occasion to watch a Windows Systems Administrator at work, and to marvel at the ways in which the mind of such a person is not the same as the mind of a programmer. This is, to me, rather shocking: after all, the great thing about computers is that they're programmable, right? So someone who spends their lives working with computers... well, you'd expect them to know how to automate things.

I've always assumed that being a computer type means that you follow a very simple axiom: never repeat manually what could be done by a program for you.

In other words, automate the automatable, whenever possible, and, when it's not possible, whine like hell.

It turns out that our SysAdmin consultant does not think this way. Or perhaps it's simply that his definition of "possible" is extremely limited. At any rate, as a result of his ignorance in this matter, I've been reading up on scripting, trying to get myself the requisite literacy in Windows programming that, staggeringly, the Windows expert lacks. In this case, I have a very simple, very tedious task to do:

1. Collect a list of student users from our online student information database.
2. Create Active Directory accounts for those students that don't already have accounts.
3. Delete Active Directory student accounts for students not on our list.

This is the kind of task that any lover of computers should refuse to believe must be done by hand. (Note that I also had to create google-based e-mail accounts for these people — that was a no-brainer because google is not designed by idiots (there's a defined csv file and all I have to do is massage the data into that format and upload it).)

Lo and behold, after much fruitless searching, I have at long last found instructions for creating Active Directory accounts from information in a spreadsheet (or, if they were more sane, a csv file) (hopefully that link will help future googlers).

As I began to read those instructions, though, I was struck by the following strange prose, which so confused me, and so revealed the weirdness of the category of "System Administrator", that I had to stop reading and write this blog post. Here goes:
System administrators, or so we are often told, are the last of the rugged individualists. System administrators don't use mice and dropdown lists; they type their commands at the command line. System administrators don't bother with graphical user interfaces; they like their data displayed in the command window. System administrators don't pull up to the drive-through window at a fast-food restaurant, they actually get out of the car and... well, okay, even rugged individualists have to draw the line somewhere. The point is, you can run a script by starting it from the command prompt and passing it a bunch of command-line arguments; in addition, you can output data to the command window or to a text file. What more could you possibly need?

The truth is, there are lots of times you don't need anything else. On the other hand, sometimes—just sometimes, mind you—system administrators look at applications like Microsoft® Excel and think about how nice it would be to harness some of the capabilities Excel for their own use. Consider, for example, the need to create a bunch of new user accounts in Microsoft® Active Directory®. Could you do that by passing command-line parameters to a script? Sure, if you don't mind typing in command strings similar to this:

cscript new_user.vbs /cn="Myer Ken" /sAMAccountName="kenmyer" /givenName="Ken" /SN="Myer"

Okay, maybe that's not such a good idea. But couldn't you read in all the information from a text file? You bet you could. Of course, the text file would have to look something like this:

"Myer Ken","kenmyer","Ken","Myer"
"Jones TiAnna","TiAnnajones","TiAnna","Jones"
"Smith Ben","Bensmith","Ben","Smith"

That works, too, but good luck getting your HR department to supply you with a text file that looks like that. Can you use these techniques? If you want to. But think about how easy it would be for your HR department (or whoever) to type all this information in Excel; in fact, there's a good chance that's what they already do. Yes, Excel is a graphical utility, and, yes, you're a rugged individualist, but just this once, wouldn't it be nice to be able to take an Excel spreadsheet, run a script against it, and then use the information gleaned from the spreadsheet to create a whole bunch of user accounts, all in one fell swoop?

Okay, sure, not for you. But maybe you have a friend who isn't as rugged an individualist as you are. If so, tell your friend that he or she is in luck. This month we're going to tell you—um, we're going to tell them how to use a script to read data directly from an Excel spreadsheet, and then use that data to create a bunch of new user accounts in Active Directory. And then next month we'll show them how to go the opposite route: How to grab data out of Active Directory (or some other location) and display it in a nicely-formatted spreadsheet. And listen: If you decide to try these scripts, we promise not to tell your fellow system administrators. Promise

Ok, let's look at the crazy assumptions in the above:
  1. The point of the commandline is that you can do things with lots of parameters, which shows you're knowledgable.
    Actually, the point is that you can chain various commands together, and save useful combinations thereof in scripts. No one prefers typing long chains of obscure switches to pressing a few buttons; it's just that there's no way to program button-presses, so programmers prefer the commandline. It appears that sysadmins (as imagined by the above prose) try to imitate programmers by typing everything into a commandline, but don't actually understand it).
  2. A CSV text file is scary
    WTF? Is there any decent programming language that doesn't have simple libraries for handling CSV files?
  3. An Excel file is different from a csv file
    Again, WTF? Is there any person sufficiently computer literate to be reading this document who couldn't turn a given excel file into a csv file easily (Save As...)? And is there any HR department that could be trusted to get column headers etc. exactly right so you could run a script using their Excel file? Or is it actually true that all the crap excel adds to data to make the HR department happy (like formatting, for example) just gets in the way of the programmer, which is why you'd convert to CSV in the first place. I assume in this example we'll massage it into a predetermined format of Excel file instead, but if that's the case, there's really no difference between the Excel solution and the CSV solution.
  4. Rugged individualists wouldn't run scripts against spreadsheets
    Huh? I frankly can't imagine how any thinking person (and I assume these straw-man rugged individualists would style themselves thinking people) could possibly consider creating users doing anything other than running a script against something like a spreadsheet (assuming, that is, that one is copying a list of users from elsewhere, such as HR).

Of course the ultimate WTF is that this functionality isn't built into AD at a more basic level.
Anyway, I'll be reading the rest of the article soon. The odd thing about the article is that it seems to posit a commandline-using sysadmin in opposition to someone with a modicum of programming knowledge. And that, I must say, is very strange.

Saturday, August 16, 2008

Pronunciation snobbery and Beijing

The other day the radio, I heard an NPR reporter doing explicitly something that has always implicitly bothered me about NPR reporters. She was talking with their China correspondent and asked him how to pronounce "Beijing". He explained that it's actually (in Chinese) pronounced [beʤɪŋ] (with a "j" as in "juice") and not [bejʒɪŋ] (with a "j" as the "s" in "vision" or "treasure"). An article I found here at cnn.com goes so far as to make this hyperbolic claim:

Television networks should be setting a higher standard of pronunciation and fulfilling their role of informing and educating the viewing public," he said. "Mispronunciations are misinformation. The casual attitude of the networks towards this matter is, at best, negligent and, at worst, bordering on disrespect for China and the Chinese."

This is absurd of course. No one is recommending we actually try to reproduce the Chinese pronunciation of "Beijing", in which nearly every sound would be foreign to us (I believe it begins with an unvoiced non-aspirated bilabial -- not a voiced bilabial like we use) and in which we'd have to make sure we got the tones right. In no way does not speaking Chinese border on disrespect for the Chinese.

This is a more widespread phenomenon. I see it when the NPR folks try to spanishify their pronunciations of Latin American countries, (saying "chee - lay" instead of "chilly" for "Chile", for example). Have they forgotten that they're speaking English? It also reminds me of a habit of a certain acquaintance-who-will-go-unnamed who always strikes me as terribly pretentious in pronouncing all foreign words with faux-correctness, taking care to avoid flapping the "t" in words like "risotto", for example.

It strikes me that the NPR version of this has something to do with not wanting to offend people, or with the belief that Americans generally are woefully, shamefully ignorant. But isn't it obvious that all over the world people speak a handful of languages at best, and frequently just one or two (as we do), and that when they refer to other people's words, they follow the sound patterns of their own languages? I of course can pronounce Spanish place names just fine when I speak Spanish, but I find it awkward to try to pronounce them in Spanish when I'm speaking English -- that's why we warp pronunciations to fit our own sound patterns in the first place.

All of this rant is premised on my assumption the Beijing is always pronounced [bejʒɪŋ]. That does the beg question of whether I'm wrong and [bejʒɪŋ] and [beʤɪŋ] have existed as variants for some time. Is that the case? Has anyone ever heard the [beʤɪŋ] pronunciation used commonly? Is it common in Britain or other English-speaking countries? (note: pronunciations by Chinese speakers and hyper-self-conscious broadcasters don't count as common use).

Saturday, August 9, 2008

Grrr... I hate closed source software

So in my new life as a tech administrator, I've gotten to play with OS X server and client machines. It turns out that OSX includes more or less the equivalent of Norton Ghost for free — that's a good thing. Our school hadn't configured or used this functionality in the past — that's a bad thing. Enter me to save the day!

Anyway, long story short, our previous tech guy had upgraded our server to 10.5 in order to fix some now-forgotten-about bug (grrr #1: paying to get upgrades that are really bugfixes). So, long story short, after a long time today setting up an image and setting up the server to use it, I had a problem: for some reason Mac's System Image program wasn't seeing my source disk as a valid image. I couldn't figure out what was going on for the longest time, until finally on Mac's website I discovered it: with the 10.5 version of the System Image program, you can only create images of System 10.5 and later. Our client machines all have 10.4.x on them.


It's funny what you end up taking for granted in the open source world I'd been living in. Here are the things that would normally be unimaginable:
#1. That I can't update without making a big expenditure (and in this case, it would not just be one new client license but many)
#2. That I can't downgrade if an updated piece of software isn't any good (i.e. I can't get or run the 10.4 System Image program on my 10.5 server).

To solve this, I'll have to downgrade everything to the 10.4 server and hope that whatever bug bugged our last tech guy won't affect our new environment.

It's also quite puzzling to me that the System Image software cares about what kind of volume it's installing. I'd think with the base infrastructure in place, you'd be able to distribute images of any kind -- Window, Linux, Mac, what have you. I can understand that their might be some value-added stuff the System Image software can do that's specific to the OS, but it seems strange that they couldn't support at least a base functionality for any old system disk.

Lazy web programmers (or are they just stupid?)

I'm setting up some online auto-billing to save the pain-in-the-ass of stamps and checks here... this always gives me a chance to see some fine web programming on display. Here's an error message I just got that, unfortunately, is not at all uncommon:
Please enter 10 digits, leaving out characters such as "-" or "/".

My first response is: you lazy piece-of-crap programmer, how hard is it to strip out the character.

But then I realized something — the programmer isn't exactly lazy, they're stupid, because they took the time to write the code that generates the error message, but didn't take the time to just do what the user wants.

Here's some pythonic pseudo-code to illustrate:

To do it the right way
inputstring = get_idno_from_webform()
inputstring = inputstring.replace('-','').replace('/','')

To do it the wrong way...
inputstring = get_idno_from_webform()
def confirm_idno ()
inputstring = get_string_from_webform()

Grrr... makes you wonder -- who hires these people and how much do they make?

(Note: I realize that even in the ideal code you'd need an error message for cases where the user typed something totally invalid, so maybe they're just lazy after all. Still, the error code that handles things like a user typing "!)(*@!$#KJ" should pretty much never run, whereas the code that handles dashes (which are printed on the bill as part of the number) is really much more important and will be called for more often than not.)

Friday, August 8, 2008

D.A.R.E. Update

Today K was accosted by the same D.A.R.E. identity-card selling people in Arlington center that I wrote about a few weeks ago. In her case, they told her that next year ID cards would be required for children and cost a mere $65, making their price ($40) much more reasonable. They also helpfully suggested that if she didn't have cash she could give them a credit card number! So, it looks like this is an out and out scam and I should take back anything I implied about D.A.R.E. itself.

Except that the scam is based on an actual D.A.R.E. fundraiser, which, on second look, I was able to find on their website here. The description of the actual fundraiser is quite perplexing. Here are some choice quotes...
As part of the Child Safety I.D. Program representatives will offer D.A.R.E. Medical Emergency ID all-FREE of charge. During these events products including D.A.R.E. t-shirts, ID cards, DNA kits, safety videos and other child-oriented products, will be displayed and available for purchase...
This campaign is a great way to introduce and remind children about safety information. If children are made familiar with these techniques through reminders and role-playing with parents, they are less likely to find themselves in dangerous situations. We hope that no child or family ever has to use the emergency/medical D.A.R.E. ID card.

The above really doesn't get any better if you read the full context -- it's incoherent, at least to me. What, for example, is the referent of "these techniques"? In what sense are DNA kits child-oriented products? I still have no idea why I would be motivated to get this card, whether for free or (in the case of our local scam-artists) for $40 (although if they got my credit card number, I'm guessing it would come to much more than that...)

Wednesday, August 6, 2008

Tomatoes worth eating have finally arrived

I just finished a few weeks vacation in the Adirondacks. I returned to Arlington just in time for the farmer's market. The difference between what the market was when I left and what it was today was staggering: summer came out while I was gone. Tonight's dinner absolutely blew my mind — it's amazing how every year I forget just how good peak flavors are. In true farm market fashion, the foods that came out the best tonight were those I did the least to. The heirloom tomatoes sliced and sprinkled with basil and salt were the kicker. I had intended to do something else with them, but after making my first cut into one and tasting it, I knew anything else would be a waste.

These were the first tomatoes I bought this year — I've been letting my nose be my guide above all else, and it hasn't disappointed; you have to wait for tomatoes with that knock-your-socks-off fragrance, but it really is worth it. It makes me wonder whether it's worth buying fresh tomatoes the rest of the year at all (if you can't have the good stuff, it seems better just to go with canned, which pack more flavor than off-season fresh tomatoes anyway).

The corn was also fabulous — so much so I didn't adulterate it at all, just grilled it in its husk and ate it straight. I don't know why I ever bother trying to eat corn before August.

Monday, July 21, 2008

Python debugging

So I just discovered the awesomeness that is ipython -- specifically, the awesomeness that is the ipython embedded shell.

Ever wished you could just stop at a given point in your program and start poking around using the handy dandy python shell? Here's how.

# We clear the args because arguments to your program will confuse IPython
import sys
sys.argv = []
# And now we embed a shell...
from IPython.Shell import IPShellEmbed
ipshell = IPShellEmbed()

This even works from in the midst of a GUI (I use it in the midst of my gtk program).

For a lazy programmer like me, this is a godsend. Now rather than reading back through my code to find out what I need to do, I can plop the below code wherever I'm in the midst of working, then find myself landed in a shell where I can inspect my objects, variables, etc., figure out just what I need to add to my code, and give it a test run.

Wednesday, July 16, 2008

D.A.R.E., fear-mongering, and a question about identity fear

So when I was in high school, it was a cliche to make fun of D.A.R.E. as a fear-mongering, ineffective program. I don't actually remember if I ever went through the D.A.R.E. program, so I can't comment on whether it was or was not effective or fear-mongering as a high school program, but I had an experience today where I was accosted by a D.A.R.E. representative on the street in my role as parent (I was with Grace), and I learned that our local D.A.R.E. folks were involved in a whole new kind of fear-mongering: working off of the fear of medical emergencies (and, oddly, identity theft).

What the D.A.R.E. representative tried to sell me on was not (as I would have guessed) donating to D.A.R.E. Instead, she wanted to sell me, for a mere forty dollars, an identity card for Grace that would include medical information about her and give permission to treat her in case of emergency. She showed me a sample card and explained that it was an "official" something-or-other. She then reassured me that the card wouldn't have Grace's full name on it, so if it fell into the wrong hands, I wouldn't have to worry.

This raised a number of questions for me. Some of them rhetorical, some genuine (actually, maybe they're all both rhetorical and genuine):
  1. If a child were to show up in an emergency with a treatable, life-threatening condition and no guardian present, would they deny treatment? I somehow feel like they wouldn't (it's also hard for me to imagine just how Grace could end up in such a scenario, but I understand that in order to get into the proper D.A.R.E. mind-set I am to imagine the worst of all scenarios in the worst of all worlds...)
  2. Is there in fact a subset of plastic-like-identity cards that are "official"? What makes them so?
  3. Why would I be afraid of someone finding out my daughter's name? Aren't names public information? Is there anything scary that can happen to her with her name known that couldn't happen to her with her name unknown? (I've heard the name worry come up in a web context. A number of students have told me they're allowed to have facebooks/myspaces/etc., so long as they don't use their full name, or their last name, or what have you. I presume that the fear behind this is that someone will see their picture, decide to stalk them, and then, knowing their name, be able to track down their home address, etc. Are there other things about names that I should be afraid of that I don't know?)
  4. Why is D.A.R.E. selling medical-alert-ish identity cards? (Note: I couldn't find anything about this on their website, nor could I find the cards -- is it possible the D.A.R.E. table in Arlington center was actually entirely a scam? seems unlikely...)
If anyone knows the answer to these questions, I'd be interested to hear them.

Fall from Grace

I am trying to write more, and it also occurs to me that I'd like to be blogging more. I thought about setting up a content-specific blog -- but it's hard to anticipate what I'll be writing about, so I'm hoping that the "labels" feature of blogger will enable me to categorize things usefully, so that someone interested in the teaching side of this blog can avoid my sentimental musings on parenting and so on.

Speaking of sentimental, let me start off this blog from a journal entry I wrote earlier today. This week I'm on solo-parenting duty while K takes a class at UMass Boston. I've gotten into the routine of taking Grace out for a walk for her first morning nap -- usually I end up at our local Starbucks or one of its competitors and it gives me time to read or write in my journal. Here's an excerpt from this morning's journal:

Back at the same table -- again, Grace asleep on my chest. Yesterday on the radio I heard a stroke survivor describing her stroke as an enlightenment-like experience. Her left brain was choked off in the stroke, leaving her mind thoroughly in the present and giving her a feeling of connectedness and unity (what James called a mystical experience). I dabbled in just enough Buddhism in college to intuit, along with the survivor, that this was a kind of ground of experience or being, though I realize there's no good reason to think that connectedness is any more fundamental to our sense of being than any other part of our psyche (say, the list-making or anxiety-generating functions of the brain). Still, she described her experience as a kind of return to infancy, and that struck me suddenly, the way nearly anything to do with childhood strikes me since I became a father.

I have been struck often by the sheer joy I see in Grace -- it's hard not to think that that boundless, unrestrained joy is in fact a default setting for humanness, a ground of being, what we feel when nothing stands in the way. And for now, for Grace, the obstacles to joy are small and generally easy to overcome -- she is hungry or tired or uncomfortable. It's hard not to imagine growing up as a kind of fall from grace, to think of consciousness as an accumulation of obstacles that stand between self and unadulterated joy.

Yet sometimes it is that very fall that makes my heart move as I see Grace the person emerging. More and more she cries not from hunger but from more unique wants -- there is something out of reach and she can't get it, or, try as she might to crawl, she just pushes herself further and further away from her destination -- her backwards crawling so cute to us until a pout quivers onto her face and slowly but surely breaks into tears of frustration.

There is an easy spiritual metaphor in that. Her desire, Desire itself, pushing her away from Joy, which is, ultimately, what she desires.

(And now I notice a teenager in line, glossy lipped, her hair teased out model-like, a pout planted firmly on her lips -- how many desires and anxieties tell the story of her crossed arms, her polished and painted nails, her mini-skirt, the words across her t-shirt, her dramatic stance -- how adult she looks, how thoroughly sad)

But surely this line of thought, the Golden Age, the Fall, leads ultimately to a kind of misanthropy. It is hard not to want to protect Grace from this (now she is waking up as I write this), but isn't the real thing to celebrate every little piece of being human as she discovers it--every tear, every grasp and frustration and laugh -- and now I'm starting to cry just watching her wake up in Starbucks -- isn't that the thing, even here, to wake up, to bring a tear.

I told you that would be sentimental. It's what's been happening to me lately. I cry at everything. I am so happy.