Archive for September, 2008

Migrating Qt Apps from Windows to Mac OS X

One of the great selling points of Qt is that you can write one application and compile it natively on Windows, Linux or Max OS X.  I’ve been doing most of my dev work on a Windows XP laptop, however I also have a MacBook that I have for personal use.  I decided to see whether it was really that easy to take code that works well on windows and drop in into an xcode project and have it compile successfully.

Continue reading ‘Migrating Qt Apps from Windows to Mac OS X’

Texas Ribs

I’ve had a life long obsession with ribs.  Half my family are old blood Texans, so I was raised with a certain kind of barbecue.  Most people are familiar with the sweeter east coast barbecue out of the Carolinas, or the molassesy barbecue from St. Louis, but Texas barbecue is a whole beast unto itself, characterized by savory rubs, and sauce that’s just used for dipping rather than cooking.

For a few years now, I’ve been trying to find a good way to cook ribs without a smokehouse.  I’ve tried grilling numerous ways, with different heats and charcoals and gas.  I’ve tried broiling in the oven.  I even tried cooking them in a pan (once), but I’ve never been able to get the same fall-off-the-bone doneness that a good 12 hours stint in a smokehouse will give you.  Until now.

This recipe is the result of at least $300 worth or ribs over the summer.  I’ve used Alton Brown’s basic method for slow braising the ribs, though I finish them off on a barbeque to give them the smokey wood flavor.  I guarantee you won’t be disappointed.

Ribs

  • 2 1.5 pound baby back pork ribs.  Trader Joe’s is a surprisingly good source for reasonably priced ribs, but its a crap shoot as to whether they will actually be in stock.
  • 2 tbsp kosher salt
  • 1 tbsp ground black pepper
  • 1/2 tbsp dried thyme
  • 1/2 tbsp oregano
  • 1 tbsp chili powder
  • 1 tbsp garlic powder
  • 1 tbsp onion powder
  • 1 tsp cayenne pepper
  • 1/2 cup dry white wine
  • 1/2 cup chicken stock
  • 1/2 tbsp Worcestershire sauce
  • 1 tbsp sherry vinegar
  • 1 tbsp rice vinegar
  • 4 garlic cloves, crushed
  • 2 tbsp brown sugar
  1. Combine all the dry ingredients.  Place the racks on individually on foil sheets and spread the rub evenly over each.  Cover with another piece of foil and fold the sides and ends to form a closed packet.
  2. Combine the wet ingredients in a bowl and microwave for 1 minute.  Open one end of the foil packet and pour half the liquid into each.
  3. Place the rib packets on a baking sheet and into the oven at 250°.  Cook for 2.5 hours.
  4. Once done, empty the juices from each foil packet into a sauce pan one at a time.  The easiest way to do this drape the packets over the pan and cut a small hole in the bottom to drain the liquid.  Once all the liquid is out, bring juices to a boil over medium high heat.  Add the 2 tbsp brown sugar and stir to dissolve.  Reduce the sauce down to a thick consistency.  At this point, if you like a tomatoey sauce, you can add 1/4 cup of your favorite barbecue sauce and continue cooking for another few minutes.
  5. Meanwhile, heat your grill on high for at least 10 minutes – you want it to be nice and hot.  5 minutes in, add a handful of your favorite wood chips – I like apple or alder – to get it good and smokey.
  6. Brush the racks with sauce on both sides and place on the grill.  You want to cook both sides only until the sauce begins to caramelize and you get a nice smokey flavor – don’t over do it.  No more than 5 minutes total.
  7. Once finished with the grill.  Cut the ribs into section and combine with the remaining sauce in a large bowl.  Toss to get them all smothered and serve immediately.

Note: true, this is not technically barbecue, but is as close as most people can get without a spare shed to convert into a smokehouse.  I think the end results speak for themselves.

Displaying numbers with qDebug

Following up on my last post about using qDebug to write logging information to a file, I’ve noticed that there is some confusion about how to best use qDebug.  qDebug is limited – it expects a QByteArray (or similar) because it is converting that directly into a char * string for output (about as simple as you can get).  However, most people want to write more information than just a simple byte array to the output stream.  Below are some examples:

//Basic qDebug call
qDebug("My debug text");
//Basic Output using QString
QString text = "My debug text";
qDebug(text.toAscii());
//Debug string with number
int times = 5;
qDebug("Loop was run "+QString::number(times).toAscii()+" times");

To output a number, the easiest way is to use QString’s static method ‘number’ to create a new QString and then output the QByteArray to qDebug.

Notes/Tasks Version 0.8 Released

I’ve released the latest version of Notes/Tasks, version 0.8, my Qt application for note and task management.  Notes/Tasks provides a powerful and simple tool for note and task management.

In this latest release, I’ve added the ability to synchronize your notes and tasks with notestasks.com – you can access your notes from anywhere.  There is also a special mobile interface for iPhones!  Also new is AES encryption for you data, adding security for sensitive information.

Check it out and let me know what you think!

C++ Crypto Libraries

As part of a project, I’ve been looking around for a simple to use C++ crypto  library that supports hashing and at least AES 128 encryption.  My requirements were pretty simple: I needed a library with a good API that I could use to encrypt the contents of a data file using a password.  I needed something that was standard and could be integrated in with Qt without a whole lot of effort, and I didn’t want something that would bloat my app with a lot of encryption mechanisms I don’t need.  I found three major libraries, however one was for MSVC and cost money, neither of which I have.  The other two, Crypto++ and Botan are free (as in beer) and I tried both.  Read on for my reviews.

Continue reading ‘C++ Crypto Libraries’

Prosciutto Wrapped Scallops over sauteed Oyster Mushrooms

We’ve cooked a lot of recipes using scallops (one of my favorites, yet to appear here, is scallops with pancetta and pea shoots), but this is my new favorite.  We were inspired by a fabulous dinner we ate at the Harvest Vine – one of the best restaurants in Seattle.  This recipe combines the buttery flavors of prosciutto melted into the sweet flesh of the scallops, over woody oyster mushrooms.  By the way, oyster mushrooms are, in my opinion, one of the hidden treasures of the supermarktet.  At least here in the NW, we can get them for about $8 per pound, which is a steal for such a great tasting mushroom.

The Scallops

  • 2 Large (U16) Scallops (About 1/2 pound)
  • 2 slices prosciutto, preferably imported from Parma or Serrano
  • Salt and Pepper
  1. Preheat the oven to 450°. Prepare the scallops by removing the foot (the tough tissue on one side of the meat).  Salt and pepper liberally on both sides.
  2. Heat a cast iron skillet over medium-high and add enough olive oil to cover the bottom of the pan.  Wrap the prosciutto slices around the scallops, tucking the ends so the wrap is tight.
  3. Once the oil has barely started to smoke, add the scallops to the pan, and immediately place in the oven.
  4. As the scallops cook in the oven, the fat from the prosciutto will slowly baste the whole package.  When done, the scallops will be caramelized on top and the prosciutto will be slightly crispy, about 5 minutes.

The Oyster Mushrooms

  • 1 pound oyster mushrooms
  • 2 cloves garlic
  • 1 shallot
  • 1 tsp thyme
  • 1/2 tsp paprika
  • 1 tbsp butter
  • salt and pepper
  1. Cut the mushrooms of the main stalk, and rinse.  Mince the shallot and garlic.
  2. Heat a skillet over medium heat and add the butter.  Once hot, add the garlic and shallots.  Cook for about a minute, until soft.
  3. Add the oyster mushrooms, thyme and paprika.  Continue cooking for 5 minutes on medium heat, then reduce to low for another 10 minutes.  The oyster mushrooms will be done when they have darkened in color and began to caramelize.  Finish with salt and pepper to taste.

iPhone Web Applications with iUI and Ruby on Rails – Part 1

Since my last post outlining the different iPhone web apps, I’ve had a chance to play around with iUI a little more and get a successful app (for my side project, Notes/Tasks) up and running.  As there still is not a lot of documentation on using iUI, I figured I would sit and write down some of what I’ve learned.  As I’ve been developing the backend in Ruby on Rails, I figured I’d also add some tips and tricks for getting iUI to work well with dynamic content.  This article will cover the basic of creating a web application with iUI, including creating buttons, using forms and lists, and also how to integrate it with rails’ MVC framework.

Background
The app I’m using for demonstration is a side project of mine – building a web interface for a notes and tasks desktop application that synchs with an online server.  The desired functionality for the web is fairly simple: it needs restrict access to uses who have logged in, be able to display lists of notes and tasks, details for each individual note or task, edit the text of a note, mark a task as completed, and create new notes and tasks.  I’ve already written the API for the server (also in rails) so this project will focus on creating the user front end, rather than the backend application code.

Continue reading ‘iPhone Web Applications with iUI and Ruby on Rails – Part 1′