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

Recent Blog Posts by Ben Nadel

Proof-Of-Concept: Injecting Features Into An InVision Share Link Experience Using AngularJS 1.6.7

About a year-and-a-half ago, I put together a proof-of-concept for a Screen Flow feature that I thought might be of interest at InVision . Unfortunately, in the last 20-months, I've been unable to generate any interest in the concept. However, I still think that there may be one or two users o... read more »


Lists - The Unsung Heroes Of ColdFusion And Lucee CFML

When you first start programming in ColdFusion, you tend to lean very heavily on the idea that "everything is a String". Then, as you become more experienced, you learn that String-manipulation is relatively slow ; and, you start to use more complex data structures like Arrays and Struct... read more »


Replacing All External Date Libraries With 300 Lines-Of-Code In AngularJS 1.2.22

Yesterday, I looked at replacing all external date libraries in Angular 11.0.0 . And, while that was an exciting post for me personally, it doesn't much help me professionally because, at work , we're still running a massive "legacy app" on AngularJS 1.2.22 (with some parts on 1.7). As ... read more »


Replacing All External Date Libraries With 300 Lines-Of-Code In Angular 11.0.0

Once I discovered that Angular ships with a formatDate() function , I had the sense that I could eliminate all external Date libraries from my Angular applications going forward. All I would need to do is fill in the gaps for features like Moment.js and its .fromNow() function ; and maybe... read more »


Adjusting Dates By Adding Date / Time Parts In Angular 11.0.0

Over the past week, I've had fun exploring dates in Angular. First, when I stumbled upon the formatDate() function that ships with Angular core ; and then after, when I demonstrated how to recreate the Moment.js .fromNow() functionality in Angular . To round this adventure out, I wanted to ... read more »


Adding Differ() And DifferNoCase() Built-In Function Extensions In Lucee CFML 5.3.7.47

Yesterday, I needed to check to see if two Strings were different based solely on character-casing. To do this, I used ColdFusion's native compare() function which performs a case-sensitive comparison between two values. However, the compare() function is "funny" in that it returns 0... read more »


Building A Moment-Inspired .fromNow() Date Formatting Method In Angular 10.2.3

After writing about the formatDate() function in Angular 10.2.3 , I had mentioned to Mikko Ville Valjento that roughly 95% of my Moment.js usage consists of the .fromNow() method. This method takes a given date/time stamp and returns a human-friendly, relative String. For example, given O... read more »


Painless Date / Time Formatting With formatDate() In Angular 10.2.3

For reasons that I've never fully understand, many people within the JavaScript community simply ignore the native Date object. Which is a shame because it's a well-documented and powerful API , especially when it comes to the use of relative date calculations . I see many developers reach for ... read more »


Using Redis Blocking List Operations To Power Long-Polling In Lucee CFML 5.3.7.47

CAUTION : This is just a thought experiment. In general, I would not recommend performing a long-polling operation because it consumes a connection to both the application-server (ColdFusion) and the database-server (Redis). This could, theoretically, lead to thread exhaustion and a possible s... read more »


Using Pusher WebSockets To Show Progress During Page Unload / Redirect In Lucee CFML 5.3.7.47

At InVision , we use - and freaking love - Pusher to manage our WebSocket-based communication between the ColdFusion servers and the browser. And while WebSocket communication is awesome, I've always treated it as a "nice to have" feature - one that shouldn't make or break the user e... read more »


The Power Of Cascading Tag Attributes In Lucee CFML 5.3.7.43

The other week, when I was looking at using Postmark Tags to group related transactional emails in Lucee CFML , I used a ColdFusion Struct to apply common CFMail tag attributes to all of my outbound emails. This attributeCollection feature has been around in ColdFusion since forever. However, ... read more »


Performing A Case-Sensitive Search On A Case-Insensitive Column Using COLLATE In MySQL 5.6.49

Applications evolve over time. And, when you've been working on an application for close to a decade, you can bet dollars-to-donuts that the database schema isn't optimal. Usually, old MySQL databases aren't using utf8mb4 character-sets; and, the column collations might not be appropriate for the... read more »


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 »