Mayor of Hopville back in the office.

I recently got hired again after six months of (mostly voluntary) unemployment.  While I normally don’t muddy up the Hopville blog with details of my personal life, this is relevant purely because of how shockingly little I accomplished during all that time off.  I mean sure,  I traveled a lot. I worked on the house. I interviewed and interviewed and interviewed some more.  Did some volunteer work. And so on.  But I took a long overdue break from the tech industry, and from software development in general, for the entire time.

Luckily for Hopville, now that I am about to start work again, I’m learning lots of knew stuff and I’m completely energized about getting back into web development.  On a recent trip back east, I had some productive time on the plane – including my first-ever launch of website features from a chair in the sky (since my Delta flights were equipped with WiFi).  Here’s what’s new:

  • Recipe pages now have dedicated sections where the brewer can add tasting notes and taste ratings.
  • Brewers pitching multiple yeasts in a single batch can now list unlimited yeast strains and bacteria cultures on a recipe page.  Previously only one yeast was allowed, so brewers pitching multiple cultures had to list the supplemental strains in the recipe comments.  Now the extra cultures become a part of the main recipe.
  • Measured OG and FG can be recorded on recipe pages – when present, the display of the measured values takes priority over the values estimates by Beer Calculus.
  • Brewers can easily export their entire Hopville recipe catalog as BeerXML from their recipe page.  This is a nice shortcut for folks who want to backup or export their entire list of recipes at once, rather than one at a time from each recipe page.
  • New and slightly more enticing homepage…though it’s still a work in progress, design-wise.  Much improved version launching in a few weeks.
  • Featured recipes! Recipes are now given an “interestingness” score which allows Hopville to feature lists of the juiciest recipes on the site.  Now that there are over 10,000 recipes on Hopville, this kind of highlighting will become an important signal-vs-noise aid, making it convenient to find the best recipes quickly.

Over the next month I’ll be continuing to do some major upgrades in preparation for a larger rollout of changes I’m planning to launch on February 25th.  It’s nice to be having fun with code again…and Hopville stands to reap the benefits.

Current recipe count: 11,134

Advertisements

Comments (23)

Defaulting to Tinseth

It’s been many moons since I’ve updated anything on Hopville.  I blame the old job and the quitting of the old job and the traveling all summer and the search for a new job.  I’ve got excuses, see.  I’ve been lax, so I thought I’d announce this update.  Even though it’s small, it can have a large effect on recipe design. Previously, the default IBU calculation for Beer Calculus was based on an average of a few popular formulas. It did four calculations (Garetz, Rager, Tinseth, and the legacy Hopville calc) and averaged them together.  I chose to blend a few conflicting numbers together instead of committing to a single one by default. That neutral position tended to cause some confusion among both types of brewers: those who cared which formula was in use, but didn’t know you could change it, and those who didn’t care at all. Plus, the only indication that a formula selection was being made was a subtle message “avg” near the IBU result – pretty vague about what was happening behind the scenes. Recipes now default to the Tinseth formula. Hopefully this will satisfy those who prefer this formula, and also clarify the default calculation to folks who don’t really care.

Comments (1)

Little feature weekend

Checked off a few random things on the ever-growing TODO list for Hopville this weekend.

  • Added BJCP style validation to Beer Calculus.  As you work on recipes in the calculator, you’ll see warnings whenever the calculations seem to put your recipe out of bounds for the chosen beer style.  These warnings can be ignored entirely, but at least the information is now available where it would be most useful.
  • Added a random recipe link to the recipe navigation menu.  Self-explanatory.  And fun!  Try it!
  • Moved Beer Calculus so that it lives under the hopville.com domain at beercalculus.hopville.com.  This shouldn’t have any effect on users, but it’ll help with Hopville’s “Google juice”, keep me from having to jump through hoops to maintain state between two domains, and make it more apparent that Hopville is there to support Beer Calculus.  Since the calculator preceded Hopville by so many years, lots of folks don’t even know they can save their BC recipes yet!

Current recipe count: 2026

Comments (11)

In Search of the Real Hopville

I was traveling through Oregon this weekend and decided to take a detour to the real Hopville, a rural area in Oregon.  Google Maps makes it pretty clear that Hopville is a placeless place, in that there is no town or village or landmark to speak of.  But Google suggests that it does have a location, which it places along a roadside by some farmhouses.  The driving directions from Eugene actually ended with the grand finale: “Turn left at Wigrich Rd, then go 75 ft.”

The location of Hopville, OR according to Google Maps

The location of Hopville, OR according to Google Maps

So, I had to go there, and I had to turn left at Wigrich road, and I had to go that 75 ft.  How could I not?  Knowing in advance that “Hopville” would amount to two Willamette Valley crop fields divided by a road, I was pleasantly surprised to discover that one of those two fields is for hops.  Trellised fields were pretty common in the area, as I discovered with a little more exploration.  I drove around for a while looking for a sign (literally, a sign) that I was in Hopville, hoping to snap some photos to use on Hopville.com.  (Ever notice that the site has no logo?  Well, one day soon, I hope that it will, and a snapshot with the word “Hopville” might’ve helped a bit.)  But here’s the thing: I never found any sign of Hopville.  But I did find, at the dead end of Wigrich Road (a right turn on Wigrich being the dead end direction), a very good sign:

Rogue Farms Sign

Yep, I stumpled upon the very hop yard where the estimable Oregon brewery Rogue grows and processes its own hops.

I researched this a bit online after I’d returned home.  Rogue never mentions Hopville in any of their literature, so I am not sure if anyone besides Google believes the place exists. But, I’m just sayin’, here’s a wider view of the Hopville map:

Hopville to Rogue Farms

Rogue brands their hops using a town a few miles northwest of this area, a town called Independence.  Apparently it was once the “hop capital of the world”.  From Rogue’s press release:

In May of 2008, Rogue entered into a strategic alliance with heritage hop growers the Coleman family. Rogue planted 22 acres of hops and will add 20 more this fall on the former John I. Haas Alluvial Hop Farm just south of Independence. The land, at the end of Wigrich Road, is part of a historic hop farm called the Wigrich Ranch, that in the 1920s was the largest hop yard under a single trellis in the world.

Quite a coincidence considering that I was only trying to find Hopville; apparently Rogue was too.  If I didn’t have Maritime Pacific as my neighborhood brewery in Seattle, I think Rogue would have to be Hopville’s official microbrewery.  Maybe I should return during growing season so I can see hops on those trellises and see if Rogue wants to sponsor their “neighborhood website”.  Hmm….

Current Hopville recipe count: 1554. Hey, ain’t that a beer?

Comments (4)

Milestone!

Yesterday was truly an historic day, folks.  Know why?  Hopville passed the mark of 1,000 homebrew recipes.  That’s pretty good for an almost-ready website, I’d say.  (Apparently, there was some sort of election too.  Check the interwebs.)

Leave a Comment

Database Exposure

When I last checked in about development status, I was about to shoehorn the BJCP style information into the database.  Well, consider the  most recent guidelines shoehorned.  They still need to be cleaned up a little bit, the textual data was a little messy, but at least the stats and descriptions are there now for easy reference.  In the process of fleshing out the style pages, I also made it easier to browse recipes within the style, narrowing down to extract, all grain, or partial mash.  And the relatively new search feature is an easy way to cut through the database looking for specific styles too.

In other developments:

  • I finally opened up the ingredients database to the masses. Previously I was the only person who could add new ingredients into the database, so folks had to drop me an email request or list their unlisted ingredients inside the recipe notes.  Now anybody can add anything right into the recipe on their own.
  • To accommodate an open ingredient database, I added inline ingredient search to Beer Calculus.  Now, rather than having to read through an alphabetical select box to find the malt, hop, yeast, or miscellaneous ingredient you need, you can switch on a search box and find the selection by typing a keyword or two.  And if the ingredient you’re searching for can’t be found, it’s easy to add it.
  • Previously all IBU results were calculated using an ages-old custom formula that combined parts of the “Daniels method” with the “Garetz method”.  I’ve now updated the IBU number to be customizable to the popular formulas (Tinseth, Garetz, Rager), but I also left in the old “Hopville method” so that existing recipes keep their existing IBU value.  By default, new recipes added to Hopville will calculate IBUs by averaging the three commonly used formulas, but brewers with a formula preference can customize to use that instead.
  • Fixed some rounding errors introduced by the recent migration to metrics-based recipe storage, and some other bugs I introduced in the broad sweep of new changes.

Current recipe count: 675

Comments (1)

automatic color palette for Rails

It’s difficult trying to standardize colors across a site. I picked up a tip somewhere to keep a legend at the top of a stylesheet, something like this;

/*
HOPVILLE COLORS
F9F9FF off white
4a443c main text
B34700 link text
FF6600 action link text
eeeeee tiger body
*/

Then you have an easy hex color reference right at the top of your main stylesheet. But “easy” becomes relative. On Hopville, I ended up describing shades of green as “medium”, “medium light”, “lightest”, and “extra-lightest”. Extra-lightest green? Which one was that again? And as the site’s color scheme has evolved, the legend has gotten out of date.  Some of the colors on the site aren’t in the legend any more, some of the colors in the legend aren’t in use anymore, and so on.
It just occurred to me that this could be automated, that I could scan all the stylesheets with a script, pull out the color attributes, and generate a color swatch page on the fly.  So when I want “that one shade of green”, I can go look it up and cut and paste the hex value, without having to dig through stylesheets or maintain a color palette legend.  Rails made it easy to generate it on the fly with an erb template (ignoring MVC for simplicity’s sake) and not even have to set up a cronjob.

Dynamic color palette browser created from stylesheets in Rails.

Dynamic color palette browser created from stylesheets in Rails.

The code:

<%
stylesheet_dir = RAILS_ROOT + '/public/stylesheets'
files = Dir.open(stylesheet_dir)
css_files = []
colors_in_stylesheets = Hash.new {}

files.each do |file|
  if file.match(/\.css$/)
     File.open(stylesheet_dir + '/' + file).each do |line|
        if line.match(/\#([0-9a-f]{3,6})\;/i)
          unless colors_in_stylesheets[file]
            colors_in_stylesheets[file] = {}
          end
          colors_in_stylesheets[file][$1.downcase] = 1
        end
      end
  end
end

block_size = 100
%>

<style type="text/css">
div.swatch-block {
  margin:10px;
  float:left;
  width:<%= block_size %>px;
  height:<%= block_size %>px;
  text-align:center;
  border:1px dotted #ccc;
}
div.swatch-block span {
  background-color:#fff;
  color:#999;
  border:1px dotted #ccc;
  padding:3px;
}
h2 { clear:left; }
</style>

<h1>Color Swatch</h1>
<% colors_in_stylesheets.keys.sort{|a,b|
   colors_in_stylesheets[b].size <=> colors_in_stylesheets[a].size
   }.each do |stylesheet| %>
  <h2><%= stylesheet %></h2>
  <% colors_in_stylesheets[stylesheet].sort.each do |color, garbage| %>
    <div class="swatch-block" style="background-color:#<%= color %>;">
    <span><%= color %></span>
    </div>
  <% end %>
<% end %>

This works great for me since I always use hex colors, but I imagine it could be tweaked to find other color definitions as well.

Leave a Comment

« Newer Posts · Older Posts »