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

Recent Blog Posts by Ben Nadel

Behavior Change Of AutoComplete = "Username" In Recent Chrome Update

As a web developer, I have a lot of different email addresses, both valid and simulated, that I use to test my applications. And, for the most part, I don't give these emails a second thought; until a few weeks ago when the Chrome browser's behavior suddenly changed (I assume from some update that ... read more »

Spreading SQL And CFQueryParam Tags Across Multiple Function Calls In Lucee CFML

I've been spending a lot of time lately trying to figure out how to optimize the SQL queries required to render a given view. Ideally, the data in question should be aggregated into some sort of materialized view; or, the User Interface (UI) should be redesigned to show less data. But, unfortunatel... read more »

Considering MySQL, CFQueryParam, Prepared Statements, And SQL Queries That Use IN Clauses In ColdFusion

I've been using ColdFusion's CFQueryParam for longer than I can remember. It seems like it's just always been there, protecting us against SQL-Injection attacks and helping to speed up query parsing and performance. But, I have to admit that my mental model for CFQueryParam has always been a li... read more »

Printing Emoji Characters From Unicode CodePoints In Lucee CFML

Now that I've enabled Emoji characters in my blog comments (via MySQL's utf8mb4 character encoding), it's got me thinking more about how else I might use Emoji in my blog. That said, since my brain hasn't fully accepted Emoji as "normal" content; so, I'm still not ready to embed Emoji... read more »

I Prefer The Unary Plus (+) Operator Over parseInt() And ParseFloat() When Coercing Strings To Numbers In JavaScript

Yesterday, I accidentally stumbled into the location of a bug that's existed in InVision for over 5-years . And, when I finally found the problematic line of code, I felt like it warranted a write-up on its own. Because, the "broken" code wasn't inherently broken ; rather, it was ju... read more »

Zipping Image Archives With DEFLATE And STORE Compression Methods In Lucee CFML

For the last few years, one of my teammates - David Bainbridge - has been suggesting that we switch our zipping / archiving algorithms over to use STORE instead of DEFLATE when creating an archive of images. The idea being that most images file-formats are already compressed ; which means th... read more »

Pretty-Printing A ColdFusion Query Object In Lucee CFML

Last week, in my article about using INNER JOIN in a MySQL UPDATE statement , I shared the various states of the database using the output provided by the MySQL CLI (Command-Line Interface) tool. The MySQL CLI pretty-prints the resultant queries using a fixed-width ASCII table format, making i... read more »

Referencing String Characters Using Array-Notation In Lucee CFML

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

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

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

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

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

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

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

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

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

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

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

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

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

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 »