Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

dug (2501)

  (email not shown publicly)

I like pork and Perl.

Journal of dug (2501)

Saturday January 24, 2009
01:11 PM

I'm a Moose fanboy

I've always had some love for Perl 5's object system. I appreciate that it doesn't foist an ideology on me, instead providing me tools to build and use an object system that I'm comfortable with.

Typically for me that object system uses blessed hashes, hand-written accessors (with hand-written validation), hand written method parameter validation and explicit manipulation of @ISA.

Why don't I use X for (accessor generation, parameter validation, etc.)?

I probably have, and maybe do on a project here or there. But I've never fallen in love with a combination of OO helpers on the CPAN, and Perl's built in OO mechanisms are usually good enough for me.

A couple of things happened the other day. I looked at Moose's documentation, and stubbed a couple of classes for a home project. I was expecting a steeper learning curve than I found, and in a couple of minutes I was working with object system that I liked.

I didn't see anything about method parameter validation in the Moose documentation, so I hopped on People were nice and helpful (thanks autarch, mst and sartak!) and in another minute I had MooseX::Params::Validate plugged in and working away. I also got some exposure to MooseX::Method::Signatures, Method::Signatures and Devel::Declare. Insanely cool stuff.

Thank you and congratulations, Moose team!

-- Douglas Hunter

Friday September 26, 2008
04:14 PM

Old Man++

My father just completed a 2,400 mile, unassisted bike ride from Fairbanks, AK to Spokane, WA.

He blogged about it a bit here:

Way to go, old man!

-- Douglas Hunter

Monday July 21, 2008
12:27 PM

Entry level construction skills

My entry level construction skills remind me of entry level coding.

I recently had a ductless air conditioning system replaced in my house. Someone stole the 300 lb compressor from the last unit to get a few bucks at the scrap metal shop, and the unit that they stole has been deprecated for a new version, with more efficient backward incompatible blowers and gas lines. Many walls were opened up, in a haphazard way. The company opening the walls and installing the new version doesn't close and patch walls, which is where my story begins.

Instead of reading the documentation on how to patch walls, I thought, "this can't be too hard, I'll just start typing".

The documentation would have told me that if you are patching an irregularly shaped hole, it's worth refactoring that hole into something that will take a piece of sheetrock with straight edges.

Once I figured that out for myself, I though, "Surely enough adhesive sheetrock tape and joint compound will cover my initial mistakes".

Instead of refactoring the base I plowed ahead, adding layers and layers of tape and patch to cover my work.

Lots of sanding and skim coating later, I have new, inefficiently implemented, mediocre, unmaintainably patched walls.

-- Douglas Hunter

Monday September 17, 2007
04:27 PM

Test Driven Development

Yeah, yeah, I know. I'm a little late to the game. I've known in theory that
TDD is a good idea for quite some time. But, as they say, "In theory, theory
and practice are the same".

I needed to write a plugin module for work today. I stubbed out the module
using module-starter and wrote the POD. Writing the API documentation first
had the nice effect of keeping it simple. I don't like writing documentation,
so I'm not about to document publicly something that might not be useful.

Then I wrote the tests. I like breaking things, and thinking about how to
break things. Thinking about how to break things that don't exist yet was
fun! Writing tests made me think through the API in ways that I hadn't when I
wrote the POD. Based on the thinking I had to do when writing tests, I ended
up re-writing sections of the documentation to clarify how certain methods
should act.

Then I wrote the code. I thought that I only wrote enough code to pass the
tests, but once the tests were passing I dug in and re-factored the code,
shortening it a fair bit.

I'm a TDD fanboy, coming out late!

Sunday July 29, 2007
09:34 AM

Perl Sauce

One of the things that I learned while working the meat station at Blue
Hill was how to make meat sauces. The sauce making technique there is
different than at a lot of other restaurants, and it shows (or tastes,
rather). Sauces using the technique I learned there taste like the
animal that they came from.

It helps that we did lots of whole animal butchery. Whole animals meant
that I had bones to make a native stock, and native scrap meat to braise.
The basic technique is much like making a daube or a stew.

1) Sear the cubed meat, browning on all sides.
2) Drain the meat.
3) Sweat aromatics, deglaze with stock.
4) Add the meat, braise until fork tender.
5) Strain the cooking liquid, reserve the meat.
6) Reduce cooking liquid to sauce consistency, skimming constantly.

Of course there are nuances and steps that change with the desired end
result, but this is a basic method that can be adapted for nearly any
meat sauce. And the scraps make a great family meal.

If this is such a great basic technique, why doesn't anyone use it for
fish? One could argue that poaching a fish in a fumet is the analog.
While it's a great way to cook a fish, the end result isn't a complex,
nuanced, sauce consistency sauce. It's a broth.

Why doesn't anyone do the following?

1) Poach the fish in the fumet.
5) Strain the cooking liquid, reserve the fish.
6) Reduce cooking liquid to sauce consistency, skimming constantly.

Actually, they do. In "Grand Livre De Cuisine", Ducasse has several
takes on this method. In "Simple French Food", Richard Olney describes
"Fish In Sauce", talking about different ways to bind a fumet reduction.
I'm sure others describe it elsewhere.

When I cook fish, I almost always end up making a fish sauce, using this
basic technique. I appreciate the simplicity of an herb mayonnaise, or a
beurre blanc, or an herb vinaigrette. But once I'm in fish land, I
usually want to garnish my meat with something that reflects the whole
fish, and is a reduction of its elemental flavors.

When I'm in Perl land, I usually want to garnish my meal with Perl.
I want it to smell like Perl and taste like Perl, not like some
DSL^H^H^H sauce that I just cooked up on the fly that I'm going to
garnish my Perl meat with.

-- Douglas Hunter

Tuesday June 12, 2007
03:53 PM

Back in the game

After a year in a the kitchen at Blue Hill (a great experience, more on that later possibly), I'm back in the game.

I'll be posting here about Perl related business, and over at my new blog, Pork Talk, about food related stuffs.

-- Douglas Hunter

Monday December 19, 2005
02:56 PM

Pork Gift

I just got a ham. I'm happy.

-- Douglas Hunter

Friday December 16, 2005
02:31 PM

Cod and Chipotle Stew with Black Beans and Shrimp on Toast

1 pound fresh cod (or other white fish)
1/2 pound medium prawns
1 can black beans (or 16 oz from your fresh cooked pot)
8 roma or plum tomatoes
8 cloves garlic
2 chipotle peppers in adobo
queso fresco
2 table spoons bacon fat
2 table spoons butter
salt and pepper to taste
1 loaf rye bread

Half and roast the tomatoes skin side up until the skins blacken and
can be easily removed.

Roast 4 cloves garlic (this can be done in 15 minutes in a skillet on
top of the stove, turning occasionally on medium heat).

Dice the remaining 4 cloves of garlic.

Add tomato's, minced chipotles and roasted garlic to a blender and
pulse until coarse.

In a skillet heat 1 table spoon bacon fat until smoking, add the
tomato-chipotle mixture to the skillet and cook until it becomes a
dark red, about 15 minutes.

Add 1 table spoon bacon fat to a second skillet, and heat until just
smoking. Liberally salt and pepper the cod, and cook in the bacon fat
2 minutes per side (keep the pan hot, we want the outside of the fish
to develop a nice crust. The inside of the fish will continue to cook
in the stew).

Remove the fish into the tomato-chipotle sauce, add the black beans
and stew until the fish falls apart.

Add one table spoon butter and the minced garlic to the fish skillet,
followed by the prawns. Cook the prawns until they turn red then
remove them from the skillet.

Add the last of the butter to the skillet and grill the bread in the
remaining butter, garlic and bacon fat.

Once the bread nice and crispy golden brown, layer on top of it
crumbled queso fresco, tomato-chipotle stew, crumbled queso fresco,
tomato-chipotle stew and then top it with the shrimp.


-- Douglas Hunter

Tuesday December 13, 2005
06:37 PM

Tonight's menu

I'm off to the local markets for fish stew makings. Cod, prawns, black beans, tomatoes (most probably canned or roasted roma), garlic, chipotles and epizote. Maybe some Oaxaca cheese as well.

If all goes well I'll post a recipe here tomorrow.

-- Douglas Hunter

Monday December 12, 2005
05:48 PM

Gadgets is available for use. It's still young (the management and helper tools for authoring new gadgets aren't there yet), but I'm happy with what we have so far. There also isn't a front end caching proxy yet, so it might be slow under load ( is a Xen domain with limited resources)

Soon to come is the translation interface, which is far slicker than translation tools I've worked with before. When it is enabled translating the interfaces is as simple as hilighting the text to be translated, hitting "t" on ones keyboard and entering the translated text. Nice work, Kwin!

I'd like to hear folks feedback. Either sign up and create a post or reply to this journal.

Have fun, and thanks!

-- Douglas Hunter