Recent Blog Posts by Ben Nadel

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 »





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 5.3.6.61 . 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 »





Generating An Interactive Craft Sketch File From An InVision Prototype In Lucee CFML 5.3.6.61 At InVision , one of the tools that we offer is Craft / Craft-Manager , which provides a suite of functionality for generating interactive prototypes in Sketch and Photoshop. In recent years, the Sketch open file-format has evolved into a ZIP archive consisting of images and JSON (JavaScript ... read more »





Most ColdFusion Examples Of EncodeForCSS() Are Broken I absolutely love the encodeForXYZ() functions in ColdFusion and Lucee CFML. They make life absolutely wonderful for developers ; and, more importantly, they make life safe for users because they prevent hosted and reflected XSS (Cross-Site Scripting) attacks. But, the one encoding function th... read more »





Wrestling With My Dogmatic Fear Of The REQUEST Scope And Accessing Global Variables In ColdFusion For years, I've had a general notion that "global variables" are a "Bad Thing" ™. And, I've come to love Inversion of Control (IoC); and, I believe that Dependency Injection (DI) is one of the greatest things since sliced-bread. But, I fear that I've become blind to the pragmat... read more »





CSS Flexbox, Overflow, Text-Overflow Ellipses, And A Separation Of Concerns As I've gotten older (and hopefully wiser), I've grown to love the separation of concerns between layout and content . And while this separation of concerns incurs more verbosity, it leads to cleaner, easier-to-maintain HTML and CSS. That said, the separation of concerns is not always perfectl... read more »





Using Inline-Block To Provide Consistent Padding And Element Width Inside An Overflow Container In CSS This is primarily a note to self ; and, is something that has been covered several times on StackOverflow; but, I can never seem to remember the answer and end-up re-learning it each time. As such, I wanted to write it down! This post looks at how to get CSS padding and widths to work consiste... read more »





Using Constants To Help Clarify Boolean Arguments And Return Values In ColdFusion And JavaScript A few weeks ago, I talked about how I often see some very questionable Boolean arguments in old, legacy code . This has kept Boolean arguments top-of-mind for me; and one thing that I've started to experiment with recently is the use of "Constants" - named, static values - to bring addit... read more »





Using NPM Run-Scripts To Execute Shell Commands In Lucee CFML 5.3.6.61 Over the last few months, I've looked at various ways that ColdFusion can interact with the command-line. For example, we can use a proxy script to run CFExecute from a working directory ; or, we can use Java's ProcessBuilder to interact with the underlying processes directly . The other day,... read more »





Creating A Simple Slide-Show With Dynamic Keyframe Animations In Angular 10.0.9 The other day at InVision , I came across a View within our AngularJS 1.2.22 SPA (Single-Page Application) that was using a 1,000-line jQuery plug-in to power the most basic of horizontal carousels. Upon further investigation, this was the only UI (User Interface) that was using this jQuery plug-i... read more »





Generating Rich Server-Side Reports In Lucee CFML 5.3.6.61 When it comes to rendering "Views" and / or "API Responses" in a ColdFusion application, I feel like I have a good-enough handle on where things are supposed to live within the application architecture (somewhat dictated by whatever framework I'm using). But, when it comes to g... read more »





Encapsulating Deep Object-Graph Traversal Using A Visitor Function In Lucee CFML 5.3.6.61 The other day, in JavaScript, I wrote some code that required three nested for -loops in order to locate data for consumption. The JavaScript code looked something like this: screens.forEach( ( screen ) => { screen.conversations.forEach( ( conversation ) => { conversation.co... read more »





Mapping Arrays-To-Structs And Structs-To-Arrays Using Mapping Functions In Lucee CFML 5.3.6.61 When mapping one data-set onto another data-set in ColdFusion, we can usually use the built-in .map() functions. This works great when the input and the output data-sets are the same type . But, every now and then, I want to map an Array onto a Struct ; or, a Struct onto an Array ; which i... read more »





isNumeric() And numberFormat() Can Work With Very Large Numbers In Lucee CFML 5.3.6.61 For historical reasons, I'm a bit weary of any kind of numeric value that won't fit into a Signed Integer in ColdFusion. I can't point to specific issues necessarily; but, I know that I've run into errors working with large numbers. That said, yesterday when I was looking at how to implement an in... read more »





Performing An In-Place Natural Sort On An Alpha-Numeric Array In Lucee CFML 5.3.6.61 In the past, I've looked at implementing a "Natural Sort order" in both JavaScipt and ColdFusion . However, my ColdFusion-based approach has always created a new array as part of its algorithm. Most of the time this doesn't matter; however, yesterday at InVision , I ran into a situa... read more »



