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 cf.Objective() 2013 (Bloomington, MN) with:

Elliott Sprehn

Member since Dec 11, 2008

Recent Blog Comments By Elliott Sprehn

  • Bug With ARGUMENTS Scope And Implicit Array / Struct Creation

    Posted on Aug 1, 2010 at 12:29 AM

    @Tom I submitted a bug because they broke implicit structs and arrays in named arguments in 9.0.1, specifically with accessing local variables (of which the arguments scope is one). I got a confirmation that they fixed it but it also vanished from the bug tracker. Hopefully we'll get a hotfix soon.... read more »

  • Javascript's IN Operator Does Not Work With Strings

    Posted on May 11, 2010 at 4:39 PM

    The next iteration of JS is supposed to finally get rid of the string primitive problem. Martin is right that the problem is that "in" is an operator and not a method. "foo" in new String("bar") does work for that reason. I'm pretty sure all this nonsense came about for performance reasons back in... read more »

  • Faking Prototypal Inheritance In ColdFusion Components

    Posted on Mar 24, 2010 at 1:02 AM

    Prototypal Inheritance is something I talk about in my "I bet you didn't know you could do that with ColdFusion" presentation, which I'm giving doing an updated version of at CFUnited 2010. It has some neat uses, particularly in reducing the amount of work per object creation in a large scale applic... read more »

  • Exploring ColdFusion Component Runtime Class Properties And Serialization

    Posted on Mar 18, 2010 at 5:35 PM

    Saving private properties is necessary so that you can "reconstitute" an object on the other side of the wire, or load up a serialized object you saved to disk. If it didn't save the private state of the object you'd lose that information and possibly end up with an object in an unusable state on t... read more »

  • Executing A Recursive CFThread In ColdFusion 9

    Posted on Feb 24, 2010 at 1:35 PM

    This the coolest use of getFunctionCalledName() I've seen. There was some initial feedback on the prerelease like "what would you ever use that for!" and no one even dreamed of anything like this.... read more »

  • Making Sure Your ColdFusion Applications Are Uniquely Named

    Posted on Feb 10, 2010 at 6:32 AM

    I've seen this approach taken before, but it's messy with a lot of things. Saying you don't have to read the name is not true. For instance cflog writes the application name in the log file. As you somewhat mentioned CF also uses the application name to create the the full (server side) session Id... read more »

  • ColdFusion GetPageContext() Massive Exploration

    Posted on Feb 9, 2010 at 4:13 PM

    @Sean You don't need to use GetPageContext().getFusionContext().getPagePath(), just use GetCurrentTemplatePath() instead (which really just calls getPagePath() anyway). As for the methodCalledName private property, use GetFunctionCalledName() which was added in CF9. The methodCalledName property w... read more »

  • Using Logical Operators To Perform Ternary Operations In Javascript

    Posted on Nov 19, 2009 at 1:35 PM

    @Ben Hah! You should start a CF obfuscation contest.... read more »

  • Using Logical Operators To Perform Ternary Operations In Javascript

    Posted on Nov 19, 2009 at 11:38 AM

    In excess it certainly reduces readability, but the idea that the operators return a value is pretty foundational to some languages. For instance, ruby doesn't have a ternary operator, instead you use the logical operators. An example from a recent project was: # username is the first command lin... read more »

  • Getting IFRAME Window (And Then Document) References With contentWindow

    Posted on Jun 10, 2009 at 4:56 PM

    @Muhammad You can only interact with the document of an iframe if the document it loaded is on the same domain. So it would depend on what you meant by "other websites".... read more »

  • Getting IFRAME Window (And Then Document) References With contentWindow

    Posted on May 22, 2009 at 2:43 PM

    @Ben http://scheduler.cfunited.com/js/scheduler.js If you search for "getIFrameDocument" that's what I used. It works in basically every browser, new and old. :)... read more »

  • ColdFusion 8 Per-Application Settings Get Partially Cached (And There's Nothing You Can Do About It)

    Posted on May 6, 2009 at 8:11 PM

    @Ben This bit us recently with the mappings and how part of our platform worked. All of our applications live in the same CF application and each has a section of the application scope. I had it defining an auto mapping for the root of each sub-application (which is outside the webroot) at the sta... read more »

  • Using Super Constructors Is Critical In Prototypal Inheritance In Javascript

    Posted on Apr 17, 2009 at 11:58 AM

    @RickO Who is multithreading JavaScript? To my knowledge all browsers single thread JS execution. I've not seen anything about adding support for threading constructs.... read more »

  • Testing For ColdFusion Component Interface Support

    Posted on Apr 16, 2009 at 4:07 PM

    @John Ack! If you want to go that route just use IDL. component extends Super { public function method( string arg1="default", optional numeric arg2 ); } There's nothing in there that isn't plain text for another developer. Notation that uses *, -, +, ~, # and what is horrendously cryptic, es... read more »

  • Quick Thought On OOP Data Validation And Why Redundancy Is OK

    Posted on Apr 5, 2009 at 6:01 PM

    @Ben The problem with throwing errors like that is that you can't generically catch them. Account.Init.Number.InvalidArgument With this you can cfcatch Account errors, or Account.Init errors, or even Account.Init.Number errors, but you can't catch InvalidArgument errors generically. CF can catch... read more »

  • Ask Ben: Finding XML Nodes That Have Children With The Given Case-Insensitive Phrase

    Posted on Feb 12, 2009 at 1:18 PM

    It's not about them implementing anything. XPath 1 just doesn't have those functions, the XPath engine they use (Xalan) is XPath 1 compliant. They'd need to use an XPath 2 compatible library instead, and that means switching to Saxon because that's the only implementation in Java unfortunately. Pe... read more »

  • Ask Ben: Checking Domain Name Availability Using ColdFusion

    Posted on Nov 25, 2008 at 8:18 PM

    @Stork Provided you query for the A record contents then no, it will never change. If you have access to a *nix machine try "dig google.com" and what you'll get back is the DNS master file records. That's the actual DNS format that will never change until they replace DNS with something better. :... read more »

  • Ask Ben: Limiting The Number Of Simultaneous Users For A Given IP Address

    Posted on Nov 21, 2008 at 12:57 PM

    This is trivial to fix with an onError() handler. When you cfabort or cflocation CF throws a coldfusion.runtime.AbortException which you could trap in the Application.cfc#onError() and decrement the counter. That aside, limiting connections based on IP address is a horrible horrible idea unless thi... read more »

  • Comprehensive ColdFusion Component OnMissingMethod() Testing

    Posted on Nov 20, 2008 at 1:38 AM

    The reason for this is actually very simple. I'm pretty sure I've posted about this a number of times... CFCs are just proxied pages. CreateObject() returns a TemplateProxy that wraps the CFPage that is your actual code. When you call a method inside a CFC without qualifying it with this, such as ... read more »

  • Ask Ben: Limit File Upload Size In ColdFusion

    Posted on Nov 12, 2008 at 1:21 PM

    @Adrian That won't work because of the possible race condition. Right after the fileExists() and before the delete the file could vanish, and then the operation would still fail.... read more »