Archive for August, 2008

Best Skirt Steak Ever

One of my favorite cuts of beef is the skirt steak.  Its generally more tender and flavorful than flank steak, due to its higher fat content, and usually cheaper too.  The best way to cook it is over a really hot grill for 1-2 minutes per side, or until barely on the cooked side of rare.  Beware over cooking, or you will get something resembling shoe leather.  

Almost any marinade will do, but something acidic will help to tenderize the meat.  Below is my favorite recipe for preparing skirt steak, adapted from something I saw in an Alice Waters cookbook.  Anchovies and garlic make a surprising marinade, but one that adds flavor and just the right amount of saltiness to the meat.  For those who cringe at the thought of anchovies, get over it – grilling mellows the flavor and adds a smokiness to the whole thing, leaving no discernible anchovy flavor. 

Anchovy Garlic Grilled Skirt Steak

  • 2 pounds skirt steak
  • 1 2oz jar of salted anchovies in olive oil
  • 6 garlic cloves
  • 1/2 cup olive oil
  • salt and pepper

1) Remove the anchovies from the oil and roughly chop.  Peel the garlic.  Add the anchovies and garlic to a food processor and pulse briefly – don’t over do it or the blend will turn into a paste.  Add the olive oil, and the oil from the anchovy jar, a touch of salt and a good amount of pepper.  Pulse again briefly.

2) Lay the skirt steak out on a baking sheet.  Spoon 1/2 of the anchovy garlic marinade over the skirt steak and rub into the meat.  Flip the steaks and repeat with the remaining marinade.  Let the meat rest for 1 hour.

3) Turn on your grill to high and let heat for 15 minutes.  You want it to be really hot when you add the steak.  Once heated, add the skirt steak and cook for about 2 minutes.  Flip the meat and cook for another 2 minutes.  Be sure not to over cook, or the meat will come out tough.  Remember, skirt steak is very thin and will continue cooking once you remove it from the grill, so if it looks a little underdone when you take it off, don’t worry.

4) Slice the skirt steak against the grain into small strips.  Add some parsley for garnish, if desired, and serve immediately.  I like serving it with just a simple salad – this meat really stands out well on its own.

 

Duck and Cabbage Gyoza

For those of you in the know, Gyoza are the most delicious thing this side of italian food.  I mean, what could be better than little fried packets of vegetables and meat?  Seriously.  The only thing better than restuarant gyoza is homemade – its actually pretty easy, and if you are willing to spend the time, totally worth it.

This is an interesting twist on the standard gyoza recipe that uses chicken (ok) and/or pork (delicious) – instead we used some of the duck confit that’s been looking so good in the fridge.  If you don’t have duck, substitute about a 1/2 pound of ground pork.  This recipe will make about 30 gyoza, but can be portioned up or down easily.

Ingredients:

  • Meat from 1 duck confit leg, or about 1 cup depending on the size of the leg
  • 2 cups cabbage, finely chopped
  • 1 cup onion, finely chopped
  • 1/2 cup scallions (aka green onion), chopped
  • 4 garlic cloves, minced
  • 1 shallot, minced
  • 1 teaspoon grated fresh ginger
  • 1 teaspoon tamari
  • 3 tablespoons peanut oil
  • 1 egg
  • 1 4oz package of round gyoza wrappers (about 30 per pack, available at any asian grocery)

Making the Filling

1) Pick the meat off the duck leg.  There really is no clean way to do this, so don’t be afraid to get your fingers greasy.  Once you’ve picked all the meat from the bones, chop it into a medium fine dice.  Remember, it’s got to go inside gyoza, so make it small, but not too small that it gets lost.

2) Heat a large skillet or wok over medium heat and add 2 tablespoons of the peanut oil.  Once hot, add the onion, garlic, shallot and ginger.  Cook until tender, but not mushy, about 5 minutes.  Add the cabbage and continue to cook for another 4-5 minutes, or until the cabbage is soft.

3) Add the duck meat, scallions, tamari and egg to the pan and cook for 2 minutes more, or until the egg stops being runny.  Remove from the pan into a bowl.

Making the Gyoza
I usually prepare a space ahead of time for making the gyoza.  You’ll want a little dish of water, a towl to dry your hands, and a spoon.  The wrappers can get very sticky and tear easily if wet, so be sure to wipe off your hands if they get messy.

4) Take a gyoza wrapper and place flat on the work surface.  Moisten half the edge of the gyoza wrapper by dipping a finger in the dish of water and running it along the edge of the wrapper.

5) Next, place a half spoonful of the filling mixture in the middle of the gyoza wrapper and bring the edges together to form a taco shape.

6) Working from one side, bring the edges together and pinch them so they stick.  The water will make the inside edge slightly tacky, helping the process.  Create 5 crimps along the edge to ensure the sides stay joined.  Continue until all the filling and wrappers are used.

Cooking the Gyoza

7) Add the remaining tablespoon of the peanut oil to a heavy bottom skillet (I prefer cast iron) and heat on medium for a few minutes.  Once hot, add the gyoza to the pan, fold side up.  Cook for about 4 minutes on medium heat, or until the bottoms are crispy and brown.

8 ) Add 1/4 cup of water to the pan and cover immediately.  I usually add the water with one hand and have the lid in the other so I can cover quickly and minimize the hot oil spraying everywhere.  Continue cooking the gyoza until the water has cooked off, or about another 5 minutes.

9) Remove the lid and cook for 1 minute more to firm everything up.  Remove to a plate and serve immediately.

Writing Qt Debug Information to a File

Update: I’ve added some additional information on limiting logging when compiling in release mode.

Common problem: I’ve got a Qt app with debugging information, and have a bug that only appears when the code is compiled using the release makefile.

I’ve had this a happen a few times.  By default, the debugging information is written to the debugger console, but when running a compiled ‘release’ app, there is no debugging console and thus no way to get the output.

Solution: Turn on debugging messages in the release makefile and have Qt write the messages to a log file.

Step 1: Remove the -DQT_NO_DEBUG flag from your release makefile.  This will increase the size of the app, though by how much depends on the amount of debugging code in your app.

Step 2: Create a debug message handler function in your main.cpp file.  Here’s an example:

#include <iostream>
#include <fstream> 

#include ...

using namespace std;

ofstream logfile;

void MyOutputHandler(QtMsgType type, const char *msg) {
    switch (type) {
        case QtDebugMsg:
            logfile << QTime::currentTime().toString().toAscii().data() << " Debug: " << msg << "\n";
            break;
        case QtCriticalMsg:
            logfile << QTime::currentTime().toString().toAscii().data() << " Critical: " << msg << "\n";
            break;
        case QtWarningMsg:
            logfile << QTime::currentTime().toString().toAscii().data() << " Warning: " << msg << "\n";
            break;
        case QtFatalMsg:
            logfile << QTime::currentTime().toString().toAscii().data() <<  " Fatal: " << msg << "\n";
            abort();
    }
}

Step 2: Install the handler in your main function, like so:

int main(int argc, char *argv[])
{
    logfile.open("logfile.txt", ios::app);
    #ifndef QT_NO_DEBUG_OUTPUT
    qInstallMsgHandler(MyOutputHandler);
    #endif
    ...
}

Now all debug information will be written with the time to a log file called ‘logfile.txt’ in your application directory.

When compiling your final application, be sure to add the flags -DQT_NO_DEBUG and -DQT_NO_DEBUG_OUTPUT.  These will reduce the application size and ensure that the logfile isn’t used.  Alternately, you can keep NO_DEBUG_OUTPUT out of the makefile if you still want the logfile.

iPhone Web Development Tools

I’ve been looking for an easy set of stylesheets and javascripts to create nice looking iPhone enabled web apps.  After some cursory searching, I’ve found a couple of resources, listed below, with my thoughts.

There seem to be a few toolkits out there, but nothing that has been developed into a stable version.  I think that most people bailed on the web apps when the real iPhone SDK came out in January, so there doesn’t seem to be much action.  However, I still see a big use for iPhone web apps as a prototyping tool for the real thing – at least that’s what I’m interested in.

iUI

A good start to a generic iPhone web app library.  Hasn’t been updated in a while (since November, 2007) but looks like the 0.30 version is scheduled to come out any day now.  This project has the laudable goal of making developement for the iPhone as easy as coding HTML – no knowledge of javascript or css necessary.  Sounds great, and they’ve made good progress, but I ran into quite a few problems.  First, there were quite a few rendering bugs – background images appeared all over the place, forms didn’t work, links were spotty and the text rendering looked terrible.  My guess is there hasn’t been any active development since the 2.0 firmware was realased which include updates to the WebKit rendering engine.  Also, the lack of any documentation was really frustrating.

iPhone Sample Code and Examples

This isn’t really a library, and I have a sinking suspision that it was based on the early work of the iUI folks, but is a helpful resource nonetheless.  Basically, the site provides examples of different iPhone web pages that can be used to fake the look of a real app.  I found that this site was in generally better shape than the iUI library, but was very kludgy.  Again, very little documentation didn’t help matters.  For example, the way the javascript is written removes any link functionality – <a> tags are repurposed for displaying in-page divs which gives it the sliding effect.  However, to link to an outside site, one has to add an ‘onclick’ javascript function to manually change the window.location.href url to the link you want to follow.  Very annoying.

iPhone Toolbox

This is a general resource rather than a library.  But, they provide a bunch of useful links to other sites and iPhone emulators which can be helpful.  Also, the site provides lists of cool webapps, and for you folks with hacked phones, icon sets and wallpapers.

Duck Confit

I’ve had an obsession for the last 6 months with duck fat. To be more specific, with finding duck fat so I can make a proper duck confit. When I was in France a couple of years ago, I was introduced to the wonderfulness that is duck cooked in it’s own fat. The rich, dark meat would appear in delicious dishes, from cassoulet to salads. Since I got back to the states, I’ve been trying to figure out how to make duck confit so I can have the meat around for myself. You can find duck confit in specialty stores, but it is cheaper, and like most things, better when you cook it yourself.

In French, confit means to preserve, usually through a combination of salt curing to remove excess moisture and slow cooking in fat. Once prepared, duck confit can last several months in the fridge (if it’s stored covered in the fat you used to cook it). But, to be honest, I’ve never had it last that long! In the states, raw duck is pretty easy to find: I can get good legs at the local Whole Foods for about $5 per pound. Duck fat on the other hand, is quite a bit more difficult. At least in the quantities I was looking for – between 2 and 4 pounds, depending on how many legs you are cooking.

Since I couldn’t find 2 pounds without paying an arm and a leg, I initially decided to try some of the recipes that allow you to substitute olive oil for the duck fat. Bad decision. The duck was, 1) too salty, but that may have been a function of the recipe, and 2) had a very weird flavor. Overall, it lacked the almost creamy texture and mellow, buttery flavor I remembered.

So, after months of searching, I was at the local Uwajimaya Asian supermarket looking for gyoza wrappers in the freezer section and stumbled on about 6 pounds of rendered duck fat: Yellow Gold! And for only 7 bucks a pound (that might sound like a lot to some of you, but keep in mind you can strain the fat once you are done and reuse it a few times). I only ended up with 2 pounds, and four meaty duck legs, but I was set!

So, here is a recipe for Duck Confit, adapted from a recipe in the excellent Chez Panisse Cafe Cookbook by Alice Waters and Co.

Recipe
Makes 4 legs.

Ingredients:

  • 4 duck legs, thighs attached
  • 2 pounds of duck fat, about 2 quarts
  • 3 tablespoons salt
  • 3 bay leaves, crumbled into small bits
  • 1 teaspoon fresh thyme
  • 1 teaspoon rosemary
  • 1/2 teaspoon fresh pepper

1) The day prior to cooking, prepare the legs – trim any excess fat from the thighs. Mix the dry ingredients and apply liberally to the legs.  Place in a glass baking dish and refrigerate overnight.

2) The next day, heat a cast iron dutch oven over medium heat and add the duck fat. Meanwhile, use a paper towl to remove the excess salt from the legs. Once the fat is melted, add the legs, being careful not to splatter yourself with the hot fat.

3) Reduce the heat to low. You want to avoid overheating the fat, as it will cause the duck to be gamey. I generally try to avoid heating the fat beyond the point where a few streams of small bubbles are floating to the top. Cook on low for about two and a half hours.

4) To test the legs for doneness, insert a skewer into the thickest part and remove. The legs are done when the skewer slides out easily.  Once cooked, remove from the heat and let the legs cool a bit.  Remove the legs from the pan and place in a glass or earthenware crock.  Cover with the fat and refrigerate, ensuring that all parts of the duck are completely submerged.

And there you go!  Wonderful duck confit that can either be eaten on its own (just put it under the broiler, skin side up, for 5 minutes until the skin is crispy) or added to salads, soups, sandwiches or whatever else strikes your fancy.

Welcome

Hi all, welcome to the Cooking and Coding blog. I’ve wanted to do this blog for a long time as it combined my two non-work passions – you guessed it, cooking and coding. I have a few projects that I’ll be writing about:

  • A visual notes application written in c++ and Qt.
  • A set of online collaboration tools written mainly in Ruby and Rails.
  • My pie-in-the-sky dream of opening a restaurant. Step one, define a personal cooking style.

In addition to the three main projects, I’ll be adding anything else that looks interesting to me. So, welcome and stay tuned.