Tuesday, April 24, 2012

Recipe: Homemade Sauerkraut

2 Lbs green cabbage
2 Tbsp coarse pink sea salt 
1 tsp sugar

(Yield: about 5 cups)

Shred the green cabbage, with a food processor or knife, and place all ingredients in a large bowl.  Cover and allow mixture to sit at room temperature for about an hour, until the cabbage has released a lot of liquid (brine).

Move the cabbage to a new container, preferably glass or porcelain (if plastic, avoid BPA: plastics tend to leech into food!) and squeeze out the brine as you move it.  Once you have moved the squeezed cabbage, compact it a little and cover with brine, which was just squeezed out, until it is submerged by about an inch.

Next you want to cover the cabbage mixture with something that will apply a little pressure and keep the cabbage submerged in the brine.  Most people use a plate, upside down, with some sort of weight on top (a rock would do!).  You don't want the plate to float.  Finally, cover the entire thing with a cloth to keep any air-borne dust from getting in.

Let sit for 2 to 4 weeks, but check it once a day to be sure the plate and cabbage is submerged.  If there is any "froth", use a spoon to remove it.

Temperature should be in the range of 72 to 74 degrees.  At 75 degrees, allow 3 weeks for fermentation.  At 70 degrees, allow 4 weeks.  At 65 degrees, allow 5 weeks.  At 60 degrees, allow 6 weeks.  It's not advised to allow the temperature go above 75: it may not ferment and could spoil.

  • Do not use aluminum utensils!  Aluminum is a reactive metal that will alter the taste.
  • Cleanliness is important to avoid bacterial contamination: wash utensils, containers and hands! 

Eating sauerkraut is a great way to protect the balance of bacteria in your GI tract
Sauerkraut is one of the few foods that contain the beneficial bacteria called Lactobacilli plantarumL. plantarum is found in certain food products that undergo fermentation (sauerkraut, green olives, sourdough bread, naturally brewed wines and beer).  Until rather recently, L. plantarum was a common part of the human diet.

Friday, April 20, 2012

HttpWebRequest.GetResponse() taking a long time (Microsoft Security Essentials, DefaultProxy)

I wrote a simple VB.NET command-line (Console) program to grab a web page using HttpWebRequest and HttpWebResponse.

The following code snippet (req is an HttpWebRequest) would take 13 to 17 seconds to grab a simple 4k web page that would come up instantly under the IE or Chrome browser.

   1:  SWATCH = Stopwatch.StartNew()
   2:  Dim resp As HttpWebResponse = DirectCast(req.GetResponse(), HttpWebResponse)
   3:  SWATCH.Stop()
   4:  Console.WriteLine("OK - Elapsed Time: " & SWATCH.Elapsed.ToString())

I did some fiddling around and found TWO areas that I had to make modifications.

The first modification I made was inside the settings for my anti-virus program: Microsoft Security Essentials.  After playing around, I found that one particular setting was causing 10 seconds of the 13+ second delay: the Enable behavior monitoring setting.


The next culprit was the fact that HttpWebRequest will use the default proxy set in IE.  I do not have a proxy set, but it was still causing about a 3 second delay.  The solution was to create a .config file for my program that turned this behavior off.

   1:  <?xml version="1.0" encoding="utf-8"?>
   2:  <configuration>
   3:      <system.net>
   4:          <defaultProxy>
   5:               <proxy autoDetect="false" />
   6:          </defaultProxy>
   7:      </system.net>
   8:  </configuration>


Another method is to disable the Automatic Proxy Detection in Internet Explorer:




The offending 13+ seconds was reduced to 0.12 seconds!