Ben Nadel
On User Experience (UX) Design, JavaScript, ColdFusion, Node.js, Life, and Love.
I am the chief technical officer at InVision App, Inc - a prototyping and collaboration platform for designers, built by designers. I also rock out in JavaScript and ColdFusion 24x7.
Meanwhile on Twitter
Loading latest tweet...
Ben Nadel at RIA Unleashed (Nov. 2009) with:

Mike Causer

Member since Jan 27, 2009

Recent Blog Comments By Mike Causer

  • Posting Form Values With The ColdFusion CFHttp And CFHttpParam Tags

    Posted on Feb 21, 2012 at 1:08 AM

    Has anyone noticed that if you try to post a string that exceeds 1,000,000 characters, it simply does not include the field with the request? ..and doesn't throw! eg. <cfscript> var h = new http( url = "http://...", method = "post" ); h.addParam( type = "formField&quo... read more »

  • Learning ColdFusion 9: CFScript Updates For ColdFusion Components

    Posted on Sep 14, 2011 at 3:03 AM

    Regarding the use of CreateUUID(). Last time I checked, this: createUUID() Was 2x slower than this: createObject("java","java.util.UUID").randomUUID().toString() They produce slighlty different results too. createUUID(): 0310A4B5-CC59-EA05-43BB229A4D46B69C java.util.UUID: f4... read more »

  • ColdFusion 9's NEW Operator Can Use Dynamic Class Paths

    Posted on Sep 14, 2011 at 2:49 AM

    It's a shame we still cant go: myCfc."dynamicMethodName"() or even: myCfc[dynamicMethodNameVar]()... read more »

  • ColdFusion Session Management And Spiders / Bots

    Posted on Sep 13, 2011 at 2:27 AM

    Oops... "[code]" Where's the edit button Ben? :)... read more »

  • ColdFusion Session Management And Spiders / Bots

    Posted on Sep 13, 2011 at 2:23 AM

    In our application.cfc we have an onRequestEnd() that detects if the current cgi.http_user_agent matches a blacklist, and if so reduces the session timeout to 15 seconds. [code] session.SetMaxInactiveInterval(javaCast('long',15)); [/code] Another thing you can do is start off with a small session ... read more »

  • Ask Ben: Converting A Query To A Struct

    Posted on Sep 9, 2011 at 11:10 AM

    If you want all columns, in their specified case and in their selected order, use this: columns = arrayToList( myQuery.getMeta().getColumnLabels() ); getColumnLabels() returns a java string array (string[]), so if you want to use cf array methods on it, you'll need to bounce it through a listT... read more »

  • Why NULL Values Should Not Be Used in a Database Unless Required

    Posted on Jul 14, 2011 at 7:15 PM

    I don't see the point in arguing for or against the use of nulls. They have their place. It's your choice as a developer whether you will use them or ignore them. The best thing about nulls is that you can use them however you want. They are simply another value. A null (eg. string) in one applicat... read more »

  • Creating A Struct From A ColdFusion Array Using The TreeMap And The LinkedHashMap

    Posted on Feb 8, 2011 at 6:07 PM

    I wrote my own version of your arrayCollection() functions using TreeMaps and LinkedHashMaps without reading yours based on your sample output. Turns out we think alike! Main differences are you used arrayIsDefined() where I used isNull() with Array.get() and I favoured cfscript. The TreeMap versi... read more »

  • Learning ColdFusion 9: Using CFQuery (And Other Service Tags) In CFScript

    Posted on Oct 24, 2010 at 8:17 PM

    @Ben - only downside to that is your query columns must then be syntactically correct variable names. ie. you cant have a column (or alias) with spaces the .getColumn('column name') on the g.etResult() works around this limitation... read more »

  • Learning ColdFusion 9: Using CFQuery (And Other Service Tags) In CFScript

    Posted on Oct 21, 2010 at 6:23 PM

    @Kevin try this: query = new query(...); instance.user.systemAudiences = []; instance.user.systemAudiences.addAll( query.getResult().getColumn('SystemAudienceID') ) .getColumn() supports case insensitive column name or integer offset (1=first column) be sure to javaCast('int',offset) as it only w... read more »

  • Learning ColdFusion 9: Using CFQuery (And Other Service Tags) In CFScript

    Posted on Jun 21, 2010 at 12:20 AM

    Is it just me or do you need spaces after your named :params? For example: myQry = new query(); myQry.setSql(' select id from table where id = :id and deleted = 0 '); myQry.addParam( name="id", value=0, cfsqltype='cf_sql_integer' ); myQry.execute(); If my :id is followed by a line break, it thr... read more »

  • Ask Ben: Converting A Query To A Struct

    Posted on May 23, 2010 at 7:37 PM

    @Chad, Leading zeros aren't being stripped for me... Can you give more details about your setup? mysql, sql server, cf7, cf8, cf9 etc?... read more »

  • Extending ColdFusion Components And Its Impact On Page Performance

    Posted on Apr 27, 2010 at 10:12 PM

    I find getTickCount() doesn't have enough granularity - it only deals with milliseconds. I prefer to work with nanoseconds (1ms = 1,000,000ns) Rather than executing something in a loop 1000x times with cftimer, I use the system class timer. I'm sure there are java overheads that get in the way, but... read more »

  • Comparing ColdFusion Struct Equality With Java

    Posted on Apr 21, 2010 at 9:15 PM

    @Tony Wu In your example, the reason for the "NO" is because a.n is created as a java.lang.String and b.n is created as a java.lang.Double - eg. <cfset a = structNew()> <cfset a.n = 2> <cfset b = structNew()> <cfset b.n = 1 + 1> <cfoutput> #a.equals(b)# (NO) #a.n.ge... read more »

  • Why NULL Values Should Not Be Used in a Database Unless Required

    Posted on Feb 23, 2010 at 11:33 PM

    Nulls are great! They are excluded where you expect them to be. As per your examples, if you wish to include them, you need to use the sql server isNull() function to replace the nulls with blank strings. Theres also an opposite nullIf() function for replacing values with nulls when they match con... read more »

  • QUERY.ColumnList Does Not Return True Column Ordering

    Posted on Oct 29, 2009 at 9:45 PM

    If you want all columns, in their specified case and in their selected order, use this: columns = arrayToList( myQuery.getMeta().getColumnLabels() ); getColumnLabels() returns a java string array (string[]), so if you want to use cf array methods on it, you'll need to bounce it through a listToArra... read more »

  • ColdFusion Application.cfc OnRequest() Creates A Component Mixin

    Posted on Aug 19, 2009 at 10:56 PM

    typo detected... "Executes the requested ColdFusoin template"... read more »

  • GetMetaData() Is Shared By All Instances Of A Given Class In ColdFusion

    Posted on Jul 22, 2009 at 8:53 PM

    Interesting... It seems the meta data is being stored with the template proxy cache. I guess they figured it wouldn't change much and people wouldn't try to modify it... The cache hangs around until you run: createObject('component','CFIDE.AdminAPI.runtime' ).clearTrustedCache('/full/path/to/your.... read more »

  • KinkyTwits - My ColdFusion And jQuery Powered Twitter Client (Beta)

    Posted on Jul 20, 2009 at 7:31 PM

    seems the problem is to do with the cf8/9 javascript-style create structs and arrays. eg. myStruct = {}; myArray = []; try replacing {} with structNew() and [] with arrayNew(1) or upgrading to cf8... read more »

  • KinkyTwits - My ColdFusion And jQuery Powered Twitter Client (Beta)

    Posted on May 15, 2009 at 1:08 AM

    Nice work! One thing I noticed was in TinyURLService.cfc you were pointing to http://tinyurl.com/create.php and using regex to extract the url. There is a TinyURL api which just simply returns the url, without tons of html. No need for the regex. Simply change create.php to api-create.php. eg. ... read more »