Archive for September, 2007

Yet Another Geek Badge

Sunday, September 23rd, 2007

On Saturday morning, I earned a new geek badge. It’s one that takes a long time to get:

(charon)~> uptime
13:46:22 up 366 days, 14:14, 1 user, load average: 0.01, 0.00, 0.00

Yes, that’s one year, one day and fourteen hours with out a reboot.

Leaving Yaletown

Sunday, September 23rd, 2007

In the mounting insanity surrounding my imminent move out of Yaletown to a quieter, cooler part of Vancouver, it struck me that I should spend a while walking around and taking pictures, focusing on what I like about the place and what I absolutely will not miss. I got tired of this after about six blocks, as the process solidified my understanding of what I already knew.

Because I was looking specifically to separate out what I did and did not like about the neighbourhood, I fairly quickly noticed that it’s actually really pretty. On a Saturday afternoon it looks vibrant; the buildings are well-maintained and everything is colourful and varied. Even the little bits of park, with the grass overgrown and gardens gone wild from the strike, look good.

For the stuff I didn’t like, I snapped pictures of the overflowing dumpsters (ones that are hauled by private firms, so this has nothing to do with the strike), creepy dog fashion stores, smeared dog shit and litter on the sidewalks. The observation that arose from this is that the problem with Yaletown is not really the place itself so much as a lot of the people it attracts. There are poorly dressed people pulling along the toy dogs that they don’t clean up after, strutting “Wimbledon thugs” shouting about “bitches” into their cell phones, party-going women who at first glance and often first inspection are indistinguishable from the “service industry” workers a couple blocks over (hint: one of the two is generally quieter). There are 50 year-old shriveling boomers still dressing in tight shirts and getting hammered at clubs. Not only is a Saturday afternoon not the likeliest time to find these types around, taking pictures of people randomly doesn’t tend to do well, and getting people’s permission to take a picture usually leads to a crappier, posed picture. Finally, Saturday afternoon is one of the few times where the construction is stopped and the sun is out.

The pictures wound up coming out in favour of the place, but I still can’t really imagine myself missing it.

Design Patterns Are Not Good Programming

Monday, September 17th, 2007

This is something that’s been getting to me, lately.  The worst form of it is the almost religious devotion to model-view-controller (MVC), but in general, I think design patterns are an idea that people are largely taking the wrong way.

By way of an explanation, consider a zen koan.  It’s relationship to zen is very, very much like the relationship of design patterns to good programming.  A koan is not zen.  It does not describe a zen state, but, if one looks at it properly, one can (un?)learn something about zen.  Memorizing a million koans will not bring one any closer to zen than memorizing one.  Doing as the characters in zen koans do does not bring one any closer to achieving zen.  Making a practice of kicking things over when you’re asked to describe them is probably not as appropriate as it was for Joshu’s cook.  There is something to be figured out in the koan, and once one understands it, the koan should be thrown away.  It is a linguistic container for the idea; the idea itself is necessarily more elegant and more compact.

Similarly, knowing lots of design patterns isn’t going to really make one a better programmer.  Using design patterns will probably result in better code, but it won’t, by itself, make one a better programmer.  Unlike zen, good programming can be described quickly and succinctly: getting the most good code with the least effort.

For example, the concept of MVC can be applied to a web service.  There’s a model for the data, a controller to do stuff with it, and a view that decodes method calls and encodes responses.  Let’s say that it’s an XML-RPC service: all the view does is convert back and forth between XML and locally usable data structures (assuming the controller validates its input properly).  Significantly, these structures are passed directly to controller, and what the controller returns is probably encoded and sent right out.  There is nothing significant happening here.  The view is extraneous.  In turbogears, for example, one could use the CherryPy to do the conversion; I believe the whole process is no longer than four lines.  Even in something as primitive as C or PHP, the view for the whole application, regardless of size, can be implemented in one function.  There’s no point in setting up a sacred View pedestal to put it on.

The lesson to take away from MVC is that by breaking a certain class of application into these three components, it becomes easier to modify any of the components without needing to change the others.  It prevents rewriting and saves effort, and less effort is better programming.  Once this lesson is learned, MVC as a strict thing can be thrown away, and the idea of compartmentalization that it provides can be applied in some form where appropriate.

The same applies to other patterns: they are ways of approaching specific classes of problems.  Although some of them are damn clever (think: visitor pattern), one will almost never run into a problem where the pattern, taken verbatim, is the best way to solve it.  What they are is programmer-koans that provide insight into the nature of the problem at hand, and the nature of good programming.  Design patterns are not good programming. 

Beers of Vancouver, Vol 3

Saturday, September 8th, 2007

This time, some of the beers are actually from BC!

Howe Sound Brewing Garibaldi Honey Pale Ale

This is a relatively normal pale ale, but with honey added. From the taste of it, I’m guessing that the honey was added post-fermentation, because it’s quite sweet and the honey flavour is clearly present.

The sweetness diminishes the solo drinkability of it slightly, but this is an still eminently quaffable beer, and would pair extremely well with, say, BBQ ribs.

At $10 for a 1-litre resealable bottle, this is definitely something worth checking out.

Howe Sound Brewing Whitecap Wheat Ale

This one describes itself as “a refreshing Belgian-style wheat beer with hints of coriander and orange.” I’m not sure if I’d agree entirely. It tastes, to my mouth, a bit more German than Belgian, and the orange/coriander notes don’t quite manage to climb above the hops and say hi.

Honestly, I don’t think I’ll be getting this again, but it’s not because this beer is bad, by any means: it’s just outshone by other beers that I could get instead. For example…

Antares Imperial Stout

Wow. Kudos to Argentina: this beer is awesome. It grudgingly allows light to shine through, but barely. The carbonation is appropriately light. But the taste of it…

This is what Guinness wishes it was. It’s powerfully malty and has a bitterness just big enough to take a couple of good, solid shots at the caramel part, but not enough to win the match. It’s thick, but it doesn’t hang around too long: the finish is full and then it leaves cleanly. There’s no residual bitterness. Where Guinness has a kind of clamminess to it, this has a sharper edge which seems to be largely responsible for the perfect finish.

Find this beer, and enjoy it.

Antares Kölsch

From what I gather, the story behind this beer has something to do with a group of people in Germany who were religiously anti-lager. As in, if you were one of them and you were caught drinking it, you’d be shot. Does this make sense? No. But in light of that, this beer does.

It’s a lager brewed in the style of an ale. It could be offered to those tempted by the devil brew to satisfy their temptation without endangering their soul, or whatever. It’s as drinkable as a lager, but it has more to offer in the flavour department. I could see myself coming to enjoy this beer on hot days.

Pile of Coincidence

Wednesday, September 5th, 2007

This is kind of neat.

I had just been listening to Start A People by Black Moth Super Rainbow, and I mentioned it on the talk forum at work, with the description “something like what instrumental hip hop would sound like if it were recorded by cooky synth nuts who moonlighted writing songs for sesame street in 1972.”

A short while later, another Black Moth Super Rainbow fan at work (there actually is one! How awesome is my workplace? Very!) asked if I was referring to .

I wasn’t, but who would have thought that such a relevant recording actually would have appeared on Sesame Street in 1972? Freaking sweet.