Blog

Category Filtering: 'CF'

Remove Filter


Should Centaur have a CFScript version of every tag?

Posted by Brad Wood
Jul 21, 2008 08:03:00 UTC
My last post about my structparam function had me thinking about what tag stuff you can't do in CFScript without writing some sort of wrapper function. I know from the CFUnited keynotes Adobe has some kick butt CFScript stuff up their sleeve. I know this is probably a can of worms, but what's the chance they would go all out and give us a CFScript equivalent for just about everything from sending mail to cfquery?

My cfscript version of cfparam

Posted by Brad Wood
Jul 20, 2008 06:16:00 UTC
Some time ago while working in cfscript I had the need to cfparam a bunch of variables. I was building an XML document out of form fields and a number of the fields wouldn't always exist. At first I made a simple UDF to encapsulate a cfparam tag, but it this code was inside of a loop that beat it over and over again before it was finished and performance just wasn't cutting it. The culprit as it seemed was scope hunting.

Understanding HTTP- Part 1

Posted by Brad Wood
Jul 19, 2008 07:53:00 UTC
Many of the low-level technicalities of our life go on right under our nose without us really understanding their inner workings. You drive your car everyday, but do you understand how an internal combustion engine works? You keep your milk cold in the fridge, but do you grasp the physics of why Freon absorbs energy when it becomes a gas? As a mere user, deep understanding of the things you use is generally not necessary, but if you build or maintain one of these systems you had better know what goes on under the hood.

Confessions of a speed junky: How I made my code faster

Posted by Brad Wood
Jul 18, 2008 08:33:00 UTC
The past couple of days I've been messing around with a couple functions, cleaning them up a bit to blog about them. One of them is for color-coding SQL and the other for highlighting differences in two strings. Both are pretty small, but very repetitive in what they do. Depending on the size of the text you are processing, performance varied. Sometimes the code inside was repeated hundreds of thousands of times given a large enough test.

Put down the keyboard and step away from the computer

Posted by Brad Wood
Jul 17, 2008 08:30:00 UTC
Research shows that driving while extremely tired renders the same results as driving drunk. Following that same line of though, is coding while sleep deprived the same as writing your code in a drunken stupor?

No Cookie For You: Second Solution

Posted by Brad Wood
Jul 15, 2008 08:06:00 UTC
I have a solution that I have gotten working locally to rid my ColdFusion logs of the annoying "Cannot create cookie" errors. For those of you just joining us, Teeps blogged it, Jochem explained it, I took a stab and it and failed, and now I'm back for round two. I apologize for blogging this so much lately, but once I get a good puzzle in my craw, I just can't let up until I've solved it.

Sour Endings: Anatomy of a Loser

Posted by Brad Wood
Jul 14, 2008 19:29:00 UTC
They say that hindsight is 20/20 and I think they're right. Ray announced the winner of his Lemonade Stand contest today and I'm afraid I didn't do too well. In fact I lost $3.87 overall. Don't worry though, after downloading the code and fixing my function up a bit I can win almost every time now! If only I could remember where I put that danged time machine...

Just when you felt safe... SQL Injection and MySQL

Posted by Brad Wood
Jul 14, 2008 02:07:00 UTC
Zac Spitzer recently blogged about an article explaining how to hack ColdFusion. Overall the "exposé" was mostly meaningless drivel not having anything much to do specifically with ColdFusion itself. It was accompanied by an array of Code Samples that look like they were written by a third grader. One point the article made though caught my eye. It claimed MySQL would let you inject SQL into a cfquery not using cfqueryparam even if the variable was enclosed in single ticks. "Could it be?", I scoffed. Oh yes, yes it is true.

Lemonade Memoirs: Make a stand

Posted by Brad Wood
Jul 12, 2008 16:52:00 UTC
While, Ray is still reeling from the massive response to his IPhone post which has pushed back the Lemonade Stand Puzzler, I thought I would take a quick opportunity to put my code out there. In overview, Ray asked us to write a function that emulated a Lemonade Stand. It had to decide how many cups of lemonade to sell and for what price based on the weather, temperature, budget, and cost of supplies.

Cookie Reserved Names- Who's to blame?

Posted by Brad Wood
Jul 12, 2008 04:35:00 UTC
Teeps started off the fun last month with this blog post about countless errors in his logs about not being able to set cookies. I get the errors too, and they usually look like this: 07/11 15:58:19 error Cannot create cookie: domain = .notingdetails.com 07/11 16:19:01 error Cannot create cookie: domain = .notingdetails.com 07/11 16:39:12 error Cannot create cookie: domain = .notingdetails.com 07/11 16:45:05 error Cannot create cookie: domain = .notingdetails.com

Site Updates

Entries Search