Coder's Revolution

Do you want a revolution?

Category Filtering: 'CF'

Should Centaur have a CFScript version of every tag?

ColdFusion
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?
Comments are currently closed

My cfscript version of cfparam

ColdFusion, Performance
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.
Comments are currently closed

Understanding HTTP- Part 1

ColdFusion, Technology
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.
Comments are currently closed

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

ColdFusion, General, Java, Performance
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.
Comments are currently closed

Put down the keyboard and step away from the computer

ColdFusion, General, Java
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?
Comments are currently closed

No Cookie For You: Second Solution

ColdFusion, Java
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.
Comments are currently closed

Sour Endings: Anatomy of a Loser

ColdFusion, General
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...
Comments are currently closed

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

ColdFusion, SQL
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.
Comments are currently closed

Lemonade Memoirs: Make a stand

ColdFusion
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.
Comments are currently closed

Cookie Reserved Names- Who's to blame?

ColdFusion, Java
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
Comments are currently closed