Skip to main content
Ben Nadel at cf.Objective() 2017 (Washington, D.C.) with: Jake Scott
Ben Nadel at cf.Objective() 2017 (Washington, D.C.) with: Jake Scott

Recent Blog Posts by Ben Nadel

Using Both Tab And Arrow Keys For Keyboard Navigation

By Ben Nadel on

I must admit that, historically, when thinking about keyboard-based navigation on a website, I've really only considered the Tab key for moving around and the Space and Enter keys for activation. The other day, however, I noticed something very interesting on the GitHub site: the Tab key was skipping over large swaths of buttons—buttons which, it turns out, can only be accessed using the ArrowLeft and ArrowRight keys. This kind of blew my mind!.. read more →

Generating Fake User And Company Data With ColdFusion

By Ben Nadel on
Tags: ColdFusion

As a companion piece to my Feature Flags Book, I'm creating a small playground app in which readers can explore the feature flags experience, both from a configuration and a consumption standpoint. As part of this process, I had to generate a set of fake users against which a set of configured feature flags could be evaluated. I know there are plenty of existing websites that will generate fake data for you; however, since I needed a predictable set of properties for my feature flag rules engine, I decided to generate my own fake data using ColdFusion... read more →

Working Code Podcast - Episode 181: More The Laws Of Software

By Ben Nadel on
Tags: Podcast

On today's show, we continue our discussion of the entries outlined on the website, the Laws of Software. Topics include McKinley's law on boring technologies, Doerr's law on aligning team vision, and Fitt's law on touchability... read more →

Using Range Offsets To Power Weighted Distributions In ColdFusion

By Ben Nadel on
Tags: ColdFusion

A few years ago, I looked at using arrays to power weighted distributions in ColdFusion. Using arrays is nice because they create a great visualization of the distributed values. But, creating and populating an array is a lot of overhead. As such, I wanted to revisit the idea of a weighted distribution of values; but, instead of populating an array, I'm just using calculated offsets... read more →

The 17th Annual Regular Expression Day - June 1st 2024

By Ben Nadel on
Tags: ColdFusion

Good morning my beautiful, beautiful friends and happy Regular Expression day 2024! Isn't it comforting to know that even with so much uncertainty in the world, you can always depend on the awesome power of pattern matching to help make life a little bit better—a little bit more fulfilling. And, even though there's ample opportunity to use Regular Expressions in every day life, there's always something new and exciting to try. And in celebration of this joyous day, I want to try something new (to me) and exciting in ColdFusion: using a callback operator in Adobe ColdFusion's reReplace() function... read more →

Using Margins With Four-Sided Positioning In CSS

By Ben Nadel on

Thirteen years ago, Ryan Jeffords blew my mind when he introduced me to four-sided positioning of absolute/fixed position elements. Yesterday, Scott Tolinski and Ivor Padilla took that to the next level when they explained to me that margins also work with four-sided positioning. And, to be honest, this kind of broke my brain, especially with regard to, margin:auto. As such, I needed to sit down and try it out for myself... read more →

Parallel Iteration vs. Chunked Parallel Iteration In Lucee CFML

By Ben Nadel on
Tags: ColdFusion

One of the most exciting features in ColdFusion is the ability to iterate over collections using parallel threads. When consuming large amounts of data, parallel threads can have a dramatic impact on performance. But, spawning threads isn't free—and, in some cases, spawning threads is even more expensive than you realize. Because of this cost, one thing that I've always wanted to test is the performance of straight parallel iteration compared chunked parallel iteration in Lucee CFML... read more →

Working Code Podcast - Episode 180: The Laws Of Software

By Ben Nadel on
Tags: Podcast

On today's show, we discuss a few of the entries outlined on the website, the Laws of Software. Topics include Atwood's Law on JavaScript, Cunningham's Law on getting answers, Parkinson's Law on getting things done, Goodhart's Law on taking measurements, Hofstadter's Law on inevitable failure, and the Peter Principle... read more →

Nesting The pointer-events Property In CSS

By Ben Nadel on
Tags: HTML / CSS

The pointer-events CSS property can be used to disable mouse interactions on a given DOM (Document Object Model) element. When an element has pointer-events set to none, it instructs the browser to let the mouse events "fall through" the given DOM element and target / effect whichever next element is stacked below the user's cursor. I've barely ever used this particular CSS property because—for the most part—when I create a UI (User Interface) element, I want the user to have access to it. Yesterday, however, I learned that you can nest the pointer-events property within the DOM tree. This creates an interesting confluence of interaction behaviors... read more →

Working Code Podcast - Episode 179: AI Sells You On AI

By Ben Nadel on
Tags: Podcast

On today's show, Tim gears-up for a farm insurance conference out in Nashville where he's hoping to educate farmers on the pros-and-cons of artificial intelligence (AI). But, ahead of his talk, he'll be using AI voice technology—provided by Bland.AI—to call the conference attendees and convince them to attend his presentation. And then, hopefully, weave statistics and sentiment analysis insights from these automated calls back into his slide deck... read more →

Experimenting With Low-Level SQLite Access In Lucee CFML

By Ben Nadel on
Tags: ColdFusion, SQL

In my first look at accessing SQLite databases in ColdFusion, I was using a Lucee CFML specific feature that allows for creating on-the-fly datasources in the CFQuery tag. As a follow-up experiment, I wanted to see if I could use lower-level Java methods—in the java.sql package—in order to access SQLite without having to rely on Lucee-only features... read more →

Working Code Podcast - Episode 178: Upgrading From Node 0.10

By Ben Nadel on
Tags: Podcast

This week on the podcast, we touch on a variety of topics. I've been incrementally building a data export feature for my customers; and, I've gotten to a point in which I can see a viable light at the end of the tunnel! Carol has discovered that if she doodles circles with her non-dominant hand, it occupies the ADHD portion of her brain and frees her up to focus on reading. Tim is continuing to improve his AI voice-agent, using a listener-suggested approach to loading Spanish language voice models on demand. And, Adam is battling some pretty steamy code rot; and is attempting to upgrade a series of interconnected Node.js Lambda functions from v0.10—released in 2013—to v20... read more →

Creating In-Memory SQLite Databases Using JDBC In Lucee CFML

By Ben Nadel on
Tags: ColdFusion, SQL

In my first look at connecting to SQLite databases using JDBC in Lucee CFML, I was creating physical database files and synchronizing them between my Docker container and my host machine. But, in an experimentation context, there may not be any need to persist the database state across container restarts. In such a context, I could have used SQLite's in-memory database mode to explore the SQLite space without having to worry about persisting data to disk... read more →

Creating On-The-Fly Datasource Connections In Lucee CFML

By Ben Nadel on
Tags: ColdFusion, SQL

In yesterday's post on connecting to SQLite databases using JDBC in Lucee CFML, I was creating and consuming a new, user-specific datasource on every page request. In order to do this, I made use of a technique that I only just learned about from the CommandBox Book written by Ortus Solutions. Apparently, in Lucee CFML, you can provide the CFQuery datasource attribute as a struct instead of a string... read more →

Experimenting With SQLite JDBC Connections In Lucee CFML

By Ben Nadel on
Tags: ColdFusion, SQL

Although SQLite has been around for almost 25-years, it seems to be having a moment. In the past year or two, I've heard many people discuss the power of embedding SQLite databases within an application. I've never looked at SQLite before; and, I don't think it necessarily makes sense in the context of a ColdFusion web application; but, as a fun exploration, I wanted to see if I could get ColdFusion to connect to a SQLite database... read more →

Using Multiple Common Table Expressions In One SQL Query In MySQL

By Ben Nadel on
Tags: SQL

A couple of years ago, I upgraded this blog from MySQL 5.7.10 to MySQL 8.0.28. This gave me access to newer SQL features like Common Table Expressions (CTE) and JSON column types. But, my blog requires little more that CRUD (Create, Read, Update, Delete) operations; so, there's not much of need for me to write advanced SQL statements... read more →

CSS Open Props Exploration

By Ben Nadel on

I've known about the CSS Open Props project for a long time. But, it was only after recently hearing its creator, Adam Argyle, discuss the power of :where() within a design system that my curiosity was sufficiently piqued. I decided to start exploring this project in hopes of building a better sense of how design systems work... read more →

Working Code Podcast - Episode 177: Infinite Invisibility Timeout

By Ben Nadel on
Tags: Podcast

On this week's show, we cover a variety of topics. Adam uses the new CSS color functions for HSL (Hue, Saturation, Lightness) in order to create a heatmap for the number of dollars raised by his platform. I dive into the Algolia search service as a way to provide a search feature on this blog. Carol is trying to alleviate performance concerns around an N+1 SQL query problem using an ORM (Object-Relational Mapper) that has decided to use an N+1 selection strategy as "the way" with no escape hatch. And, Tim is getting some great feedback regarding his AI-powered call system that will alert customers to upcoming renewal dates... read more →

Where Does Serialization / Deserialization Belong In A Database Access Workflow?

By Ben Nadel on
Tags: ColdFusion

A ColdFusion web application is composed of a series of nested abstractions. Each abstraction layer hides some level of private detail and exposes data for public consumption. For most of the work that I do, the exposed data is one dimensional. But, on occasion, I need to store complex object structures. As a simple example, I might have a MySQL table with a JSON column. Which means that each record that I read from said database table contains both normal data and serialized data. Which begs the question: where in the data access workflow should the embedded serialized data (JSON) be deserialized?.. read more →

Why I Avoid DEFAULT Column Values In My SQL Database

By Ben Nadel on
Tags: ColdFusion, SQL

When defining a relational database table schema, each column can have a type and, optionally, a default value to use if no value is provided in a subsequent row INSERT statement. When evolving a table schema, these DEFAULT value mechanics make migrations tractable. But, as soon as I can, I drop the DEFAULT setting from the column definition. In fact, I try to limit my use of DEFAULT values as much as possible... read more →

CFHttp Error: Column Names Must Be Valid Variable Names In ColdFusion

By Ben Nadel on
Tags: ColdFusion

One of the peculiarities of the ColdFusion language is that some operations are capable of returning two different kinds of data (results and metadata). And, some operations are capable of returning the same result using two different mechanisms. Most of the time, this is fine—you develop the patterns of consumption that work best for your particular style of coding. But, sometimes your brain farts and you end up with strange error messages... read more →

Working Code Podcast - Episode 176: Mocking In Public

By Ben Nadel on
Tags: Podcast

On today's show, we cover a variety of topics. Tim was suffering from a "carding" attack (aka, a "credit card stuffing" attack) and had to build an internal CAPTCHA system in order to protect his web-based payment forms from bad actors. Adam created an open-source JavaScript library for mocking ES modules (see Mockable) that makes it possible to swap implementation details at runtime. And I fall back in love with ColdFusion—again—and continue to find that even the small language details bring me great joy and fulfillment... read more →

Using :where() To Reduce CSS Specificity Issues

By Ben Nadel on
Tags: HTML / CSS

This morning, I started looking into the Open Props project by Adam Argyle. And, to kick it off, I watched the video, Build Custom Interfaces Using CSS Open Props. In that video, Adam said something that gave me pause: all of the CSS selectors that he authored in Open Props base style-sheets use the CSS pseudo-class function, :where(). This gives the selectors a specificity of 0; which means that they can be overridden with ease in a concrete implementation. As someone who has spent years fighting against terrible decisions in a base design architecture, this novel technique was something that I had to try for myself... read more →

Inline Script Tag Execution In Hotwire Turbo And ColdFusion

By Ben Nadel on

Right now, my Dig Deep Fitness application has no build process. And, every request to the application results in a full page refresh. I'm considering updating it to use Hotwire Turbo for faster navigation. But, I'm not confident in my understanding of how Turbo will interact with all of the inline <script> tags that currently drive the page interactions. As such, I wanted to put together a quick exploration of inline scripts operating within a multi-page ColdFusion application... read more →

Adding turbo-cfml To My ColdFusion + Hotwire Demos Project

By Ben Nadel on

Out of the box, Hotwire Turbo doesn't work with ColdFusion / CFML because it doesn't recognize .cfm as a valid HTML file extension. To "fix this", I forked the Turbo project and created turbo-cfml, which does nothing but add cfm|cfml|cfc to the library's regular expression pattern matching. This morning, I then added a "hello world" demo, using turbo-cfml to my ColdFusion + Basecamp Hotwire Demos project... read more →

Working Code Podcast - Episode 175: Overcompensation, Mentoring, And More

By Ben Nadel on
Tags: Podcast

On today's show, we cover a variety of topics. I talk about overcompensation at work; and, how we often swing way too hard in one direction at the first signs of a challenge. Carol talks about how her current task got away from her; and, how she suddenly found herself creating a Pull Request with 84 files in it (I have strong feelings about Pull Requests). Tim talks about the generational smoking ban going into effect in England. And Adam talks about the challenges of mentoring junior developers; and, how hard it's been to have enough "right sized" tasks ready for them to work on... read more →

Variables Scope Persists Across Custom Tag Execution Modes In ColdFusion

By Ben Nadel on
Tags: ColdFusion

ColdFusion custom tags are just ordinary CFML templates that are executed using extraordinary mechanics. These mechanics allow custom tags templates to be used for looping, provide isolated rendering contexts, and allow for privately scopes template methods. These features aren't always obvious and are worth exploring. In this post, I want to demonstrate that the variables scope is persisted across the execution modes in a given tag invocation... read more →

ColdFusion Custom Tags Can Have Privately Scoped Functions

By Ben Nadel on
Tags: ColdFusion

In my previous post on the CF_SaveFile ColdFusion custom tag, my SaveFile.cfm template contained a private method named dedent(). Because ColdFusion custom tags execute in an isolated page context, all of the variables defined within the custom tag remain encapsulated within the custom tag boundary. The same is true for any functions defined within the custom tag. Which means, ColdFusion custom tags can have privately scoped helper functions... read more →

Using getApplicationMetadata() To Provide Global Defaults In ColdFusion

By Ben Nadel on
Tags: ColdFusion

A couple of weeks ago on Twitter, James Moberg and I were discussing ColdFusion application metadata. In recent years, ColdFusion has provided a getApplicationMetadata() function for retrieving the configuration associated with the current request (remember, the Application.cfc framework component is freshly instantiated on every single request). I've never used the getApplicationMetadata() function before; but, after my previous post on the ColdFusion custom tags, it occurred to me that I could use the ColdFusion application framework as a hook into providing global defaults for my custom tag attributes... read more →

CF_SaveFile Custom Tag In ColdFusion

By Ben Nadel on
Tags: ColdFusion

A couple of years ago, on the Lucee Dev forum, I proposed a file attribute for the CFSaveContent tag in ColdFusion. This comes out of a pattern that I employ quite often in which I use the CFSaveContent tag to generate the contents of a static file; and then, use the fileWrite() function to save said content disk. So, why not combine these two steps into a single step using a ColdFusion custom tag... read more →


I believe in love. I believe in compassion. I believe in human rights. I believe that we can afford to give more of these gifts to the world around us because it costs us nothing to be decent and kind and understanding. And, I want you to know that when you land on this site, you are accepted for who you are, no matter how you identify, what truths you live, or whatever kind of goofy shit makes you feel alive! Rock on with your bad self!
Ben Nadel