Skip to main content
Ben Nadel
On User Experience (UX) Design, JavaScript, ColdFusion, Node.js, Life, and Love.
Ben Nadel at cf.Objective() 2009 (Minneapolis, MN) with: Jean Ducrot
Ben Nadel at cf.Objective() 2009 (Minneapolis, MN) with: Jean Ducrot

Recent Blog Posts by Ben Nadel

Testing wkhtmltopdf 0.12.6 With Docker In Lucee CFML

A few months ago, James Moberg listed out a good number of Command-Line utilities that he uses in ColdFusion . Among them is wkhtmltopdf , which is a tool that can convert HTML and CSS to PDFs using the Qt WebKit rendering engine. Since I've been digging into PDF document generation in Lucee... read more »

Evaluating Database Records That Contain ColdFusion Interpolation Expressions In Adobe ColdFusion 2018

Yesterday, I was talking to Angel Gonzalez about an interesting use-case in ColdFusion - something that I've never personally tried before - evaluating database records that contain ColdFusion Expressions . Specifically, database records that contain String interpolation in which the interpola... read more »

CFDocument Intelligently Reuses Repeated Image Objects In Lucee CFML

The other day, I experimented with saving InVision prototypes as interactive PDFs in Lucee CFML . And, while very few people will have an interest in such a technique, it's gotten me thinking a lot about how I might use PDFs more effectively. One thing I started to wonder about is how CFDocumen... read more »

ColdFusion Components (CFC) vs. ColdFusion Closures Performance Exploration In Lucee CFML

In the early days of ColdFusion, instantiating ColdFusion Components - CFCs - was pretty expensive. This was due, in part, to the highly dynamic nature of ColdFusion Components which has to be facilitated on top of Java, a significantly less dynamic language. With Lucee CFML, this cost was been l... read more »

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

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

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

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

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

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

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

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

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

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

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

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 To Unfortunately, when we did that, we started seeing the following ColdFusion ima... read more »