Ben Nadel
On User Experience (UX) Design, JavaScript, ColdFusion, Node.js, Life, and Love.
Ben Nadel at the jQuery Conference 2010 (Boston, MA) with: Brian Crescimanno
Ben Nadel at the jQuery Conference 2010 (Boston, MA) with: Brian Crescimanno@bcrescimanno )

Recent Blog Posts by Ben Nadel

Checking To See If An IP v4 Address Is In A CIDR Range Using ColdFusion And SubnetUtils

At work, I need to build a feature that allows an IP address to be validated against a CIDR (Classless Inter-Domain Routing) range. CIDR - as I just learned - is range notation that defines a High and Low IP address by identifying how many bits in a given IP address are "locked down" and how many a... read more »

JavaScript Demos Using Webpack 4 With Angular 6.1.7 And Ahead Of Time (AoT) Compiling

As you may know, I collect most of my JavaScript demos in a single GitHub repository (JavaScript Demos) . And, for the last year or so, I've been compiling my subset of Angular demos with Webpack 3 . These Webpack compilations have been using the ts-loader plugin to transpile and concatenate file... read more »

Testing For Future Data-Types With isFuture() And isEmptyFuture() In ColdFusion 2018

ColdFusion 2018 introduced us to the concept of Futures. Futures, like Promises, provide hooks into the eventual resolution of data. Unfortunately, ColdFusion 2018 doesn't seem to have any "decision functions" geared towards Future detection. Luckily, the isInstanceOf() function provides us with an... read more »

Passing A Timeout To .get() Will Not Override An Existing Future Timeout In ColdFusion 2018

CAUTION : This is just a note to self; building my mental model around Futures in ColdFusion 2018. This is just a quick post to document a behavior of .get() on a Future in ColdFusion 2018. Calling .get() will cause the page to block and wait for the Future to be resolved. And, as part of that ca... read more »

Saving A Future In An Intermediary Variable Breaks Error Handling In ColdFusion 2018

A couple of days ago, I stumbled upon a "bug" in ColdFusion 2018 in which passing a Future though a proxy method breaks the error handling on that Future . Well, this morning, I ran in to a related bug that is even more befuddling. It turns out, if you save a Future into an intermediary variable b... read more »

EXPERIMENT: Creating A Promise-Inspired Future Constructor In ColdFusion 2018

To be honest, when I saw that ColdFusion 2018 had "Futures", my first reaction was something like, "Awesome, we now have Promises in ColdFusion!" As I've dug into the feature, however, I've come to realize that ColdFusion Futures and JavaScript Promises have very little in common. At best, they bot... read more »

Mysterious Error Handling Behavior With Proxied Futures In ColdFusion 2018

As I've been digging into the new Future functionality in ColdFusion 2018, I've stumbled over a number of caveats. But, this morning, I've run into something that I can't seem to make heads-or-tails of. From what I think I can demonstrate, the error handling capabilities in a Future chain appear to... read more »

The .error() Method Cannot Catch Future Task Timeout Errors In ColdFusion 2018

Earlier this morning, I demonstrated that providing a Timeout value to a Future method will change the Future callback from an asynchronous call into a blocking, synchronous call in ColdFusion 2018 . Now, I don't know if this is a related "issue"; but, it appears that the .error() method cannot ca... read more »

Providing A Timeout To A Future Method Changes It To A Synchronous Blocking Call In ColdFusion 2018

As a quick follow-up to my previous post on Future Timeouts in ColdFusion 2018 , I just realized that timeouts have a very curious side-effect: they turn asynchronous callbacks into blocking, synchronous calls. This appears to apply to both the runAsync() method as well as any chained .then() or .... read more »

Timeouts Only Apply To Last Future Thread, Not The Preceding Future Chain In ColdFusion 2018

When I first read the Future documentation in ColdFusion 2018, it was very tempting to think that everything was asynchronous. But, as I demonstrated yesterday, the .then() and .error() Future methods are blocking, synchronous calls in the parent context . That was a bummer of a discovery. And, it... read more »

Errors Thrown In Future Threads Don't Report Complete Details In ColdFusion 2018

Earlier today, I took my first look at the Future data-type and the associated runAsync() method in ColdFusion 2018. In that post, I talked about the confusing behavior of the .then() and .error() methods which appear to be blocking calls on the parent thread . Another point of confusion and frict... read more »

The Future Methods .then() And .error() Are Blocking In ColdFusion 2018

The other day, I read that a new version of ColdFusion has been release: ColdFusion 2018. And, while perusing the "What's New" list , I happened to see that asynchronous programming with "Futures" was one of the newly-introduced features. I've never used Futures in Java before; though, I have used... read more »

MySQL 5.7 InnoDB AUTO_INCREMENT Counters Get Reset After MySQL Service Restart

The other day, while writing some "archiving" logic in a data-driven ColdFusion application, I started getting errors that I didn't quite understand. As I was moving records from an "active" table to an "archive" table, the database started throwing "Duplicate entry for key 'PRIMARY'" constraint vi... read more »

Defining Dynamic AJAX-Driven Service Providers Using APP_INITIALIZER In Angular 6.1.4

On the latest Adventures In Angular podcast , Dave Bush discusses his blog post about storing Angular configuration data outside of the compiled application files. By separating the application logic from the configuration data, it makes your compiled application portable across your various env... read more »

Using Background-Attachment CSS To Create A Sticky IFrame Advertising Background In JavaScript

Over the weekend, while Googling around, I landed on a page that happened to have a Google advertisement embedded in the content copy. Normally, I would just skip right over the ad without giving it a second thought. But, this ad had me mesmerized: as I scrolled the page, the background-image of th... read more »

Using CSS Custom Properties To Theme Components In Angular 6.1.3

Earlier this week, I took my first look at theming Angular applications using the :host-context() binding . That approach worked really well, was straightforward, and did not have any special browser-support considerations since Angular just compiled it down to compound CSS selector paths. But, it... read more »

Using CSS Host-Context To Theme Components In Angular 6.1.3

After I built BigSexyPoems with Angular 6 ( ), Seema Shariat augmented the application with some theming abilities. I really like the direction this app is going in; and, I want to try and take the theming functionality to the next level. Only, I've never done any theming b... read more »

Replacing Double-Dashes With Em Dashes While Typing In JavaScript

One of the little delighters that I see many applications baking into their user experience (UX) is the auto-injection of Em Dashes whenever the user enters two normal dashes (hyphens) in a row. The Em Dash is often used used in lieu of other punctuation marks, such as commas or parenthesis, in ord... read more »

Creating A Pre-Bootstrap Loading Screen With window.postMessage() In Angular 6.1.2

Managing the UI (User Interface) within an Angular application is relatively easy. But, communicating UI changes to the greater browser context is not exactly straightforward. This challenge presents itself when creating a pre-bootstrap "loading" screen that only disappears once the Angular applica... read more »

Experimenting With CSS Variable / Custom Property DOM Inheritance

For the last couple of days, Seema Shariat and I have been discussing the concept of theming in Angular applications. And, to be honest, this is something that I know next-to-nothing about. So, I've started to read up on the matter; and it seems that CSS Custom Properties (commonly referred to as... read more »

Using style.setProperty() To Keep CSS Property Names Consistent In JavaScript

This morning, while reading an article on theming Angular components by Austin McDaniel , I saw something that I don't think I've ever seen before. Austin was using a .setProperty() method to define an element's CSS properties in JavaScript. Historically, I've mutated the style properties direct... read more »

Using "Safe Updates" To Prevent Unbounded UPDATE And DELETE Statements In MySQL

Earlier this week on Twitter, I was joking / venting about how I accidentally ran an UPDATE statement without a WHERE clause and it [obviously] ended-up affecting every row in the given table. In response to this tweet , Karl Petrow mentioned that "safe updates" must have been turned off. I ha... read more »

BigSexy Poems Uses Angular And The Datamuse API To Help You Write Poetry

Beneath my nerdy exterior, I fancy myself a romantic. And, one of the ways in which I like to express that part of my psyche is through poetry. If you've followed this blog for long enough, you'll know that I like to write poems about ColdFusion and jQuery and Regular Expressions . But, I also... read more »

Don't Let The Minimum Lovable Product (MLP) Become The Enemy Of The Good

As someone who has spent more than a decade living and breathing a "design first" product development workflow , the original concept of the "Minimum Lovable Product" was such a breath of fresh air. In my mind, the Minimum Lovable Product - or MLP - was nothing more than an acknowledgment that des... read more »

Checking To See If An Element Has A CSS Pseudo-Class In JavaScript

This morning, I sat down to see if I could detect "autofill" behaviors in the browser. In doing so, I came across several StackOverflow posts that mentioned a ":-webkit-autofill" pseudo-class getting applied to inputs in WebKit-based browsers. When I read this, it occurred to me that I didn't know ... read more »

A Book Apart: Flexible TypeSetting By Tim Brown

Over the weekend, I read Flexible TypeSetting by Tim Brown . This book, from the ABookApart series, discusses the fascinating and beautifully nuanced art-form of font selection and responsive text layout design. If you're strictly a back-end engineer, this is probably not the book for you. But, ... read more »

Implementing A "Show Password" Checkbox On A Login Form In JavaScript

More and more, I've been seeing a pattern emerging on login forms where the user is presented with a "show password" toggle. Clicking on this toggle will change the password field from an obfuscated input to a plain-text input where the user can clearly see what value they are typing. Now, if you'r... read more »

ColdFusion Client For The Word-Finding Datamuse API

As a side-project to learn more about Docker and Redis, I've been working on an application that will help me write poetry. A big part of writing poetry is understanding rhyme schemes, syllable counts, and words that have similar meanings. My application hopes to bring all of these tools together i... read more »

Downloading Text Using Blobs, URL.createObjectURL(), And The Anchor Download Attribute In JavaScript

About a month ago, I discovered that you could use Plain Text in a Data URI when programmatically prompting a user to download content . Prior to that, I had assumed that all Data URIs had to be Base64-encoded. In response to that post, several of my co-workers ( Adam DiCarlo and Dave Johnson ) ... read more »

Timezone In Date .toTimeString() Is Not Always An Abbreviation In JavaScript

The other day, when I tried to open my Incident Commander app on a different computer, nothing would load. The console was reporting some sort of parsing error. And upon digging into the issue, I discovered that the timezone substring reported by the Date's .toTimeString() method was not what I a... read more »