Rick O
Member since Dec 11, 2008
- Profile: /members/2134-rick-o.htm
- URL: http://rickosborne.org/
- Comments: 153
Recent Blog Comments By Rick O
-
The Performance Cost Of Throwing Exceptions In ColdFusion
Posted on Jul 17, 2009 at 11:59 PM
Jose: I'd argue that exceptions should truly be reserved for "holy cow, I don't have a clue how to handle this" types of situations. They should not be used for easy-to-handle problems like missing attributes or basic error checking. It's a judgment call, and there aren't any hard and fast rule... read more »
-
The Performance Cost Of Throwing Exceptions In ColdFusion
Posted on Jul 17, 2009 at 7:51 PM
Heh, thanks for this. I fight this battle, primarily with OO-purists, enough that I end up coding up something like this about once each year. Now I can just point and say "Ben said so, and he's too nice to lie to you". Exceptions are expensive. They are supposed to be expensive, because they ... read more »
-
What Chinese Food Has Taught Me About Life
Posted on Mar 26, 2009 at 12:44 AM
I think you're missing something crucial here, though. Not only are you paying for chicken (quality), but you are also paying for the service. Maybe not table service, but service nonetheless -- the implied service contract is that when you place an order you will only have a reasonable wait. If ... read more »
-
OOP Philosophy: Invalid State vs. Invalid Method Call
Posted on Mar 23, 2009 at 10:47 PM
Why wouldn't you extend the Account class with a TransferAmountTo(Amount, TargetAccount) method? I'm having trouble rationalizing why a transfer (an action verb) would be an object, which are traditionally nouns. You wouldn't want to take that transfer, serialize it, and move it someplace else, no... read more »
-
Converting A Full CSS Selector To XPath Using ColdFusion
Posted on Mar 13, 2009 at 11:37 PM
I would be remiss in my duties if I didn't point out that you should talk like a pirate and use → instead of ==> .... read more »
-
Making My ColdFusion Tags More Consistent
Posted on Feb 25, 2009 at 9:13 PM
The problem with cfset is that there are only 3 of the 4 components. You can think of it as either an implied verb or an implied noun: <cfset y=x> translates as: "cfset [stored] y from x" -- implied verb or "[cfset] set y from x" -- implied subject Admittedly, the second seems like a bit ... read more »
-
Hal Helms - Real World Object Oriented Development, Sarasota - Day Two
Posted on Feb 25, 2009 at 1:08 AM
Blarg. This is why you don't comment at 1am. When I said "duck typing", I meant to say "method injection". I have no idea why it came out the other way. Cuckoo.... read more »
-
Hal Helms - Real World Object Oriented Development, Sarasota - Day Two
Posted on Feb 25, 2009 at 1:03 AM
Interesting. So how do you reconcile that with duck typing?... read more »
-
Making My ColdFusion Tags More Consistent
Posted on Feb 24, 2009 at 3:40 PM
Ack, Ben, can you unboldify that last comment? Sorry about that!... read more »
-
Making My ColdFusion Tags More Consistent
Posted on Feb 24, 2009 at 3:39 PM
Well, let me stop and reiterate definitions for each of those grammatical terms. Subject: The focus of the sentence. Verb: The action of the sentence. Indirect Object: The thing upon which the subject and verb are acting. Direct Object: The recipient of the action performed on the Indirect ... read more »
-
Hal Helms - Real World Object Oriented Development, Sarasota - The Cookout
Posted on Feb 22, 2009 at 11:56 PM
Thanks again for letting me crash your party. It was great to get out of my own little world for a while.... read more »
-
Using A Rough Box Model To Gather Near-By Zip Codes
Posted on Feb 19, 2009 at 1:22 PM
Todd- It's not exactly production-worthy, but here you go: http://code.google.com/p/nowrists/source/browse/ #svn/trunk/NoWriSts/where... read more »
-
Making My ColdFusion Tags More Consistent
Posted on Feb 13, 2009 at 10:41 AM
So it looks like you're doing subject - indirect object - verb - direct object ? I tend more to subject - verb - indirect object - direct object when I code. But as long as you are consistent, that's cool. My personal pet-peeve is the lack of consistency between YES/NO and TRUE/FALSE for attri... read more »
-
Using A Rough Box Model To Gather Near-By Zip Codes
Posted on Feb 10, 2009 at 1:26 PM
You could also argue that, in many cases, doing any of this on the db server at all is now a moot point. If you use the Google Maps API correctly, you can have it send an AJAX request with the Lat/Lon bounding box. No math needed! I wrote up some proof-of-concept code for this a while back: htt... read more »
-
Using A Rough Box Model To Gather Near-By Zip Codes
Posted on Feb 10, 2009 at 10:47 AM
Derf. Curly braces. Sorry. That's what I get for typing comments directly into the box and not testing them first. But you get my point.... read more »
-
Using A Rough Box Model To Gather Near-By Zip Codes
Posted on Feb 10, 2009 at 10:44 AM
I have to wonder how your performance would change if you built denormalized tables for common radius values. That is: CREATE TABLE Zip_50MI { start_zip INT NOT NULL, near_zip INT NOT NULL, distance_mi TINYINT NOT NULL } ALTER TABLE Zip_50MI ADD PRIMARY KEY (start_zip, near_zip) Then, run a... read more »
-
A Graphical Explanation Of Javascript Closures In A jQuery Context
Posted on Feb 4, 2009 at 11:00 AM
I second Brian's comment. As I was reading through the post I was thinking I'd have to find the same video. Pretty much all of the Crockford videos on Yahoo! are worth your time. Some of them get mind-bendingly complex, but they'll really open your eyes. Having said all of that, I'll also say th... read more »
-
Winners Of My 1,000th ColdFusion Post
Posted on Jan 26, 2009 at 11:00 AM
That is a truly twisted and inspired way to get a random number. I'm a little bummed that you couldn't work QoQ into it, but then I know you need to protect the image of your sanity with the community. Gratz on your kilopost.... read more »
-
Ask Ben: Removing Duplicate List Items While Maintaining Original List Order
Posted on Jan 15, 2009 at 1:24 PM
Ben said: "you can modify your example to use CFHTTP to pass in the list" Well played, sir. Well played.... read more »
-
Ask Ben: Removing Duplicate List Items While Maintaining Original List Order
Posted on Jan 15, 2009 at 11:23 AM
For your "How NOT to do it" file: <cfset strList="1,1,2,3,4,1,3,5,5,1,9,0,1"> <cfset q=queryNew("item,position")> <cfloop list="#strList#" index="j"> <cfset queryAddRow(q)> <cfset querySetCell(q, "item", j, q.recordCount)> <cfset querySetCell(q, "position", q.rec... read more »