Saturday, March 30, 2013

How to Bathe the Cat


How to Bathe the Cat

  1. Thoroughly clean the toilet. 
  2. Add the required amount of shampoo to the toilet water and have both lids lifted. 
  3. Obtain the cat and soothe him while you carry him towards the bathroom. 
  4. In one smooth movement, put the cat in the toilet and close both lids (you may need to stand on the lid so that he cannot escape). CAUTION: Do not get any part of your body too close to the edge, as his paws will be reaching out for anything they can find. The cat will self-agitate and make ample suds. Never mind the noises that come from your toilet, the cat is actually enjoying this. 
  5. Flush the toilet three or four times. This provides a "power wash and rinse" which I found to be quite effective. 
  6. Have someone open the door to the outside and ensure that there are no people between the toilet and the outside door. 
  7. Stand behind the toilet as far as you can and quickly lift both lids. 
  8. The now-clean cat will rocket out of the toilet and run outside where he will dry himself. 

Sincerely,
The Dog

Friday, March 29, 2013

Using Chrome Developer Tools to Debug node.js Applications

1. Install node.js
Visit http://nodejs.org/, download and install for your platform.

2. Install node-inspector
npm install node-inspector

Tip: "npm" is the node.js package manager; its path is added to the environment upon installation.

3. Write a script to be debugged, save as .js
Sample script:

// Script start
var APP_PORT = 8080;
var http = require('http');

var server = http.createServer(function(request, response) {
  response.writeHead(200);
  response.end('Hello, world!');
});
server.listen(APP_PORT, function(){
  console.log("Listening on http://localhost:" + APP_PORT);
});
// Script end

4. Start the node server in debugging mode; this will enable the debugger ("DEBUG_PORT") on port 5858
node --debug path/to/your/script.js

Tip: "node" is the core node.js server; its path is added to the environment upon installation.

5. Connect node-inspector to the node server, specifying a port ("INSPECT_PORT")
node-inspector --web-port=8989

Tip: Use "netstat -a -o" to see what ports are in use, before assigning INSPECT_PORT.

This puts three (3) ports into use:
APP_PORT (8080) - the port used by the application to respond to web requests.
DEBUG_PORT (5858) - the port used by node.js to serve up debugging requests.
INSPECT_PORT (8989) - the port used by node-inspector to relay requests to node.js' debugger.

6. Connect Chrome locally to the port served by node-inspector.

    http://127.0.0.1:INSPECT_PORT/debug?port=DEBUG_PORT

Once loaded, you'll get access to Chrome Developer Tools' Scripts and Console tabs, enabling you to breakpoint and inspect executing code, as well as view console output.

Tuesday, March 19, 2013

Paste

Why can't I paste something from my brain onto the screen? I know it's there.

And seriously, my clipboard is very temporary...

Sunday, March 17, 2013

Worst. Gluten-Free Hippie Bread. Evar.

In the past, I've made some pretty kick-ass bread. It always uses gluten-rich white flour, the yeast is always activated with white sugar, and it always comes out pretty freakin' awesome.

However...

I had a good reason to try my hand at making a gluten-free, low glycemic-index bread. So with Pumpkin Princess in-hand, we headed over to the local Bulk Barn for supplies.

The GF Supplies

We waltzed up and down the aisles while looking for two things: gluten-free all-purpose (GFAP) flour, and Xanthan (or Guar) Gum.

I found the GFAP flour easily enough. I decided that it must be the "right" flour to get, as when I opened the bin lid, the flour was nearly depleted. Pumpkin Princess graciously scooped in what looked like 5 cups of the stuff at my direction, then we headed off to find some Xanthan (or Guar) Gum.

Not finding what I was looking for, I asked a friendly BB employee for some assistance, and she was able to point me in the right direction. I found Xanthan (and Guar) Gum, and compared their prices.

After picking my jaw up off the floor, I opted to buy the $6 Guar Gum, and left the $13 Xanthan Gum on the shelf.

The GI Supplies

Since the Cambridge Farmer's Market outdoor section has been closed since November, I haven't had the opportunity to relieve Doug the Beekeeper of some of his supply of raw honey. So yesterday, I headed to the Stratford Farmer's Market with a remarkable new friend of mine. I had an amazing time, and when I arrived home, I was armed with some Bauman raw honey.

Off To A Good Start

I fired up my foolproof, successful-many-times-over white bread recipe, and started aligning its existing ingredients (water, white AP flour, white sugar, yeast, oil, and salt) with what I would consider a healthier GI/GF bread. After I'd figured out the measurements for things, I assembled the Usual Suspects, and began.

The usual suspects. (I forgot to include the salt and olive oil in this photo, but come on, everyone has salt and olive oil. It's just not cool.)

First, add some hot tap water to the bowl.

Here's where we get Vegan-y, adding the raw honey to the mix. Swirling the spoon around causes the honey to dissolve into the hot water, readying it for the yeast feast.

The yeast. Fleischmann's is pretty much my go-to yeast. Because, yeah, I have a go-to yeast.

Here, the yeast bacteria begin to grow as they eat the sugars in the honey.

Eat, my pretties.

Eat....

EAT! 
Going Full-Hippie

This is the heart of the hippie bread. The GFAP flour. It contains (according to BB's website) a mix of flours made from garbanzo beans, potato starch, tapioca, white sorghum, fava beans, and a fine Chianti.

Here, I suspensefully add the GFAP flour for premixing with the gum...

...and the Guar Gum. (At this point, I wonder if the Xanthan Gum would have been a better choice?)

See? Guar Gum.

Pour the nasty-looking yeast mix into the crater I made in the flour.

Adding the uncool olive oil and salt. Hell, I didn't even bother to photograph the salt. Screw that salt.

Here, I begin to suspect that things are as they never were before.

I prepare the death-grip into the nasty, sticky mess that is the bread dough...

...and immediately begin wishing I had a big ol' Kitchenaid mixing bowl apparatus.

The bread-turd that I happened to find after mixing everything around and "kneading" it. (Note; kneading generally does not cause your flour to crack and break apart. In this case, every time I kneaded, the dough cracked and came apart. At this point, I knew this bread was going to suck badly.)

Things Start To Go Wrong

The "bread" dough, in all its Play Doh-consistency, twelve-pound glory.

It's laughing at me. It knows it is a failure, and is projecting its misery upon me. Disgusted, I cover it with a dish towel, and leave it in the sun to die.

What a freakin' mess. (Oh, look! The salt!)

Here, the dough has mutated into a hippie-flavored ball at least 1.1x its original size, and 300x its mass.

A close-up of the ball of dough. It's still laughing. 

Having had enough of its tripe, I punch it with all the fury of a disappointed baker.

After sitting in the sun again, it has metamorphosed into a sentient mass of ... dough?

I turn the "dough" out onto the table. Funny, from this angle, it looks like the moon. And oddly enough, it has the moon's mass.

Granny's bread-pans. If anything can save this gong-show of a baking session, they can!
I divide the dough in twain, dump each piece into its tin...

...and leave them in the sun once again.

After baking at 425F for 30 minutes, I have come to the conclusion that this project is a dismal failure.

The artsy angle.

Notice how the bread crumbles when pressure is applied with a knife.

This slice of bread tasted like chick peas, had absolutely no texture,  smelled disgusting, and weighed the same amount as the sum of all human apathy.


I'm not giving up, however. I'm not exactly sure what went wrong, but if I had to identify two things that likely went wrong, I would say:

  1. I chose the wrong flour. This flour tasted like crap warmed over (literally), and did not lend well to a baked bread.
  2. I should have splurged on the Guar Gum. The way this bread cracked and broke up, it should have been made with a more gluey hydrocolloid.
Well, that's it. I hope this was as entertaining as it was fail.

Tuesday, March 12, 2013

Sometimes

Sometimes, when I find that perfect spot while lying in bed, I wish I could switch the lights off using sheer willpower, rather than having to get up, never to find that perfect spot again.

Screw you, Jedi Knights.