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

Recent Blog Posts by Ben Nadel

Referencing String Characters Using Array-Notation In Lucee CFML 5.3.5.92

Over the weekend, I was reading through the Learn Modern ColdFusion <CFML> in 100 Minutes book by Ortus Solutions when I came across their section on Character Extraction . In that section, they mention that - in Lucee CFML - you can access the characters of a String using Array-notati... read more »


Experimenting With Chained Keyboard Events Using Event Plug-ins In Angular 9.1.0

Over the weekend, I tried to showcase the awesome power of multiple cursors in Sublime Text 3 (ST3) . As I was doing that, I thought about two of the ST3 key combinations that I use all the time: CMD+K followed by either CMD+U (uppercase) or CMD+L (lowercase). Which, in turn, got me thinking... read more »


Exploring The Power Of Multiple Cursors And Selections In Sublime Text 3

For the past few years, I've been using - and loving - the Sublime Text (ST3) editor . In fact, I find it so enjoyable, that I've never even looked at any of the new editors that seem to be gaining popularity. One of the Sublime Text features that I couldn't live without is the ability to use ... read more »


Putting DEBUG Comments In Your SQL Statements Makes FusionReactor Query Tracing More Effective

For years, I've been advocating that people put DEBUG comments in their SQL statements to help identify performance bottlenecks in their applications. I feel so strongly about this that I'm absolutely nonplussed whenever I see a SQL query show-up in the MySQL slow-log or the process-list withou... read more »


Deleting Data From A Table Using An INNER JOIN DELETE Query In MySQL 5.6.37

Earlier this week, I took a look at using an INNER JOIN within an UPDATE statement in MySQL in order to copy data from one table to another. To complement that post, I wanted to take a quick look at how an INNER JOIN can also be used in a DELETE statement to allow for the deleting of reco... read more »


Array.Sort() Operator Must Return INT-Sized Result In Lucee CFML 5.3.4.80

A few weeks ago, I wrote about using Subtraction to power the Array Sort operator in Lucee CFML . This has become my go-to approach for sorting arrays. However, yesterday, I ran into an edge-case in which Subtraction was throwing an error. It turns out, the number returned from the array.sort() ... read more »


Now Using utf8mb4 To Enable Emoji In My Comments

This post is mostly here so that I can test the comment feature in production. I just updated my blog_comment table to use the utf8mb4 character set, which means that it can now support Emoji characters: ALTER TABLE `blog_comment` MODIFY COLUMN `content` longtext CHARACTER SET utf8mb4 C... read more »


Tag Islands And CFScript-Based Tags Bring Perfection To ColdFusion In Lucee CFML 5.3.4.80

In February of this year, I wrote two back-to-back posts about fascinating features of Lucee CFML. First, that you could use all ColdFusion tags in CFScript using a consistent syntax (thanks Gert Franz ); and, second, that Lucee CFML supports Tag Islands within CFScript (thanks Andrew Kretzer... read more »


Copying Data From One Table To Another Using An INNER JOIN UPDATE Query In MySQL 5.6.37

As database-driven applications evolve, so does the underlying database schema. When this happens, some degree of data transformation and migration often has to happen. For example, I just retrofitted Markdown onto 15-years of HTML content using Lucee CFML . One approach that I make use of a lot i... read more »


As A Man, I Can Be A Better Example Than I Have Been

Many years ago, a woman came up to me at a conference and said something to the effect of: I really appreciate what you do; but, I think you're a terrible person. At the time, I was amused by this sentiment. I've been writing on this blog for about 15-years now; and, in the early d... read more »


Avoiding Self-Closing IFRAME Tags Using htmlParse() In Lucee CFML 5.3.4.80

Over the past week, I've been working to retrofit Markdown onto all of my old blog content using Lucee CFML . It's been an exciting journey with a lot of trial and error. For example, the other day, I realized the .xmlText property wasn't giving me escaped HTML entities ; and, just this morning... read more »


Reading XmlText Values From The XML Document Produced By htmlParse() In Lucee CFML 5.3.4.80

Over the weekend, I spent about 2-days trying to retrofit Markdown onto 15-years of HTML-based content using htmlParse() in Lucee CFML . It was an iterative process with a lot of trial and error. And, even after I posted my article, I continued to find new and interesting caveats. One thing th... read more »


Retrofitting Markdown Onto 15-Years Of Articles Using htmlParse(), XPath, And Lucee CFML 5.3.4.80

In 2019, I finally dumped my Windows VirtualBox and XStandard ActiveX blog authoring and moved my content-creation workflow over to using Markdown in ColdFusion . Markdown has been a total joy to work with for new articles; however, I still have 15-years of old content that is hard-coded as ... read more »


Pixelating An Image Using GraphicsMagick And Lucee CFML 5.2.9.31

The other day, while searching for some GraphicsMagick information, I came across a Stack Overflow post that was discussing an approach to pixelating part of an image. I don't really have a need to pixelate images in my day-to-day work; however, it's Friday the 13th; and, pixelation sounds like a... read more »


Using Subtraction To Power The Array Sort Comparison Operator In Lucee CFML 5.2.9.31

Yesterday, while looking at generating color histograms using GraphicsMagick and Lucee CFML , I had to sort of an Array of colors based on their frequency distribution within an image. To do this, I created a sort operator that used a single Subtraction expression to calculate the comparison resul... read more »


Exploring Color Histograms In GraphicsMagick And Lucee CFML 5.2.9.31

Within InVision , one of the interesting features of "Boards" is that, when you upload an image, the app shows you the "top colors" present in the image (which you can then re-add to the Board as a Swatch). I believe we use ColorThief to do this. This feature got me curious a... read more »


Replacing Transparent Image Backgrounds With GraphicsMagick And Lucee CFML 5.2.9.31

At InVision , one of the things that we do when generating thumbnails is replacing transparent image backgrounds with a solid color (typically white). We do this because the design of the page that renders thumbnails is almost never designed to expect any image transparency. As such, I wanted to t... read more »


Centering An Image Annotating Using GraphicsMagick And Lucee CFML 5.2.9.31

At InVision , when a user leaves a comment in a prototype, we generate a "context image" for that comment to use in the header of an outgoing notification email. Currently, that context image is generated using ColdFusion's native CFImage functionality. In an effort to see if I can mo... read more »


Annotating An Image Point Using GraphicsMagick And Lucee CFML 5.2.9.31

Continuing my exploration of GraphicsMagick in Lucee CFML , this morning, I wanted to see how I might go about annotating an image. That is, labeling a point on the image with a marker and an annotation index. I suspect that this can be achieved in several ways; however, the first approach that ju... read more »


Getting Image Width And Height Using GraphicsMagick And Lucee CFML 5.2.9.31

Yesterday, I looked at how to get the RGB/HEX color of a pixel using GraphicsMagick and Lucee CFML . Continuing my exploration of how I might use GraphicsMagick to replace ColdFusion's native CFImage functionality, I wanted to look at how I might read an image's Width and Height attributes using... read more »


Getting The RGB Color Value Of An Image Pixel Using GraphicsMagick And Lucee CFML 5.2.9.31

Now that I have my GraphicsMagick Docker playground up and running, it's time to start recreating some functionality with the gm command-line tool that I would have historically done with ColdFusion's CFImage tag. Starting out simple, I wanted to see if I could read in the Color value (Hex or... read more »


Creating A GraphicsMagick Playground With Docker, CommandBox, And Lucee CFML

When Adobe first introduced the CFImage tag in ColdFusion 8 , I thought it was the bee's knees! Suddenly, this language that made everything else easy now made image manipulation easy as well. In the years since then, however, I've grown to view ColdFusion's image manipulation with a bit of ... read more »


Using CSS Webkit-Appearance To Style Checkbox ::after Pseudo-Element

Last weekend, my mind was blown by Divya Sasidharan , who mentioned that you could use webkit-appearance to add custom CSS styling to native form elements . Since then, I've been on the lookout for examples of this; and, just yesterday, I came across a fascinating checkbox on the Coolors col... read more »


Retrofitting Theming Into A Legacy App Using LESS CSS And CSS Custom Properties

A while back, I started to experiment with using CSS custom properties to theme Angular components . Which is totally awesome! But, it's one thing to be working with a fresh Angular install; and, it's a completely different beast to be working with an old, janky, legacy application ( cough this... read more »


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 5.3.4.77

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 5.2.9.40

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 5.2.9.40

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 »