Saturday, September 13, 2008

CF: Silent Server Side Debugging

So you get this call. Customer says "Nothing is working"; you cannot replicate. When you go to your application or site everything is working just fine.
Have you been there? I have many a time. Wouldn't it be great to have had the debug output (classic coldfusion format) when the customer ran this?
Well you can. You can change the way coldfusion does the debugging in a fairly straight forward fashion, i.e. you can capture all debug information and save it to files for later analysis by changing the debug handler.
You do this like so:

1.) Download the sample file (ToFile.zip).
2.) Extract and place the file (ToFile.cfm) in your debug handlers directory [cfusion root]\wwwroot\WEB-INF\debug. If you installed ColdFusion in C:\CfusionMX8 this would be the final directory to place the file in: C:\CfusionMX8\wwwroot\WEB-INF\debug
3.) Log in to ColdFusion Administrator and navigate to Debugging & Logging:Debug Output Settings
4.) Change the " Select Debugging Output Format" drop down to "ToFile.cfm"

For each page that you are generating a debug file, the time needed as well as the file name to which the debug information was saved will be displayed at the bottom of the screen.
You have the option to specify a variable in URL, Form, or Variables scope.
Specify a variable named: "DebugSilent" to suppress the bottom text altogether.

Be careful though how long you keep this on as it will generate many files that need to cleared out.


-Bilal

Tuesday, July 29, 2008

Using Richt Text TextArea results in error (java.lang.Double cannot be cast to java.lang.String)

Well you guessed correctly from the title. There is something odd going on.
If we are passing on variables that are typed as numeric to an argument (height and width) that would conceivable accept numeric values we will get this error:

java.lang.Double cannot be cast to java.lang.String

Here is sample code to reproduce this:

<cfset iHeight=Val(200)>
<cfset iWidth=Val(500)>

<cfform name="myForm" method="POST" action="Self.cfm">

<cftextarea richtext="true"
toolbar="Basic"
name="MyRTField"
height="#iHeight#"
width="#iWidth#" value="">
</cftextarea>

</cfform>


This could easily occur when passing values as returns from functions. I found two ways of avoiding this.
a) specifically declare variables as strings

<cfset iHeight="200">
<cfset iWidth="500">


b) introduce space when passing arguments so as to force an implicit conversion

...
height=" #iHeight# "
width=" #iWidth# "

Tuesday, July 1, 2008

Micromarketing - Web 2.0+ and the evolution of human to machine marketing

It all started with search engines. People built sites and wanted other people to find them. This was a submission game. If I submit my site to X engines, it would increase traffic by n. This type of site registration work was done mostly by generalists maybe using special submission software to make this repetitive task easier.
However, as search engines became smarter, this stopped working well. Besides, the few surviving search engines where exploring the mechanisms on how to make more revenue and would for that reason alone want to control the results more actively.
Thus, a change happened in marketing. Even before this happened I did make a bold prediction that we would have this new aspect of marketing appear. The human to machine specialist. Marketing before this was mostly an affair of humans trying to convince other humans to do things or spend money on things and services they presumably did not think to be needing otherwise.
The common incarnation of the human to machine marketer was the search engine specialist. Now, here was a marketer blissfully unconcerned about any human audience, rather focusing his energies on how to influence a system (search engine), which in turn would yield the outcome (higher search results). Whole companies specialized in this and are still today providing these services to others.
Banner companies appeared, and a sophisticated system of banner advertising that was content sensitive appeared. Things evolved and no one in their right mind wanted to click on banners any longer. Google ads was begotten and as most things Google, it drowned everything else out. Google rules the masses with Add text banners.
Now, we have this Web 2.0 happening and some of the paradigms with sites and submissions went out the door. So, then, you may ask, what with this web 2.0 stuff happening, whatever that is, will happen to the human to machine people? Will this have any impact on how marketing will evolve? Of course, thanks for the lead in .... If I were free to opine (which I am) I am going to make a prediction. Marketing will change once more to adopt to the next level of message delivery. Machine to machine marketing, or more specifically machine to machine Micromarketing, will emerge.
Sure, obvious you say; maybe so, but let me explain my particular take on this. Imagine a web application in new web 2.0 style, highly interactive, highly social (high stickiness). Maybe you and your buddies are watching a bike race unfold online. As you are looking at the leader riding his Schwinn bike to victory, in the background systems (machines) are negotiating advertising rates with Schwinn based on this event, i.e. sports (special section bike related), audience (your buddies, target group size, average incomes and ages, etc.); Schwinn's systems may have to bid automatically against a competitor (automated market rate auctions) to gain the rights to transparently overlay a marketing message on the race as the race unfolds. This happens several times, as leaders change position, new Marketing messages are negotiated. This is target advertising driven to a next level, highly personalized, informative, automatic, integrated. Wow! You are right, there is no escape now, we will be truly slaves to our passions and exploited for our whims ;o)
However, we are not there yet. There is a lot of work needed to create this next level of reality for marketing. Infrastructure and systems and protocols are just a few things.
  • Negotiation protocol for marketing events. Probably something on top of WS standards, containing event information, exposure times, audiences, bid information.
  • Advertising systems that can recognize types of events and are policy driven (executing against a pre-defined marketing strategy) to react to 1000s+ add requests per second.
  • Micro-payment system: The ability needs to exist to pay for impressions or executions (clicks, seconds of videos watched, games played, names captured); maybe a quarter cent per incidence.
Of course, some of this could be outsourced to specialist, which will then program your policies in their systems on your behalf. Maybe this could be the next Doubleclick service. Just say I didn't tell you so.

Sunday, June 8, 2008

Why the iPod must die

First of, I admit that I have owned an iPod. I owned it very briefly and did admire the attention that Apple has given to designing a well rounded MP3 player. However, I gave it away very quickly. I owned several other MP3 players before and after the iPod. The MP3 player that I am currently using is made by Samsung; and the main reason I bought it for was the radio tuner, followed by size and ease of use. Which overall brings me to the topic at hand, the future of the MP3 players in general and iPod in particular.
The reasons that I did not keep my original iPod and also gave away multiple iPods that I received as promotional gifts and purchase bonus are very simple on one side but point out some of the issues that will, of course only in my humble opinion, doom its existence.
To start with iTunes rubs me the wrong way. As a more technical person than the usual user, I did not like how iTunes took over my computer (with little to no choice), was consuming resources precariously and would not allow me to transfer tunes to anything else but iPod.
I went on to discover something else about myself while dealing with the iPod (and other MP3) players. You could call it a journey of self discovery of sorts. Though the idea of downloading and assembling your own tunes seems pretty cool at first, the stark truth is, it is a LOT OF WORK.
I did a completely statistically irrelevant survey to confirm my suspicions, I asked 7 people about their approach to iPod music management; astonishingly enough they did the same thing. Once they had loaded their favorite tunes, they made very few changes to their music play lists or downloaded music, ripped their CDs etc. Of course there are plenty of people who enjoy doing these things, they just don't seem to be in the majority.
This must probably go under the more "dah" moments in live. We all relish the choice, but are not willing to put in the effort. Thus, I like the other people in my survey realized that this downloading and song organizing part of the iPod does not work for us as the maker intended.
Thus, I am looking for the next wave of devices that truly promises to me the notion of complete choice by giving up any choice whatsoever. Counterintuitive you may say,"hah!" but not truly so I retort. I am thinking here of interactive, internet based radio available 24/7 with or without commercials, where I can pick a genre/type of music I feel like listening to, then I am able to make my preference known within the type by either fast forwarding or ranking the tunes. The new interactive radio station would learn my strange music ways and be able to quickly become adapt at knowing what to play to me, even be able to play medleys, cross music boundaries and present new bands/songs/artists to me.
No more iTunes, no more needing to download anything, if I like a song I can ask for more frequent replay. I pay or not pay (via commercials) professionals to go out there and find the stuff I like. A serving of Indy... here you go, newest Pop/Rock, right away Sir...
Now is this the stuff of far away future? Was I too quick to write the obituary of such an ingenuous device? I, of course, do not think so. The companies at the best position to deliver this are the companies that already sell us our daily other gadgets, such as the wireless carriers. They have realized this potential and working on services and devices that are nudging us ever closer towards this music nirvana. Unfortunately, they have only one way track thinking, e.g. make money directly on subscription services. Leaving out tremendous potential for ad dollars, cross marketing of goods (how about being able to buy tickets for a band you just heard that will be performing in your area. The carrier would know where you are located, they would know you just rated the song highly, bingo! you are ripe for the plucking.). I don't want to mention merchandising, but I think I just have. In other words there is potential beyond subscription for revenue.
I also see potential for our friends from satellite Radio; they have the content, but they need to get off the bandwagon that radio is one directional. The radio of the future is interactive. Their gadgets need to be improved and maybe a free service would be available for people that do not want to do subscription, but would be willing to get commercials or merchandising messages etc. Wow, this could be cool.
Apple is no dummy either. I believe, they have foreseen the death of the iPod already ;o) and I am convinced they are working diligently on the next best thing. What could this be? How could they capitalize on the trends I am predicting (crystal ball and all). iPhone is a start of course, but they just now get to a device that has sufficient bandwidth to access high quality music streams. What's the other way? Keep the best part of the iPod alive indefinetly and ensure it can get licensed easily and it gets into as many places as possible (Unfortunately licensing is not one of Apple's strengths). What am I talking about? The iPod's connection interface of course. Your radio clock has it, your car has it, your zip pocket in your pants will have it before you know it. It should become more ubiquitous than plain m&m's that don't melt in your hand. Thus, there could be a way in which the iPod could live on forever, however, its days as the music player of choice are numbered.

Sunday, May 25, 2008

FlexManiacs 2008

Just returned from the Flexmaniacs 2008 show put on by Figleaf. I would classify this as mixed bag show. It is an impressive array of presentations, presenters and topics that were being covered. To me though this all seemed still a little rough around the edges; it is the second year so a little slack can be given.
Half the presentations I attended ended up having a low value for me whether it was content, presenters struggling with presentations or topics, etc. Overall it was still a valuable conference to attend but the main part requiring improvement is to separate the bad presenters from the good and get to more consistent polished presentations. I have never seen a conference where half the audience would leave within 10 min of a start of a presentation; I can imagine this to be a good blow to many a soul attempting to present.

In brief:
the good: The conference is pretty long enough and provides good coverage of topics to sniff into into get an idea. The weather was nice ;o)
the bad: Need better individual presentations and presenters. Would like to see options to rate individual presenters (online or after each show) . Topics should be better described ahead of time (I sat through an hour of a Flash presentation when topic was Flex). An individualized schedule should be printable from the website. More networking forums needed.

Would attend again but pick only the day I think has the biggest bang.

Cheers.

Friday, May 23, 2008

CF: cfhttp and The column name "" is invalid.

The other day we were looking at cfhttp to parse out a CSV (comma seperated values) file. It worked beautifully on the test systems but would not run when transferred to staging site.
We would get this error consistently.

The column name "" is invalid.

None of the internet resources regarding this was very helpful. So after many trial and errors we discovered that the webserver we posted this to had basic user authentication switched on, thus we needed to provide username and password attributes of the cfhttp tag for this to work.
Another perfectly good example of how the simple things get you. Would have been helpful too if the cfhttp tag could throw a more meaningful error.