Belgian Blond Ale

Last weekend I brewed up a 5 gallon batch of my first belgian style ale. This is an extract recipe with a small amount of specialty grains.

The BJCP describes this style as “A moderate-strength golden ale that has a subtle Belgian complexity, slightly sweet flavor, and dry finish.”

I am eager to see how it turns out.

Ingredients

  • 0.74 lbs. Balgian Pale
  • 0.10 lbs. Belgian Aromatic
  • 3 lbs. Dry Extra Light Extract
    Boiled at 25 min.
  • 3 lbs. Muntons Dry Extra Light Extract
    Boiled at 25 min.
  • .6 lbs. Candi Sugar Clear
  • 1 oz Challenger (Pellets, 6.7%AA)
    Boiled at 60 min.
  • .4 oz Amarillo (Pellets, 8%AA)
    Boiled at 15 min.
  • .5 oz Fuggle (Pellets, 4.75%AA)
    Boiled at 1 min.

Once again, I forgot to measure the original gravity. The recipe that I started with predicted an OG of 1.066 with an expected alcohol content of 7.3%.

Easy Zebra Striping with Prototype

While reviewing some of the JQuery tutorials, I was impressed with the ease of setting up a table with alternating row colors.

This got me thinking that it should be a relatively easy thing to achieve using the Prototype library as well. In this edition, I will give quick example of doing just that.

We’ll start by using the element selector utility method ($$). This will return a list of the odd numbered rows in our table. We then add the oddRow classname to each of these matched table rows.

1
2
3
4
5
6
7
8
9
10
function stripe(e) {
  var evens = $$('table.stripe tr:nth-child(odd)');
    if(evens) {
      evens.each(function(tr) {
        tr.addClassName('oddRow');
      });
    }
}
 
Event.observe(window, 'load', stripe);

The next step is to assign the stripe class to our table. Any table with this class will pick up the new behavior.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<table class="stripe" border="0">
<thead>
  <tr>
    <th>Lorem</th>
    <th>Ipsum</th>
    <th>Dolor</th>
    <th>Sit</th>
    <th>Amet</th>
  </tr>
</thead>
<tbody>
  <tr>
    <td>Lorem</td>
    <td>Ipsum</td>
    <td>Dolor</td>
    <td>Sit</td>
    <td>Amet</td>
  </tr>
...

Last step, we need to specify the CSS to change the background color. I also threw in a directive to collapse the borders.

1
2
3
4
5
6
table.stripe tbody tr.oddRow {
	background-color: #eee;
}
table.stripe {
	border-collapse: collapse;
}

Here it is in action. Though it’s a bit crude it illustrates that the rows are highlighted as intended.

Lorem Ipsum Dolor Sit Amet
Lorem Ipsum Dolor Sit Amet
Lorem Ipsum Dolor Sit Amet
Lorem Ipsum Dolor Sit Amet
Lorem Ipsum Dolor Sit Amet
Lorem Ipsum Dolor Sit Amet
Lorem Ipsum Dolor Sit Amet
Lorem Ipsum Dolor Sit Amet
Lorem Ipsum Dolor Sit Amet
Lorem Ipsum Dolor Sit Amet
Lorem Ipsum Dolor Sit Amet

As always improvements, tweaks & suggestions are welcome.

CVS Shortcuts in Vim

Vim is an incredibly flexible text editor. I continue to be surprised by the number of strange things it’s capable of doing. For example, there is a crude Tetris clone available for Vim.

A bit more useful, though, is the cvsmenu script for Vim. This is a fairly polished plug-in that will allow you to do all of the basic CVS tasks from inside your text editor. The supported CVS commands are: add, diff, commit, update, status, shortstatus, localstatus, and revertchanges.

Since the plug-in is poorly documented, I thought that I would take this opportunity to explain how to use it.

Installation

In Ubuntu, this is pretty simple.

% sudo aptitude install vim-scripts

% vim-addons install cvsmenu

This will install the package and enable the plugin for your user.

Usage

I will assume that you already have a versioned source tree checked out on your system. Start by opening a file in this tree. You can open a diff view by typing “,cd”. Note: that’s comma, C, D.

The local revision is shown on the right, the remote revision is on the left. This is a bit backwards from the Eclipse and Netbeans way of doing things. Typing CTRL+W+W will move your cursor between the two revisions. I haven’t found an easy way to move a change to the right, but I would be interested in reader comments.

Here is an index of the commands. They may be documentation somewhere but I was only able to find them by looking at the plug-in source code.

  • ,ca - Add
  • ,cd - Diff
  • ,ci - Commit
  • ,cu - Update
  • ,cs - Status
  • ,ch - Short Status
  • ,cc - Local Status
  • ,cv - Revert Local Changes. The odd thing about this is that it only updates the file on disk. It doesn’t actually revert the changes in the open editor.

Modern IDEs do ease the pain of performing mundane versioning tasks such as merging. But, this is a nice alternative to those heavy-weight tools.