Skip to main content
Ben Nadel
On User Experience (UX) Design, JavaScript, ColdFusion, Node.js, Life, and Love.

Recent Blog Posts by Ben Nadel

The Double-Bang (!!) Operator And A Misunderstanding Of How JavaScript Handles Truthy / Falsy Values

Strictly speaking, there is no "double-bang" operator (or the "double-not" operator) in JavaScript; the ( !! ) notation is really just two "Not Operators" in a row. In languages, like JavaScript, that support Truthy / Falsy values, the double-bang operator can be used... read more »


Applying CSS Flexbox To Pseudo-Elements

The other day, I was listening to Episode 14 of the CSS Podcast: Pseudo Elements , hosted by Una Kravets and Adam Argyle , when Adam said something quite thought-provoking: he mentioned that you can apply CSS Flexbox to pseudo-elements in order to perfectly align icons. I didn't know if we was ... read more »


Using CFDocument To Save InVision Prototypes As Interactive PDFs In Lucee CFML 5.3.4.80

As I talked about in my post yesterday regarding "Dark Matter Designers" , I've been playing around with some more advanced ways to generate PDFs at InVision . One idea that I had recently was to try and save one of our interactive prototypes as an interactive PDF . Meaning, a PDF ... read more »


Are There "Dark Matter" Designers?

In the engineering world, people like Scott Hanselman , Ward Bell , and John Papa sometimes talk about a cohort of developers that they call, " Dark Matter Developers ". As Hanselmen described them 8-years ago, these dark matter developers: ... don't read a lot of blogs, they ne... read more »


Using CFDocument And CFPDF To Generate PDFs With Different-Sized Pages In Lucee CFML 5.3.6.61

When you use the CFDocument tag to generate a PDF in ColdFusion, you define the page-size on the root of the document. Which means, every page in the generated PDF uses the same size page. But, what if you wanted to generate a PDF in which each page (or related set of pages) needs a custom, conte... read more »


Using A Tracer Cookie To Watch For Browser Download-Prompts In Lucee CFML 5.3.6.61

Yesterday, I was working on some report-generation for InVision that used Content-Disposition: attachment in order to prompt the user to save the generated content. My current approach is just to initiate the download in a new tab, which the browser automatically closes once the report has been... read more »


Scope Traversal Behavior With Undefined Function Arguments In Lucee CFML 5.3.6.61

Just now, as I was looking at iterating over Structs using CFLoop in Lucee CFML , I ran into a fun little behavior of the ColdFusion language: Scope traversal will skip-over undefined function arguments and access like-named values in higher-up scopes. At first, this feels like a bug. But, I... read more »


Struct Iteration With CFLoop Exposes Both Key And Value In Lucee CFML 5.3.6.61

Back in February, when I was having lunch with Gert Franz , co-creator of Lucee CFML, we were commiserating on how amazing ColdFusion is. At that lunch, Gert told me about some of the great things that Lucee CFML offers, like its seamless support for ColdFusion Tags in CFScript . Another minor ... read more »


Proxying Amazon AWS S3 Pre-Signed-URL Uploads Using CFHTTP And Lucee CFML 5.3.6.61

At InVision , when a user goes to upload a screen for an interactive prototype, we have the browser upload the file directly to S3 using a pre-signed URL . We've been using this technique for years and it's worked perfectly well. However, we now have an Enterprise client whose network is blocking... read more »


Returning CFQuery / Query Results As Structs In Lucee 5.3.6.61

A few months ago, I looked at returning CFQuery results as an Array in Lucee CFML ; and, in the comments of that post, Gert Franz pointed out that Lucee could also return CFQuery results as a Struct in which a given column would be used as the look-up key in said Struct. Mapping a query ... read more »


Every Line Of Code That You Write Is An Explicit Decision To Make The Application Better Or Worse

CAUTION: This post is a very soap-boxy. The other day, I was watching the new Hannah Gadsby comedy special (which is great, by the way), when something she said about Art got me thinking about Programming. She was pointing out that every aspect of a painting reflected an explicit decis... read more »


Using UPDATE + ORDER BY + LIMIT To Drive Multi-Worker Migrations In Lucee CFML 5.3.6.61

Earlier this week, I took a look at using ORDER BY and LIMIT clauses within an UPDATE statement in MySQL 5.6.37 in order to limit the scope of the data-mutation. In that post, I said that such a technique can be used to drive a multi-worker / multi-threaded migration in which each worker &q... read more »


You Can Use ORDER BY And LIMIT Within UPDATE And DELETE Statements In MySQL 5.6.37

Continuing with the database-theme of the week , I wanted to share one piece of wisdom that I learned from our former director of Data, Brad Brewer . He taught me that you can use the ORDER BY and LIMIT clauses inside both UPDATE and DELETE SQL statements within MySQL 5.6. While I wouldn'... read more »


Why I Use TINYINT Columns Instead Of BIT Columns For Boolean Data In A MySQL Application

Since the theme of my week appears to be database interactions (having looked at index structure query-performance on "membership" tables and prepared statements in the JDBC driver ), I figured I would end the week on more database-related "hot take": I no longer use BIT co... read more »


I've Had Fundamental Misunderstandings Of How CFQueryParam Works Within MySQL Queries And ColdFusion / Lucee CFML

As much as I love databases and writing SQL , the reality is, I'm not a "database admin". And, I don't have the best grasp of how databases work their magic under the hood. This leaves me open to many misunderstandings; one of which appears to be the way that the CFQuery and CFQueryPa... read more »


Showing The Affects Of Database Index Structure On Membership Table JOIN Performance In MySQL 5.6.37

At InVision , a couple of the engineers on my team are building a new feature that will entail a "membership" pattern of data organization. Meaning, there will be "containers"; and then, "items" within those "containers". Yesterday, we began to noodle on the... read more »


Attempting To Create A Flexible Dual-Select Control Component In Angular 9.1.9

Over the weekend, I took a look at an old, but wonderful, form control: the dual-select (or double-list) input , that allows a user to move options back-and-forth between two different sets of options. I love the user experience (UX) of this control because it very clearly identifies the selecte... read more »


Managing Selections With A Dual-Select Control Experience In Angular 9.1.9

Back in the day, before Angular or AngularJS, when I used to build Form controls with raw JavaScript, one of my favorite type of controls was a dual- select input, wherein one multi- select menu represented "unselected items"; and another multi- select menu represented "selected i... read more »


deserializeJson() Silently Fails On High-Precision Numbers In Lucee CFML 5.3.4.77

Yesterday, Nicholas Mackey - from our Inspect team - stumbled upon an interesting behavior in which a JSON (JavaScript Object Notation) payload coming out of the Craft plug-in was including a Float value with something like 20-digits of precision. I have no idea how that value was being calcu... read more »


The mid() Function Can Safely Go Out-Of-Bounds And Gather Zero Characters In Lucee CFML 5.3.4.77

I'm almost certain that the mid() function in ColdFusion - think the .slice() function in JavaScript - has historically been quite touchy regarding out-of-bounds references and zero-length extractions. At some points, however, this must have changed. I don't know when it changed; but, I acciden... read more »


The 13th Annual Regular Expression Day - June 1st 2020

Holy cow! I can't believe it's already Regular Expression Day 2020 !! Has it already been 13-years since we decided to start celebrating the overwhelming, awe-inspiring power of String-based pattern matching?! These little modern marvels of computer programming never get old - always a thrill, a... read more »


Attempting To Improve Rendering Performance Of A Large List View In AngularJS 1.2.22

Last week at InVision , we held a company hackathon that produced some amazing ideas across the company. I was on a team that built a "magic link" invite system for enterprise customers. But, as we were integrating the feature, I noticed that the "Team List" page rendering perf... read more »


Using Abstract Classes As Dependency-Injection Tokens With "providedIn" Semantics In Angular 9.1.9

Earlier this week, I looked at saving temporary form-data to the SessionStorage API in Angular 9 so that a user wouldn't lose their form-data if they accidentally refreshed the page. In that exploration, I had a Storage class that used the SessionStorage API internally in a hard-coded fashion... read more »


Returning Promises From Async / Await Functions In JavaScript

Over the weekend, when I was using SessionStorage to cache form-data in Angular 9.1.9 , I had a service object that included a number of async / await functions. And, as I was putting these functions together, my mind began to stumble over an inadequate portion of my Promise chain mental m... read more »


Saving Temporary Form-Data To The SessionStorage API In Angular 9.1.9

I'm sure we've all been in one of those situations where we're filling out a big web-based form; then, we get some sort of an error page; so, we hit the browser's Back Button only to find-out that our form is now completely blank. Hulk smash ! Some applications do us the courtesy of storing unsav... read more »


Can't Cast Object Type [Struct] To A Value Of Type [image] In Lucee CFML 5.3.4.77

As I wrote about back in January, we were having some performance issues in one of our Lucee CFML services . One of the steps we took in the debugging process was trying to upgrade from Lucee CFML 5.2.9.40 To 5.3.3.62. Unfortunately, when we did that, we started seeing the following ColdFusion ima... read more »


Canonicalizing A URL By Its Individual Components In Lucee CFML 5.3.6.61

CAUTION : I am not a security expert . I do work with security experts; and I try my best to implement their vision and understanding of the world and malicious actors; but, I am just a flawed human. As such, please see this post as an exploration and not necessarily as any kind of best practic... read more »


Hiding Overflow Scrollbars Until Hover (ala Gmail Labels) In Angular 9.1.7

The other day, when using my Gmail account, I noticed an interesting little user experience (UX): my list of "labels", which is longer than my browser's viewport, is only scrollable when I mouse-over it. I assume this is done to hide the scrollbar which would otherwise create a strong &qu... read more »


Separating Layout HTML And CSS From Content HTML And CSS Is Good

I'm a slow learner. That's part of why I write so much - it takes ages for ideas to sink into my Neanderthal brain. Such is the case with something like the separation of concerns in HTML and CSS. 11-years ago, I looked at Nicole Sullivan's Object-Oriented CSS (OOCSS) ; then, 9-years ago, I looked... read more »


Application Setting "useJavaAsRegexEngine" Tells CFML To Use Java's RegEx Engine For Built-In Re-Functions In Adobe ColdFusion 2018

So, yesterday, when I was looking something up in the Adobe ColdFusion RegEx documentation, I saw something that blew my mind! Apparently, as of Update 5, there is now a ColdFusion 2018 Application setting - useJavaAsRegexEngine - that tells the CFML runtime to use Java's Regular Expression engin... read more »