Ben Nadel
On User Experience (UX) Design, JavaScript, ColdFusion, Node.js, Life, and Love.
Ben Nadel at the NYC Tech Talk Meetup (Aug. 2010) with: Mike Lewis
Ben Nadel at the NYC Tech Talk Meetup (Aug. 2010) with: Mike Lewis@mLewisLogic )

Recent Blog Posts by Ben Nadel

How I Take A "Mental Health Day" At Work

On a recent episode of the JS Party podcast , Suz Hinton , Feross Aboukhadijeh , and Emma Wedekind had an open and honest conversation about workplace burn-out. The workplace is an interesting beast. Sometimes, it can grind me down to a soulless nub ; and, other times, the workplace is so exh... read more »

The CFQueryParam Tag Does Not Require The "CF_SQL_" Prefix On SQL Types In Lucee

This is primarily a note to self ; but, one nice thing about moving from Adobe ColdFusion 10 to Lucee CFML is that I can start to omit the cf_sql_ prefix in my cfqueryparam tags. So, instead of using something like cf_sql_longvarchar , I can just use longvarchar . I never understood... read more »

Possible Bug: Variable Assignment Gets Swallowed By Function Invocation In Lucee

UPDATE : On Twitter, John Pansewicz pointed out why this doesn't work. And, boy do I feel foolish . This "assignment" syntax that I'm trying to use in the context of a Function call is actually the named parameters invocation of that Function. So, I'm not assigning the variable, I'm i... read more »

Immediately Invoked Function Expressions (IIFE) Work In Lucee

Yesterday, at the end of day, I tweeted about something exciting that I had found in Lucee . It was the fact that the Immediately Invoked Function Expression construct - or IIFE (pronounced "iffy") - is supported in Lucee More than anything, this is just a demonstration of h... read more »

CFThread Attributes Are Passed By Reference - Not By Deep Copy - In Lucee

When Adobe ColdFusion first introduced the cfthread tag, a lot of us stumbled over the fact that attributes are passed by deep-copy into the cfthread body . This was done by design in order to help prevent developers from having to worry about accessing and mutating shared state . Which, to b... read more »

Deeply Nested CFThread Tags Are Permitted In Lucee

When Adobe ColdFusion introduced the CFThread tag for asynchronous processing, they decided to prevent developers from nested it. That is, they explicitly prevent one CFThread tag from spawning a child CFThread tag . The rationale (as best I can remember) being that a developer could acciden... read more »

The CFQuery Tag Supports Silent Asynchronous Query Execution In Lucee

As I've been digging through the Lucee CFML documentation, one feature that I came across was the ability to execute SQL queries asynchronously with the async attribute of the cfquery tag (and the corresponding queryExecute() function). The Lucee documentation doesn't really tell you... read more »

I Can Finally Embed An Assignment Operation Inside Of Other Expressions In Lucee

CAUTION : This feature is actually buggy in Lucee. It works within the the return context of this post; but, it seems to break everywhere else. See Comments section below for more information. Having recently switched from Adobe ColdFusion 10 to Lucee CFML 5.2, I've been digging through al... read more »

The CachedWithin Function Memoization Feature Appears To Compare Complex Objects By Value In Lucee

Earlier today, I demonstrated that the cachedWithin Function memoization feature caches the output buffer in Lucee 5.3 . While this was an unexpected behavior, I think it makes perfect sense. And, as a quick follow-up post, I wanted to share yet another cachedWithin behavior that wasn't immedi... read more »

Caching Function Outcomes With CachedWithin Caches Both The Return Value And The Output Buffer In Lucee

One of the cool features of the Lucee CFML engine is that you can have it memoize the outcome of a Function if you define a cachedWithin directive in the Function's meta-data. The cachedWithin directive caches the outcome of the Function; and then, if the Function is invoked again with the same... read more »

Returning CFQuery / Query Results As Arrays In Lucee

Anyone who has used ColdFusion is very familiar with the Query object that is returned from the cfquery tag. But, if you are using Lucee 5+, the cfquery tag has a fun little efficiency built into it: the returnType attribute. The returnType attribute accepts the values, query (the defau... read more »

Using The String localeCompare() Method To Implement A Natural Sort In Angular 8.2.0-next.0

The other day, while exploring the Fat-Arrow function support in Lucee 5.3 , I used the compare() function to implement a .sort() operation. I had never used ColdFusion's compare() function in this capacity before; and, it seemed like such a natural fit (based on its return-values) that I wa... read more »

A Good Samaritan Law For Engineers At A Software As A Service (SaaS) Company

Time and time again, when I read articles or listen to podcasts about companies that have industry-leading Customer Satisfaction ratings , it almost always turns out that the employees at said companies are granted special and explicit permission to cater to customer needs . A great example of th... read more »

Dynamically Loading Java Classes From JAR Files Using CreateObject() In Lucee

Yesterday, I took a look at parsing HTML natively in Lucee 5.3 using the htmlParse() function . The htmlParse() function returns an XML document, which isn't the easiest data-format to work with. But, for small, predictable inputs, using htmlParse() and some XPath is an attractive option. Fo... read more »

Parsing HTML Natively With htmlParse() In Lucee

Parsing HTML isn't a task that I often have to perform during the "normal operation" of a ColdFusion application. However, parsing HTML can be a helpful feature when it comes to data migration. For example, when migrating from an old, HTML-based content management system (CMS) to a Markdo... read more »

Wrapping Immutable Arrays In Mutable Arrays For Easier Processing In Angular 8.2.0-next.0

The other day, in my post about fat-arrow and lambda expression support in Lucee , I wrapped one Array inside another Array so that I could more easily sort the original Array using a "natural sort". This pattern, of wrapping one Array inside another one for local manipu... read more »

Fat-Arrow Functions And Lambda Expressions Are Supported In Lucee

Yesterday morning, I spent a few hours combing through the Lucee 5.3 documentation looking for features that would be worth digging into a bit further. And, one of the tasty little treats that I came across is the fact that Fat-Arrow Functions and Lambda Expressions are supported in Lucee's ver... read more »

Creating asyncAll(), asyncSettled(), And asyncRace() Functions Using runAsync() And Parallel Iteration In Lucee

The other day, I was delighted to discover that Lucee supports asynchronous iteration of collections , including "each", "map", and "filter" operations. Then, in the comments to that post, Charlie Arehart mentioned that Lucee also supports the runAsync()... read more »

Experimenting With The Developer Ergonomics Of Data Access Using Parallel Struct Iteration In Lucee

Last week, I discovered that Lucee 5 has the ability to iterate over data structures using parallel threads. This feature opens up the possibility of gathering data using asynchronous, parallel queries , something that is common place in the JavaScript / Node.js world but has never really been ea... read more »

Experimenting With Asynchronous Data Access Using Parallel Array Iteration In Lucee

At work, we recently migrated from Adobe ColdFusion 10 to Lucee CFML 5. With such a significant jump in ColdFusion engines, there are a lot of new features that I've yet to even experiment with. One of the features that I'm most excited about at the moment is the ability to iterate over arrays usin... read more »

Considering Index Design When Using A Nullable DateTime Column To Record A Scheduled Action

I had a lot of fun writing yesterday's post on creating a composite index using ancestral keys in a hierarchical database . Index design - and database schema design in general - is fascinating to me. I've been using relational databases for years and I'm still learning how to leverage them most e... read more »

Creating A Composite Index Using Ancestral Keys In A Hierarchical Database Table Design

For the most part, when designing database tables that exist in some sort of an hierarchical relationship, the "child" table will contain a key reference to the "parent" table. So, for example, a "list item" table would contain a listID that references its "cont... read more »

Use CSS Overflow "Auto" - Not Overflow "Scroll" - When Clipping Most Fixed-Size Containers

When the Apple iPhone came out in 2007, the default Safari Mobile browser didn't have scrollbars. Well, at least, not scrollbars that were visible all the time. Thin little scrollbars showed up when you started to scroll; but, for the most part, the Apple iPhone user interface (UI) was scrollbar-fr... read more »

Instrumenting ColdFusion And Lucee Code With New Relic's Java Agent

As I mentioned two weeks ago, I am currently in the process of migrating the explicit instrumentation of my ColdFusion JVMs using Datadog and DogStatsD over to the implicit Agent-based instrumentation of my JVMs using New Relic's Java Agent. The Java Agent covers a lot of ground right out of the ... read more »

Hello World With The CLI, AoT, Lazy Loading Routes, Differential Loading, And Ivy In Angular 8.1.0-beta.2

Up until now, all of my recent Angular demos have been built using a small Webpack configuration file that consumed the AngularCompilerPlugin() provided by @ngtools/webpack . But, with the introduction of Angular 8, there are features that don't fit neatly into my approach. Features like "d... read more »

The Hope Of Using JVM Metrics To Drive The Readiness Check In Kubernetes (K8) And ColdFusion

Earlier this week, I looked at how you can measure JVM metrics like CPU load, garbage collection times, and thread state in ColdFusion . Normally, this kind of measurement is performed implicitly by Java agents like FusionReactor . But, in the world of Kubernetes (K8), I had hoped that such metri... read more »

Gathering CPU Load, Garbage Collection Time, Thread Dumps And Other JVM Metrics In ColdFusion

A few months ago, I looked at generating a Java thread dump programmatically using ColdFusion . I was doing that as part of an ongoing effort to find processing bottlenecks in the main ColdFusion application that we have at InVision . Along with those Thread Dumps, I've also been collecting a myr... read more »

Keeping Prepared Statements Consistent Even With Dynamic Parameterized Queries In MySQL And ColdFusion

Yesterday, in response to my post about [SQL queries and code duplication], Phill Nacelli demonstrated that you could keep the "shape" of a prepared statement consistent even with a dynamic set of query criteria. I had never seen this approach before and I found it completely fascinat... read more »

SQL Queries That Look The Same Are Not Violating The DRY Principle

A couple of months ago, I tried to list out several lessons that I wish I had learned much earlier in my web development career . One of the more important lessons in that list is the proper application of the DRY principle; otherwise known as the, "Don't Repeat Yourself", principle.... read more »

Romanticizing The Idea Of Old-Man Vengeance In A Fast-Paced Web Development World

I love a good underdog story. But, there's a particular type of underdog that holds a special place in my heart. Let's call it the " old-man vengeance " context. In this kind of story an over-the-hill character is thrust into a harrowing situation and must use his or her wisdom, experien... read more »