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.)

Comments

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 breweres 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.

Comments

Miscellaneous Developments

Continuing my second sweep through Hopville, lots of new stuff happened over the weekend:

  • New “miscellaneous ingredients” section added to the recipe page to handle flavorings, clarifiers, etc.
  • Recipe types have been added.  Search and style browsing both now include filtering by recipe type so you can find relevant recipes (all grain, extract, partial mash) more easily.
  • Recipes can now be exported as BeerXML.
  • Lots of little UI tweaks in pursuit of beery beauty.

Right now I’m trying to shoehorn the 2008 BJCP style guidelines into the database, and fleshing out new style pages that will make all the style information readily available on Hopville.

Current recipe count: 633

Comments

Hopville goes better with search.

I’ve pretty much burnt out on fixing up my house, which has been my big summer project.  So now it’s back to working on stuff in my newly clean office space.  It’s stylin’.  I’m preparing a significant Hopville release right now, but it’s mostly significant in the guts of the program.  I’m converting the database to use metric units to store all recipe measurements.  This will make the site a lot more useful for non-U.S. folks.  It’s true that most users of the site are in the States, but that’s partly because the site is effectively useless for non-citizens.  We’re the only remaining stalwarts of the ancient English system.  Except maybe Burma.  And Liberia.  Not a lot of homebrewing going on in those locales.

But I’m not just converting to metric in order to feel wordly.  This change will also facilitate recipe importing and exporting features.  BeerXML is the language that brewing software uses to communicate with other brewing software about recipes, and it only speaks metric.

The metrics conversion shouldn’t affect U.S. users at all, the Beer Calculus interface and calculations will remain the same (assuming I didn’t mess up…but I’m being especially careful with this release), but users will be able to create, view, and edit recipes in whichever system they like.  Hopefully I’ll be rolling out that release by the end of the weekend, along with some navigation improvements.

Speaking of navigation improvements, I finally added search to Hopville this week.  It was a big, gaping hole in the site navigation so I’m glad some users contacted me to cow-prod me into adding it.

Current recipe count: 613

Comments

One Hundred Bottles of Beer on the Site

The Hopville recipe count turned 100 today! Okay, it’s a relatively small milestone, but it’s also the very first milestone. And when you launch a site with three recipes on it, do no promotion/advertising/blog commenting, and have almost no Google exposure (which is still true…Google’s last crawl was on the 11th), 100 feels like a lot of recipes. Hey G, why don’tcha come on back and see us sometime? We’d like that. The more, the merrier. With 41 registered users, I think we might’ve already surpassed the population count of the real Hopville, OR.

In other news, recent developments on the site:

  • First draft of fleshed-out brewer profile pages. You can now add a profile picture, a link to your website, and a few words about your brewing self to the profile page. That page has been split into tabbed pages for Recent Activity, Recipes Created, Recipes Favorite-d, and Comments.
  • Editing individual ingredients in Beer Calculus is now AJAX-based, so each page load as the recipe gets designed and updated is a wee bit faster than it was before.
  • Completed the list of recipe types so all BJCP beer styles are represented.
  • Added a beer style dropdown to the style page, making it easy to switch between styles when browsing recipes. Search soon to follow.
  • As usual, lots of little design changes accompanied these updates.

Comments

On the Road to 1.0

I managed to avoid hangovers this weekend - at least, debilitating ones - and made more steady progress on Hopville. When I started thinking about releasing the site as fast and light-weight as possible, I reckoned there’d be three stages of the initial roll-out. With the addition of the recipe comments feature, I’m about half way done with the “second phase”. I suppose that means I’m about half way to a launch-ready site, and the current participants are unwittingly acting as Beta testers. Shhh…

New Stuff

  • Comments are now allowed on recipes, so brewers can share questions, compliments, and tips on their recipes
  • The points per gallon of sugar extract, as well as the lovibond rating of each fermentable ingredient, are now customizable.  Previously there were default settings for each ingredient, which were fixed and never displayed.  That was handy for keeping the interface clean, but continued design tweaks on the calculator are facilitating more customization options without huge costs in terms of clutter.
  • Added White Labs yeast strains, as well as Rice Hulls as a mash/sparge ingredient


Other Updates

  • Improved the way stylesheets handle the “printable” version of pages, so more information is displayed on the printed version, and a separate version no longer needs to be maintained
  • Fixed some bugs with “save” versus “save as” when updating saved recipes
  • Made the maximum weight per fermentable ingredient dynamic, dependent on batch size. Most people will never know this happened, but it’s much more convenient for folks brewing batches of 10+ gallons.

Current recipe count: 74

Comments

Hopville hiatus

After hosting an out-of-towner and then catching a mild but brain-freezing cold, I got back into Hopville development last night.

  • Merged the recipe display code for Hopville and Beer Calculus. This will help keep them in sync visually and ensure that bug fixes on one will immediately apply to the other
  • Design improvements on Hopville recipe page
  • Bug fixes: handled recipe editing edge cases, added and fixed functionality to the favorites feature (where you can save other brewers’ recipes into your recipe file), fixed bug with changing hop forms in the calculator
  • Show IBU correction information only when applicable

No major feature additions but several are likely to happen by the end of the weekend.

Current recipe count: 59

Comments

Beer Calculus gets outpatient surgery

Some small tweaks to Beer Calculus tonight. The malt results now represent color as degrees SRM (Standard Reference Method). This has always been the basis of the color calculation, but the result was left out in favor of a text description that was somewhat less helpful, and sometimes innacurate. Not only is SRM exposed, but its formulation has been upgraded to use the hopefully more accurate, definitely less linear Morey equation by default. Other items on the short list for Beer Calculus updates:

  • Allow editing of sugar and color contributions for each fermentable, so brewers who know the PPG and °L of their ingredients can customize their recipes.
  • Allow multiple equation choices for things like hop utilization and SRM calculation.
  • More of this information exposed on the printable version of the recipe page.

Current recipe count on Hopville: 10.

Comments

Hopville launches. (Very softly.)

In the spirit of “launch early, launch often”, I pushed an embryonic version of Hopville out to the interwebs yesterday. Ultimately I’d like it to be a lively, free community site for homebrewers. Right now it has maybe 5% of its intended features and exactly 0% of the community members that will make it all happen. But since the existing features facilitate permanently storing recipes created on Beer Calculus - which was long overdue - I thought I may as well get Hopville out the door early.

Now I’m setting up a blog type thing where I can give development updates for those who care to follow along. Much like the site, the blog is likely to be empty, ugly, and located at temporary URLs for awhile. So it goes. The good news is, I got a great tip on some new references to use while upgrading the mathematical innards of Beer Calculus. The bad news is, I’m hosting out-of-towners this weekend and won’t be able to add any major features. More major ones to follow next week, and hopefully some minor improvements meanwhile.

Comments