It's dog's life after all………

A butcher watching over his shop is really surprised when he sees a dog coming inside the shop. He shoos him away. But later, the dog is back again. So, he goes over to the dog and notices it has a note in its mouth. He takes the note and it reads “Can I have 12 sausages and a leg of lamb, please”. The dog has money in its mouth, as well. The butcher looks inside and, lo and behold, there is a ten dollar note there. So he  takes the money and puts the sausages and lamb in a bag, placing it in  the dog’s mouth.The butcher is so impressed, and since it’s about closing time, he decides to shut the shop and follow the dog. So off he goes. The dog is walking down the street, when it comes to a level crossing; the dog puts  down the bag, jumps up and presses the button. Then it waits patiently,  bag in mouth, for the lights to turn. They do, and it walks across the  road, with he butcher following him all the way. The dog then comes to  a  bus stop, and starts looking at the timetable. The butcher is in awe as  the dog stops a bus by pulling its left leg up and gets in it.

The butcher follows the dog into the bus. Then the dog shows a ticket which is tied to its belt to the bus conductor. The butcher is nearly fainting at this sight, so are the other passengers in the bus. The dog then sits near the driver’s seat looking outside waiting for the bus stop to come. As soon as the stop is in sight, the dog stands and wags its tail to inform the conductor. Then, without waiting for the bus to stop completely, it jumps out of the bus and runs to a house very close to the stop. It opens the big Iron Gate and rushes inside towards the door.

As it approaches the wooden door, the dog suddenly changes its mind and heads towards the garden. It goes to the window, and beats its head against it several times, walks back, jumps off, and waits at the door. The butcher watches as a big guy opens the door, and starts abusing the dog, kicking him and punching him, and swearing at him.

The butcher surprised with this, runs up, and stops the guy. “What in heaven’s name are you doing? The dog is a genius. He could be on TV, for  the life of me!” to which the guy responds: “You call this clever? This  is the second time this week that this stupid dog’s forgotten his key.”

Moral of the story: You may continue to exceed onlooker’s expectations but shall always fall  short of the boss’ expectations. It’s dog’s life after all………  

 

Dynamic Component Path

I moved a CMS application from one server to the other (which was almost a good replica of the production server) and CF couldn’t find my components again. Since I don’t have a ready access to the webroot to store my components I had to look for a way to dynamically pass the component path to the CreateObject function.

It is actually very simple:<br/>
<cfset componentPath=“com.somewhere.component”>
<cfset myObj=CreateObject(“component”,“#componentPath#”)>

Sony is not OK at all

Seems everyone knows what Sony has been up to. The company is not better than those evil hackers that write terrible vira except that it is big and very mean. From now on, I wouldn’t be found dead within a mile of a Sony; it has gone too far, it has broken public trust and the d**ned company ain’t even contrite!

Everyone should boycott Sony, it should be taught a lesson.

What .Com can do to your brain!

An ambitious yuppie finally decided to take a vacation. He booked himself on a Caribbean cruise and proceeded to have the time of his life… until the boat sank! The man found himself swept up on the shore of an island with no other people, no supplies… Nothing. Only bananas and coconuts.After about four months, he is lying on the beach one day when the most gorgeous woman he has ever seen rows up to him. In disbelief he asks her: “Where did you come from? How did you get here?”

“I rowed from the other side of the island,” she says. “I landed here when my cruise ship sank.”

“Amazing,” he says. “You were really lucky to have a rowboat wash up with you.”

“Oh, this?” replies the woman. “I made the rowboat out of raw material that I found on the island; the oars were whittled from gum tree branches; I wove the bottom from palm branches; and the sides and stern came from a Eucalyptus tree.”

“But-but, that’s impossible,” stutters the man. “You had no tools or hardware. How did you manage?”

“Oh, that was no problem,” replies the woman. “On the south side of the island, there is a very unusual strata of alluvial rock exposed. I found that if I fired it to a certain temperature in my kiln, it melted into forgeable ductile iron. I used that for tools and used the tools to make the hardware.

The guy is stunned.

“Let’s row over to my place, ” she says.

After a few minutes of rowing, she docks the boat at a small wharf. As the man looks onto shore, he nearly falls out of the boat. Before him is a stone walk leading to an exquisite bungalow painted in blue and white. While the woman ties up the rowboat with an expertly woven hemp rope, the man can only stare ahead, dumb-struck.

As they walk into the house, her beautiful breasts bouncing with each step, she says casually, “It’s not much, but I call it home. Sit down please; would you like to have a drink?”

“No thank you,” he says, still dazed. “Can’t take any more coconut juice.”

“It’s not coconut juice,” the woman replies. “I have a still. How about a Pina Colada?”

Trying to hide his continued amazement, the man accepts, and they sit down on her couch to talk.

After they have exchanged their stories, the woman announces, “I’m going to slip into something more comfortable. Would you like to take a shower and shave? There is a razor upstairs in the cabinet in the bathroom.”

No longer questioning anything, the man goes into the bathroom. There, in the cabinet, is a razor made from a bone handle. Two shells honed to a hollow ground edge are fastened onto its end, inside of a swivel mechanism. “This woman is amazing,” he muses.

“What next?”

When he returns, she greets him wearing nothing but vines and a shell necklace-strategically positioned-and smelling faintly of gardenias.

She beckons for him to sit down next to her.

“Tell me,” she begins suggestively, slithering closer to him, “we’ve been out here for a very long time. You’ve been lonely. I’ve been lonely. There’s something I’m sure you really feel like doing right about now, something you’ve been longing for all these months? You know… ” She stares into his eyes.

He can’t believe what he’s hearing. His heart begins to pound. He’s truly in luck: “You mean…”, he gasps, “…I can actually check my e-mail from here??”

ColdFusion White Space Reduction

I just finished our new website (my place of work). Now, I live in Nigeria and most of our customers are resident in Nigeria too. However, because of our local Internet infrastructural constraints, most visitors would have narrowband connections.For them to enjoy visiting the website, optimizing code for fast download became imperative. Actually, it was one of the highlight of the new website.

White space has always been one of the issues with ColdFusion application. For enterprise apps, bandwidth is usually not an issue but by the time you want to scale your app across the web to narrowband users, every single count.

While developing the new website (using NWWX CMS), I tried configuring white space management in the CF Admin but it didn’t do much so I hit the internet. I discovered a lot more people had same issue.

Too bad I couldn’t find a pre-cooked strategy so I ended up creating mine. This is what I did.

  • I set <cfsetting enablecfoutputonly=”yes”>
  • Wrapped all my component invocations in <cfsilent>
  • Now, all the index.cfm (a dynamic website with just 1 template and a bunch of components) code is wrapped within a <cfsavecontent variable=”the_web”>
  • Now the fun part. I got a very terribly cool function,  HtmlCompressFormat, from cflib.org which I rewrote into standard cffunction and included in my library components
  • <cfset html = library.HtmlCompressFormat(the_web,3)>
  • <cfoutput>#html#</cfoutput>

The result was awesome. I got as much as 40% size reduction on some pages and it worked fine. I only had issues with some buttons which were staying too close. I simply added &nbps; to separate them.

If you have other methods, especially something sexier, kindly share.