BenEngebreth.org

Around Lake City

Sunday, November 07 2010

Back in the first week of September, my brother and I both found ourselves with unexpected breaks in our respective schedules before substantially break-free periods were to set in. Seeing an opportunity, I talked him into a trip to Lake City, Colorado, a little town in the middle of the San Juans that I've long been interested in visiting and that provided easy access to fantastic hiking. Fall had already arrived in the region by that point. The temperature fell below freezing every night and the aspens above town went from sorta yellow to blazing gold in just the time we were there. It was a well-timed visit.

Roadside between Lake City and Creede Colorado.

The desolate landscape of Snow Mesa near Spring Creek Pass. It might look like Nebraska, but we're at over 12,000 ft. here. It's not a grassy plain; it's alpine tundra.

David, the sheep herder who was living alone up on the Mesa for the summer. He hadn't seen anyone in 3 days at this point and it was clear that he was eager to chat. Not having any connection to the world below he was anxious to hear what the weather was going to be like and whether we had seen his boss' red pickup down in Creede (he was expecting to drive the sheep down into the valley for the winter any day).

Along the trail to Handies Peak — the 14er that we attempted but didn't quite attain. Blisters...

Gunnard admiring the views along Highway 149 above Lake City.

Real

Sunday, September 26 2010

It takes a minute for to appreciate that the images below are real. They are not renderings or artist conceptions but actual pictures depicting the state of the universe as seen by the Cassini spacecraft as it encountered Saturn's moon Enceladus (some 900 million miles from Earth) earlier this year.

This first image shows Enceladus as the dark shadow along the bottom with the rings of Saturn above it (viewed in-plane) and the moon Titan behind.

And this movie is not a poorly produced scene from a 1950s sci-fi flick, but the actual view from Cassini on its approach to Enceladus. The plumes are potentially water-rish geysers on the moon's surface.

These images are a couple of months old, but I completely missed them when they were released. It's amazing stuff if you stop to think about what you're actually looking at.

Maine and Acadia National Park

Tuesday, June 22 2010

I visited Maine and Acadia National Park for the first time two weekends ago. The park is a gorgeous place when it's not raining. Unfortunately, it rained most of the time when we were there. Driven out of camp early by the weather we made our way down the coast visiting Bailey Island and Portland along the way. Both places were beautiful and I'd love to go back and spend more time in each again soon. Perhaps it's just a simple minded comparison drawn from the equivalent names of the largest towns in the two states, but Maine really reminds me of Oregon. I had to keep telling myself I was still on the east coast for most of the trip.

Here's the full set.

Sunrise over Cadillac Mountain

Personal Kyoto

Thursday, May 27 2010

A couple of years ago I built a site called Personal Kyoto that scraped electric use data from Con Ed (the New York area eletric utility) and presented it on the web in a way that allowed a person to see their electric use change over time. The idea was to give people feedback on their electric use because measuring consumption is a requirement for reducing it. It turns out I was interested in building a demonstration of the the concept more than anything else, so the site effectively shut down a year or so later.

I still thinking tracking electric use (or any energy use really) is a prerequisite for any kind of sustained reduction in use and have lately been wondering what my electric use looks like at my current place. I borrowed some of the tools that I've built for Department of Numbers and got a very crude Personal Kyoto like environment up and running again. The goal here is to keep that green line (a 12 month rolling average) heading down. If I do that it means that I've used less electricity in the current month than I did in the same month the prior year. Keep doing that and the cumulative effect can be pretty substantial.

Nice View

Monday, April 19 2010

It's a crappy iPhone photo, but it still illustrates the amazing views to be had from rooftops in DUMBO.

Minimizing CSS Files with Ruby

Monday, January 18 2010

I've been using YSlow a good deal lately to attempt to wring out every last ounce of speed from Department of Numbers. I'm not sure if this is the best investment of my time or not, but it is a strangely satisfying task. I've heard that Google may be considering factoring page speed into their ranking algorithms, so I guess that's how I justify expending the effort to try to win these infinitesimal performance gains.

So as YSlow recommends, I decided I'd consolidate and compress DoN's css files to both limit the number of HTTP requests and return the smallest file possible. I grabbed the Ruby css compressor Rainpress and ran my css files through it. While I did get a noticeably smaller file this way it also became quite difficult to read. As I still value the whole view source nature of the web, I don't want to unnecessarily obfuscate my html and css for a negligible performance boost (negligible in my case at least). Given that Rainpress appears to have file input and output options but no formatting options, I decided to try to make something really simple (dumb some would say) where I could customize the output a bit more.

Here's what I came up with: mincss.zip


#!/usr/bin/env ruby

#define formatting around the characters
colon = ':'
semicolon = '; '
comma = ','
open_brace = ' {'
close_brace = '}'

file = !STDIN.tty? ? STDIN.read : File.read(ARGV[0])
file.split('}').each do |block|
 #one block per line 
 block.gsub!(/\n/,' ')

 #get rid of comments
 block.gsub!(/\/\*.*?\*\//m,'')

 #apply formatting defined above
 block.gsub!(/\s*:\s*/,colon)
 block.gsub!(/\s*;\s*/,semicolon)
 block.gsub!(/\s*,\s*/,comma)
 block.gsub!(/\s*\{\s*/,open_brace)

 #single spacing
 block.gsub!(/\s\s+/,' ')

 puts block.strip + close_brace if block.include?('{')
end

To maintain css readability I opted for one block per line with spacing after the semicolons and before the open braces. I think the results are more appealing now, but I can change this very easily if I wanted to by manipulating the define formatting around the characters section in the code above. Just modify the strings to represent what you want the space around each of those characters to look like.

As I said, this is pretty dumb code. It doesn't have any knowledge of css syntax or grammar it can use to shorten or correct your code; it just removes extra spacing and consolidates your css to one block per line. If you really want to get your css file as small as possible, Rainpress is probably the best bet as far as Ruby utilities go. But if you're looking for a flexible and concise yet readable view of your css, you might find this tool useful.

Usage is as follows:


> mincss.rb styles.css
> cat styles.css | mincss.rb

You can pass the input css via STDIN or as an argument. I operate with 3 distinct css files in my development environment but then have a Rake task that concatenates them and pipes the output to mincss.rb for the production environment. Now my development css files are verbose and my production css is concise.

Update: A reader sent in a fix for a greedy inner-block comment deletion. All the code has been updated. Thanks Jeff!

Catherine & Aaron's Wedding

Wednesday, September 30 2009

Here are a couple of photos from Catherine and Aaron's wedding in Pennington New Jersey. Actually, I didn't take any photos at the wedding at all. After the formal stuff was finished we all ended up hanging out in the hotel lobby till late. That's were all of these came from. There are a few more in the full set on Flickr.

Glacier National Park

Tuesday, July 21 2009

A trip to Montana. Full set on Flickr.

White Glove Tracking

Thursday, May 03 2007

Evan and I just put out a new project called White Glove Tracking. From the site:

There are 10,060 frames of video in Michael Jackson's 5 min 35 sec nationally televised landmark performance of Billy Jean. The White Glove Tracking project (W.G.T.) is an effort to isolate just the white glove from this moment in pop-culture history. Rather then write unnecessarily complex code to find the glove in every frame of the video I am asking for the assistance of 10,060 individual internet users to simply click and drag a box around the glove in one frame.

Help us out! It's a surprisingly addictive process. Get started loggin' frames.

Big thanks to Eyebeam and Rhizome for the support!

Electric Use Map for Personal Kyoto

Tuesday, April 17 2007

PK-Map-Post.jpg

The map above shows the average monthly electric use of Personal Kyoto users. A frequently updated map is also available at the Personal Kyoto site.

Getting the average use data out of PK and getting the data into Google Maps was pretty simple. What turned out to be challenging was working with the US Government's zip code boundary lat/lon data which is in a completely weird format. It's just a lot less user friendly than it could (should?) be. One could imagine that public data (which this zip code boundary information is) could be a lot more accessible. This seems to be a trend I've observed with most of the public data I've worked with now.