Site icon Accidentally in Code

Duck Typing Applied to People

The other day, my boyfriend and I have a conversation along the lines of the following:

Boyf: Why does X keep talking about how she’s a cricketer*?

Me: I know, she’s never even thrown a cricket ball.

Boyf: Seriously? Then she’s not a cricketer.

Me: She self-identifies as a cricketer, I guess she is.

Boyf: I self-identify as a lolcat, does that mean I am one?

* Changed to protect anonymity.

Credit: flikr / Kevin Steele

How does this lead to Duck Typing, though?

Duck typing means that if it walks like a duck, and talks like a duck, it’s a duck. It’s used in both Ruby and Python – see the Wikipedia article.

If we’re a little bit like compilers, my boyfriend is smart in that he uses duck typing to decide what they’re like. I know I’m more inclined to take people as they say they are, which causes ClassCastExceptions further down the line.

A while ago, I read an article by Penelope Trunk in which she says, “People who workout regularly think of themselves as people who workout even when they are ditching the gym and eating ice cream.” I’ve been thinking of this lately as I try and get back into the habit of training post injury. I think of myself as someone who works out, so even though I’m busy, and tired, I drag myself out and go. I’m actually finally starting to enjoy it again, too. However if I didn’t go, no matter how hard I thought about being someone who worked out, I wouldn’t be. I have to walk the duck walk, not just talk the duck talk.

Credit: flikr / anomalous4

Here’s my suggestion for the day – let’s duck type ourselves more. This means:

Exit mobile version