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

Recent Blog Posts by Ben Nadel

Considering Data Workflows Within A MongoDB Data-Access Layer In Lucee CFML

At InVision , I've consumed MongoDB databases. But, I've never actually created a MongoDB data-access layer on my own - I've only ever consumed one that was created by another team. That is, until last week. I've been working on a project to fold a "microservice" back into the "mono... read more »

Experiment: Modeling Complex Data Structures As Nested Query Objects In Lucee CFML

One of the most exciting aspects of working with a Relational Database is the fact that you get you work with the ColdFusion Query object in your application code. The Query is just a wonderfully well-thought-out data-type with very pleasing developer ergonomics. But, once you start using a Documen... read more »

Using Closures To Encapsulate FileReadLine() Operations In Lucee CFML

In Episode 75 of the Modernize-or-Die podcast , Brad Wood talked about the fact that the fileReadLine() function in Lucee CFML was thread-safe; but, that you must remember to call fileClose() once you are done otherwise the files can remain locked. These days, whenever I hear "you have ... read more »

A Closer Look At Error Handling During Parallel Array Iteration In Lucee CFML

I've looked at using parallel array iteration in Lucee CFML before ; I've even mentioned that the errors during parallel array iteration bubble-up to the parent page request. But, my mental model for error handling during parallel array iteration hasn't yet been fully formed. At least, not in a w... read more »

Using A Progressive-Search Optimization When Filtering Arrays In Angular 10.1.6

The other day, I looked at a search optimization in Angular 10 in which I use a single, pre-compiled keyword value as my search target . That optimization allows me to search across an aggregation of values with a single operation. Today, I wanted to follow-up with another search optimization that... read more »

Checking To See If A Struct Is Of Type Ordered / Linked In Lucee CFML

One of the really excited features of ColdFusion is that it can create linked / ordered Structs. These are Structs (objects, hashes, maps) in which the key-iteration order matches the order in which the keys were originally defined. As I discussed last year, ordered Structs are perfect for MongoD... read more »

Exploring Postmark Tags For Grouping Related Transactional Emails In Lucee CFML

At InVision , we use Postmark to send both our outbound transactional emails and handle inbound reply emails . We've been using them for over 8-years and it's been just a seamless, outstanding experience . In those 8-years, however, Postmark has added a number of features that we have yet to t... read more »

Using A Single, Pre-Compiled Keyword Search Target For Filtering In Angular 10.1.5

The other day, I picked up a cool Angular trick from fellow InVision engineer, Josh Siok : when performing a keyword-based search on a given collection, he will pre-compile a "keywords" String for each item. Then, when he goes to perform the keyword-based filtering, he only has to in... read more »

Using SMTP Headers To Send Custom MetaData Through Postmark In Lucee CFML

The other day, I took a look at using CFMailParam / custom SMTP headers to include debug data in outbound emails in ColdFusion . In the comments to that post, Aaron Terry mentioned that my approach was fine from a "generic" standpoint; but, that most of the Email SaaS (Software as ... read more »

Getting MongoDB Database And Collection Names From The Connection String In Lucee CFML

At InVision , I'm working with Boaz Ruck on a little experiment : whereas our ColdFusion application would normally construct a MongoDB connection using a variety of individual values, the Data Services team would like to try providing the entire MongoDB connection configuration as a single e... read more »

Including Custom SMTP Headers For Debugging Using CFMailParam In Lucee CFML

Recently at InVision , I've been digging into the new Message Streams / Broadcast Streams feature that Postmark is currently rolling-out. This feature allows Postmark to serve both Transactional emails as well as list-serve emails; and, might help me cater to a few needs of InVision's Enterpr... read more »

Calling Into A Timed-Out Parent Page Context From A CFThread Tag In Lucee CFML

Yesterday, I looked at how you can eagerly show report-generation results from a CFThread tag in Lucee CFML . However, after I was done with that experiment, it got me thinking about what would happen if a long-running CFThread tag called back into a parent page context after the parent page... read more »

Racing To Show Asynchronous Report-Generation Results With CFThread In Lucee CFML

At InVision , I've been building a reporting module for our enterprise clients. And, depending on the size of the account, any given report may run in seconds; or, for rather large companies, minutes. The problem is, this report generation sits at the very back-end of a long-chain of intermediarie... read more »

On The Virtues Of Being Emotionally Attached To Your Code

In the world of web development, emotional detachment is often heralded as a virtue . It is usually not stated quite so explicitly; but, it manifests itself in how people describe company cultures and how engineers feel about their own code. I believe this concept to be toxic . And that it does... read more »

Using Amazon S3 As Temporary Storage In Lucee CFML

At InVision , we have several workflows that create "temporary files" that we have to make available to users for a brief period of time. Right now, we do that with a few fixed locations which we have to keep track of and then subsequently delete for both security and GDPR (General Dat... read more »

Reflecting On 40-Years Of Privilege And An Obligation To Vote

I just turned 40. It seems rather insignificant in the grand scheme of things: a global pandemic, mounting civil unrest, and a landscape on fire; but, it's given me a moment to pause and reflect on the past four-decades. And, I can say with complete clarity, I have lived a life of wonderful privil... read more »

ArrayPop(), ArrayShift(), And ArraySliceSafe() In Lucee CFML

I can get pretty darn far when I use the built-in Array methods in Lucee CFML However, there are a few "utility" Array functions that I find myself writing from time to time, specifically relating to the push and pop methods that I use in JavaScript. As such, I thought it wo... read more »

Playing Zoom Bingo In Angular 10.1.2

The other day, I was on a call that felt more like a reverse Turning Test in which the human on the other end was trying to their hardest to imitate the cold, detached logic of a machine . It conjured up all the frustration that one feels while navigating an IVR (Interactive Voice Response) de... read more »

Creating Pixel-Art Of Ruth Bader Ginsburg Using CSS Box-Shadow In Lucee CFML

Like many of you, I'm completely gutted by the loss of Ruth Bader Ginsburg; and am still trying to wrap my head around what this loss means for our future and our rights given the malignant forces in this world. And, as I often do, I turn to programming as a "happy place" to find comfort ... read more »

Using Derived Tables To Generate "Stats" For An Outer Query JOIN In MySQL 5.6.49

Most of the time, when writing SQL queries, I try to keep my queries as simple as possible . I find that this aids in both readability and performance. However, sometimes, the more complicated query is the best option . This is particularly true when writing reporting queries . And, one techniqu... read more »

Code Kata: Creating A Fluent, Closure-Based "Builder" API In Lucee CFML

As of late, I've been feeling very creatively blocked . Right now, work is taking every ounce of mental energy that I have, which is leaving me with little left over with which to create magic. As such, I just wanted to do something - anything - to create a little neural activity to keep the old... read more »

Accessing Cookies With The Same Name In Lucee CFML

This morning, I took a look at the fact that the first cookie wins in both JavaScript and ColdFusion when multiple cookies are assigned with the same name . As a quick follow-up post, I wanted to see if I could access all of the conflicting / colliding cookies in the HTTP Header data even if t... read more »

The First Cookie Wins When Conflicting Cookie Names Are Used With Different Settings In Lucee CFML

A few weeks ago at InVision , we did one of the most dangerous things you can do in a production application: we messed with some Cookie settings . And, unfortunately, we got a little burned when the change produced some unexpected behaviors - unexpected in so much as we didn't have the best ment... read more »

Deleting Temporary Upload Files In Our K8 Operational Readiness Probe In Lucee CFML

Over the weekend, I talked about the fact that some of our Lucee CFML containers at InVision were running out of disk space. It seems that the current release of Lucee will generate a duplicate temporary .upload file per CFThread ; and, that it won't delete these files automatically after th... read more »

The Elvis / Null Coalescing Operator Can Sometimes Replace The Safe Navigation Operator In Lucee CFML

Yesterday, when I was listening to the latest episode of the Modernize or Die Podcast , Brad Wood said something that I had not heard before: that the Safe Navigation operator can usually be replaced with the Elvis / Null Coalescing operator in Lucee CFML. I had always just assumed that ... read more »

Temporary Upload Files Are Duplicated And Persisted When A Request Uses CFThread In Lucee CFML

Earlier this week, Pablo Fredrikson from our Platform team was paged because one of the Kubernetes pods that runs one of our Lucee CFML containers was running out of disk space. Upon further investigation, he found that the server's temporary file directory was using over 160 Gigabytes of stora... read more »

Using Both STORE And DEFLATE Compression Methods With The zip CLI In Lucee CFML

A couple of months ago, I looked as using the zip CLI with the STORE or DEFLATE compression methods in Lucee CFML . The DEFLATE compression method attempts to shrink file sizes as it adds the files to an archive where as the STORE method just adds the files to the archive, but doesn't at... read more »

Proxying Amazon AWS S3 Pre-Signed-URL Uploads Using Netlify Functions

A couple of months ago, I looked at proxying Amazon S3 pre-signed URL uploads using Lucee CFML . This was a topic of interest because InVision has enterprise customers that block all direct access to Amazon AWS (for security purposes); and, the only way we can upload files to S3 is by &... read more »

Animation Timing-Functions Can Be Changed Per-Keyframe In CSS

Yesterday, I demonstrated that the animation-timing-function property is applied per-keyframe in CSS . Today, as a fast-follow, I wanted to demonstrate that the animation-timing-function can also be changed per-keyframe as well. In fact, this was the hot-tip that Una Kravets mentioned on t... read more »

Animation Timing-Functions Get Applied Per-Keyframe In CSS

A couple of weeks ago, I looked at creating a simple slide-show using dynamic keyframe animations in Angular 10.0.9 . In the video for that demo, I mentioned that my approach was somewhat limited because the timing-function wasn't granular enough. As it turns out, my assumption of granularity wa... read more »