Archive for August, 2006

31
Aug
06

zOMG! Guns!

It strikes me as peculiarly Canadian to send our men and women into danger — entirely unarmed, because guns are scary! I quote:

About 5,000 Canada Border Services Agency officers have been demanding to be armed like their American counterparts to help them deal with cross-border criminal activity.

They have complained that their jobs are not safe, prompting some guards to abandon their posts amid reports of armed suspects headed their way.

Why aren’t these people armed yet?

31
Aug
06

Why don’t they listen?

I feel like bitching about students lately. Psychoanalyze this if you must.Okay, here’s the spark that ignited this particular cloud of powdered aluminum:

In particular, this comment stuck in my forebrain like a sliver of steel under a fingernail:

We have a statistical model (created by yours truly) that shows that if you take the class that we tell you to, then you have at least a 75% chance of passing with a C or better; if you ignore placement, your chances of success are much lower.

Now that classes have met for a few days, all sorts of students who placed into College Algebra or pre-calc are stopping by my office to tell me their sob stories and to beg me to let them into some sort of calculus course.

See, my basic problem here is that instructors, TAs, and so forth often go out of our way to tell students how to get good grades; the students ignore us, do the wrong things, and get bad grades; then the students complain that they got bad grades “which they didn’t deserve”.

For the past two years, I’ve TAed the “Computer Graphics I” course at my university. Two weeks before the first assignment is due, I send out an email entitled “How to get a good mark on your first assignment.” That’s exactly what I say in the email: here’s what you have to do to get a good mark on your first assignment. Show your work: if you convince me that you basically know what you’re doing, but missed an exponent somewhere, I’ll give you better marks than I will if you report a (wrong) answer with no elaboration. Comment your code: if I can figure out what you’re doing, I’ll be able to give you marks that I wouldn’t if you presented me with an obfuscated (and wrong) program.

Oh, and for the love of Gödel and all that’s Turing-complete, come to my fucking office hours if you have a question!

Does it happen that way? Of course not. Inevitably, someone bitches that I gave them zero marks on a written problem where they handed in nothing more than a (wrong) answer — after all, they “handed in something — doesn’t that mean they should get some marks for that question?”

No, asshole, read my email.

This reminds me of an old joke: (Please change the sexes of the protagonists to suit your own preferences; they are chosen to suit my own.)

An attractive young woman walks into a suave assistant professor’s office. She looks around conspiratorily, then shuts the door. The assistant prof sets down his coffee mug, and swivels to face her.

“I’m sorry to bother you, Professor, but I’m concerned about my performance in this course,” she whispers. “I need an ‘A’ to maintain my scholarship, and I’ll do anything to get it.”

The prof licks his lips, narrows his eyes, and smiles back. “Anything?”

The student crosses her legs (think Basic Instinct). “Yes, anything,” she breathes.

The prof stands up, steps around his desk to where she’s seated. He leans over and whispers in her ear:

“Will you… study for the goddamn final?

Basically, I’m pissed off that when students complain about how unfair their marks are, it’s not because the marks are actually honest-to-Sagan unfair, it’s because they got the marks they earned — but expect that they can negotiate a better mark.

Marks are not open to negotiation.

If I made a mistake while marking your assignment, I will by all means correct it if you bring it to my attention. If I made no such mistake, but you think you deserve a better mark, when you ask me for extra credit you are asking me to re-mark every assignment I have been given. You’re asking me to change my standards for your benefit. It ain’t gonna happen.

31
Aug
06

Damn proto-freshmen and their unfortunate first impressions

Okay, I really shouldn’t be using the term “freshmen”, because it’s sexist (what about freshwomen? Is that even a word?) and (horrors!) it’s American. That sentence is me trying to give a shit. I’ll stop now — it isn’t working.

This usually happens at the start of a september: my campus is overrun with gawking high-school graduates wandering herd-like down hallways and across quads behind hyperactive extroverted “orientation leaders” waving numbered placards and shouting perky imperatives.

There’s something wrong with this picture.

For one thing, I cannot stand the orientation platoon leaders. They screech banal bullshit. They halt their herds of confused proto-frosh smack in the middle of narrow hallways, forming clots of confused sluggish humanity that people like me — people with legitimate business on the other side — can’t penetrate without physical violence. (Today I learned that if you say “pardon me” after osoto gari, proto-frosh will assume that they stumbled over your feet.) And they do it all with a saccharine self-righteous smile on their wholesome scrubbed faces — it’s clear that they can’t possibly imagine that they’re inconveniencing anyone.

For another, there’s something wrong with the whole process of orientation.

I don’t know about the rest of the world, but at both universities I’ve attended orientation is designed to hold the proto-frosh’s hand and guide him, her, or it through the difficult, intimidating, and arduous process of getting a student ID and registering for classes. That’s counterproductive. These people are kids becoming adults. In many cases, they’re living away from home for the first time, buying food and paying rent out of their own pockets for the first time, and separated from everyone they know well. Stuffing them into an orientation group and holding their goddamn hands is not going to help them become self-sufficient.

These orientation leaders — they come across as frustrated kindergarten teachers. Numbered placards and zany chants and insipid group exercises and name tags — fucking name tags — what is this, grade school? A first-year university student is an adult, not a half-matured automaton who needs to be guided through the difficult and dangerous process of applying for a library card.

Don’t think this doesn’t carry over into their coursework. When the first thing a university does is tell proto-frosh that they need their hands held, and will have their hands held whenever necessary, the proto-frosh overwhelmingly believe the university. They think they need hand-holding, and expect it.

This steaming pile falls squarely in the laps of those poor bastards who TA first-year courses.

See, profs are remote, inaccessible (office hours? Oh no, those are scary!), and altogether unapproachable. TAs, though — we’re students, just like their orientation leaders. These poor people — understandably a bit intimidated by a new and alien environment, awed by their new responsibilities, and entirely too suggestible — expect us to come through and save the day. Their first exposure to other students with authority was their orientation leader, who obligingly filled out their student ID numbers on their bus pass applications. Now they have TAs, who they naively expect to fill the same role.

First-year logic student: “But what’s the right answer?”

Matt the Angry TA: “Look at the truth table and figure it out for yourself.”

First-year logic student: <existential shock>

Matt the Angry TA: <sigh> “Okay, suppose P is true and Q is true [...]“

It just doesn’t work. If you mollycoddle students through (say) Programming I, they’ll fail horribly when they have to write their own damn functions in Software Engineering I — and if you mollycoddle them through Software Engineering I, they’ll have no fucking clue what to do in Software Engineering II. You can’t explain design patterns to someone who writes his programs as one big function, or eigenanalysis to someone who doesn’t know how what it means to multiply a vector with a matrix.

Now, imagine what might happen if these proto-frosh started out with a somewhat more respectful orientation:

“Ladies and gentlemen, you’re adults. More than that, you’re fairly intelligent adults — if you weren’t, we wouldn’t have let you come here. Have a look at that folder we gave you. It tells you what you need to do to register for classes, get your ID cards, and so on. If you get lost on campus — and by Erastothenes we need better signs around here — or can’t figure out how to deal with the frigging Rec Office, feel free to ask one of the perky people in the bright green tee-shirts. We give them grande latte enemas every hour, on the hour, so they’re not going to sleep until next month anyway.

“Other than that: you’re adults, you’re on your own. Welcome to <something foobar> university. If you can’t cope with orientation, you probably don’t deserve to be here. The pub opens next Tuesday.”

That might actually work. If proto-frosh started out with the idea that they were responsible for their own success at university… my god, they might actually do the readings!

First-year logic student: “We need to be able to read truth tables for the midterm, right?”

Matt the Angry TA: “Yes, that’s why it’s on the midterm review list.”

First-year logic student: “Why are if clauses true when the antecedent is false?”

Matt the Angry TA: <swoons at intelligent question> “Because logic writers are unbearably pedantic.”

Alas, I can’t actually see this happening at any university with which I am acquainted. I don’t know whether administrators are afraid of scaring off potential tuition-paying automata — I mean students, I mean students! — or whether orientation leadership types are too caught up in the asshole-mainstream-political ideal of eliminating personal responsibility (and therefore personal freedom) from everything over which they have control, or what.

It’s that first impressions thing again. When you painstakingly guide some poor proto-frosh through his, her, or its registration process, you send the impression that the school you represent will do anything hard that needs to be done for them. That impression is entirely incompatible with higher learning. It must be stopped.

Toss the frosh into the fire. They’re competent adults — they’ll cope magnificently. Stop telling them that they need help with every detail and stop teaching them to expect it.

31
Aug
06

Form versus function

Let’s begin with a parable from Inside Higher Ed:

(Read the comments, too — there’s an entertaining subthread about women sexualizing men:

“When women objectify men, its a cool, chic, and enpowered act. When men do it, its sexist.”

Let’s not let a double standard get in the way of my rant, okay?)

I agree with Ms. Levine’s point, and I’m a bit surprised that I do. See, I find academia’s tolerant attitude towards eccentricity — particularly in one’s wardrobe — compelling. I spent a little while working in the private sector, and it galled me to be held to a dress code (“no jeans, no sneakers” — okay, if you want BDU trousers and garrison boots, I’m happy to oblige) when management wouldn’t let me anywhere near clients.

On the other hand, I’m deeply grateful that management wouldn’t let clients anywhere near me.

Lately, though, I’ve swapped my CADPAT for blue jeans and my Skinny Puppy t-shirts for polos. Why? Because no matter what we’d all like to believe, first impressions count for a lot — and visiting professors are more likely to take me seriously if I come across as an adult than if I come across as an angst-ridden teenager. If nothing else, they’re less likely to be distracted from my brilliant research by my new less-outlandish wardrobe. The same thing applies to table manners — I’d rather the distinguished guest lecturer across the table focus on what I’m telling her about my earth-shattering hypotheses than on my atrocious fork-handling.

The same thing applies to writing. When I submit a paper, I want the reviewers to look at the content — not get stuck on hundred-clause run-on sentences. I want to dazzle them with my screenshots, not baffle them with my atrocious grammar. I want them to re-read my proofs because they’re breathtakingly elegant, not because they can’t figure out what the hell I’m trying to say.

Further, I want to stack the deck in my favour as much as possible. Content counts above all else — but once I have worthy content, I want the packaging — the paper, the writing, the typesetting — to look as good as possible. This is where real typesetting systems like LaTeX and AMS-TeX really shine: they produce damn fine output left to their own devices, and they give you extremely fine control over things like spacing and hyphenation when their typesetting heuristics fail to produce exactly the right thing. I can spend an hour tweaking the spacing of symbols in a LaTeX equation and end up with a beautiful piece of mathematical typography. The mere thought of spending an hour in Microsoft Equation Editor makes me want to break my fingers.

As far as I’m concerned, Graham, Knuth, and Patashnik’s Concrete Mathematics is the pinnacle of mathematical typography. It was typeset using TeX (of course) and the Euler mathematical typeface. It’s a damn fine book in its own right, but the equations are works of art.

Ah, but there’s a catch.

When issues of proper appearance come up, most people argue from an absolute position. It’s always best to use your utensils from the outside in. It’s always best to typeset your articles in some variant of TeX. It’s always best to wear a nice suit, shirt, and tie.

Nope.

See, the form of whatever you present is itself a piece of content — it projects an image, an impression. You may project that image very effectively, in its most sophisticated and refined form, but if your audience wants to see something else, you are foxtrot uniform. Submit a meticulously typeset article on cryptographic methods to Wired magazine and the editor will laugh at you. Walk into a blue-collar sports bar in khakis and a tight salmon-coloured babydoll tee-shirt and you’ll get the shit beat out of you. It’s not just projecting an image — it’s projecting the right image.

(This is, of course, where the personal-security thread comes in. How people see you — which is directly related to what sort of image you project — largely dictates how much shit they’ll give you. If you look like a cheeseburger, they’ll try to eat you for lunch. If you look out of place, you attract attention — and you identify yourself as an intruder to anyone with a territoriality complex. If you blend in at first glance — and look inedible at a second glance — well, there are probably easier targets out there.)

Pay attention to how you say things as well as what you say.

26
Aug
06

First-rest list processing

If you’re a functional programmer (particularly a Lisp or Haskell programmer) — move along. I’m unlikely to say anything you don’t already know.

If you’re not a functional programmer, you might find this of use.

Everyone knows that the right way to traverse a list looks something like this:

int i;
for(i = 0; i < n; i++) {
    do_something_to(list[i]);
}

or maybe this:

node* n;
for(n = list->head; n; n = n->next) {
    do_something_to(n->data);
}

or even, if you’re one of those fancy OO types:

iterator* it;
for(it = list->CreateIterator(); !it->Finished(); it++) {
    do_something_to(*it);
}

You might be sick of writing out a for loop every time you want to munge every element in a list, and prefer to write something along the lines of:

list.map { |elem| do_something_to(elem) }

That’s all well and good, but it’s not the whole story. Sometimes it’s worth processing lists recursively.

Here’s my motivating example: I want to generate HTML. In particular, I want to generate a <p> tag, process the rest of the tokens in a list, and generate a matching </p> tag. Any balanced-action task will do — maybe you want to open and close database connections, or filehandles, or allocate and free memory.

If you’re stuck in a for-loop mentality, you’re going to have a hell of a time remembering to close the things you opened (in the right order, no less!) when you finish off a list. You can create and maintain a stack of actions, remembering to pop off (and close) actions when you get to the end of the list.

Hmm. Stack. Does that suggest recursion, or what?

Here’s how you do it:

process_list(first, rest) {
    open_action(first);
    if(rest != NULL) {
        next = rest.shift; /* pops off first item in rest; rest is destructively shortened */
        process_list(next, rest);
    }
    close_action(first);
}

Isn’t that pleasant? We’ll let the program stack remember where we are, recurse a while, and finish up at the end. Okay, it won’t work if the lists are ridiculously long — we’ll run out of stack space. But for most sane data sets, it’s easier than explicitly maintaining a stack.

First-rest processing works nicely when you’re parsing some data, too. Suppose you have a character string that, unbeknownst to the string itself, is (syntactically) a list of tokens. You can write a full-blown lexer in lex, if you want. You can count the number of tokens, allocate space for them, and then blow through the string, filling the allocated space.

Or you can just process the tokens once at a time:

typedef struct {
    token tok;
    char* rest;
} tok_rest;

tok_rest
next_token(char* rest)
{
    tok_rest tr;
    tr.rest = extract_first_token(rest);
    tr.first = get_token(rest); /* stops before next token */
    return tr;
}

token_list*
tokenize(char* string)
{
    tok_rest tr;
    if(string == NULL) return NULL;
    tr = next_token(string);
    return prepend(tr.tok, tokenize(tr.rest));
}

Okay, I’ve taken a few liberties with string processing and list manipulation, but you get the idea. A first-rest string (or list) processing function should only care about the first element in its argument. It should deal with that element — and let the next recursive call deal with the remainder. Eventually, you get to the end of the list, and everything starts popping back to where you started.

25
Aug
06

Beers of Milwaukee, vol. 7

Enough of this “hops” shit, let’s make with the stout.

Tonight’s beer is Goose Island Beer Company’s Oatmeal Stout. It’s damn good, as rich as (for instance) Young’s Double Chocolate Stout or Flying Dog’s Imperial Porter, but neither sweet nor overwhelming. Goose Island’s stout is as drinkable as St. Ambroise Noire, but richer and more refined — and less savoury. Better suited to a quiet evening than a night of (for instance) Counter-Strike. It goes well with literature. Strongly recommended.

23
Aug
06

Grade scales

Okay, so what makes a “good grade”?

At my institution of higher learning, an A+ translates into a 4.33 (4-point grade scale), an A into a 4, and so on. Big deal; there’s a standard mapping of letter grades into four-point grades, which makes it easy for anyone to evaluate one grade in the context of another.

But what about mapping marks (“You got a 74% on the third assignment”) into grades (“You got a B- in Intro Computer Graphics”)? How does the one get transformed into the other?

My favourite answer is “it depends”. Marks — at least in theory — are entirely empirical things. You get so many marks for satisfying each part of the assignment specification. If you implement this and this and this, you get this many marks. Sure, fine. That’s fairly obvious.

But when you take those “earned marks” and translate them into “overall grades”, you need to mess with things a little. Maybe my section of CMPUT 321 is tougher than Dr. Choad’s section of CMPUT 321, because I asked my students to write a Monte Carlo raytracer for their second project and Dr. Choad asked them to write “Hello, world!” in OpenGL. A 40% in my section is worth an 85% in his section, but they both correspond to an A-.

Or do they? How can you tell these things until the end of the semester?

My undergrad education was full of these problems. One prof of mine — intro deductive logic — complained that he’d promised everyone with a 90% or better average a 9 (on a 9-point scale — no, not a stanine), and a third of the class earned 90s. (That class was amusingly bimodal: most of the Arts majors who figured that a Philosophy course would be easier than a Math course failed it, and most of the CS majors who figured that a Philosophy course on logic they’d taught themselves in the eighth grade would be easy meat aced it. But I digress.) Another prof of mine thought it’d be reasonable to expect a 50% or better average from students, and that he could fail the rest — but he’d never taught an undergraduate analysis course before, and after the midterm the class average was 44%.

Several friends of mine took honours-programme math courses, in which a 40% was often the best mark in the class. They were crushed until they realized what was going on — they weren’t expected to understand everything perfectly, just to get the gist of what was being taught. On the other hand, I can’t really bring myself to believe that it’s okay for students to earn less than half of the available marks on a given assignment — what’s the point?

Back to the first question, then: what makes a good grade?

23
Aug
06

Beers of Milwaukee, vol. 6

That’s right, devoted fans, we’re back with another installment of the desperately beloved “Beers of Milwaukee” series!

Tonight’s beer is Victory Beer’s HopDevil India Pale Ale. It is, as you might expect, hoppy — though not nearly as sledgehammer hoppy as Tree’s Hophead IPA. Victory claims HopDevil to be “Bold, spicy, and menacingly delicious” — well, maybe. It’s sweeter than most IPAs, to my taste, but not too much so. HopDevil’s an excellent beer, on par with Flying Dog’s Pale Ale and IPA by taste alone.

What HopDevil has that others don’t is power. It’s a 6.7% beer — that’s a lot of drunk in a six-pack, folks. Good stuff, especially on a hot summer day.




anarchocapitalist agitprop

Be advised

I say fuck a lot
Grammar Nazi

Categories

Archives

Statistics FTW