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

Recent Blog Posts by Ben Nadel

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 »

.NET Microservices: Architecture For Containerized .NET Applications

Last week at InVision , Tom Lee passed-around a few links to articles that discussed handling failure in a distributed system. These articles turned out to be chapters in a digital book published by Microsoft: .NET Microservices: Architecture For Containerized .NET Applications by Cesar de la... read more »

Accessing Parent Route Params Via paramsInheritanceStrategy In Angular 6.0.7

Yesterday, I took a quick look at how to access any and all route parameters in an Angular 6.0.7 application by walking the Router State tree and aggregating all params in an RxJS Observable. In response to that post, Danny Blue pointed out that recent releases of the Angular Router include a... read more »

Collecting Route Params Across All Router Segments In Angular 6.0.7

One of the really cool things about the Angular Router is that it supports location paths that implement "matrix URL notation". This matrix URL notation creates strong cohesion between the route parameters and the route segments to which they belong. This cohesion is really nice from an ActivatedRo... read more »

The Not-So-Dark Art Of Designing Database Indexes: Reflections From An Average Software Engineer

When I first started using databases in my software design, I didn't even know that databases had indexes (or "indices," for the more mathematically minded folks). In fact, I had already been building data-driven websites for a few years before I even worked on a database that was large enough to p... read more »

Open-Source, Secure, Client-Side, Network-Free, JSON Linting

When I write data to a log aggregation tool, like Loggly, I try to write said data as structured JSON (JavaScript Object Notation) values. This way, the log aggregation tool can parse and index the log payloads using something like ElasticSearch (under the hood). Unfortunately, in order to manage c... read more »

Using The LaunchDarkly Dashboard And JSON Types To Create Light-Weight Application Administrative Features

In the LaunchDarkly Lunch-n-Learn panel discussion in NYC , I had theorized that you could use LaunchDarkly as a way to "hack together" light-weight administrative features for your web application. Since the LaunchDarkly multivariate feature flag values are so open-ended, I suggested that you cou... read more »

LaunchDarkly Lunch-And-Learn Panel Discussion: New York City

Yesterday, I had the pleasure of representing InVision App in a Lunch-n-Learn panel discussion for LaunchDarkly (alongside Lena Krug of Meetup, Christopher Cosentino of Shutterstock, and Greg Ratner of Troops). As you may have seen from my blog, InVision has been a LaunchDarkly customer ... read more »

Drawing Parallels Between a Flux-Style State Management Architecture (Like Redux) And An Event-Driven Microservices Architecture

CAUTION: This post is mostly just me thinking out-loud about stuff with which I have little experience. Take the following with a grain of salt. I'm just trying to formulate a better mental model for complex architectures that have long-term maintainability. The vast majority of my experience re... read more »

Taming The State In React: Your Journey To Master Redux And MobX By Robin Wieruch

I have several projects at work, such as my Incident Commander application , that could use some refactoring love with regard to state management. I have a sense that using a technology like Redux or NgRx Store would be a value-add. However, I've been having a heck of a hard time wrapping my head ... read more »

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, has been coming up a lot in my Google searches when researching the Angular web development framework. Not only does 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 »