Skip to main content

Dustin

Member since Dec 11, 2008

Recent Blog Comments By Dustin

  • Exercise List: Incorporating OOP Style Form Validation

    Posted on Nov 19, 2007 at 10:29 AM

    You're definitely making some good progress on your OOP. You may want to look at incorporating some DAO methodology. It helps keep your service objects more organized since move all your queries to a data access object/gateway (single and multiple records respectively). As far as validation goes, ... read more »

  • Ask Ben: Pulling SQL Records Based On A List Of IDs

    Posted on Sep 26, 2007 at 12:03 PM

    Well that *did* sound like something interesting to explore. So I decided to do some testing and I did find out something interesting. If you try to do a QoQ with cfqueryparam and a 4000 item list it crashes CF. Ooops....... read more »

  • Ask Ben: Pulling SQL Records Based On A List Of IDs

    Posted on Sep 26, 2007 at 11:34 AM

    @Adam, While I'm not entirely sure about the maximum number of items you can put in the IN statement. I've never had an error tossed from this and the docs for T-SQL states " IN (,...n)" which leads me to believe there isn't a limit (at least for MS-SQL). That aside you should really use the <... read more »

  • Ask Ben: Pulling SQL Records Based On A List Of IDs

    Posted on Sep 26, 2007 at 10:09 AM

    Another alternative to this would be to do your second example, but instead of looping the query, loop the list and do a query of query pulling the record you need for that iteration. That should keep easy to read, give fairly good performance, and you avoid the complex query.... read more »

  • RELoop ColdFusion Custom Tag To Iterate Over Regular Expression Patterns

    Posted on Sep 25, 2007 at 3:21 PM

    Uh oh, looks like Ben is moving to the dark side. First he starts on how to bypass spam filters. Now he's scraping email addresses. Next is a spider, followed up buy a full on spamminator. I sense a disturbance in the Force. :0... read more »

  • New SPAM Leverages Amazing Brain Functionality

    Posted on Sep 24, 2007 at 1:23 PM

    @CoolJJ - Ask and you shall receive! <cffunction name="toSpam" access="public" returntype="string" output="false"> <cfargument name="cleanText" type="string" required="yes" /> <cfset var spamChars = "'|,|_|-|+|*|.| " /> <cfset var lowerBound = 0 /> <cfset var upperBou... read more »

  • Code Assertively

    Posted on Sep 18, 2007 at 1:51 PM

    @Gus "<cfif isDefined("firstName")> is more efficient than <cfif structKeyExists(form,"firstName") OR structKeyExists(url,"firstName") OR structKeyExists(attributes,"firstName")>" More efficient for you, the compiler, or in execution? I would think it's only more efficient for you si... read more »

  • Digital Smiley Face Turns 25

    Posted on Sep 18, 2007 at 11:29 AM

    Speaking of annual events, tomorrow is international talk like a pirate day. So don't forget to talk like a pirate! http://www.talklikeapirate.com... read more »

  • jQuery Plugin To Make It Vibrate

    Posted on Sep 12, 2007 at 4:04 PM

    And you thought you were getting on search engines for odd keywords before. Just imagine what you'll get now! "Where's my huge ass vibrator?!?!?" LOL... read more »

  • jQuery 1.2 - An Unexpected Surprise

    Posted on Sep 12, 2007 at 11:38 AM

    @Ben What?!? No banner ad for this? I would have surely thought you would have made a banner of a vibrator with JQuery written across it. Maybe do it in flash and have it actually vibrate when you do a mouse over /w some moaning sounds! LOL... read more »

  • Converting XML To HTML Using ColdFusion And XSLT

    Posted on Sep 11, 2007 at 2:58 PM

    No problem! The xsl:strip-space is to remove empty nodes from your XML so they don't display the whitespace of the empty node. The function name is a little misleading, I know for sure I was confused by it when I started using XSLT. From the link above: "You can also automatically delete white-sp... read more »

  • Converting XML To HTML Using ColdFusion And XSLT

    Posted on Sep 11, 2007 at 2:29 PM

    XSLT does have the ability to strip/preserve white-space. I haven't tested Coldfusion's implementation on this, but it is available: http://www.cafeconleche.org/books/bible2/chapters/ch17.html #d1e8886... read more »

  • My First ColdFusion XML / XSLT Example

    Posted on Sep 7, 2007 at 9:22 AM

    XSLT is freakin awesome. It can be used for a lot of stuff, for example I use it as my email templates, which makes it really easy to update any email that gets sent out. A while back this saved me quite a bit of time when DOD changed to INFOCON 4 and had to change to all plain text emails. I also u... read more »

  • Ask Ben: Handling Errors With ColdFusion CFError

    Posted on Aug 29, 2007 at 1:02 PM

    @Michael If you are catching db errors you'll output these: <cfif IsDefined("catch.SQLState")> SQL State: #catch.SQLState# </cfif> <cfif IsDefined("catch.Sql")> SQL: #catch.Sql# </cfif> <cfif IsDefined("catch.queryError")> Query Error: #catch.queryError# </cfif>... read more »

  • Preventing Spam Bot Form Submissions With ColdFusion (Revisited)

    Posted on Aug 27, 2007 at 4:39 PM

    Not a bad tactic there. Although it might become quite a bit harder to figure out if you use it for a real graphic in the site layout. I just say that because if I were to reverse engineer your form submission process and I saw that image tag in the source, that would be the first place I'd explore ... read more »

  • Advice On Balancing Cohesion, Packaging, And God Objects?

    Posted on Aug 24, 2007 at 9:16 AM

    I haven't had a lot of time to read the flow of data in the CFC. But the first comment does seem like it could help you out for a first step. On the last three functions you have 6 arguments. You could reduce this to one argument if you create a bean with those attributes. Peter Farrell made a reall... read more »

  • Strange ColdFusion Component Shell Behavior

    Posted on Aug 22, 2007 at 4:50 PM

    Thanks! I was getting the same feeling as I was testing it as well. I even tested it with <cfcomponent> within both the .cfc and the .cfm pages. I could have swore if you tried to declare a component within another component it would throw an error.... read more »

  • Strange ColdFusion Component Shell Behavior

    Posted on Aug 22, 2007 at 4:34 PM

    Just for the pure oddness of what you are finding I decided to mess around with this a little, this is what I found. 1. If you add <cfcomponent> around your cfinclude it "fixes" the WEB-INF.cftags.component thing. 2. It seems that coldfusion ignores the <cfcomponent> inside the inclu... read more »

  • I Just Can't Understand Object Oriented Programming (OOP) And Join Tables

    Posted on Aug 17, 2007 at 11:09 AM

    Well that didn't turn out too pretty. Hopefully you get the idea. That aside, you should add a preview feature to keep me from posting garbage like that. ;)... read more »

  • I Just Can't Understand Object Oriented Programming (OOP) And Join Tables

    Posted on Aug 17, 2007 at 11:07 AM

    If the join table your using is only dependent to the practice table, there's nothing wrong with having them as a single service. If there are multiple dependents or if your business rules don't fit quite right, you'd likely want to break it out into its own service. I would organize something like... read more »

I believe in love. I believe in compassion. I believe in human rights. I believe that we can afford to give more of these gifts to the world around us because it costs us nothing to be decent and kind and understanding. And, I want you to know that when you land on this site, you are accepted for who you are, no matter how you identify, what truths you live, or whatever kind of goofy shit makes you feel alive! Rock on with your bad self!
Ben Nadel