Skip to main content
Ben Nadel
On User Experience (UX) Design, JavaScript, ColdFusion, Node.js, Life, and Love.
Ben Nadel at InVision In Real Life (IRL) 2019 (Phoenix, AZ) with: Gabriel Zeck
Ben Nadel at InVision In Real Life (IRL) 2019 (Phoenix, AZ) with: Gabriel Zeck@GabeZeck )

Recent Blog Posts by Ben Nadel

Making SQL Queries More Flexible With LIKE In MySQL 5.7.32 And Lucee CFML 5.3.7.47

While you might stand-up something like Elasticsearch, Lucene, or Solr in order to provide robust and flexible text-based searches in your ColdFusion application, your relational database is more than capable of performing (surprisingly fast) pattern matching on TEXT and VARCHAR fields using th... read more »

Creating A Group-Based Incrementing Value Using LAST_INSERT_ID() In MySQL 5.7.32 And Lucee CFML 5.3.7.47

Yesterday, I took inspiration from Jira's ticketing system and explored the idea of creating a group-based incrementing value in MySQL . In my approach, I used a SERIALIZABLE transaction to safely "update and read" a shared sequence value across parallel threads. In response to that po... read more »

Creating A Group-Based Incrementing Value In MySQL 5.7.32 And Lucee CFML 5.3.7.47

UPDATE : After posting this, I was told to look at the use of LAST_INSERT_ID(expr) as a way to build thread-safe sequences in MySQL. I have written a follow-up post that revisits this demo using LAST_INSERT_ID() instead of the SERIALIZABLE transaction. In the past few weeks, I've been ... read more »

Working Code Podcast - Episode 045: Join Our Discord

The Working Code Podcast is coming up on its one-year anniversary . Over the past 45 episodes, we've been having a blast sharing our thoughts with y'all on web development, team culture, self-improvement, software architecture, and generally sacrificing ourselves on the alter of dignity and bearin... read more »

The Scope Of SERIALIZABLE Transaction Row-Locking Is Larger When Rows Don't Yet Exist In MySQL 5.7.32

After looking at using SERIALIZABLE transactions to enforce unique-naming constraints in a MySQL and Lucee CFML application, I posted a follow-up exploration on the scope of SERIALIZABLE transaction row-locking . What I didn't understand at the time of that follow-up post, however, is that t... read more »

Applying Multiple Animation @keyframes To Support Prefers-Reduced-Motion In CSS

Yesterday, I demonstrated that four-sided positioning plays nicely with scale() transformations in CSS. That demo used both the opacity and transform properties in order to "enter" a modal window into view. After I posted that, I started to think about the prefers-reduced-motion ... read more »

Four-Sided Positioning Plays Nicely With Scale() Transformations In CSS

A decade ago, Ryan Jeffords changed my life forever when he introduced me to the concept of four-sided positioning in CSS . Since then, four-sided positioning - along with CSS Flexbox - have become a mainstay of my modal-window content strategy. As much as I love positioning in CSS, I've never... read more »

Working Code Podcast - Episode 044: Facebook's No Good Very Bad Week

Between Frances Haugen's testimony, a mega outage of Facebook properties including Facebook.com, Instagram, and What's App, and a $7 billion drop in Mark Zuckerberg's personal wealth in a matter of hours, it's safe to say that Facebook has been having a terrible, horrible, no good, very bad time of... read more »

Using INTERVAL To Perform Date Math Without DATE_ADD() In MySQL 5.7.32

This post is more of a note-to-self than anything else; but, historically, every single example that I've ever seen of adding time to a date/time stamp in MySQL has used the DATE_ADD() function. But, I was just looking through the MyQueue project by Kota Saito when I saw that they incremented... read more »

CFQueryParam Value Attribute Seamlessly Handles Arrays In Lucee CFML 5.3.7.47

This almost isn't worth blogging since it's clearly stated in the Lucee CFML docs. But, since some people don't make it a habit to read documentation, I wanted to share this fact more widely and with much excitement: the CFQueryParam tag accepts arrays for its value attribute. And, when giv... read more »

Using WHERE TRUE To Create Dynamic, High-Performance SQL Queries In MySQL 5.7.32 And Lucee CFML 5.3.8.201

When I write ColdFusion applications, I almost always create a "Data Access Layer" (DAL) so that my business logic isn't intermingled with my SQL query syntax. And, to make this DAL more flexible, I tend to create some sort of "By Filter" function that allows me to query a given... read more »

Working Code Podcast - Episode 043: Relay Race Programming

You might think that "programming" is a relatively straightforward concept: take abstract ideas and codify them into lines-of-code (LOC). But, within this broad abstraction, there are a multitude of implementation details. Some engineers love to hunker down and write code inside a metapho... read more »

Testing BIGINT AUTO_INCREMENT Usage In MySQL 5.7.32 And Lucee CFML 5.3.8.201

For the most part, I live in an Integer world. Meaning, almost every numeric value that I deal with falls below 4.29 billion, which is the maximum value that can be stored in an unsigned integer. So, it's not surprising that I don't have a great mental model for what happens in ColdFusion and M... read more »

Working Code Podcast - Episode 042: Potluck

This week on the podcast, the crew discusses various topics: "Strong opinions, loosely held" - is this a statement with noble intent? Or, does it encourage people to dismiss past evidence and the experiences that have shaped their current view of the world? When is it time to upgrade ol... read more »

Fixing Protocols In My ColdFusion Custom Tag DSL For HTML Emails

Last week, I looked at the fact that [Yahoo! Mail won't render href attributes with encoded protocols]. In that post, I created a ColdFusion user defined function (UDF) to un-encoded the https:// portion of the href attribute. After letting that approach bake in production at InVison for a ... read more »

Exploring The Scope Of SERIALIZABLE Transaction Row-Locking In Lucee CFML 5.3.7.47

Earlier this week, I looked at using SERIALIZABLE transactions to enforce unique naming constraints in MySQL and Lucee CFML. Transaction isolation isn't a topic that I'm super comfortable with. As such, I wanted to continue exploring the way in which transaction locking affects concurrent acces... read more »

CFThread "ElapsedTime" Is Not "Processor Time" In Lucee CFML 5.3.8.201

This morning, as I was trying to perform some follow-up exploration on SERIALIZABLE transactions in MySQL , I noticed something strange about the metadata exposed by the CFThread tag in Lucee CFML. Whereas Adobe ColdFusion (ACF) documents the ElapsedTime property as being "The amount o... read more »

Working Code Podcast - Episode 041: The Third Age Of JavaScript With Shawn "swyx" Wang

Shawn Wang - known as "swyx" online - is a financial investor turned software engineer and journalist. With a passion for history and a knack for "trend spotting", Shawn uses a keen analytical sense, honed through years of financial due diligence, in order to organize the worl... read more »

Enforcing Unique Naming Constraints Using A SERIALIZABLE Transaction In Lucee CFML 5.3.7.47

The other day, I had to write a SQL script to clean up some "dirty data" in our database that violated a unique-naming constraint imposed by the business logic. When I looked at the ColdFusion code that created the dirty data, I noticed that it wasn't using a transaction tag. Now, as mu... read more »

Request Tracing Propagation When Consuming Amazon SQS Queues In Lucee CFML 5.3.8.201

As I continue to explore the use of Amazon SQS queues in Lucee CFML , I have to start thinking about request tracing. In a monolithic application, request tracing is much less of a value-add since most operations happen within a single request. Once I start using a message queue to decouple steps ... read more »

Spreading Http And HttpParam Tags Across Multiple Function Calls In Lucee CFML 5.3.8.201

Back when InVision was running on Adobe ColdFusion 10, I leaned heavily on the native Http.cfc component when making network requests. However, once we switched over to Lucee CFML 5.3, where tag support in CFScript is much more robust , I found myself reverting back to the http and httpPa... read more »

Generating SQL INSERT Statements From SQL SELECT Statements In MySQL 5.7.32

I've spent the last 2-days slicing-and-dicing data for one of InVision 's enterprise clients; and, I'm as happy a pig in slop! As I've said before, data is my happy place. Few things give me as much joy as writing SQL queries - as bending relational database tables to my will. We have a client tha... read more »

Yahoo! Mail Does Not Render Anchor Tags With Encoded HREF Attributes

When rendering view templates in Lucee CFML (or any server-side language for that matter), rule number-one is don't trust the content . This is a corollary to an older rule, don't trust the user . As such, when I render content, I almost always wrap it in one of the many encoding methods that Col... read more »

Working Code Podcast - Episode 040: Are Database Transactions Overrated?

The other day, I was listening to an episode of the MongoDB podcast in which Mat Keep shared a story about the adding of atomic transactions into the MongoDB product. Mat said that the engineer who spearheaded the effort used to joke about the fact that his team was spending a huge amount of ti... read more »

Organizing My Application Layers Using Z-Index Stacking Contexts In CSS

A few years ago, the concept of a stacking context in CSS finally clicked for me. And, as I've continued to maintain the same Single-Page Application (SPA) over the last decade, my thinking about z-index and stacking contexts has continued to evolve. My current mindset is that I want to go in... read more »

Checking CFLock Acquisition Success In Lucee CFML 5.3.8.201

Yesterday, in my post about considering the separation of concerns when consuming Amazon SQS queues in Lucee CFML , I created a demo in which I synchronized long-polling requests through the use of an exclusive CFLock tag. For the demo, I had logging in place to trace the workflow of each reques... read more »

Separation Of Concerns When Consuming Amazon SQS Queues In Lucee CFML 5.3.8.201

Last week, I started to explore the consumption of Amazon SQS (Simple Queue Service) in a Lucee CFML application . That first post was a low-level look at the mechanics of using the AWS (Amazon Web Services) Java SDK to add and remove messages to and from a given queue, respectively. Today, I want... read more »

Producing And Consuming Amazon SQS Messages In Lucee CFML 5.3.8.201

A year ago, I shed some light on my quest to merge microservices back into my ColdFusion monolith . For my size team and the type of domain boundaries that we have, a monolith just makes the most sense. And while I've been thrilled with the progress my team has made in its re-consolidation effor... read more »

Working Code Podcast - Episode 039: Ben's Future At InVision

For last 8-years, I've poured my heart and soul into InVision , a product that drives design collaboration. During this period, my area of expertise has focused on the (now named) "legacy" platform - the ColdFusion and AngularJS monolith that has built the business into what it is toda... read more »

Maintaining Route Information During SPA (Single-Page Application) Authentication In Lucee CFML

NOTE : While some parts of this post are generally applicable, much of this post is a byproduct of working with a system that has been around for a decade and used to have to support old browsers like IE6. Your mileage may vary. The InVision platform is composed of a series of SPAs - Singl... read more »