Archive for June, 2006

26
Jun
06

It’s not all about the grades

Rate Your Students posts a dialogue about grades vs. learning. In the red corner, we have a student whose stated objective is “nothing short of getting the best grades possible”. In the blue corner, we have a cynical academic first-person-plural who “know about the outside world [...] and [...] don’t even have to acknowledge it”. Round one: fight!

I butchered both of those quotations for the sake of flow. You’d probably better go read the full exchange on RYS, just to make sure that I’m not bullshitting you.

This is the point where I jump up and down, point my finger, and shout, “See? SEE? That’s what I’m talking about, that right there!”

This anonymous student just wants grades. I quote:

All ANYONE looks at is how well we did. We both know that. So what’s the motivation to speak up and argue? Why run the risk? That sort of prevelant mindset may upset you, but it’s reality. It’s logical. It’s reasonable. And I certainly think it’s understandable.

This is a perfectly logical argument flowing from a premise of steaming bullshit. The premise?

All ANYONE looks at is how well we did.

Well, no. The only people who care about how well you did in school are the HR people who put your resumé at the top of the pile. Grades will get you an interview.

Now, let’s say you get your interview, and from your interview you get a job in your field. Now what? Your grades won’t help you again until you leave this job (voluntarily or otherwise) and apply for another. You have to fall back on what you learned in your fancy expensive degree. If you learned the fundamentals of your field — you know, the stuff we’re trying to teach you — then picking up the specific skills your employer needs should be pretty straightforward.

If you majored in grade-grubbing and minored in boozeahol, things might not be so easy.

25
Jun
06

Get your point across

I enjoy writing. I enjoy programming. I enjoy writing about programming. (I hate programming "about" writing, though. Of course, all I've written in that regard are a few half-assed markup languages, so perhaps it comes down to lack of experience.) Writing prose and writing code are amazingly similar, and the great masters of software tend to be pretty damn good authors (I'm thinking of Don Knuth, Joel Spolsky, Martin Fowler, and Kent Beck. Oh, and Brian Kernighan and Rob Pike. And Andy Hunt. And Dave Thomas. And . . . ). I don't know of any great authors who've taken up programming and excelled, but I imagine that E. B. White and William Zinsser would make better-than-average programmers.

Writing a half-assed piece of code that sort of does what it's supposed to isn't all that different from writing a half-assed five-paragraph essay that sort of gets your point across. You start with a vague idea of what you want to do, think up a few places to visit along the way that make a mild amount of sense, and dive right in. You write furiously for a few hours, force your way to a contrived conclusion, and give it a quick glance to make sure that there aren't any glaringly obvious fuckups. Then you hand it in and hope for part marks. Both pieces are shoddily written, and if — O horrors unforseen! — you have to revise them, you're lost in a world of tangled clauses and lizard shit.

On the other hand, writing an outstanding program is like writing an outstanding piece of discursive prose: you think about what you're doing, set up the structure you need to get where you're going, and systematically and ruthlessly remove every obstacle to getting your point across.

Let's start with the most obvious part of this metaphor: when you're writing code, your immediate audience is the compiler (or interpreter — whatever). You desperately want the compiler to understand what you're going on about.

If you get the syntax wrong, the compiler throws an error message. Syntax errors — in code and in language — are routine, annoying, and easy to fix. (This is why I get so annoyed when people misuse apostrophes.) If your syntax is dubious, but technically okay, the compiler throws a warning. Warnings are your compiler telling you "I don't think this means what you think it means". Like annotations from a proofreader, they're there for a reason. Worst of all, the compiler may silently mistake your meaning and generate code that does something you didn't expect. Yes, folks, that's called a "bug".

The compiler is like any other reader — it can't read your mind, it can only read what you wrote. Unlike most sapient readers, though, it can't look past the text to find meaning. It can't be generous in its interpretation. It can't get the gist of what you meant from a broader context. It sure as hell can't give you the benefit of the doubt — or maybe it can't not give you the benefit of the doubt, and spits out an executable regardless of whether your code made sense.

Other programmers — this includes yourself in two weeks (or two decades) — can look past the code to figure out just what the hell you were trying to do. This is where life really starts to suck for a maintenance programmer.

If you write spaghetti code, branching from topic to topic and back again, your readers won't be able to figure out what the hell you're trying to say, what you've already said, and where you might be going. If you want to cover a lot of ideas in one function, you'd better treat them briefly and go into more detail later, or your readers will get lost, confused, and frustrated. If you stuff every task you can think of into a single monolithic block of code, your readers will be just as impressed as they would by a thousand-word paper crammed into one epic three-page paragraph.

If you look at programming as writing, you get some good idioms for free. Unless they're exceptionally well-structured, long sentences confuse readers — likewise, gratuitously complex one-liners need to be exceptionally clear. Paragraphs relate well to functions: keep them short and focused. Cover a single idea in depth, or a number of simple and related ideas, or introduce several complex subtasks and elaborate in what follows. A short trip through Strunk & White's The Elements of Style will give you hundreds of ideas.

The metaphor isn't perfect, of course. Prose is basically linear (hypertext, footnotes, appendices, and the like notwithstanding), whereas code — well-designed code, at least — is anything but. Prose doesn't have to worry about the environment in which it's read — code does. Code needs to, before everything else, drive a computer — prose often doesn't have to do anything.

Still, writing code is a lot like writing prose — both make you organize and present a complex idea in an easily understood manner.

Both make you get your point across.

23
Jun
06

I see fit people

Travel sucks.

I get up at 0400h Thursday morning to catch an 0630h flight out of Milwaukee, on three hours' sleep. Four cups of coffee later, I'm in Minneapolis — and my next flight's four hours away. I got a decent meal at the airport's TGI Friday's, but four hours is a long time to sit on one's ass in a crappy airport seat, between a screeching brood of toddlers and a guy with a pinstriped suit and a Bluetooth headset who's certain that he's a high-powered, wheelin' and dealin' executive business shark.

That said, there's something going on in MSP these days. Most people were your standard north american travellers — slouching, out of breath, dragging wheeled carry-ons behind them along motorized walkways. In other words, the kind of people who make me want to hit the gym.

But I also saw a lot of people who stood out from the crowd. Energetic, vigorous people, with heads high and shoulders squared. Women with powerful legs and honest-to-Sagan glutes, not just bags of flab drooping from brittle hips. Men whose sixteen-inch arms didn't come from eating breakfast at Krispy Kreme six days a week. People with solid and crisply defined shoulders, traps, and backs.

I saw fit people.

Thank goodness.

20
Jun
06

Beers of Milwaukee, vol. 5

(Enough with the Flying Dog already!)

I don’t remember being able to find Flying Dog when I hit the Denver area for a family reunion a few years back, but most Milwaukee liquor stores sell it. That’s just wrong.

I tend to drink local minibrews. Back in Edmonton, I drank a lot of Big Rock — largely their Traditional ale, but also Grasshopper (a wheat ale), as well as their unfortunately named Cold Cock porter. About a decade ago, beer delivery workers went on strike, denying the likes of Molson Canadian and Labatt Blue to the whole country. As a consequence, Big Rock sold beer to dried-up pubs and restaurants across the whole province and beyond, and advanced from a decent but obscure microbrewery to a ubiquitous brand-name beer, at least in Alberta. Those bars kept buying Trad and Grasshopper long after the beer-strike disputants kissed and made up, and most still sell Big Rock. This is a good thing — it’s a good beer.

In Vancouver, I generally drink Granville Island’s pale ale when I’m out, although Kootenay mountain ale and black lager are strong contenders. (I try to stick with what’s on tap, unless it’s something disgusting — Blue comes to mind — and the bar stocks decent bottled beer.) God — or Adam Smith, depending on how much faith you place in the free market — blessed British Columbia with many and varied excellent mini- and microbreweries: Granville Island (pale ale and IPA), Okanagan Springs (1516 lager and a delicious — and dangerous — porter), Kootenay (their black lager is “Guinness Light”, and I mean that in a good way), Tree (based in Kelowna; their Hophead IPA is outstanding, as is their London Spy porter), and Steamworks (actually a brewpub, but their nut brown ale, their oatmeal stout, their pilsner, and their lager are all delightful) come immediately to mind. We have it pretty good on the Wet Coast.

But in Milwaukee, I drink Flying Dog. (Except, perhaps, at ball games.)

Anyway, I found a four-pack of Flying Dog’s Gonzo Imperial Porter the other day. This beer is Flying Dog’s tribute to Hunter S. Thompson; I’m predisposed to enjoy any beer that includes this quotation

I hate to advocate drugs, alcohol, violence, or insanity to anyone, but they’ve always worked for me.

on the box, particularly if (like Gonzo Imperial Porter) they’re ridiculously dark and thick, and rather malty and bittersweet.

Gonzo is fairly close to Young’s Double Chocolate stout (which, I’ve noticed, is now available in four-packs of large cans). It’s very thick, bittersweet, and rich, and it’s immensely satisfying. This is not a beer you drink after mowing the lawn. It is a beer you savour to end a pleasant evening. It goes particularly well with caustic and cynical nonfiction, and — if you can manage it — a quiet, happy, and somewhat detached cat in your lap. Sibelius, not Slayer.

It’s pretty good. You should buy some.

19
Jun
06

Take me out to the ball game

My uncle treated me to a Brewers’ game today at Miller Park. It was quite good, despite the fact that the umpire called a somewhat larger than expected strike zone and, consequently, the four runs scored on a home run and two errors. Whoops. Still, good defence is fun to watch, even if I would have liked to see a few more runners reach base.

Before the first pitch, we were treated to a short message from the announcers urging us to “stay alert” for our own safety. Now, I realise that I’m in the minority on this subject, but when I go somewhere and mix with thirty thousand energetic, motivated, and half-drunk people, I tend to keep my head on a bit of a swivel. I’m not particularly concerned about terrorists detonating a dirty bomb at a Brewers’ game — well, unless it’s in New York — but the odds of a dispute between a Brewers’ and a Tigers’ fan entering my space in a swinging-bottles way are fairly significant. For that matter, the chances of me catching a foul ball with my forehead are fairly significant if I give all of my attention to my beer. A certain degree of alertness is justified.

Lurking terrorist threats aside, I ran across a number of rather irate people who would have gladly tried to rearrange my face if I’d been wearing a Detroit ballcap. This situation was compounded by the sad fact that Miller Park cuts everyone off by the last out of the seventh inning — not so much fun if it’s a pitcher’s game and there have been perhaps four hits total by said play. Imagine twenty-eight thousand keyed-up and frustrated baseball fans, at closing time, who cannot leave the bar. I realise that these people would’ve been even less unthreatening if I’d run into them completely fitshaced driving out of the park, but still: I’d rather come across annoyed sports fans inside two tons of steel cage than outside. In any case, it wasn’t a great place to let one’s guard down.

Speaking of beer: Miller Park, despite the name, offers a wide variety of local microbrewed concoctions. (I understand that most of the microbrews present at Miller Park have been, in fact, bought out by the eponymous corporation — I just don’t give a shit as long as the beer’s still good.) As I prefer to drink draught as much as possible, I stuck to Sprecher’s Amber Ale, which suited the occasion just fine. It reminds me of Big Rock Brewery’s Traditional Ale — and considering that, for all intents and purposes, I grew up on Trad, that’s quite a compliment.

17
Jun
06

On spheres and hyperplanes

So I’ve been reading about homogeneous geometric algebra. The idea of representing planes as spheres passing through a point at infinity is astonishingly elegant. I must have it for my research, even if I’m not too clear on where it fits.

16
Jun
06

Keep yourself safe

What’s the police:criminal ratio in your town?

Myself, I cannot say. My police department seems to have roughly thirty street-going officers (from what I can tell from their org chart) for roughly 350 serious crimes in 2004. How many of those crimes were committed by repeat offenders, I have no idea.

I have to say, I think my police department’s doing a wonderful job. Outgunned by perhaps ten to one, they’re kicking ass.

But.

When a bus driver was beaten unconscious by two disgruntled passengers a month ago, no-one intervened in time to prevent said bus from plowing into a parked car.

When some asshole stabbed a teenager at a local transit station back in April, no-one intervened in time to keep said teenager’s skin intact and keep him out of the hospital. Never mind that my city has recently commissioned a number of “transit cops” with full municipal authority (and carrying full-sized Glocks, as far as I can tell — I hope they’re actually loaded).

Never mind that Harper’s Conservatives are trying to impose more, um, imposing sentences upon violent criminals.

If you’ll grant me a jaunt across the forty-ninth parallel for a moment, I’ll cite a remarkable no-shitter from California’s State Bar:

Some batterers respect [restraining] orders; some do not. In some instances, seeking a restraining order may put you in greater danger of significant bodily injury or death.

So, people prone to violence don’t necessarily become gentle peace-loving individuals when a court tells them to do so. How dare they?

Further:

High Court to Rule on Power of Protective Orders

In particular:

Justice Sandra Day O’Connor, a moderate who is viewed as one of the swing votes on the court, appeared to side with Castle Rock on another of the town’s arguments: that affording due process rights to those whose protective orders are violated
would set a precedent that would impose new burdens on state and local government.
[...]
Lenora Lapidus, director of the Women’s Rights Project at the American Civil Liberties Union in New York, argued the point during a press briefing before the trial. “Without systems of accountability in place, women and children are subject to the whims of local police departments and may suffer grievous harm from their abusers,” she said.

Overturning the lower court would deprive victims of a tool that serves several valuable purposes: In addition to deterring crime, restraining orders alert the police to certain individuals deemed by the court to be potentially dangerous; apply a lower threshold for the arrest of individuals who violate protective orders; provide a record that can be used in future court proceedings; and help perpetrators understand that their actions are wrong, according to the National Center for Victims of Crime.

“If the law’s claimed purpose to protect is a fraud, we should know that,” Gonzales said in a statement. “We should know that we are on our own when someone is out to murder our children.”

Yeah, we’re on our own.

I have run across, but cannot find to cite, a number of articles which report that victims of crime have sued their cities and states for failing to protect them, and have lost. Unless and until I find these citations, you should probably regard that as heresay, but I think it corroborates what I’ve cited above. Basically, I don’t believe that your police department has or feels any obligation to protect you personally — if anyone is obliged to do so, it is you yourself.

As John Farnam (and other notables) will tell you, the best ways to stay out of trouble are to:

  • Stay away from dangerous people
  • Stay away from dangerous places
  • Not do dangerous things

I imagine that if most of us realized that we’re the only thing between ourselves and a sucking chest wound (screwdrivers are a bitch, and not even remotely illegal to carry), we’d be a bit more circumspect and fewer of us would die.

Otherwise, it sure makes me feel safer to live in a place where only cops and criminals are allowed to carry weapons.

16
Jun
06

Beers of Milwaukee, vol. 4

Okay, enough with the Flying Dog.

Today’s beer is Rogue Brewery’s Mocha Porter. It’s — as advertised — remarkably light and crisp for a porter, but nevertheless an honest-to-Feynman porter. It’s thick, it’s dark, it’s sweet — it’s a porter, okay? And it’s tasty. Shut up.

To my taste, it’s a bit hoppier than most porters — not that that’s a bad thing; in fact, that’s probably why Rogue (and I) describe it as “light and crisp”. A good beer, by any measure, and worthy of your hard-earned money.

That said, I keep buying Flying Dog’s pale ale. What can I say? I’ve been in the mood for strongly hoppy beers these days.




anarchocapitalist agitprop

Be advised

I say fuck a lot
Grammar Nazi

Categories

Archives

Statistics FTW