Ben Nadel
On User Experience (UX) Design, JavaScript, ColdFusion, Node.js, Life, and Love.
Ben Nadel at the jQuery Conference 2010 (Boston, MA) with: Karl Swedberg
Ben Nadel at the jQuery Conference 2010 (Boston, MA) with: Karl Swedberg@kswedberg )

Recent Blog Posts by Ben Nadel

Using CSS Overscroll-Behavior To Prevent Scrolling Of Parent Containers From Within Overflow Containers

In the past, I've looked at how the scroll-wheel seems to randomly stop working in an overflow container . This phenomena is related to a browser feature called scroll chaining ; and, it can be overcome if you prevent the wheel event's default behavior . Of course, tapping into the wheel and... read more »


Using An Immediately Invoked Function Expression (IIFE) And CachedWithin To Easily Cache Steps In A Procedural Script In Lucee 5.3.2.77

As I've demonstrated before, the cachedWithin function memoization feature can be applied to Closures in Lucee 5.3.2.77. I've also demonstrated that Immediately Invoked Function Expressions (IIFE) work In Lucee . These two features can be combined to easily cache steps in a procedural script w... read more »


Discriminated Unions Don't Seem To Work In Angular 9.0.0-next.5 When fullTemplateTypeCheck Is Enabled

As part of the latest version of Angular 9.0.0-next.5 and its CLI (Command-Line Interface), the tsconfig.json file now contains a compile option called, fullTemplateTypeCheck . This feature uses TypeScript to validate the Angular expression bindings in your component templates. And, from what I ... read more »


Creating An Incrementing Input Directive Inspired By Chrome Dev Tools In Angular 9.0.0-next.5

The Chrome Dev Tools are amazing. Fact! One of the features that makes the Chrome Dev Tools so enjoyable is that you can increment and decrement embedded values - like 7px - using the Up/Down Arrows on your keyboard. This keyboard-based incrementation is also a common feature of design tools li... read more »


Locating LaunchDarkly Feature Flag References In Your Application Code In Lucee 5.3.2.77

At InVision , we've been using - and loving - LaunchDarkly feature flags for the last 3-years. Feature flags have completely changed the way that we approach application development. But, it's not all roses and unicorns. Feature flags also introduce a new type of technical debt which, left unc... read more »


Anchor Tags Can Contain Block-Level Elements As Of HTML5

The world of web development moves quickly; and, it is often be hard for me to keep my mental model in alignment with the current trends and standards. Today, I learned that one of my internal rules was critically out of date . As of HTML5 - which was released years ago - it is OK to wrap block-... read more »


Calculating Various Time-Deltas Between Two Dates In Angular 9.0.0-next.4

At work, I write a lot of Root Cause Analysis (RCA) documents (see Incident Commander ). And, at the very top of each RCA document, I have to include the duration of the Incident in terms of hours and minutes. This means that I have to take two Date/Time-stamps - Start and End - and perform math... read more »


Considering Index Design And Database Uniqueness Constraints With Soft-Deletes In MySQL 5.6.37

As I mentioned in an earlier post about index design with a nullable DateTime column , I'm building a small scheduling app at work using MySql 5.6.37. The requirements for this scheduling app have been "unfolding" (aka, scope creep) as the project has continued. And, one of the newly-r... read more »


Trying To Find My Preferred Format For Method Annotations In Lucee 5.3.2.77

One of the many differences between Adobe ColdFusion (ACF) and Lucee CFML is that Lucee won't alter the runtime behavior of the ColdFusion code based on JavaDoc-style annotations. As such, for method annotations to be applied, they have to be in the actual method declaration following the argumen... read more »


REST And GraphQL Are Not Your Only Choices When Building An HTTP API

I don't believe that the web development community is having an honest discussion about GraphQL. This is because, GraphQL is almost exclusively presented as an alternative to REST (Representational State Transfer). And, while GraphQL may remove points-of-friction found in REST, the dishonesty is ... read more »


Solutions Don't Have To Work For Everyone

I used to believe that when I added a new feature to a web application, said feature had to help all users . But, as I've grown older - and I've had to operate under greater constraints at work - I've come to embrace the idea that solutions don't have to work for everyone . A solution that adds... read more »


Shape Up: Stop Running In Circles And Ship Work That Matters By Ryan Singer

I've been a long-time fan of the good people over at Basecamp (formerly 37 Signals). Their books, like It Doesn't Have To Be Crazy At Work , have a knack for cutting through industry mythology; and, their designs are clear and effective. I've even fantasized about pulling some of their user exper... read more »


Calculating A Consistent Cache-Friendly Expiration Date For Signed-URLs In Lucee 5.3.2.77

Yesterday, I shared the results of a performance experiment in which I started caching cryptographically signed-URLs in Redis using Lucee 5.3.2.77 . The signed-URLs in the experiment where for a CDN (Content Delivery Network) that pulled-through from Amazon S3. And, after posting yesterday, I wasn... read more »


Performance Case Study: Caching Cryptographically Signed-URLs In Redis In Lucee 5.2.9.40

A month ago, I shared the results of my attempt to improve request performance with parallel data-access in Lucee 5.2.9.40 . The main take-away from that experiment was that parallelization is not a silver bullet for data-access. Especially when the cost of spawning asynchronous threads in Lucee... read more »


The Magic Of Thinking Small: Embracing Limitations As A Strength

I work on a very small team. It's me and three other full-stack developers. And while we are a cohesive unit, the four of us tend to work on completely separate initiatives. In some ways, the size of our team is very limiting. But, this limitation has also proven to be a tremendous benefit as it p... read more »


Upgrading A Built-In Function To A First-Class Citizen In Lucee 5.3.2.77

For as long as I can remember, ColdFusion has supported the idea of User Defined Functions (UDFs) as First-Class Citizens. Meaning, User Defined Functions can be referenced and passed-around just like any other object in the ColdFusion landscape. The same, however, has never been true of Built-In F... read more »


Installing User Defined Functions (UDF) As An Extension For Built-In Functions (BIF) In Lucee 5.3.2.77

With Adobe ColdFusion, I've always had a fascination with the idea of being able to extend the set of native (or built-in) Functions that are available in the request context. A decade ago , I played around with hacking User Defined Functions (UDFs) into the "hidden scope" of the PageCo... read more »


Playing With The Zip Virtual File System (VFS) In Lucee 5.3.2.77

The other day, I was talking to fellow InVisioneer, Shawn Grigson , about how weirdly excited I am that Lucee has compress() and extract() functions. I don't know why; but, I just love how easy it is to create and consume Zip archive files. In response, Shawn reminded me that Lucee also supp... read more »


Unexpected Variable Assignment Using Function LocalMode Modern With Nested Closures In Lucee 5.3.2.77

Last week, I took a look at how the Function localmode feature in Lucee makes it safer to dynamically render CFML templates . In response to that post, John Pansewicz told me that he ran into an issue using localmode with nested Functions (for which he filed a ticket ). It's one of those si... read more »


Using Function LocalMode To Render Templates During Static Site Generation In Lucee 5.3.2.77

The other day, I took a look at using the Function localmode to more-safely render templates in Lucee . The reason that localmode makes rendering templates more safe is that any unscoped variable assignment , performed during the CFML template evaluation, is applied to the local scope , no... read more »


Using Function LocalMode Modern To More-Safely Render ColdFusion Templates In Lucee 5.3.2.77

Historically, when you set an unscoped, non- var 'ed variable inside a ColdFusion Function, the variable is applied to the variables scope (except for when that assignment is inside a CFThread tag ). In Lucee CFML, however, we can use the Function directive - localmode - to change this behav... read more »


Fixing ImageScaleToFit() Invalid Size Errors In Earlier Versions Of Lucee CFML

In earlier releases of Lucee CFML, calling the imageScaleToFit() function on an oblong image can result in a Java error, invalid size for image . This does not appear to affect the latest release of Lucee CFML (5.3.2.77); however, since people - like myself - may be running on earlier releases o... read more »


CachedWithin Function Memoization Can Be Applied To Closures In Lucee 5.3.2.77

Over the past couple of weeks, I've written a few posts about the cachedWithin Function memoization feature in Lucee 5.3.2.77. I've looked at how it compares complex inputs by value ; and, at how it returns complex outputs by value . But, all of my explorations to date have been on a "pr... read more »


Using Hmac() And An Ordered Struct To Implement A Secure Email Tracking Pixel In Lucee 5.3.2.77

Last week, I looked at using ordered, or linked, structs in Lucee 5.3.2.77 . An ordered struct is one in which the keys will be iterated-over in a consistent, predictable manner. This predictable iteration is perfect for things like creating BSON documents in a MongoDB query . It's also perfect f... read more »


Function Results Are Returned By Value When Using CachedWithin In Lucee 5.3.2.77

A couple of weeks ago, I demonstrated that cachedWithin Function memoization compares arguments by value in Lucee 5.3.2.77. This behavior even includes complex objects like Arrays, Structs, and ColdFusion Components. Upon further testing, it also seems that the return value of a cachedWithin... read more »


CFCatch Can Target Explicit Java Exception Types Even With JavaLoader In Lucee 5.3.2.77

If you've been in the ColdFusion world for a while, there's a good chance that you've come across Mark Mandel's JavaLoader project. The JavaLoader project wraps a URLClassLoader , making it easy to load external Java Classes right from a set of JAR file-paths. However, there's been one long-st... read more »


Using The Safe-Navigation Operator To Safely Clean Up Resources In Lucee 5.3.2.77

I know that the "safe navigation" operator has existed in more recent releases of ColdFusion; however, coming from Adobe ColdFusion 10, I haven't been able to use the operator until my team recently switched to using Lucee CFML. As such, I haven't had time to develop consistent patterns a... read more »


Sanity Checking Closure Invocation Overhead And Performance In Lucee 5.3.2.77

PERFORMANCE CAVEAT: As with all micro load-testing scenarios, the results should be taken with caution. Testing in a local development environment, that is not under production load, is never a perfect representation of real-world performance. One of my favorite use-cases for the Closure cons... read more »


Ordered Structs Are Perfect For Creating MongoDB BSON Documents In Lucee 5.3.2.77

Yesterday, I took a look at using ordered, or linked, structs in Lucee 5.3.2.77 . These are Structs in which the order of the iteration of the keys matches the order of the insertion of the keys. Internally to ColdFusion, having a predictable Struct iteration order is almost always unnecessary; bu... read more »


Exploring Linked / Ordered Structs In Lucee 5.3.2.77

The Struct data-type in ColdFusion is an "unordered" collection of key-value pairs. Anecdotally, if you iterate over the keys in a Struct, they are returned in alphabetical order. However, this ordering is not guaranteed; and, you should not depend upon this ordering in your logic. That s... read more »