Ben Nadel
On User Experience (UX) Design, JavaScript, ColdFusion, Node.js, Life, and Love.
Ben Nadel at RIA Unleashed (Nov. 2009) with: Brian Rinaldi
Ben Nadel at RIA Unleashed (Nov. 2009) with: Brian Rinaldi@remotesynth )

Recent Blog Posts by Ben Nadel

Using invoke() To Invoke Passed-In Closure And Function References In ColdFusion

This morning, I had a huge break-through in my understanding of the invoke() function in ColdFusion. The first argument of the invoke() function is documented as being either a ColdFusion Component instance (or Java or COM or Corba or .NET instance); or, the name of a ColdFusion Component class fil... read more »


Automatically Scroll The Window When The User Approaches The Viewport Edge In JavaScript

CAUTION: This is primarily a "note to self" for future Ben. This represents a part of DOM interaction that I don't have a solid mental model for. As such, my confidence level here is not stellar. The other day, I had to a fix a bug in InVision that related to dragging DOM (Document Object Mode... read more »


Using Multivariate Feature Flags In LaunchDarkly To Gradually Ramp-Up Batched Operations Like Database Migrations

Yesterday, in my review of Distributed Systems Observability by Cindy Sridharan , I mentioned that I've never gotten a lot of value out of pre-production load-testing. Instead, I use LaunchDarkly feature flags to incrementally roll-out a new feature while monitoring the underlying database and a... read more »


Distributed Systems Observability: A Guide To Building Robust Systems By Cindy Sridharan

Over the weekend, I read Distributed Systems Observability: A Guide To Building Robust Systems by Cindy Sridharan . It's a short e-book (about 36-pages), provided as a free download by Humio (in collaboration with O'Reilly Media). And, while it's short, Sridharan paints a good overview of the co... read more »


Enable Tabbing Within A Fenced Code-Block Inside A Markdown Textarea In JavaScript

Last week, I took a look at using the Flexmark Java library to parse markdown content into HTML output in ColdFusion . Shortly thereafter, I enabled markdown formatting in my blog comments. This was a huge leap forward for usability. But, it still left something to be desired. While the markdown p... read more »


Exploring Plain-Text Data URIs And The Anchor Download Attribute In JavaScript

The other day, I took a look at using the Flexmark library to parse markdown content into HTML output in ColdFusion . As part of that exploration, I used the Prism.js JavaScript library to add syntax-highlighting to the rendered fenced code-blocks. While on the Prism.js site, I noticed something... read more »


Randomly Selecting RegEx Day Winners Using A Cryptographically Secure Pseudo-Random Number Generator (CSPRNG) In Node.js

Friday was the 11th annual Regular Expression Day celebration . And, this year, participants submitted Haiku poems about their Regular Expressions experience in an effort to win some gift cards. And, since I take every opportunity I can to learn me some programming, I figured that randomly selecti... read more »


jQuery's append() Methods Intercept Script Tag Insertion And Circumvent Load Handlers

The other day, I was adding FunnelEnvy to an application. The FunnelEnvy library requires both a Script Tag injection and some subsequent configuration of the loaded module. And, since I was in the middle of some jQuery logic, I figured I would just use jQuery to create, append, and listen for the ... read more »


The 11th Annual Regular Expression Day - June 1st 2018

I can't believe how the time flies! It's just crazy! It's already June 1st - and that means that it's time to show some love to the unsung heros of the programming world: Regular Expressions (aka RegEx). And, to shower praise on the unbelievable power of String-based pattern matching. And of course... read more »


Using Flexmark 0.32.24 To Parse Markdown Content Into HTML Output In ColdFusion

Yesterday, I took a look at using the OWASP (Open Web Application Security Project) AntiSamy project in ColdFusion in order to help sanitize and validate untrusted, user-provided HTML content . I'm particularly interested in AntiSamy because I want to enable markdown in my blog comments. However, ... read more »


Using The OWASP AntiSamy 1.5.7 Project With ColdFusion 10 To Sanitize HTML Input And Help Prevent XSS Attacks

For the past few days, I've been working to enable Markdown for my blog comments. Of course, the second I enable Markdown, I allow my readers to submit a wider variety of content. In order to ensure that said content doesn't contain malicious or ill-advised code, I wanted to add a subsequent layer ... read more »


NgRx Store Reducers Work Using A TypeScript Feature Called A Discriminated Union

Lately, I've been trying to understand how, when, and where to use a store-based state management approach like NgRx Store (or Redux, or MobX, etc). I'm currently 75% of the way through Todd Motto's NgRx Store course ; and, I've recently raved about Angular University's article, NgRx Store - An A... read more »


Environment Variables Represent Global State And Should Be Accessed By The Application Bootstrapping Logic Only

The more experience that I get with Node.js (ie, JavaScript on the Server), the more I've noticed a rather odd pattern: reusable modules and 3rd-party libraries making reference to Environment Variables. As an industry, we JavaScript developers have generally agreed that "global state" is "not a go... read more »


Binding RxJS Observable Sources Outside Of The NgZone In Angular 6.0.2

Last week, I took a look at tracking the scroll percentage (0-100) of the Document (or any arbitrary Element) using RxJS . In that post, all of the Observable events triggered by the "scroll" interaction were meaningful to the subscriber. And, as such, it made sense that every scroll interaction s... read more »


Functional-Light JavaScript By Kyle Simpson

Last night, I finished reading Functional-Light JavaScript by Kyle Simpson . I know that Kyle - commonly known as " Getify " in the JavaScript community - has published a number of books over the last few years (ex, You Don't Know JS ); but, this is the first one that I've read. And, it's reall... read more »


Monitoring Document And Element Scroll Percentages Using RxJS In Angular 6.0.2

Lately, Alligator.io has been coming up a lot in my Google searches when researching the Angular web development framework. Not only does Alligator.io have quality content, they also have a nice, clean site design. One of the little delighters that they have on their site is a progress bar the in... read more »


Static Methods Can Access Private Class Constructors In TypeScript

Yesterday, in a TypeScript lunch-n-learn that Rob Eisenberg was leading here at InVision , we started talking about various ways in which we could make class Constructors impossible to invoke from outside of the Class context. This got me thinking about Static methods; and, their ability to acce... read more »


Proof Of Concept: Using Axios As Your HTTP Client In Angular 6.0.0

The other day, I was listening to Wes Bos and Scott Tolinski talk about learning new technologies on the Syntax FM podcast . In that discussion, Wes mentioned that one aspect that's great about working with an unopinionated framework is that you can bring your own favorite libraries with you a... read more »


Experiment: Injecting A Component Reference Into A Pipe Instance In Angular 6.0.0

A few months ago, I created a Pipe for Angular 4.4.0 that would pipe a value through a method of the current component . Only, it wasn't really a "method" in the bound sense - it was a free-floating, naked Function reference. This Function reference could be implicitly bound through the use of a F... read more »


The Angular Framework Forces You To Learn More JavaScript, Making You A Better JavaScript Programmer

CAUTION: This post is entirely tongue-in-cheek (ie, not meant to be taken seriously). The very idea that a framework can force you to learn more or less JavaScript is completely ludicrous . And, any engineer that suggests otherwise has clearly not yet had sufficient caffeine. The only thing that ... read more »


Translating Viewport Coordinates Into Element-Local Coordinates Using Element.getBoundingClientRect()

Some user interaction events provide positional meta-data about the event in relation to the browser's viewport. For example, if you highlight text, the Selection API reports the bounding box of the selected Ranges in relation to the viewport . In order for your application to react to such events... read more »


Sanity Check: Manipulating Event Handlers And Timers Outside Of NgZone In Angular 5.2.10

CAUTION : This is primarily a "note to self" post. Yesterday, as I was recording the video for my Medium-inspired (textSelect) Angular directive , it occurred to me that I didn't have a great mental model for Angular Zone / NgZone / zone.js. I knew that I could bind an event-handler outside of t... read more »


Creating A Medium-Inspired Text Selection Directive In Angular 5.2.10

The other week, I started experimenting with the browser's Selection API , using it to draw outlines around the selected text based on the DOM (Document Object Model) Rectangles emitted by the embedded Range objects. As a follow-up to that experiment, I thought it would be fun to try and build a M... read more »


Using Node.contains() To Determine If One DOM Node Is Inside Another

This post is primarily a "Note to Self"; but, the other day, I was reading through the Mozilla Developer Network (MDN) site - as you do - and I noticed that the Node interface in the Document Object Model (DOM) API has a .contains() method. This method checks to see if one node is contained within,... read more »


Going Offline: Designing An Ideal Offline Experience With Service Workers By Jeremy Keith

Books in the "A Book Apart" series are just a pleasure to read. They are often the perfect length with just the right amount of content. They cover complex ideas; but, always make sure to cater to readers who are newer in the industry. They feel informal; but very professional. Going Offline: Desi... read more »


90% Of Design Is Picking Good Margins And Making Sure Things Line Up

Coming up on twenty years ago, I had an internship at a company in New York City called Kokopelli New Media. There, I had the opportunity to learn from some of the most amazing people like Glen Lipka , Ben Peters , and Ye Wang . It was there that I first learned about ColdFusion - the programmin... read more »


Leaders Are The People We Bleed With - Not The People We Bleed For

For the last few days, I've been obsessing over the ending of Braveheart - one of my favorite movies of all time. Now, I don't know how I got started in this direction; but, I've been thinking about the one line of dialogue that brings the Scotsmen into their final battle with the English. It's n... read more »


Designing Distributed Systems: Patterns And Paradigms For Scalable, Reliable Services By Brendan Burns

Over the weekend, I read Designin Distributed Systems: Patterns and Paradigms for Scalable, Reliable Services by Brendan Burns . I really enjoyed this book; although, I must admit it wasn't exactly what I expected. The description of the book barely mentions containers. And, while the patterns d... read more »


Outlining Text Selections Using The Window Selection API

Lately, I haven't been feeling terribly creative. Quite blocked, actually. And, as Ze Frank would recommend, I acknowledge that creativity is outside of my rational control . So, in order to get back to a good place, I need to just keep the machinery firing and hope that the creativity returns. So... read more »


The Daily Prime: Docker Experiment And A Source Of Daily Inspiration

Last month, I published a blog post on my journey from complete Docker noob to Docker novice running a Docker host on DigitalOcean with Nginx, Node.js, DataDog logs, DogStatsD, and free LetsEncrypt SSL certificates . That was a huge milestone for me; but, it was just the beginning of my Docker edu... read more »