Categories
Geek

When good programmers make bad choices for touchy-feely-smurfy reasons

Every now and again, I reserve the right to taunt a friend mercilessly. This is one of those times.

My friend Danny O’Brien was trying to decide whether to use Perl or Python for a project. He was originally leaning towards Perl; I blame the fact that he might have been living in California too long, or perhaps he’s inhaled too many fumes while changing his lovely daughter’s diapers.

He writes:

I’m utterly torn between Perl and Python. My first choice in this case would be Python, because bad Python code doesn’t seem to be quite so personal. I’ve seen people spit blood at other coder’s Perl, just because it’s not the way that they would do it. Perl demands rather more sympathy with your predecessor than does Python. With Python, it’s just more code to stare at.

This sort of statement makes me imagine Danny at an electrical engineering class: “But professor, how does Kirchoff’s Voltage Law make you feel?”

Danny’s statement seems to imply that Perl requires you to know the previous programmer’s “headspace” in order to be able to maintain his or her code. In other words, the language alone does not communicate the author’s intent without the kind of exegesis usually reserved for studies of the subtext of inside jokes that might have appeared in the Gnostic Gospels.

You wanna get all touchy-feely and sympathetic with the previous developer’s “inner child”, don’t read their code. Instead, why don’t you two curl up in front of the TV and watch Oprah, then go hop in the hot tub and kiss?!

What is this, the Matt Damon/Ben Affleck school of coding?

That said, your successor does need to actually know the language. Most of the people I can imagine maintaining this code will know Perl but not Python. Python doesn’t take that long to learn, but reading Python to take on someone else’se project just isn’t much *fun*. Sitting down to learn someone’s Perl, while tough, does teach you about the way they were thinking when they wrote the application. Python’s clarity, I think, cuts down on its expressiveness in depicting why certain decisions were made. When I had to hunker down and learn POE or Moveable Type, for instance, I came away with a very deep understanding of how it was supposed to work. It was fun, albeit time-consuming. I sometimes have problems doing the same with slabs of Python code, just because they can be very lacking in personality.

What you call personality, I call distraction. Yes, I’m probably bound to find out more about the previous coder’s approach to programming by their Perl code. I might even able to ratiocinate their astrological sign or whether they’re dominant or submissive. But damned if I can figure out what the hell they were trying to get the code to do.

Python’s clarity is what I like about it. My first Python project — an actual paying one with an actual deadline for an actual system to be used by actual users — required me to pick up where the original developer, who had to work on other parts of the system, left off. The clarity of Python actually allowed me to see his design decisions; the obscurity of Perl would’ve been a hindrance.

That said, I’m not paid to be a programmer. What is fun is a hobby can be skull-crackingly frustrating in a job with a deadline.

Even when I have plenty of time to kill (hah!), I’d rather have a language that let me concentrate on my task and less on the language’s idiosyncracies.

Danny, being the kinesthetic sort, learned his lesson by peeing on the electric fence:

Now, a couple of days into it, I’ve begun to seriously reconsider. I’m nowhere near the Mason bit of the application, and I’m getting continually bogged down in Perl style issues that really don’t have anything to do with what I’m trying to write.

To be honest, I think this is my Perl rustiness kicking in; and I think it may go away after a few more days hacking. Worse, though, is the effect of something I thought would be a real boon – CPAN. There’s a bunch of useful utilities there that I’d love to suck in and use in my program. But they all have different idioms – all of which I have to sit down and learn. Plus there’s the whole dependency issue: sooner or later I’m going to have to install all of this on the working server, and there’s a real penalty to be paid for being dependent on a lot of scattered Perl modules. Will they work? Will they still be maintained? Which of alternative implementations should I choose?

Not into the touchy-feely thing anymore, are we, John Gray?

Oh, I’m being cruel now. Group hug!

(I’m kidding, Danny.)

Luckily, he eventually made the right decision, and I’m happy to report that things are working well for him.

Otherwise, I might have to mock him even more.

Categories
Uncategorized

Roast beef should quit whining

In the online comic Achewood, Teodor and Ray are giving their friend Roast Beef — the unhappiest geek on earth — a Queer Eye for the Straight Guy-style makeover.

Beef isn’t very pleased with the results, as you can see. Stereotypical geek response.

Personally, I think he looks like a badass:

Photo: 'Achewood's' Roast Beef comapred with Joey deVilla.

Lookin’ good, Beef!

Categories
Uncategorized

Jin and Juice

Photo: Asian-American rapper Jin (from the New York Times).

Us Asian guys, we turn up where you’d least expect and always school you propah, dogg!

I’ll let this excerpt from the New York Times article tell the story:

In his lyrics Jin talks unabashedly about his Asian ethnicity, sometimes in self-defense but more often because he wants to bolster the idea of an Asian-American rapper. In last year’s battles on BET’s “106 & Park,” rival rappers most frequently hurled ethnic insults at Jin:

I’m a star

He just a rookie

Leave rap alone and keep making fortune cookies.

But Jin turned those taunts into his own disses:

You wanna say I’m Chinese

Sonny here’s a reminder

Check your Timbs

They probably say made in China

he raps, referring to Timberland shoes. And

Yeah, I’m Chinese

Now you understand it

I’m the reason that his little sister’s eyes are slanted

If you make one joke about rice or karate

N.Y.P.D. be in Chinatown searching for your body.

Yeah, boyeeeee!

Categories
Geek

Thank you, Blogger

I’m a little late in writing this. I meant to write this before moving over to Blogware, but as they say, “better late than never.”

I’d like to say “thank you” to Blogger.

Blogger got me started in the blogging game in the first place. Although I could thrown together my own “content management system” or simply done things the hard way by hand-coding HTML, Blogger was there, and it saved me the trouble of having to worry about technical issues and concentrate on what it is that makes a weblog: the writing.

The nice people at Blogger have impeccable taste; quite early on in the history of The Adventures of AccordionGuy in the 21st Century (remember, in the Blogger blog it’s “AccordionGuy”, here it’s “Accordion Guy”), they declared it a “Blog of Note”. Remember, this was well before some of my better-known, wilder entries.

How many applications can you say changed your life in ways both subtle and extreme? In my case, I can’t think of any other than Blogger. Blogging most certainly saved me from a big world of misery: you might recall the story about the New Girl, in which my effusive blogging about a new girlfriend prompted a reader (who became a reader because she liked an earlier post of mine) to warn me that this new girlfriend was not whom she claimed to be. Through blogging, I widened my circle of friends; I’m sure it also played a part in landing me a very nice job at Tucows.

Blogging encouraged me to write daily, which improved my writing, gave me more discipline, and acted as a way by which I get a better perspective on myself. I understand that line about the unexamined life not being worth living more clearly now — since I write about what I do and who I am, I give more thought to what I do and who I am. That has paid off in spades.

As you know, I switched tools.

At Tucows, we’re rolling out Blogware, our own blogging tool, and as part of the Research and Innovation Group, I’ll be making my small contributions, giving direct feedback to the developers and of course, “eating our own dog food”. Blogware’s a good tool with a lot of neat features, and I like it a lot. For all these reasons, I made the switch from Blogger.

However, I wanted to express my gratitude to Blogger for giving me my start. Let me pay Blogger the biggest compliment I can: blogging — which I did via Blogger — has been just about as life-changing for me as the accordion has been.

To Evan, Steve and the rest of the crew, I’d like to express my thanks.

Categories
It Happened to Me

Scenes from a stag party

While I’m writing up the story of the stag (and figuring out how the photo album feature in Blogware works — it seems pretty cool), here are some photos from Saturday’s highjinks…

Photo: Derek Walker and Joey deVilla at The Roof lounge, Park Hyatt, Toronto, for Derek's stag.

Me and the groom, enjoying expensive but tasty martinis. Derek, being the groom-to be, is supposed to be the centre of attention, so I bequeathed to him my jester’s hat and flashing necklace. I love the expression on my face: I seem to be saying “Goodbye, Meester Bond.”

Photo: Derek's friend Marius and Joey deVilla at The Roof lounge, Park Hyatt, Toronto, for Derek's stag.

Welcome to Accordion City, Marius! Derek lives in Switzerland, and Marius is a friend of his from over there who’s come all this way to be at his friend’s wedding.

Photo: Joey deVilla and a Cuban cigar at The Roof lounge, Park Hyatt, Toronto, for Derek's stag.

I love it when a plan comes together! The organizer of this boys’ night out takes a break to savour the fruits of his labour.

Photo: Dhimant Patel and Joey deVilla at 606 King West, Toronto, for Derek's stag.

Trouble, Incorporated. Me and Dhimant. We look like two guys who just got their first VC money for an Internet start-up. “Pet food! On the Internet! H1-B visa, here we come!”

Categories
Uncategorized

Luckily, I was bitten by a radioactive nephew

I can tell young parents just by looking at their eyes. They’re a strange combination of tired and alert. Kids take up a lot of energy, and you’ve got to watch them like hawks because they have a knack for putting themselves in all kinds of dangerous situations.

(There’s a Dennis Miller joke in which he says that parenting is so tough that the only reason God got to rest on the seventh day is because He sent His kid to live with another family.)

Apparently, being an uncle also gives you “toddler sense”, a knack for knowing when a kid is about to put himself or herself in peril.

Two Saturdays ago, I biked to Henry’sAccordion City’s premier camera store — to purchase my super-nifty Nikon Coolpix SQ. After buying the Coolpix, I lingered in the store for a while, thinking that the rain would stop coming down in buckets shortly. Half an hour later, the torrent was finally beginning to show some signs of letting up enough for me and my camera — in my knapsack, protected by three layers of plastic shopping bags — to head home. I stood in the little covered doorway of the store’s entrance, waiting a little longer and watching the rain subside.

I was standing there daydreaming, half-noticing a toddler — perhaps three or four years old — playing with the automatic door. He’d step towards it and watch it open, then run away from it to let it close.

He then decided to walk towards the door and stay there. It opened all the way. He then stuck his arm in the gap between the door and frame, where the hinges were. He was so close to the doorway that he was out of the door’s sensor range, and like a good automatic door, it started to close.

Toddler sense…tingling!

A fraction of a second later, it dawned on me that this big glass and steel door was going to crush this kid’s arm like a nutcracker crushes walnuts. I don’t remember actually diving for the door — I just remember suddenly being right at the door, holding it open, and pulling the kid’s arm away.

“Don’t put your arm there! You could’ve been hurt!” I scolded the kid.

(I can imagine my friends having trouble picturing me as “adult supervision”. It happens sometimes.)

The kid’s mother, who was busy attending to his younger brother in the store, saw all this. She snatched the kid from the doorway and brought him to his father, who’d been eyeing the display racks. With no one in the range of the door’s sensors, the door closed, with me outside and the kid and his family inside. The father was checking his kid’s arm and the mother was scolding him.

I waved and said “Uh, you’re welcome” to them, but they were oblivious. Ah, well. They can’t take away the “warm fuzzy” that small-scale superheroism gives you.

If being an uncle has sped up my reflexes this much, I can’t imagine how fast my sister — with Aidan reaching his “terrible twos” and Nicholas a few months old — must be.

I’ll bet she can catch bullets with her teeth.

Categories
Uncategorized

And here I thought that using a cell phone while driving was bad…

How about putting the car in cruise control at 65 mph and then breast-feeding your baby?