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

Recent Blog Posts by Ben Nadel

Effortless Custom Form Input Styling With Webkit Appearance None

So last night, I was listening to the latest episode of JS Party , when Divya Sasidharan said something that rocked my world . Paraphrasing, she said something to the effect of, "Styling form elements is easy if you just use webkit-appearance: none " . I had never hear of this webk... read more »

Exploring The Triple Equals (===) Operator In Lucee CFML

CAUTION : I am incorrect about what is happening with regard to Simple Values in my write-up -- the Lucee Documentation is, apparently, also wrong. See Brad Wood's comments below and his link to a demo showing that the triple equals operator ( === ) always does memory reference comparisons ... read more »

Using CSS Counters To Apply Custom Labels To An HTML List

The other day, one of my teammates, Hector Yeomans , shared a blog post by Nicolas Carlo on the Strangler Pattern . The post, in and of itself, was an intriguing look at how to avoid "big bang" rewrites. However, as I was reading the post, something else caught my eye. Nicolas was doing... read more »

Experiment: Wrapping CFThread Execution In A FusionReactor Tracked Transaction In Lucee CFML

Now that I have FusionReactor running in our production Lucee CFML apps , I've been spending a lot of time trying to understand how I can best leverage its functionality. And, while it offers excellent insight into the top-level page requests coming into the ColdFusion application, I am struggling... read more »

Adding A Description To FusionReactor Tracked Transactions In Lucee CFML

A few weeks ago, I looked at using the FusionReactor API ( FRAPI ) to add custom instrumentation in Lucee CFML . In that post, one of the features that I explored was the ability to wrap a portion of your code in a "Tracked Transaction" such that the execution of said code would show up ... read more »

Generating Meme Images In The Browser Using html2canvas In Angular 9.0.1

Over the weekend, I was noodling on some ideas regarding image generation when I came across a blog post about "screenshots" by Daniel Sternlicht . In that post, Daniel was using a library called html2canvas (by Niklas von Hertzen ) to generate screenshots of DOM nodes in the browse... read more »

Using XSLT And XML Transformations To Style My Blog's RSS Feed As An HTML Page

For years, I've been using CSS to add a touch of style to my blog's RSS feed . For those of you who are relatively new to web development, RSS stands for "Really Simple Syndication"; and was one of the primary ways that content was distributed on the web prior to the "Social Media&q... read more »

Dynamically Instrumenting ColdFusion Component Methods With FusionReactor Tracked Transactions In Lucee CFML

One of the really fun features of ColdFusion is its highly dynamic nature. Whether you're using onMissingMethod() or using getFunctionCalledName() or injecting methods , you can basically make your ColdFusion code do anything that you want it to. In celebration of this flexibility, I wan... read more »

Exploring Tag Islands (Tags In CFScript) In Lucee CFML

Yesterday, in my post about using CFML tag syntax in CFScript , Andrew Kretzer told me that Lucee CFML now offers something called "Tag Islands" (seemingly as of Lucee CFML ). I had never heard of Tag Islands before; and, other than this rather heated post on the Lucee ... read more »

Using ColdFusion Tags In CFScript In Lucee CFML

Last week, I had lunch with Gert Franz - co-creator of the open source ColdFusion-compatible language, Lucee CFML . At the meeting, I was telling Gert how using Lucee over the last year or so has really reignited my love and passion for ColdFusion programming . ColdFusion just makes things e... read more »

My Personal Best Practices For Using LaunchDarkly Feature Flags

It's hard to believe that I've been using LaunchDarkly for over four years now. In October 2015, when Christopher Andersson suggested that we try something called "feature flags" here at InVision , I couldn't even begin to understand how truly revolutionary they were going to be. I... read more »

Trying To Debug "Deadlock found when trying to get lock; try restarting transaction" Errors In Lucee CFML

The other day, Josh Siok and I were running into a strange problem: we were executing a ColdFusion page that was immediately terminating in a Transaction Deadlock error in MySQL. However, when we looked at the SQL statement that was failing to obtain the lock, it was a complete mystery (at leas... read more »

StructCopy() Does Not Necessarily Return A Native Struct In Lucee CFML

Over the weekend, while working on a version of dump() that gracefully handles cyclic references in Lucee CFML , I happened upon a quirk of the language when dealing with reflection-style coding. It turns out, using structCopy() to perform a shallow-copy of a given data-structure doesn't neces... read more »

The "Top" Argument In Dump() Will Not Protect You From Circular References In Lucee CFML

The other day, I had a typo in my ColdFusion code that was accidentally creating a circular reference in one of my data-structures. The workflow that was consuming this data-structure dealt with serialization; and, attempting to serialize the accidental circular reference was completely locking-up ... read more »

Sending FusionReactor Tracked Transaction Metrics To The Cloud Dashboard With Lucee CFML

One of the nice features of FusionReactor is that when you create a sub-Transaction with the FRAPI , you can graph that Transaction performance against the server's CPU and Heap profile. This helps identify correlations, bottlenecks, and performance opportunities. This works out-of-the-box wit... read more »

Wrapping The FusionReactor API (FRAPI) For Safe Consumption In Lucee CFML

Over the weekend, I looked at how to use the FusionReactor API (FRAPI) to instrument ColdFusion code . In that post, I was referencing the FRAPI Java class directly; which, only works if you have the FusionReactor Java Agent installed. In production code, I tend to wrap these kinds of classes / ... read more »

Using The FusionReactor API (FRAPI) To Add Custom Instrumentation In Lucee CFML

Now that InVision is migrating from the New Relic APM to the FusionReactor APM (Application Performance Management) for our Lucee CFML servers, I wanted to take some time to familiarize myself with the API exposed by the FusionReactor Java Agent . On its own, the FusionReactor core functiona... read more »

A Months-Long Journey Of Incrementally Increasing Performance Of A Lucee CFML Service

The last two-and-a-half months of my life have been bananas! They've also held some of the most rewarding work that I've done in a some time. Along with the support from a few of my fellow InVisioneers , I've been working tirelessly to try and improve the performance of a long-neglected internal... read more »

Using A File Upload Or The Request Body To Overcome The Slow Processing Of A Large Form POST In Lucee CFML

Yesterday, I demonstrated that Lucee CFML appears to incur a request-cloning cost when spawning CFThread tags . In most circumstances, this cost is negligible. However, if the parent HTTP request is generated by a large Form POST , the cost of spawning a CFThread tag can become shockingly ex... read more »

Lucee Appears To Incur Request-Cloning Overhead When Spawning CFThread Tags In Lucee CFML

Yesterday, we installed FusionReactor on some of our Lucee CFML servers in order to investigate curious JVM performance patterns. I'm still trying to understand what I'm seeing; but, I did notice something bizarre happening in some of the stack-traces. It looked as if the incoming HTTP Request Ob... read more »

Strange MongoDB Error When Incrementing A Document Property In Lucee CFML

Yesterday, I ran into a really strange error when trying to increment a numeric value on an in-memory MongoDB document in Lucee CFML Google didn't really provide any answers; so, I wanted to document the error here and share the work-around that I finally used. My ColdFusion code was at... read more »

Using A Closure To Encapsulate Depth-First Tree Traversal In Lucee CFML

In my last couple of Lucee CFML posts, I've looked at using a while loop to recursively iterate over a tree structure without creating a deep (and expensive) call-stack. I've done this using both a breadth-first algorithm and a depth-first algorithm . In both cases, the algorithm for the trave... read more »

Repositories And Data Access Layers Can Have As Many Methods As You Find Helpful

When I was first learning about Abstractions in programming, one of the early patterns that I came across was the Data Access Layer (DAL), which attempted to hide the implementation details of the underlying data persistence mechanism. I believe that the Repository Pattern is a more specific type o... read more »

Passing isArray() Decision Function Does Not Ensure Member Methods In Lucee CFML

This post is primarily a note-to-self so I don't make this mistake again. But, the other day, when I was working on the memory-leak detector code for Lucee CFML , I ran into a fun edge-case having to do with Reflection-style programming. In that post, I used Lucee's Decision functions (ex, isArra... read more »

Snapshotting ColdFusion Component State In Order To Find Memory Leaks In Lucee CFML

A couple of years ago, I wrote about a "Snooper" component that I created that would allow you to peek into the private scope of your ColdFusion component state in order to try and find memory leaks. That approach worked. Sort of. But, it was clumsy and hard to use. Then, the other week... read more »

Depth-First vs Breadth-First Tree Traversal Using A While-Loop In Lucee CFML

As part of my post yesterday on how I sometimes replace recursive algorithms with loop-based algorithms in Lucee CFML, I mentioned that the algorithm incidentally shifted from a depth-first strategy to a breadth-first strategy. In a follow-up conversation that I had about the post with fellow InV... read more »

Replacing Depth-First Recursion With A Breadth-First While-Loop In Lucee CFML

Recursion is a very powerful programming construct. And, I absolutely love recursion just as much as the next person (whether I'm dealing with recursive Promises in JavaScript , recursive templates in Angular , recursive components in Angular , or recursive algorithms in ColdFusion). But, recu... read more »

Struct Iteration Methods Like Each, Map, And Filter Include Null Values In Lucee CFML

Earlier this week, I was working on some reflection-style code in CFML wherein I was recursively looking through structs of data. As I was doing this, it occurred to me that some of the values stored in the structs could be null; and, I wasn't sure off-hand how Lucee would handle these values durin... read more »

Considering HTTP Methods PUT And PATCH Indicators Of An Anemic Domain Model And A Leaky Abstraction

A few years ago, I wrote about how I don't like "Update" methods in my API design . In that post, I talked about my "feelings" on the matter because I couldn't really articulate the red flags that were going off in the back of my mind. Over the weekend, however, I was reading t... read more »

The Unicorn Project: A Novel About Developers, Digital Disruption, And Thriving In The Age Of Data By Gene Kim

Early last week, I posted my review of The Phoenix Project : A Novel About IT, DevOps, and Helping Your Business Win. I found that book to be absolutely riveting. And, in the multitude of conversations that I was having about that book, I discovered that Gene Kim - co-author of The Phoenix Proje... read more »