Posted on 1 Comment

CSS3 is coming!

CSS3 is coming! CSS3 is coming! Cascading Style Sheets allow design to be separated from programming. Before quality support of CSS within web browsers, designers and programmers had to rely on tricks to make the site appear correctly. One technique even included creating separate documents for each of the major browser, detecting the browser version, and presenting the correct document. What a pain!

With CSS, a programmer can create an HTML document sematically. In short a programmer can write code that says, "put a paragraph here" without worrying about what a paragraph’s appearance should be. That is, the programmer need not concern themselves with size of the font, indentions, emphasizing the first word, and so forth. The designer can manage that all through the style sheet.

Is it me or wasn’t vertical alignment of text promised in CSS3? I don’t see that in the list!

Posted on 3 Comments

Fly Half Way Around the Globe, See Atlanta Airport, Go Home!

Give me your tired, your poor,
Your huddled masses yearning to breathe free,
The wretched refuse of your teeming shore.
Send these, the homeless, tempest-tossed, to me:
I lift my lamp beside the golden door.

Exerpt from The New Colossus by Emma Lazarus as found on a bronze plaque inside The Statue of Liberty [Source]

Except for you and you and, hey, yes, you–the Asian guy.

Posted on 1 Comment

All Things Web 2.0

View a list of the best and most popular web 2.0 applications. What is Web 2.0? It is being hailed the next generation of web applications. In reality, it is an old concept. The way the World Wide Web works is a client computer (your web browser) makes a protocol request (typically http) to a web server which then talks to other servers (ColdFusion, PHP, mail, news, etc.) and returns a document to your browser. We experience this as a screen refresh and the little icon in your browser spinning around like an abnoxious hourglass. Web 2.0 gives the illusion that the wait, the hourglass, has been eliminated. It uses JavaScript tricks to make the requests behind the scenes. You can witness this by adding something to your Google Calendar. Notice the word "Loading…"? That has replaced a total page refresh.

I have problem with Web 2.0 and that is accessibility. For years web developers have held back on certain capabilities in order to not limit their audience. I would ask my clients, "how successful would McDonald’s be if they turned away 80% of their customers?" In the early days relying on something like JavaScript could be just that limiting. As a business, you have to know who you are serving. If your customer base is primarily Mac users and your web developer says, "I don’t support Safari." then you need to decide if you are going to fire your web developer or your customers. Browsers have come a long way and for the most part are much more compliant and compatible and almost all support Javascript. So where is the accessibility problem? We have far more computer neophytes using computers today and playing on the Internet (primarily via the World Wide Web). Apply firewall settings too strictly or get overly aggressive on popup blocking and you may find that Javascript is disabled. Try disabling Javascript and use Google’s calendar. They can afford to turn people away. Can you?

Use Web 2.0! It is cool and what people will expect of your application. However, write it to degrade nicely. Detect that Javascript is disabled and, if so, present your site Web 1.0 style.

Posted on 8 Comments

Separation of Church and State..except in Arkansas

So, in TN we are doing stupid things with our constitution like dictating morals, telling people whether or not they can get married, and forbidding people from buying dildos. But in Arkansas they have an article in their constitution forbidding Atheists from holding public office or testifying as a witness! I’m calling my state representative! Our stupidity has been one up’d! (See the correction)

Article 19, section 1 of the Arkansas Constitution: Atheists disqualified from holding office or testifying as witness.

No person who denies the being of a God shall hold any office in the civil departments of this State, nor be competent to testify as a witness in any court. [Source]

The Arkansas constitution is available online.

Posted on Leave a comment

Patent Pending

So, this tells me a few things.

  1. Anyone can get a patent.
  2. A patent doesn’t make it a good idea.
  3. This patent owner has obviously never owned a dog. (probably an irrate petless walker that has stepped in one too many landmines)
  4. You don’t have to know how to use Photoshop to get a patent.
  5. Peanuts come from dog butts.

This comes at a timely moment as I am quoting a patent attorney on a web project today. I’ll have to share patent US 7,090,268 B2 with them.

Posted on Leave a comment

Bush asks Mom, “How do you know his life would have been good?”

Did Bush really say this?!

Dolores Kesterson’s son died in Iraq. She was granted a private meeting with the President.

Dolores tried to give Bush a sense of what type of person Erik had been. She described her son as a “comedian” whose favorite saying was, “Life is good.” The president replied, “How do you know his life would have been good?” [Source]

He followed up with some enlightenment.

Before he concluded their meeting, Bush proclaimed to Dolores, "We won’t know in our lifetime whether or not Iraq was a success." [Source]

In our lifetime?! I can tell now.

Posted on Leave a comment

Start your own business

Want to start your own business? CNN Money asks, "how much money will you need?" I still contend that the government, the same government which encourages small business, is the greatest hinderance to the small business owner. Screw up the taxes and suffer the rest of your life.

Btw, CNN’s answer was $10,000. I started my first real endeavor with $38,000 and pumped another $20,000 of my own money into it before going belly up.

See also.

Posted on 1 Comment

Like Productivity Tools?

As an independent contractor it is important to me to track all my time. That means if I am working for someone either at an hourly rate or a fixed price I track my time. If I am marketing myself (which would be working for me) I track my time. I have even tracked time when I was away from work. This time tracking lets me know if I am charging correctly and whether or not I am performing efficiently.

I have used a variety of time tracking solutions including Quicken’s. I have tried several online versions only to have them move from free to charging as soon as their app was stable. Allnetic’s Working Time Tracker has done the best job for my circumstances. A new player is SlimTimer. SlimTimer looks free for the moment. But, the first one is always free, right?

Ps. I haven’t done anything with SlimTimer yet so no review at the moment.

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 1 Comment

User interfaces of the future

Windows and even the Mac OS are products the 80s. The user interface you use to operate your computer is over two decades old. Is this as good as it gets? John Kheit says change is coming and offers descriptions and links to what could be the computer user interface you use tomorrow.

Look at pictures of desktops (user interfaces) from 1984 to the present.

Posted on Leave a comment

Fly Naked Air

I said the future is in nude airlines!

This video shows we are practically there! (Note: the yahoo interface is obnoxious in that it moves immediately to the next video story. The new airport scanner is the first video). Basically, a machine is almost ready to deloy that will allow airport screens to see you nude and see everything you are packing.

It’s a virtual strip search…so detailed you can see genitalia.

So here is my more friendly skies concept. The airports will have rows of changing rooms like you would see in a dressing room at a clothing store. All passengers go into the changing rooms and strip. There is a container that you put your clothes, carry-on, and everything into. Like the doctor’s office bathroom, there is a pass-through which allows your sealed container to move onto a conveyor belt. You don a hospital robe, leave the changing room, and proceed through the metal detectors.

Taglines for my airline might be "Fly Naked Air" or "The Mile High Club is Open Again" and, my favorite, "Have no fear because you can see what everyone’s packing!" I’m seeking investors!

See the failed endeavor Hooters Air and The Sun News report on its failure. Wait a minute! Naked-Air (NWS) already flys out of Miami! Here’s a worksafe write-up of Naked-Air including this quote:

"After 9/11, I didn’t have any cancellations," [Donna Daniels] said. "Even after war broke out, we didn’t have any cancellations on this trip. People feel safe on a flight like this."