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 the New York ColdFusion User Group (Mar. 2009) with:

Christoph Schmitz

Member since Dec 11, 2008

Recent Blog Comments By Christoph Schmitz

  • Getting Contact, Photos, And Social Media Information Using FullContact.com And An Email Address

    Posted on Oct 18, 2011 at 9:28 AM

    It always amazes me how little people care about when or where they reveal their data. FullContact seems to be able to relate your Youtube account to your Twitter account to your bio to your demographics. That is more that just a little scary to me... @Ben, in your dump your usernames for the diffe... read more »

  • Performance Of LEFT OUTER JOIN Insert vs. INNER JOIN Delete Statement

    Posted on Aug 20, 2011 at 5:47 AM

    @Ben, @David, NOT IN has always been known to be a performance killer. One of the slowest operations in SQL. NOT EXISTS on the other hand can take full advantage of the indices that exist and usually is much faster than NOT IN or LEFT OUTER JOIN. If we are talking about many records, this differe... read more »

  • Getting @@RowCount After SQL INSERT INTO Statement

    Posted on Jul 27, 2009 at 7:34 AM

    @Scott that can not work. The SQL statement is not processed by CF, but, by the database. CF can only reference what the database sends back. Local variables are only sent back if you use a corresponding return statement. Classic case for a stored proc with IN and OUT variables. ;-) Cheers Chris... read more »

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

    Posted on Jul 1, 2009 at 3:25 AM

    @Jody I respectfully disagree. While it may be more convenient to have '000-000-0000' instead of a NULL, it's neither good nor correct. NULL marks the absence of a value, so, if a user doen't provide a value, NULL is what to store in the database. '000-000-0000' on the other hand is a value, it ge... read more »

  • Project HUGE: My First Leg Workout After Active Release Technique (ART)

    Posted on Jan 20, 2009 at 4:31 AM

    Congrats on getting back into the workout, Ben. In general, how is your month of health developing. I bet I'm not the only one curious about your changes, achievements, etc. Oh, and about the squats, I just recently read that squats are not as bad for your knees as people tend to think. If done wi... read more »

  • Project HUGE: The Imaginary Fear Of Scheduling Mundane Tasks Such As Nutritional Intake

    Posted on Dec 29, 2008 at 10:03 AM

    Ben, I would be interested in what supplements you are or will be taking and what falls in the category of "nutrients". ;-) Chris... read more »

  • Project HUGE: My Recent Experience With Light Cardio Fitness

    Posted on Dec 29, 2008 at 5:58 AM

    @Ben, why don't you do cardio at the gym? Lately, I have been trying to alternate cardio and weight training. Once you get in the habbit, it's not that hard. And, it works. Plus, at the gym they have a couple of things that make the treadmill a lot less boring. You know, like TVs, pretty women,... read more »

  • Ben Nadel's Easy Tips For Writing Better, More Optimized SQL

    Posted on Mar 28, 2008 at 6:19 AM

    Never use SELECT * should actually read 'Never use SELECT * unless in an EXISTS Clause'. It is OK to write SELECT ID, name FROM tblA a WHERE EXISTS ( SELECT * FROM tblB WHERE fkField=a.field ) According to Joe Celko, this makes the query optimizer choose the best index and will result in b... read more »

  • Incoming Tabular Data Stream Remote Procedure Call Is Incorrect

    Posted on Jan 4, 2008 at 5:17 AM

    @Ben, IN and especially NOT IN come with pretty big performance penalties... the longer the list the bigger the performance loss. Unless there is a reason why you MUST use it, I'd recommend changing your query to e.g. NOT EXISTS. That can speed up query execution time considerably. I've seen impr... read more »

  • Getting @@RowCount After SQL INSERT INTO Statement

    Posted on Nov 28, 2007 at 4:45 PM

    Hey Ben, great post! You are talking about MS SQL Server, correct? For MSSQL, I have two additions... you can select @@rowcount with physical tables as well, if you use cfquery's result attribute: <!--- use the result attribute for cfquery ---> <cfquery name="qry" datasource="#myDSN" resu... read more »

  • SQL Optimization Case Study - JOIN Clause vs. IN Clause

    Posted on Sep 5, 2007 at 8:39 AM

    @Ben, yes, EXISTS can reference values from the outer select. Look at the condition of the subquery from my example: WHERE userID=r.userID Here r is an alias for the table from the outer select. The subquery only selects those records that have a corresponding userID in the outer select. Thos... read more »

  • SQL Optimization Case Study - JOIN Clause vs. IN Clause

    Posted on Sep 5, 2007 at 4:50 AM

    Hi Ben, you might want to check the EXISTS clause, too. E.g. SELECT requestID, request_title FROM Request r WHERE EXISTS ( SELECT * FROM User WHERE userID=r.userID ) Given proper indexes, EXISTS is much faster than IN. And, considering that NOT IN is even slower than IN, NOT EXISTS ca... read more »

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

    Posted on Aug 17, 2007 at 3:25 AM

    Hi AJ, that problem arises from putting blank values where a NULL should have been... you must check against both options: <CFQUERY Name="GetCompanyName" datasource="DS123"> SELECT CompanyName, date_approved FROM CompanyProfile WHERE CompanyID = #VAL(CompanyID)# and date_approved is not null... read more »

  • Need Help Making A Viable ExpandServerPath() ColdFusion UDF

    Posted on Jul 4, 2007 at 3:32 AM

    Ben, I'm not sure I understand your desired function completely... you want the full path to any file where you give the relative path to the calling template? Well, that's exactly what ExpandPath() does... ExpandPath( "./data/2007_07_02.dat" ) will give you the full path, so what's the difference... read more »

  • Did You Know That "000" Equals "00A" In ColdFusion?

    Posted on Apr 10, 2007 at 2:27 PM

    @Justin, CFML supports the CONTAINS operator: <cfif variable CONTAINS 'AE'> Just keep in mind that this operator is case insensitive, like all basic decision operators in CFML. For more information, take a look at the docs: http://livedocs.adobe.com/coldfusion/7/htmldocs/wwhelp/wwhimpl/co... read more »

  • Ask Ben: Limiting The Amount Of Time A Block Of Code Can Run

    Posted on Apr 2, 2007 at 9:37 AM

    Ben, no offense man, but, you got cflock wrong somehow... The timeout attribute of cflock specifies the time a request will wait until it aquires a lock, it does NOT specify the time a request within the lock may run. You can have a cflock-timeout of 1 second and still have the request run 100s of... read more »

  • Strange Numericly Named CFInvokeArgument Behavior

    Posted on Mar 30, 2007 at 7:54 AM

    @Ben, Ahhh... I see. Couldn't you simply use an array, conditionally append element, and then pass that array to the function? Or, if you need single arguments within your function, could you use a struct with numeric keys and pass that struct in as argumentcollection? Chris... read more »

  • Strange Numericly Named CFInvokeArgument Behavior

    Posted on Mar 30, 2007 at 4:10 AM

    Hi, actually you can pass argument names that are not syntactically valid variable names. <cfinvokeargument name="another girl" value="Kim" /> will work as expected. And it should, too, because all strings can be keys of a struct. myVar['some invalid var name'] is a syntactically correct wa... read more »

  • A Better CFParam Tag With A Catch Attribute (Proof Of Concept)

    Posted on Mar 23, 2007 at 8:16 AM

    Ben, I don't know if one could say "using it wrong". Come to think of it, I use <cfparam> on form pages only, when I want to prefill a form control: <cfparam name="form.foo" default=""/> <form> <input type="text" name="foo" value="#form.foo#"/> </form> My apps are... read more »

  • A Better CFParam Tag With A Catch Attribute (Proof Of Concept)

    Posted on Mar 23, 2007 at 7:05 AM

    Fred, I wasn't aware that IsDefined() behaved like that, thanks for pointing that out! I got curious and just for the fun of it wrote a small test to compare the two functions. I found that when searching the variables scope, IsDefined() is usually faster, when searching other scopes, StructKeyExi... read more »