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 Scotch On The Rock (SOTR) 2010 (London) with:

Elliott Sprehn

Member since Dec 11, 2008

Recent Blog Comments By Elliott Sprehn

  • Apparently ColdFusion Cannot Handle Chunked Multi-Part Form Data

    Posted on Sep 9, 2011 at 3:30 AM

    This is probably just JRun only supporting HTTP/1.0 or incorrectly supporting 1.1. Did you try on Tomcat instead? It's unlikely that CF has anything to do with this, the error comes up from the servlet engine.... read more »

  • Branching Logic vs. Guard Logic When It Comes To Function Control Flow

    Posted on Jun 23, 2011 at 11:20 PM

    @Drew I'd challenge you to show me real world examples where branching logic has any statistical difference. You're fighting the bare metal here. The assembly generated by the VM is going to be so fast that branching logic (CMP) and return (RET) likely have almost no impact at all. You might as we... read more »

  • Branching Logic vs. Guard Logic When It Comes To Function Control Flow

    Posted on Jun 23, 2011 at 11:12 PM

    For anyone not following on twitter... Drew's test has a bug and calls Math.random() twice in the early return. If you fix that you'll see both are nearly identical in performance. The test is really flawed either way since the slowness of Math.random() is drowning out any difference from the early... read more »

  • Branching Logic vs. Guard Logic When It Comes To Function Control Flow

    Posted on May 18, 2011 at 4:42 PM

    I really hate seeing functions where the entire body of the function is inside an if statement. I always write what you're calling guard logic here. It reduces the noise in the function and means there's less indentation. It's also better to structure your function in terms of lots if if statements... read more »

  • Seven Languages In Seven Weeks: Ruby - Day 2

    Posted on Nov 23, 2010 at 2:14 AM

    @Rick Most modern languages (ruby, python, php, tcl, ...) have interactive consoles. In fact Lisp had an interactive console back in the 60s. If anything, it's weird to see a language (like CF) that doesn't have one. @Ben To do it without a variable outside the block just invert your thinking and... read more »

  • ColdFusion Ordered ArgumentCollection Behavior Depends On ColdFusion Version And Invocation Context

    Posted on Nov 4, 2010 at 9:18 PM

    @Aaron That does appear to be a bug in CF9. If there's not enough named arguments to map the positional args to it just iterates the structure assigning them to arguments which is broken since there's no order to a structure. <cfscript> function test() { return arguments; } args = {"1&q... read more »

  • ColdFusion Ordered ArgumentCollection Behavior Depends On ColdFusion Version And Invocation Context

    Posted on Nov 4, 2010 at 1:59 AM

    @Ben There's some confusion in your premise that the mapping has to do with the "order" of the struct assignments. It has to do with the names. args["2"] = 10; args["1"] = 5; test(argumentCollection=args); // same as test(5, 10); This is the reason your boy1 and boy2... read more »

  • ColdFusion Ordered ArgumentCollection Behavior Depends On ColdFusion Version And Invocation Context

    Posted on Nov 4, 2010 at 1:54 AM

    Adam is unfortunately wrong that this is a bug. CF 8.0.1 intentionally added this behavior to cfinvoke to allow name="{number}" or argumentCollection on cfinvoke to use numbered keys so that frameworks could invoke methods without needing to know the name of the arguments. It was a really ... read more »

  • Exploring Javascript's parseInt() And parseFloat() Functions

    Posted on Sep 20, 2010 at 12:08 AM

    @Ben The best way is to use (value-0) instead of parseInt. parseInt() is almost always the wrong tool for the job. The only use cases I can think of that makes sense is when you want to parse a string with the unit attached or a number not in base 10 (which is very rare). parseInt("22km",10) // t... read more »

  • Building A Twitter-Inspired RESTful API Architecture In ColdFusion

    Posted on Aug 19, 2010 at 10:45 PM

    The Accelerate framework which powers the CFUnited websites and lots of the internal apps supports this. ex. http://cfunited.com/2010/topics.json http://cfunited.com/2010/topics.xml http://cfunited.com/2010/speakers/902.json... read more »

  • From Windows To Mac - A Roller-Coaster Of Emotions

    Posted on Aug 11, 2010 at 9:30 PM

    @Ben Definitely don't install anything in /etc! The hidden folders are hidden to prevent casual users from messing up the system. The same is true on Windows installs by default. If you go into the /Windows folder it'll tell you the system files are hidden to protect you and not to reveal them unle... read more »

  • Named Arguments In ColdFusion Depend On The Argument Collection, Not The CFArgument Tags

    Posted on Aug 11, 2010 at 8:46 PM

    @Ben You couldn't pass positional arguments with argumentCollection or cfinvokeargument name="1" (etc.) before 8.0.1. That's the reason ColdSpring and many other frameworks looked at the metadata of functions to get the argument names to use cfinvoke. The only reason not to use this feature is if ... read more »

  • Bug With ARGUMENTS Scope And Implicit Array / Struct Creation

    Posted on Jul 26, 2010 at 6:16 PM

    Sigh, I spoke too soon. http://cfbugs.adobe.com/cfbugreport/flexbugui/cfbugtracker/main.html#bugId=83671 Implicit structs and arrays are still broken in all kinds of fun ways. I really wish I knew why Adobe couldn't get this right. Please vote. :/... read more »

  • Bug With ARGUMENTS Scope And Implicit Array / Struct Creation

    Posted on Jul 25, 2010 at 9:24 PM

    @Ben Have you tested in 9.0.1? They fixed tons of these bugs. I have a fairly complicated test suite for implicit structs and arrays that all passed in CF9.0.1... read more »

  • Javascript's IN Operator Does Not Work With Strings

    Posted on May 16, 2010 at 10:26 PM

    @Ben NS4 = Netscape 4. The birthplace of modern javascript.... read more »

  • Force ColdFusion Server To Recompile A ColdFusion Template

    Posted on May 4, 2007 at 3:19 AM

    Trusted Cache is quite useful, and contrary to Max said enabling it doesn't mean you can't disable it later to upload a change or just clear the template cache and leave it on. For instance it can give you a pretty substantial speed boost for complicated execution paths or framework heavy code like... read more »

  • Ask Ben: Limit File Upload Size In ColdFusion

    Posted on May 4, 2007 at 2:29 AM

    Unfortunately flash forms aren't really accessible, have poor fallback, and can be a real PITA for users. A great solution to providing a better user experience, in terms of file uploading, that I've found is SWFUpload. http://swfupload.mammon.se/ Works really nicely. Falls back to a regular file... read more »

  • Checking To See If CFFlush Has Already Been Executed

    Posted on May 1, 2007 at 4:00 PM

    Throwing an exception as regular program flow is far from best practice and can also be quite expensive in some situations. This method also has the unintended side effect that checking if the buffer has been flushed resets the response code to 200 which may be undesirable if a different part of the... read more »

  • Spacious Formatting For Inline ColdFusion Variable Evaluation

    Posted on May 1, 2007 at 5:03 AM

    Yeah it works, for the same reason you can do that kind of thing inside a <cfset> statement. ColdFusion defines the cfset statement as: <cfset ((Identifier|String) =)? expression> Where the left hand side of the statement is optional, and the right hand side is an expression that eval... read more »