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

Recent Blog Posts by Ben Nadel

Generating A QR Code With iTextPDF 7 Barcodes In Lucee CFML 5.3.6.61

At InVision , my teammate Josh Siok has been experimenting with the use of QR Codes as a means to send prototypes to a user's mobile device. I know of QR Codes; but, I've never generated one before. As such, I wanted to see if I could generate a QR Code in ColdFusion. To this end, I came across ... read more »


Struct Iteration With CFLoop Includes Super Intuitive Aliases In Lucee CFML 5.3.6.61

A few months ago, I was excited to discover that CFLoop exposes both keys and values during Struct iteration in Lucee CFML. In that post, I demonstrated that the "key" could be accessed via index and the "value" could be accessed via item . Well, life just keeps getting b... read more »


MongoDB BSON Structs Are Case-Sensitive In Lucee CFML 5.3.6.61

Yesterday, I started to consider what a data-access component for MongoDB might look like in Lucee CFML . This thought process was initiated by the fact that I ran into a surprising key-case-sensitivity issue with the BSON documents returned by the MongoDB Java Driver. This isn't the first time th... read more »


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

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 5.3.6.61

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 5.3.6.61

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 5.3.6.61

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 5.3.6.61

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 5.3.6.61

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 5.3.6.61

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 5.3.6.61

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 5.3.6.61

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 5.3.6.61

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 5.3.6.61

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 5.3.6.61

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 5.3.6.61

I can get pretty darn far when I use the built-in Array methods in Lucee CFML 5.3.6.61. 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 5.3.6.61

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 5.3.6.61

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 5.3.6.61

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 5.3.6.61

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 5.3.6.61

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 5.3.6.61

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 5.3.6.61

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 5.3.6.61

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 »