ColdFusion Muse

It's My 41rst Birthday

Mark Kruger March 31, 2006 2:05 PM Humor and Life Comments (6)

It's my 41rst birthday today. When I went out to my car today my wife and kids had decorated it with streamers and balloons, and painted “happy birthday” on both sides. I was delighted. I went through the Starbucks drive through and because I had the window down on the drivers side it read “py Birthday”. “Py birthday” she said, “what does that mean?”

My wife and kids are buying me a recliner for my birthday. When I was 30 they bought me a treadmill. That pretty much sums it up - a treadmill at 30, a recliner at 40, probably a new mattress at 50, and when I hit 60... back to the treadmill - only this time with larger side rails and a much slower speed.

I've learned a few things in my 41 years, and since it's my birthday I feel I have every right to impose this wisdom on my readers - so here goes.

Read More
  • Share:

New Artist of the Month - Sean Keith

Mark Kruger March 24, 2006 10:48 AM Humor and Life Comments (0)

I'd like to take a moment to give an endorsement to my good friend Sean Keith. Check out his newest singles on mySpace. Sean writes all original music and he has a clean compelling voice that's sooo easy to listen to. One of my college degrees is in music, but Sean makes me feel like a no-talent hack. He's a huge American Idol fan and he tells me he likes the "spastic grey haired guy". I have never seen America's number one show, because I assume that a show that popular must be mindless, inane or focused on humiliated poor desperate people (plus Simon is an insufferable turd... not that I've ever seen it... so how would I know). When Sean says "spastic grey haired guy" I think of an old man trying to polka - and I wonder how that can be popular.

Anyway, if you are a myspace user (written in Fusebox on Bluedragon servers by the way - you're welcome Charlie and Vince) drop Sean a note and tell him you like his stuff. Be nice - he thinks all my readers are charming and sophisticated like me (ha). If you are not a myspace user check out his personal site at Seankeith.com. Show some love people.

  • Share:

Becoming a Better Troubleshooter

Mark Kruger March 21, 2006 2:52 PM Podcasts, Coldfusion Troubleshooting Comments (1)

Every week I seem to find myself dealing with intractable bugs or performance issues for CF Webtools' customers. Last week, for example, I found myself troubleshooting a JVM for a CF 7 customer, a Database performance issue, a JMS issue and a persistent memory leak in a COM object. That's a pretty typical week for me.

I like troubleshooting and debugging. I suppose it's the Sherlock Holmes in me that likes to pour over minute details looking for clues and possibilities. I think a good troubleshooter has that quality in his nature - the thirst for knowledge and the desire for intellectual growth. I would say that's one of my strengths. That is not to say you can't be a good troubleshooter without those skills, but it helps if you really enjoy uncharted territory.

Listen Here

Read More

Getting the Auto Number Field in MS Access

As a follow up to this Previous Post on using the @@Identify Field and it's related function "scope_identity()", it appears that it is possible to do this same thing in Access. Charlie Arehart has posted a great article with some examples titled "Select @@Identity Works in Access. Worth Exploring. Check it out.

  • Share:

Server-side Vs. Client-side Validation Revisited

Mark Kruger March 16, 2006 10:11 AM Coldfusion MX 7, Coldfusion Tips and Techniques Comments (12)

CF Muse Reader Asks:
You suggest both client and server side should be used for validation. Just to check - I should code so that js picks up the errors first using event code or onsubmit then let server side pick up the errors on submit using cfinput validate/required etc. Or do I recode all the stuff to be event driven such as onchange etc.

This question refers to the previous post on form validation. From the way the question is phrased I believe the reader is probably proficient at JavaScript. There are some amazing things you can do with JavaScript, and I'm in favor of creating intuitive interfaces that help your user cope with the complexity of your application. Obviously JavaScript is or can be a big part of that solution. If your concern is to provide a better user experience then JavaScript is helpful and necessary. If your concern is to validate your data for accuracy and security then you must use server side code to check your form inputs.

Read More
  • Share:

You Should Use an Alias for Those Sub Query Tables!

Mark Kruger March 15, 2006 4:04 PM SQL tips, Coldfusion & Databases Comments (4)

Here's a rule of thumb for you. When you are writing a query that includes a sub query always use an alias for the table and qualify the columns - or use the full column name if you are so inclined. If you don't you may very well end up with unexpected results. Consider this query:

Read More
  • Share:

CFMX and the Dot Operator - Migrating From CF 5 to CFMX

Mark Kruger March 14, 2006 11:23 AM Coldfusion MX 7, Coldfusion Tips and Techniques Comments (4)

If you come from the old "Coldfusion 4-5" days (in fact many or our customers are still running CF 5) then you might remember how those earlier versions handled variables with periods in the name. If you created a variable with a period in the name CF simply treated the period as if it were part of the variable name. For example, if you did the following in CF 5:

<cfset var1.var2.var3 = "My Dotty Variable">

You would not have created anything more than a primitive variable named "var1.var2.var3". If you tried to use <cfdump ...> to dump out var1 it would generate an error - var1 not found. If you intended for var1 to be a structure containing a structure var2 containing a primitive var3 then you would have to rewrite the code like this:

<cfset var1 = structNew()>
   <cfset var1.var2 = structNew()>
   <cfset var1.var2.var3 = "My Dotty Variable">
Fast forward to CFMX.

Read More
  • Share:

Running Queries Using JavaScript?

Mark Kruger March 10, 2006 2:45 PM Coldfusion Tips and Techniques Comments (6)

CF Muse Reader Asks:
I am trying to develop 3 drop down list boxes which gets the data from the database. On change of first will pop up second and on change of second will get the values based on first and second. Do you know the smartest way to do this. How can I run queries from JavaScript?

The first thing to decide is, do you really want to connect to the server for each change in the drop down box? The answer depends on the size and schema of the database.

Read More
  • Share: