Monday, September 10, 2012

Performance Review

John Corbett recently published a nice summary of Ken Vandermark's career to date. Section #4 is of the of most interest to me, since it covers the time when I was living in Chicago and discovering both Vandermark's music in particular and free jazz in general. I feel very fortunate to have been there during the so-called "golden age in Chicago", when I had the chance to hear the Vandermark Five and other groups play on a weekly basis, if not more frequently. Simpatico is one of my favorite V5 recordings and I think it has a lot to do with the fact that I was at the Empty Bottle nearly every Tuesday night during the summer of 1998 listening as the songs that were recorded for that album were being rehearsed and developed.

Tuesday, June 05, 2012

Quality Equality

Trying to compare two arrays for equality without regard to order in a unit test is often very annoying. In Java, it would generally take four or five lines of code to express this in a test, completely obscuring the aspect of the code that I was trying to test. Ruby's Test::Unit turned that comparison into a one-liner, (expected - actual).empty?, a definite improvement but still a bit ugly. I was testing this in RSpec a couple days ago and figured there had to be a better way, and there is: actual.should =~ expected. I probably would have written a custom matcher for this rather than overload =~ if I was designing it myself, but either way, it's a big improvement in test expressiveness and readability.

Thursday, May 31, 2012

Hi Neighbor!

Ever since being thoroughly disappointed by their porter and a limited run cranberry abomination, I've been staying away from Narragansett's craft beer offerings. I gave their Oktoberfest style beer a try last fall and found it pretty tasty, so I figured their Summer Ale was worth a try. I had a couple this past holiday weekend and I'm happy to report that it's quite good.

Tuesday, April 24, 2012

Red Panda

I avoided zoos for a long time because I figured I'd be spending a lot of time at them once I became a parent and I didn't want to burn out too soon. We are now zoo members and I have already been to the zoo twice in the past month. So far, so good. Here's a shot of an adorable red panda chowing down on some leaves from this past weekend's visit. Did you know while they may look like raccoons and are called pandas, red pandas are not actually related to raccoons or giant pandas?



Friday, April 06, 2012

Under The Sea

UNESCO has recently moved to protect the wreck of the Titanic from looting and damage. Apparently, its final resting place at the bottom of the Atlantic Ocean 12,000 feet below the surface and close to 400 miles away from land is not remote enough to protect it from treasure hunters and tourists who are willing to spend $60,000 a pop to visit the wreckage in a submarine.

Tuesday, March 20, 2012

Madness

Attention hack business journalists: you are free to write stories every March about how many hours of productivity are lost to the NCAA basketball tournament as long as you balance it out with stories about how many additional hours of productivity are gained throughout the year when employees do extra work after hours and over weekends and holidays for no additional pay.

Monday, March 12, 2012

Wednesday, March 07, 2012

Works Every Time

This may have been the last mass market malt liquor TV commercial ever produced. If so, they definitely saved the best for last. It was easily my favorite commercial for a few years.


Of course, you can't talk about malt liquor TV commercials without mentioning Coldcock.




Saturday, March 03, 2012

Avocado Advocacy

Guacamole is obviously one of the greatest foods every created. I whip up a batch of it myself a few times a year, and while it's always good, I feel like it could be better. You really shouldn't need a recipe to make guacamole, but rather than eat mediocre guac, I decided to seek out some expert help before the last time I made it and I'm glad that I did. Here's the recipe, compliments of Alton Brown. The missing ingredient in my old standby was the half teaspoon of cumin, it really changed things around. Highly recommended.

Wednesday, February 29, 2012

Working for a Living

StackOverflow has recently been running a bunch of ads for their careers site touting jobs that allow working from home. The ads are all kind of whimsical, none more so than this one:


I'm guessing this isn't going to be the most productive home office. Also, does anyone know where I can find one of these combination desk/half open playpens?

Friday, February 24, 2012

Rails Parameter Filters

Secure programming 101 dictates that you should never write sensitive information to log files, and Rails makes this easy by allowing you to specify a list of sensitive fields in the filter_parameters property of your application configuration object (defined in the config/application.rb file). It's even nice enough to give you a sensible default (:password).

I got tripped up by this a couple days ago when a non-sensitive parameter that I didn't want to get filtered out of my logs was getting caught by the filter. I struggled with this for a while until I found the code responsible for the filtering, which clearly states in its comments that it filters out any parameter whose name matches the regular expression /<filter_param>/i. In other words, any parameter that contains one of your filter parameter strings will get filtered. It doesn't even have to be in the same case. Here's some example code demonstrating what's going on

The other thing I discovered is that other code that you include in your project (i.e. gems) can modify the list of filter parameters. For example, the clearance gem adds :token and :password to the filter parameters. To get the definitive list of all of the filter parameters in your application, launch the rails console and inspect the value of <ProjectName>::Application.config.filter_parameters.

Wednesday, February 22, 2012

Failing to Plan...

Is planning to fail, as the old saying goes. That's the reason for astronomical decline of Detroit, according to this piece. While it would be impossible for one person to read every single book or article detailing Detroit's decline, I've read a lot of them, and this is definitely a good one. The comments on this article are amazing as well, nearly 100 so far and almost every single one is as insightful as the article. While I'm on the topic, here's another interesting article about Detroit. I pulled both of these pieces from Richard Florida's prolific Twitter feed. Finally, I recently learned that Detroit was in the running to host the 1968 Summer Olympics. Think about that one for a second. There are some good clips up on YouTube from the movies put together for the selection committee.