Posted on 3 Comments

Dear Target, sorry about the stink in the bathroom…

I love having a big family! Big families teach self-sufficiency and team work.

Last night in Target I heft Evan up on my shoulders as he giggles maliciously. Seconds later the smell hits me. That familiar smell of a runny diaper filled to capacity with sludge. Microseconds later he is off my shoulders and being held in that non-loving pose at the end of my outstretched arms using only my finger tips as if carrying hazardous waste all too aware that squeezing the diaper could make John Belushi’s zit seem tame.

I pass Noah playing demos in the video games. I speed past aisle after aisle knowing I could easily be walking right past Cathy and crew. Then I see a cute little Amy peek out. I alert Cathy that I must go to the car and she deftly produces "equipment" from her purse.

Wordlessly I grab the diaper and wipes and rush to the nearest restroom. One thing parenting has taught me is that stores abound with hidden restrooms. Some are singles; some are family; some are "employee only"; but if do not have children, these secret water closets are invisible to you! In Target, I was nearest the rear one located in toys. The men’s room is a single shooter graciously outfitted with a changing table with a broken safety belt. Not having the belt means one hand holds the baby, while another hand handles the wipes, another hand keeps the baby’s hands from helping, another hand removes the diaper, another hand guards the clothes from sliplage and overflow, two hands bag and seal the toxic waste, and two hands put the new diaper on the baby.

I plop Evan on the table and open the diaper. Huggies should be proud! Evan immediately goes for the flip and almost simultaneously throws in the helping hands. I am off to a bad start and recognizing I misjugded the diaper threat level I know I need reinforcements. Evan at this point is in full scream and sending a text message sos is out of the question. I dial Cathy’s number and put the phone down as I attempt to salvage the situation. Assuming I went to voicemail. I slap the phone shut, hit redial, and return to mud wrestling. Moments later, a 4 year old girl opens the men’s room door. Then a 13 year old girl opens it slight further. My reinforcements have arrived!

Suffice it to say that with Evan now outnumbered we won the battle with minimal damange. All hands, including Amy, pulled their weight. The 13 year old deserves a purple heart for casually stepping into the men’s room. From Cathy’s perspective, when the phone rang she could hear the baby screaming in stereo and knew to deploy the more mobile of reinforcements. Good choice on the special ops!

Posted on 7 Comments

Happy Anniversary Wife!

I first met Cathy on October 23, 1999. I knew she was remarkable at first glance! We probably exchanged 3 sentences and by happenstance were brought together by friends in the beginning of 2000 hoping we would dispense with some mutual angst and move on with our lives.

Guns N Garters - We married here!

Cathy and I dated approximately a year an a half. During that time she won me over and I put an engagement ring on her finger. A short while later we were watching the children play in the cove and questioned why wait. We had each experienced fancy weddings with our previous marriages. Noah was too young to appreciate a wedding; he has almost no memory of our trip to Disney World. Tommy was still too unpredictable and self-absorbed. The wedding would be meaningless to each of the boys, or so went our thinking. I checked some legalities and acquired a marriage license. Cathy and I told no one of our plan, had the grandparents watch the boys, and we took Sarah with us to Gatlinburg to Garter’s & Gun’s. We picked three nice costumes which velco’d on the back. They took our ol’ tyme photo. We went to a room decored as a chapel that could probably hold all of 10 people. The photographer performed a legally binding ceremony and Cathy and I became married on August 25, 2001 much to the disappointment and disbelief of many people.

Amy was born on June 10, 2002. There has been speculation that she encouraged our marriage. This speculation is wrong. Suffice it to say, everyone responded to 9/11 in their own way.

Six and a half years fly by so quickly. As I look back, they have been fantastic years! As I understand, the milestone years in marriages are 1, 3, 7, 10, 14, and 21. Those the years with the greatest numbers of divorces. Our relationship is still magical and strong. If anything could stand improvement, I need to be a better husband, father and provider. I remain the wildcard that introduces instability into our family. I need to be more of an anchor, a rock, a foundation. Looking back on our five years of marriage, the only missed goals have centered around that instability. So before we blink again and see another 5 years pass, I must provide more stability. In all other aspects, we have a wonderful marriage and a wonderful live!

Happy Anniversary Cathy! I love you!

ps. "5 years is a wood anniversary." Uh…

Posted on Leave a comment

Math is hard

One of the things The They don’t tell you is that as a parent you get to repeat school. You repeat it once for every child you have. I find it interesting to watch little minds grow. Concepts that are reflexive to us are foreign to them.

Today I wrote the number 1943 and asked Noah watch place each number occupied. 3, ones. 4, tens. 9, hundreds. 1, thousands. Then I added 1943.5 and asked about the 5. "That’s the oneths. No. Tenths." Good. So I added a 2 making the number 1943.52 and asked about the 5. "That’s the hundredths. The 2 is in the tenths." Hmmm. I add 7 making the number 1943.527 and asked about the 5. "The 5 is in the thousandths."

I started over putting only the 3 and he correctly identified it as the ones place. When I added the 4 for 43, the 3 remarkably remained in the ones place. Using this knowledge and some diagrams I think Noah finally got it. He correctly identified the 1/10s, the 1/100s places and so forth. Still, I think some reinforcement is in order.

I enjoy being a dad. I enjoy helping minds grow.

Posted on Leave a comment

We each walk our own path; even if it is a well worn path

My teenage daughter frustrates me so much. Why as teens do we do such stupid things? The irony is I acted much like she is. I retreated emotionally at her age. I silently screamed for notice and became angered when no one answered, when no one read my mind. That was ok. I knew everything. I didn’t need them! I cut ties to friends and family. I made mistakes and I seem helpless to stop her from making the same mistakes.

Posted on 1 Comment

Respect to the Mommy Bloggers

In the brief times that I solely try to simultaneously watch and keep Evan happy in the name of giving Cathy a break I have accumulated dozens of half finished draft blog posts. How do you guys do it with infants, toddlers, and other assorted rug rats?! On top of producing great content for our reading pleasures, the Mommy Blogger Brigade tends to the emotional, spiritual and physical needs of the children and even squeeze in time to clean house, cook, and in some cases work a job or two among all the other varied things on their calendars. Amazing! I salut the Mommy Bloggers!

I’d say more but Evan wants me to be a jungle gym for a bit…

Posted on Leave a comment

From the mouths of babes

Dad, point out some studs in the house: "Noah, what are these for?"
Noah: "To keep the craddle from turning over."
Dad: "It’s a crib not a craddle."
Noah: "To keep the craddle from turning over."
Dad: "It’s a crib not a craddle."
Noah: "To keep the craddle from turning over."

You know, kicking expensive phonographs always helped in these circumstances…

Posted on 2 Comments

Today’s construction lessons/reminders

  1. Just because you have a rotary tool doesn’t mean you should use it
  2. Drywall is made out of dust
  3. A razor blade cuts drywall very well it’s just not as cool as a rotary tool
  4. Razor blades also cut fingers
  5. There is a reason your safety goggles are in your working pile of tools instead of in storage in the garage
  6. Razor blades do not automatically cut straight lines
  7. Take your time or take a lot of time…it’s your choice
  8. Do not walk away and think the mess will clean itself up
Posted on Leave a comment

ColdFusion Event Gateway / Web Service Gave Me Trouble

My programming love is ColdFusion. I have been working with it since early 1998 with the release of version 3. Version 8 will release next year. A feature of CFMX7 that I have not had the opportunity to use is the Event Gateway to turn a CFC into a web service.

ColdFusion event gateways are ColdFusion MX elements that let ColdFusion MX react to or generate external events or messages in an asynchronous manner. Event gateways let a ColdFusion application handle information that does not come through an HTTP request. For example, you can use event gateways to handle instant messages, short messages from mobile devices, or messages sent to a TCP/IP port. [Source]

The Project

I have a project that uses XML feeds to update inventory status from a wholesaler to the reseller. Unfortunately, do to problems at the wholesaler end, one of the feeds is unavailable and will remain so. The solution is to use a query of the database to obtain IDs of the active products then use CFHTTP to get the information from the wholesaler’s website (site scraping). Since there are roughly 1500 active products at any one time, making 1500 CFHTTP calls at once causes timeouts as the browser gives up before the webserver can finish its task. Since this update will be done only occasionally, 1500 requests to the wholesaler is not a big deal.

The Solution

The solution to the problem is to implement the CFHTTP request as a CFC, create a gateway instance with a 5 minute timeout, and call the gateway instance with small groups of product ids from a .cfm page. The concept works beautifully since the Event Gateway is asynchronous and decoupled from the browser which initiated the instance.

The Problem

I choose the .cfm to manage grouping the product IDs so that there would only be one query instead of 150 queries (~1500 products in groups of 10) as would happen if the query were within the CFC. So the code builds a list of IDs within a structure (as required by the Event Gateway)

The onIncomingMessage method must take a CFEvent structure that contains input information in its Data field, and processes the contents of the Data field as needed. [Source]

The loop that calls the gateway instance builds the list, calls the instance, clears the list, builds the next list, calls the instance, and so forth. Apparently I am able to alter the datastructure so quickly that the second list replaces the first list before the gateway instance fires so the CFC ends up processing only the information from the latter lists. More simply, the CFC processes whatever data is in the structure at the time the gateway event fires from the queue not the state of the structure at the time the gateway event was called by the ColdFusion application. Set up a gateway instance and try the following code. This is the CFC to which the gateway instance will be associated.

test.cfc

<cfcomponent displayname="Test Gateway" hint="Logs the idlist passed into the CFEvent.Data structure.">
   <cffunction name="onIncomingMessage" access="remote">
      <cfargument name="CFEvent" type="struct" required="yes">
      <cflog
         text="Gateway test complete for ids #CFEvent.Data.idlist#."
         file="GatewayTest"
         type="Information"
         application="Yes">
   </cffunction>
</cfcomponent>

The calling CF application is show below

test.cfm

<cfscript>
   datarange = structNew();
   tmplist = "8,1008,1019,1020,1021,1022,1024,1025,1026,1027,1030";

   datarange.idlist = duplicate(tmplist);
   datarange.datasource = "adult";

   status = SendGatewayMessage("TestGateway", datarange);

   tmplist = "8,20,19,18,17,16";

   datarange.idlist = duplicate(tmplist);
   status = SendGatewayMessage("TestGateway", datarange);
</cfscript>

You would expect the log file to have two different lines.

Gateway test complete for ids 8,1008,1019,1020,1021,1022,1024,1025,1026,1027,1030
Gateway test complete for ids 8,20,19,18,17,16

but instead it has two identical lines.

Gateway test complete for ids 8,20,19,18,17,16
Gateway test complete for ids 8,20,19,18,17,16

The Solution

I have not tested the solution yet but I am betting that I either

  1. have to let the CFC call the gateway instance after it has processed a batch of ids thus making this a synchronous process to itself but still asynchronous to the browser or
  2. Create a unique structure for each group of IDs to be processed

I prefer the latter. Update: Testing is complete and solution #2 works great!

Other Resources

About event gateways
Abobe’s (fomerly Macromedia formerly Allaire) overview
Deploying an event gateway
Macrodobellaire’s livedocs for initial setup of an event gateway
Using the CFML event gateway for asynchronous CFCs
This was the most helpful livedoc with critical information non-chalantly hidden within such as "Using the CFML event gateway for asynchronous CFCs"
SendGateWayMessage
Livedocs for SendGatewayMessage
The Asynchronous CFML Gateway – A Real-World Example of a Great New Technology
Matthew Woodward comes through in this ColdFusion Developer’s Journal article
Understanding Asynchronous Processing by Ben Forta
It wouldn’t be ColdFusion unless Uncle Ben said something.
Concurrency Library
It is very difficult to mention asychronous CFML without someone mentioning Sean Corfield’s work.
XML Path Language (XPath)
XPath is a language for addressing parts of an XML document, designed to be used by both XSLT and XPointer.
XPath Axes
XML Lessons at W3Schools
Posted on 2 Comments

Woot-Off today!

If you don’t know what a Woot-Off is then you probably don’t know what Woot is. Woot is one of those wonderful ideas that makes you slap your forehead and cry out, "why didn’t I think of that!" Woot is associated with Overstock.com and releases 1 product Monday through Friday at 12am Central time (1am Eastern). The product is available in a limited number and often sells out in the first hour. The product is almost always significantly cheaper than anything you find on Froogle.

A Woot-Off is basically a chance for Woot to clean out their warehouse.

Woot-Off Light…a short term frenzied mutation of our product posting procedure. In Woot-Off mode, a new product is launched immediately after the sellout of the previous deal. There is a half-Woot-life of 12 hours maximum on any product within a Woot-Off that does not sell out. The number of Woot-Off items, sequence, and quantity will not be announced. When Woot-Off mode is over, the orange lights will disappear and our normal schedule will resume. Depending on its success, this may be a mode we would go into once or twice a month for a relatively short duration of time (24-72 hours generally.) [Source]

I have purchased twice through Woot and been thrilled each time. Both the products are regularly used and were fantastic bargins. I wish we weren’t in tight budget mode or I would buy my wife the Bluetooth iPod headphones right now. My other favorite bargin hunting site is Slickdeals.net which reports coupon and rebate combinations that often result in wonderful deals or free products. It’s sister site is Slickfillers.net which helps you find low dollar items to push an Amazon order over the $25 mark to gain free shipping.

Posted on Leave a comment

August Challenge – Getting Things Done

1and1 Webhosting

I highly recommend my web host. The way it reports statistics in the user control panel is a little weak. I have full access to the server logs and could process them through Webtrends for detailed reporting but it should be easier. I have been procrastinating on installing PhpMyVisites for my wife. Little procrastinations hang over your head and become huge burdens. I finally have a nice statistics report package in place for my wife to monitor her sites!

Can you meet The August Challenge?