Monday, August 24, 2009

Crawfish Pie

The other day Kim and I where listening to NPR when they did their daily summer songs on All Songs Considered and one of their picks was Hank William's Jambalaya (On the Bayou). I used to have a tape of Hank Williams songs and this one always stuck out as the best one on the tape. I was quite glad to hear the old tune again. When I got home I found where I could listen to the song online on Jango.com. With Hank's heavy souther accent it was hard to pick out some of the lyrics so I looked them up on Google. In the chorus he mentions "Crawfish Pie" I thought that sounded like a pretty funny idea for a dish so I found a recipe online at http://recipes.epicurean.com/recipe/15228/emeril-lagasse's-crawfish-pie.html. So yesterday I made a trip to Publix and picked up the ingredients I needed. Tonight after dinner I began the process of making my very own crawfish pie.

The process began with the crust. I mixed flour and vegetable shortening with a little water, wrapped it in plastic and then sat it in the fridge.

Next I cut up the bell peppers. I had purchased two, but the first one was a cup, and the recipe only called for half a cup. I sliced the celery and put it in the pan of butter and cooked that. Then I through in some diced tomatoes and began the process of removing the meat from the crawdads. This process was very labor intensive. I had purchased 2.5 lbs of whole crawdads. First I removed the tail, trying to preserve as much meat as possible. Then I removed the meat from the tails. It probably took me in excess of thirty minutes to complete. By this time I had turned off the stove so the vegetables didn't burn. Once the crawdads where added I added a little water/flour mix and let it thicken. Athena came in and helped me with stirring the mix as it cooked.

Finally it was time to roll out the dough and bake it all together. The dough turned out to be very frustrating. My past attempts at making dough in the past have not been very successful. As I rolled it out on the cutting board it kept flaking and breaking on me. I added a small amount of water to give it some more elasticity but it was still pretty flaky. I managed to roll it out and get most of it in the baking pan. The rest I had to attach it in the baking pan by kneading it back together in the pan.

Finally I poured the crawfish and vegetable mix in and baked it for forty-five minutes. For some reason I was worried it was going to burn, and I kept checking on it, but forty-five minutes later it was just right. By this time it was about ten o'clock, so I wrapped it up and put it in the fridge. Tomorrow night we will all have a nice crawfish pie for snack.

Thursday, August 20, 2009

Making Lunches

School is starting up next week and my kids have been spending their last two weeks of summer in daycare/summer camp. That means much of our school routine has started back up, including making lunches each night.

I take feeding my kids right to be pretty important, so I don't leave it up to the whim of school to feed my kids well. Just look at the public school lunch menu and you'll see why.

Packing healthy lunches that my kids will eat is no small task but one I'm working down to some sort of soft science. It is soft because what my kids claim to like and not like changes semi-regularly.

When packing I have three criteria I try to meet.

  • Little Waste
  • Healthy
  • My kids will actually eat it.

With lunches it is easy to have a lot of waste. Juice boxes/pouches and individually wrapped food items can make each of the three kids lunch have quite a bit of waste. I've purchased some small glad juice boxes which are just like kid-sized water bottles for keeping juice. With these I can purchase a large container of juice and just put a little in these containers and send them off to school. One large jug of juice that is recyclable is less waste than multiple juice pouches that have to go in the trash.


Source: http://www.glad.com/containers/gladware_containers.php
I've also purchased a bunch of small 4oz containers for putting food. These store great because the lids lock when stacked. With these I can buy a large container of some sort of food, like apple sauce, and divy them out into these smaller containers.

Sending your kid to school with junk food is easy. There is no lack of junk food at the grocery store. Often it tries to label itself in ways to appeal to kids, appear healthy, or both. The Kraft Lunchables tries to sell itself as "wholesome" when most of those are just low-quality meat packed with fillers and sodium, some crackers (with more sodium), very low-end cheese (which resembles cheese as much as Nehi resembles juice) and a small candy bar. Parents fall for these shortcuts in droves.

I've been using a system of trial-and-error to find things I know my kids will eat. For Aurora I've got shelled sunflower seeds, and Yo Kids yogurt, and Craisins. Athena likes her Apple Sauce and Arianna likes Nature Valley bars. These aren't necessarily packed with nutrition, but they are not bad and represent a good starting point to building a good lunch. They all get a 4oz cup of fresh fruit as well. Sometimes I'll pack them a few slices of lunch meat or a sandwich with any combination of peanut butter, jelly, and/or honey. Unsalted whole-wheat crackers are a favorite as well.

As much as I find eating healthy to be important, it is also just as important to live a little. Sometimes we'll get them snacks that go from not healthy to unhealthy. For not healthy we may get them Goldfish. For unhealthy it could be a sugar snack like Little Debbies. I think giving your children things that are considered unhealthy (candy, TV, etc.) in moderation is rather important. Your teaching your children these things are alright, you just have to enjoy them responsibly. You don't want to find your child like a Catholic freshman in college.

As the year continues I will keep experimenting with different foods and finding out who like what. I've already started building a list on paper. I will buy the different items I know I can rely on in large containers and divy them out in the smaller tupperware and hopefully be able to feed my kids healthy food that they will eat with as little waste as possible.

Tuesday, August 18, 2009

My personal parallel universe.

So not many people knew this about me before this opst, but every so often I get zapped into a parallel universe. It is very similar to the twilight zone, except it is more comedy based than sci-fi/horror based. In this universe people act strange and pretend that they are being normal. It is really this big practical joke on me enacted on a massive scale.

I can never be certain when I will find myself in my universe, but once there it is obvious that that is where I am at.

I found myself there last week on the way to a party. My friend Tammy recently got a job in California and will be moving there. It is her first job after college. My wife put on a going away party for her and while driving there she lamented that some of Tammy's friends where not able to make it. Apparently they had spent weeks planning an out-of-town trip to go shopping at IKEA and couldn't back out. I thought about this for a while an asked, "Who plans weeks in advance to go out of town to shop?" Kim assured me that this was quite normal. "But, surely if your friend is permanently moving thousands of miles away most people would push back their shopping for them." Perhaps, but this was a trip to IKEA. In fact, Kim assured me, it was perfectly reasonable to not attend such an event for your friend so that you could go out of town and shop at IKEA.

That's when it occurred to me I was in my parallel universe. Here's the difference between the real universe and parallel universe:

Real UniverseParallel Universe
People go out of town to visit points of interest (camping, monuments, historical sites, etc.) or to catch up with old friend.People go out of town to shop.
People postpone unimportant events for their friendsShopping is a more important event than friends.

How to use SVGs in webpages.

In my previous post I lamented me woes of attempting to use SVGs within a web page. A commentor named Brad Neuberg offered some advice that got me going in the right direction and now I have everything working. I wanted to come back and address how I go I finally got this working.

The problem I was experiencing has to do with how Inkscape saves images as SVGs. The files can be easily modified so that they can be used in web pages to scale as desired.

For starters add the following code to your HTML where you want to place the image:

<object data="foo.svg" type="image/svg+xml" style="height: 32px; width: 32px">
  <img src="foo.png" alt="logo" style="height: 32px; width: 32px" />
</object>

This will give you the clipping I had talked about before. This is actually the correct behavior based on the properties in the SVG. So we need to modify the SVG and tell it to behave. To do this open the SVG in your favorite text editor and find the width and height properties in the SVG tag.

<svg
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:cc="http://web.resource.org/cc/"
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:svg="http://www.w3.org/2000/svg"
   xmlns="http://www.w3.org/2000/svg"
   xmlns:xlink="http://www.w3.org/1999/xlink"
   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
   width="48px"
   height="48px"

   id="svg1307"
   sodipodi:version="0.32"
   inkscape:version="0.45"
   sodipodi:docbase="/home/lapo/Icone/tangerine-icon-theme/scalable/apps"
   sodipodi:docname="alacarte.svg"
   inkscape:output_extension="org.inkscape.output.svg.inkscape">

We need to add viewbox and modify the width and height as follows:

<svg
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:cc="http://web.resource.org/cc/"
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:svg="http://www.w3.org/2000/svg"
   xmlns="http://www.w3.org/2000/svg"
   xmlns:xlink="http://www.w3.org/1999/xlink"
   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
   viewbox="0 0 48 48"
   width="100%"
   height="100%"

   id="svg1307"
   sodipodi:version="0.32"
   inkscape:version="0.45"
   sodipodi:docbase="/home/lapo/Icone/tangerine-icon-theme/scalable/apps"
   sodipodi:docname="alacarte.svg"
   inkscape:output_extension="org.inkscape.output.svg.inkscape">

Our first two entries in the viewbox will always be zeros followed by the width and height that is already defined. Next we replace the width and height with 100%. Once we save this file then it should show up in the webpage with the width and height defined in the HTML without any clipping.

In the HTML in between the open and closing tags for object we define an img tag that points to a backup PNG image. You can replace this with whatever you want IE to show. If you happen to have the image in a VML format then you could include it there, or you could simply have a message telling your users to stop using the always behind Internet Explorer (not recommended) or whatever you want IE to show in place of your SVG.

You can find a paper on converting SVG to VML here. There is also a javascript library at http://code.google.com/p/svgweb that will show the SVG in a Flash window for IE users. I plan on looking into the svgweb javascript library and giving that a spin in the near future.

I hope this post finds its way into the hands of anyone else having the same frustrations I was having.

Monday, August 10, 2009

SVG with webpages

At work we are developing a web-based framework that uses an API that support PHP, .NET and Java for developing application within it. As a general rule almost all of application within the framework are written in PHP and uses Zend for an MVC model.

While working on developing my first application I decided to extend our images API to supports SVGs. SVG is a type of image that is built on vector graphics. Vector graphics use mathematical equations to drop simple shapes that on a macro-scale define a larger image. This is very much how 3D-graphics works. Polygons are mixed together to build players, houses, vehicles, and everything else within the 3D world. SVGs usually build 2D images. The advantage to them is that you can scale them to any size you want without losing resolution.

Traditionally if you need an image at different sizes you will make a different image for each size that you need from the source. The primary problem with this is that if you try to scale an image larger than the source you get pixelation. You also might not always have access to the source, and so you are stuck with the largest version you can find.

Take for example this 32X32 image.

You could easily scale this image down to a 16X16 image, but if you wanted to make it larger it would look really ugly.

This is what happens if I try to scale the image up to 150X150:

If you always have access to the source image this shouldn't be a problem, but I see regularly enough images that have been scaled up on web page and they look horrible.

With an SVG you only need the one file and you can then dynamically scale it as you please to as small or large as you want.

Another great advantage of SVGs is that the file is plain text file that holds the formulas that draw the image, so they tend to be relatively small.

The image I am using in this example is 18.2 KB. If I convert it to a 200X200 image it is 18.3KB. If I where to convert it to a larger image then the image would take up more space as a PNG than it does as an SVG. For small files, which are small enough to download almost instantaneously, this doesn't provide any benefit, but it allows developers to provide high-quality large images and use only a very small amount of bandwidth.

IE is the only major browser that does not provide support for SVGs. Firefox, Safari, Opera, Chrome and most other even lesser-known browsers all provide support for SVGs. My plan was to have a folder named SVG in our icon directory, and then have fall back PNGs files for IE.

All of my research on the web indicated that the following code would allow me to provide SVGs with PNG fallback for IE:
<object data="foo.svg" type="image/svg+xml" height="32px" width="32px">
<img src="foo.png" style="height: 32px; width: 32px">
</object>

No matter what I tried this didn't work. Instead of resizing the SVG to 32X32, it clipped the image instead.

Clipped image:

I Googled and searched around and came up dry until I happened upon a response on someone's blog a little over a year ago that said that Firefox was planning on supporting SVGs inside the img tag. I tried <img src="foo.svg" style="height: 32px; width: 32px"> and it worked, dynamically resizing and all, in all non-IE browsers except Firefox.

I then found another trick. SVGs are plain text files that use a standard known as XML. These XML files could be modified to be PHP files that output the XML that defines the SVG iamge, and that too could be placed inside the object tag. This unfortunately gave me the same clipping results.

My final conclusion is that the web is just not ready yet for SVGs until Firefox begins providing some sort of sane support for SVG that allows developers to define the width and height to render the SVG image. We really need Microsoft and Mozilla to get on board so that we can stop using JPGs, GIFs, and PNGs wherever possible.