Comments In Code Aren't Evil. Bad Comments Are.

Jun
06
2009

I've been watching an exchange of articles over the last couple of days stemming from 10 Commandments for Creating Good Code. It's a pretty good list, but several people (including me) think he may have missed the mark with his take on code comments.

I posted a comment on the followup, but thought I'd take a few minutes to tinker with doing some video as a response as well. Steve Borsch suggested that I should start video blogging and I figured I'd give it a shot. So, here's the video version.

Mexican Burrito Bowl Recipe

May
25
2009
Mexican Burrito Bowl

I spent a good portion of the Memorial Day Weekend cooking. Lots of BBQ outside and a fair bit of time in the kitchen too. Quite a bit of what I made was actually experimental. Among those experiments was an attempt to do something about our Chipotle addiction (and the "methadone" of said addiction: QDoba) by coming up with a reasonable facsimile out of our own kitchen.

While not all of the experiments turned out like I wanted (the meatloaf had WAY too much Italian seasoning), the Chipotle analog turned out really good. So, I figured I'd share it with all of you.

We generally get the bowls (sans tortilla) when we go to either place. So, we started with the lime rice (the cilantro is optional and subject to whatever side of the cilantro wars your loyalties lie). Basic Basmati rice with lime juice worked out great.

On top of that, I threw together a black bean concoction with black beans, onions, garlic, tomatoes with chiles, and a splash of white wine.

Since I BBQ'ed a pork shoulder (see video below), we went with that for the meat, but clearly this recipe works just fine without it, making it a really decent thing to make if there's a mix of vegetarians and carnivores at a party or social dinner, without having to make 2 separate meals for the different groups.

Top with salsa, sour cream, cheese, cilantro (again, skip it if appropriate), etc. and we ate it using chips as utensils (like we usually do with Chipotle). I won't pretend that it's a clone (because it's not), but it definitely fits that same niche and might work out if you've got a Chipotle craving.

Download the recipe as PDF

Pondering the Polymath Podcast and Pedanticism

May
14
2009

I’ve been working on clarifying the approach and idea for the Polymath Podcast, which has caused reflection on a repeating set of topics. As I’ve been processing those topics in an attempt to distill them into an “overview” episode to kick things off, I’ve refined my thoughts on a few of them.

First is that I take a slightly broader view of the definition of “polymath” than many people seem to. It’s telling that many of the online discussions about being a polymath seem to center around a definition in the vicinity of “someone who knows everything”.

pedantic446-thumb

This shows up nearly immediately in the conversation, along with mentions of “Renaissance Man”, followed shortly by “Leonardo Da Vinci” and one of several people nominated as having been the “last person who could know everything”. Unfortunately, that series of predictable topical shifts is almost inevitably followed by either a declaration that being a polymath is impossible or a resignation to such a fate, depending on whether one considers oneself to be a polymath prior to the conversation.

The thing is, that the word comes from the Greek polymath?s, ?????????, meaning "having learned much". It doesn’t mean having learned everything. It’s actually a pretty ambiguous term, leaving it open to interpretation rather than some list of specific bodies of knowledge.

Beyond even that, these conversations always seem to put Da Vinci’s entire life into the “polymath” category. However, he clearly pursued a path of learning and exploration for his entire life. So, as a youth, he couldn’t have known even the definition of “everything” used in this context.

Further, he obviously didn’t know all of the stuff we’ve come to learn since his death. That makes the derivation’s definition make more sense to me than the colloquial one used in such arguments. It’s more about infinite curiosity and a lifelong quest to learn more and improve oneself.

By that definition, every one of the people usually brought up still qualifies. But, so do countless others. I consider myself a polymath in the same way I consider myself a software journeyman. It’s not a destination, it’s a path. There’s a huge difference between spending the day looking for a needle in a haystack and spending the day exploring a haystack and happening to find a needle.

The second of the topics is basically another branch of the “what is a polymath” conversation. When it doesn’t center on Renaissance gentlemen, literary canon and the extent to which the body of scientific knowledge exceeds the human memory capacity, it tends to find a topical home in an argument about “generalization” vs “specialization”.

It’s an argument I’ve been dragged into more than a few times myself. One of the problems with it is that I don’t think they’re actually antonyms.  They’re both relative terms. One person may consider my professional niche as “specializing” because I do work in information technology, building web applications on the x86/x64 PC platform while others would veto my membership in the “specialist” camp because I’ve done that work in PHP, Java, and C# on MySQL, Oracle and SQL Server, insisting that to *actually* specialize, I’d have to further refine my focus.

The other big problem with this oppositional thinking is that it presumes that one is better than the other, not that having both is often the recipe for greatest success. The “box” we often ask people to think outside of pretty much IS specialization and most generalists don’t need trite advice to see connections between disparate things.

Third and finally is the frequent citation of both Adam Smith and Charles Darwin. Both are trotted out, pointing out how both economics and evolution describe the march toward specialization. That’s followed with the “inevitable” conclusion that we must specialize or die.

Too bad that both of those disciplines also describe the benefits of “just enough” specialization and the pitfalls of going too far. The most obvious example to me is the human species itself. It’s clear that our widespread population distribution and our insistence on living in EVERY ecosystem on this planet makes it clear that if we’d been hyper-specialized to one ecosystem, things would be very different.

If we’d specialized to only be able to live in the Fertile Crescent, we’d have died off when much of that area turned to desert. The Inuit wouldn’t be hunting reindeer and surviving bitter cold. The people of the Himalayas wouldn’t be perfectly happy living in much thinner air than the rest of us.

Simply put, the capacity TO specialize requires generalization. They’re symbiotic. There’s a balance between them that’s necessary (though that balance can be societal and not made real in each and every person) in order to both survive and thrive.

If a mechanic in 1970 were to specialize in working on AMC cars, further working to become the #1 authority on performance tuning the Gremlin, he’d probably be well paid in 1978, but the 1980’s would have been fairly unpleasant.

That’s because while specialization makes the thriving work when the environment and conditions match the specialization, shifts in the ecosystem can result in disaster for that specialist. Imagine what happens to the giant panda if bamboo were to stop growing or the koala if eucalyptus were to die off because of a pesticide of some sort.

Compare that with the rabbit, the rat and tilapia (take a look at a film called Darwin’s Nightmare) for how survival and specialization/generalization relate.

OK, now that I’ve been enough of a downer to bring up the extinction of pandas and koalas, I want to finish on a lighter note.

doctor-who-tardis

For the tone of the podcast, rather than trying to decide whether one needs to be Da Vinci in order to be a polymath, I’d like to shift away from him and the rest of the canonical examples and toward the one that always comes to mind for me: The Doctor. From the TV show Doctor Who.

If you aren’t a fan, The Doctor is a 900+ year old Time Lord who travels with a companion in a space-and-time ship called the TARDIS. The Doctor has traveled the depth and breadth of the Universe and the vastness of time. He has staggering knowledge of alien cultures, technology, literature, etc.

But, seeing the entirety of space and time in front of him, he, better than we, knows that it’s not even remotely possible to know everything.

Despite that, The Doctor has that spark of infinite curiosity, constantly saying things like, “Huh, that’s never happened before.”  and “Don’t know what we’re going to do, but we’ll figure it out” with a joy and zest that’s infectious.

He doesn’t seek out knowledge and experience as though there’s some cosmic scoreboard out there where someone’s keeping track of whether he knows it “all” yet or not. He learns and seeks out new experiences simply for the joy inherent in the process. Most importantly, he doesn’t take himself nearly as seriously as most of the participants of the conversations I’ve read on these topics.

It’s that approach to life that I want the podcast to be about and is how I try to approach life and learning. I am far more likely to say, “Ooh. Now THAT’s interesting” than “Will this be on the test?”. More likely to say, “Did you ever wonder?” than “Why do you know that?”.

If this sounds like paradise to you, the show’s likely to work for you. That’s both as a listener and I’m still looking for a co-host or 2. Now, I’m going to go because I’ve got 28 tabs open in Firefox full of interesting stuff to be read.

Breaking the Rules: James Joyce Did It All The Time

May
13
2009
JamesJoyce 004

On the campus where I spent most of my college career, the English department was housed in one of the oldest buildings there. It featured stone-surfaced stairs with grooves worn into them from thousands of students trudging up them with the grit of salt and sand of a Minnesota winter on their shoes.

Because I majored in English, I practically lived in Riverview and grew to love it in its neglected charm. I still associate that musty smell and the clunking of radiators with 19th century British literature and it’s drafty windows distorting the sun with forcing the angst-ridden poetry that only a 19 year old can write into sonnets and pantoums.

And, in nearly every one of those memories is one of my favorite professors and my advisor: Steve Klepetar. Wildy gesturing, his curly dark hair flopping about onto his dark-rimmed glasses which slid down his nose as he explained for the 1000th time how the English ballad’s meter combines iambic tetrameter together with iambic trimeter.

He’d climb on the desk in the front of the room and sit, cross-legged as he’d expound on the deep significance of early 20th century poetry, clearly as excited to be talking about it as he had been the previous semester and the semesters before that.

Dr. Klepetar is the kind of professor I can only hope for other college students to have somewhere along their journey. I was blessed to benefit by spending 3 years taking classes from him regularly.

While lots of things from those classes have stuck with me, one thing has come up over and over on the job and elsewhere in my life.

See, Dr. Klepetar had a novel way of approaching written assignments. While the assignment itself was typed, students could add the kinds of notes that he would be adding later himself to the margins before handing it in.

One of the things that was to go in those margins, if you felt it was appropriate, was a series of capital letters: JJDIATT. It stood for “James Joyce Did It All The Time”.

If the last time you saw an English class was in the rear view mirror after your freshman year as you ran away, that may make absolutely no sense.

James Joyce is an Irish author who’s most famous book, Ulysses, is a shining example of someone breaking the rules. Grammar, punctuation, and literary convention were all open to some breakage when Joyce put pen to paper.

The most obvious example is that Joyce has run-on sentences that go on for PAGES (including the ending, which is a sentence that goes on for 40 pages). Yet, despite (and some would say because of) that rule-breaking, it’s considered one of the greatest literary works of the 20th century.

Thus, Dr. Klepetar advised us that we were free to break the rules. Start a sentence with “And” or “But”. Slap Grammar across the face. Make up our own spelling of a word. But, you had to put JJDIATT in the margin to indicate that you did it on purpose.

If you started a sentence with “But” or “And” (one of my favorite things to do, by the way) out of ignorance, you weren’t some rebel out to make an artistic statement. Rebellion isn’t something you do accidentally. You need to actually know what rule you’re breaking and have some goal in mind for it to “count”.

To do that, you need to actually have an understanding of the rules in the first place.

When students were bristling at the rigid structure of the sonnet, and would ask to be allowed to write free verse instead, he’d point out that your free verse gets considerably better when you have mastered writing within the confines of the rules. The confinement of 140 characters on Twitter has spurred some of the biggest growth in my ability to write since those English classes in college.

Beginners always seem to want to leap right past the rules without learning them. Yet the Dreyfus Model makes it clear that rigid following of rules is exactly what you need to do when you are new to something. Only when you move into competency and into proficiency does the rule breaking become a viable strategy.

Many people who haven’t studied art look at one of the cubist paintings of Picasso and comment something along the lines of how it’s too bad he couldn’t paint things the way they actually look. However, if you go and look at Picasso’s earliest work, it’s clear that he actually learned the techniques in drawing and painting representationally. He then spent the rest of his life breaking those rules in an effort to discover the essence of how images work and are recognized.

If JJDIATT ended there, it would be a worthwhile technique. However, Dr. Klepetar took it one step further and here’s where I think his technique was genius. Putting JJDIATT in the margin wasn’t a “get out of jail free” card you could use to write a sloppy paper. If you wrote a bad paper, had your friend proofread it and just slapped JJDIATT next to all of the mistakes, that wouldn’t fly.

That’s because JJDIATT was actually an invitation to Dr. Klepetar to have a conversation. It was waving the cape at him to examine what you were trying to accomplish in that instance of breaking the rules. And, he wasn’t one to hold back when he thought that the result didn’t accomplish the goals that launched the rebellion.

In this whole process, he taught me the importance of understanding the rules, recognizing when they are in the way of my vision, breaking them and evaluating whether the result was actually better than if I’d followed the rules in the first place.

For that, Dr. Klepetar, I am deeply grateful.

PS: It looks like I’m not the only one of his students who has a high opinion of Dr. Klepetar. His ratings on one of those "rate your professor” sites is nearly 100% positive, despite his “easiness” indicating he isn’t handing out A’s like candy.

The Problem With Video Distribution

May
11
2009

Every TV in my house (and there are too many, by nearly any standard) is connected to at least one of the following:

  • A DirectTV Tivo
  • A Roku box
  • A Vudu box
  • A computer running Boxee.

Independent of each other, I would recommend each and every one of those devices to anyone interested in buying one. The problem is that no one of those is likely to actually give me or anyone else the actual mix of video entertainment that they’re after.

That’s because we’re in the middle of one of those nasty transitional phases of media. It’s nasty because it’s a much bigger shift than the last several in video distribution (broadcast to cable, VHS to DVD, etc). It’s nasty because

The things I want to watch are produced by a variety of entities. From independent movie producers to TV companies to online podcast producers to subsidized gov’t projects (BBC & CBC). And, where they’ve decided to distribute video outside of the existing cable/satellite/broadcast TV setup (not all of them have), they have chosen a seriously fractured approach.

If the content I watch is a serial video series produced by a traditional TV company, here’s the current situation.

If I use the Vudu box, I can watch a few old seasons of shows, a few that are a full season behind and that’s about it and each episode is $2.

The Roku box has a bunch of CBS stuff and lots of old shows (without extra charges on top of my Netflix subscription), but nothing to speak of from ABC, NBC, FX, FOX, HBO or AMC in that bundle. Lots of that stuff is available via the Amazon partnership, again at $2 an episode.

The Boxee is making valiant efforts, including working hard to get Hulu support. However, most of the TV on Boxee is actually coming in via web streaming and looks far better on a 9” netbook than in a 52” HDTV. Of course, the Boxee will also play anything that is downloaded via Bittorrent, in full HD, but NONE of the producers of this content will provide it that way, even *with* commercials embedded.

As an aside, if TV producers put up full-resolution video downloads (including a reasonable number of ads) via Bittorrent, I would be first in line and would ensure that the torrent was seeded for a good long while.

Anyway, the Boxee will also handle anything iTunes sells, for, again, $2 an episode. I detect a trend.

And, if these were the only options for TV, it’d be no big deal. However, for about $90 a month, I have 250+ channels (including HBO/SHO) and the Tivo capacity to record 6 channels simultaneously. While much of that content would be recorded with commercials, some (the aforementioned HBO/SHO shows), that content is delivered MUCH cheaper than $2 an episode.

Unfortunately, that lower price means I have to know that I will want to watch that content in advance of a specific “airing time” (a distinct legacy of the synchronous nature of over-the-air television). Imagine if, in order to get a copy of a musical album required setting your audio Tivo so it gets recorded on Thursday, when it’s “on”.

The problem with that is that nearly half of the shows I really enjoy are shows I discovered long after they originally aired, making the Tivo an inadequate solution.

Movies are a bit better, with most of the rentals at about the cost of what a DVD new release rental would be. I also have done my fair share of buying DVD’s on Amazon, watching them and selling them back on Amazon, which puts TV seasons WAY below $2 an episode and movies pretty cheap too.

As far as podcast/videocast/etc. content, there isn’t much of an edge to any of them. All but the Tivo have TED videos, for instance, and most have some form of “The Best of YouTube”. Of course, they all act like this is a major accomplishment, but whatever.

The real problem, as I see it, is that nearly all of the options for video delivery are distributor-focused. Boxee is the one exception (which is probably why it’s the one I’m most optimistic of) in that if you can give it an RSS feed with video files or torrents and I don’t have to care about who’s distributing it.

I wish this was a technical problem. I wish that this was about bandwidth or codecs. Instead, it’s about whether Viacom’s lawyers have worked out a deal with Amazon or Disney’s lawyers have worked out a deal with Vudu. And, in the mean time, my ideal scenario seems lifetimes away.

I’d absolutely love to be able to take the $200+ a month (between everything) I pay for video entertainment and just get access to watch stuff: old or new, TV or movie, but there’s no sign of it happening. I’m really getting sick of cobbling together a legal solution.

That’s because the illegal solution for exactly this desire is really easy. An installation of uTorrent and a list of TV shows you want gets you automatic delivery of shows to the directory of your choice, ready for Boxee to display in beautifully-encoded video on the big screen TV, complete with subtitles in the language of your choice, even if the original producer didn’t include them.

Please, content producers, quickly figure out how to solve this problem, because the grass is looking pretty lush and green on the other side. I’m not a broke college student and am willing to pay a fair price. However, $52 per season ($2 x 26 episodes without a seasonal discount) isn’t fair.

I’m far happier with my eMusic subscription (more like $0.30/track instead of $1+ for iTunes) and many of the $6.99 albums I buy on Amazon than I am with $15 for a CD. Note that I’m not a freeloader looking for a free buffet. I’d just like better options.

In the mean time, if you’re looking for a demo of any one of the half-solutions currently available, let me know.

« Older Entries  

J Wynia

For better or worse, I'm the guy who runs things here. I'm a web consultant, software developer, writer and geek from Minneapolis, MN. This site is a fairly wide cross-section of the things I'm interested in and enjoy writing about.

Oh, and if you happen to be looking for hosting for your Subversion repositories or just web hosting in general, take a look at Dreamhost. It's what I use for Subversion and your signup helps me out.

Feeds and Links


www.flickr.com
This is a Flickr badge showing public photos from J Wynia. Make your own badge here.

Search


Pages

Archives

Computers Blog Directory
© 2003-2009 J Wynia. All original content is licensed under the terms of the Creative Commons Attribution license unless otherwise noted. Content from other sources is licensed under its original terms.