Ben Nadel
On User Experience (UX) Design, JavaScript, ColdFusion, Node.js, Life, and Love.
I am the chief technical officer at InVision App, Inc - a prototyping and collaboration platform for designers, built by designers. I also rock out in JavaScript and ColdFusion 24x7.
Meanwhile on Twitter
Loading latest tweet...
Ben Nadel at CFUNITED 2008 (Washington, D.C.) with: Simon Free

Recent Blog Posts by Ben Nadel

The User Experience (UX) Of Custom Scrollbars

By Ben Nadel on August 26, 2014

Since the beginning of time (or thereabouts), browsers have provided a native way to define a scrollable viewport for content. They're not the most beautiful things; but, they work really well, they're super easy to implement, and everyone knows exactly how to use them. When you build a custom scro... read more »

Creating A Reusable Timer In AngularJS

By Ben Nadel on August 25, 2014

In my AngularJS applications, I want my controllers to respond to events. But, often times, I don't necessarily want the controller to react to every single event; rather, I'd like to throttle those events such that closely timed events trigger only one reaction. After implementing this logic a goo... read more »

ColdFusion Per-Application Datasources Don't Work In The OnApplicationEnd() Event Handler

By Ben Nadel on August 19, 2014
Tags: ColdFusion

After yesterday's blog post about the limitations of the onApplicationEnd() event handler in ColdFusion , I wanted to see if the per-application datasources fell pray to the same problem. Long story short, they do. And, while I haven't tested all of the options, it is becoming clear to me that non... read more »

ColdFusion Per-Application Mappings Don't Work In The OnApplicationEnd() Event Handler

By Ben Nadel on August 18, 2014
Tags: ColdFusion

The ColdFusion application framework provides hooks into the full application and session life-cycles; but, to be honest, I hardly ever use the onSessionEnd() or onApplicationEnd() event handlers. This inexperience came to light the other day when I went to clean up data in the onApplicationEnd()... read more »

Looking At Nested Event Timing And DOM Structure In AngularJS

By Ben Nadel on August 11, 2014

In AngularJS, the DOM (Document Object Model) responds, so to speak, to changes in the view-model (VM) as defined by the Controllers. But, the Controllers don't directly control the DOM; in fact, the Controller aren't supposed to know about the DOM. This is a clean separation of responsibilities; b... read more »

MySQL GROUP_CONCAT() Has Buggy Interaction With UNION Clauses

By Ben Nadel on August 9, 2014
Tags: ColdFusion, SQL

So, earlier this week, I blogged about the unfortunate way in which MySQL's GROUP_CONCAT() function will fail silently when you hit its size limit . Well, it turns out that GROUP_CONCAT() is even more unfortunate. After some testing, it looks like GROUP_CONCAT() fails even harder (and more mysteri... read more »

MySQL GROUP_CONCAT() Fails Silently When It Hits Its Size Limit

By Ben Nadel on August 7, 2014
Tags: ColdFusion, SQL

The other day, we ran into interesting little problem. We were using MySQL's GROUP_CONCAT() function to turn an aggregate list into a comma-delimited list. But things weren't working. No errors - just confusing behavior. After logging a lot of output, we realized that the GROUP_CONCAT() function wa... read more »

Normalizing HTTP Header Values Using CFHttp And ColdFusion

By Ben Nadel on August 5, 2014
Tags: ColdFusion

Last week, Saravana Muthu point out that my Sticky CDN project (a content delivery network for local development environments) couldn't handle complex values in HTTP request header responses. To be honest, in all the years that I've been rocking out in ColdFusion, I never noticed that header va... read more »

Parsing Http Time Strings With ParseDateTime() In ColdFusion

By Ben Nadel on August 4, 2014
Tags: ColdFusion

This is a super minor post; but, last week, when I was working on Sticky CDN, I remembered that the parseDateTime() function, in ColdFusion, could parse the date/time strings commonly used in HTTP headers. parseDateTime() won't take the timezone information into account; but, it will parse the date... read more »

Less CSS, Relative Paths, Nested Quotes, Url() Constructs, And Post-Processing

By Ben Nadel on August 1, 2014
Tags: HTML / CSS

This is a really tiny post, but it's something that had our team baffled for weeks. We were using an older version of RetinaJS which defined an .at2x() mixin for inserting media-query rules for retina-sized images. Everything was working great until we upgraded our Less CSS compilers; then, every... read more »

Sticky CDN - A Content Delivery Network (CDN) For Your Local Development Environment

By Ben Nadel on July 31, 2014
Tags: ColdFusion

So, last week, I had an itch to create a content delivery network (CDN) for my local development environment. I was able to get something working in a few hours; but it looked junky and I've since spent the last few mornings refactoring it into something that feels a little bit more elegant. I pres... read more »

Cloning RegExp (Regular Expression) Objects In JavaScript

By Ben Nadel on July 24, 2014

This morning, Mathrick pointed out that the RegExp-cloning approach in my Node.js Transform Streams exploration was fairly inadequate. While it wasn't the focus of the blog post (it was about Node.js streams), he was 100% right - my approach only worked coincidentally with my input. And, as some... read more »

Node.js Transform Streams vs. Through2 Streams

By Ben Nadel on July 22, 2014

As I've been trying to get my Gulp.js build script to work, I've found it necessary to dip down into Node.js and learn about streams. According to the Gulp.js documentation, all Gulps.js plugins are Transform streams, running in "Object Mode," that accepts and emit vinyl File objects. Furthermore, ... read more »

My First Look At Streams In Node.js

By Ben Nadel on July 21, 2014

Last week, I started to look into Gulp.js as a possible build-system. It seems really cool; but, I immediately felt the pain of not understanding Node.js streams, which are at the core of Gulp.js. As such, I spent the last few days trying to build a Node.js stream. This turned out to be a bear of a... read more »

CFFinally Tag Will Execute Even After An Abort In ColdFusion

By Ben Nadel on July 19, 2014
Tags: ColdFusion

This is just a quick sanity check. Earlier this year, I tested to see if the CFFinally tag would execute if the CFCatch block threw an error ; which it did. Along the same lines, I wanted to see if the CFFinally tag would execute if the CFCatch block tried to abort the request processing. To test... read more »

Clustering Plupload Instances For Parallel File Uploads

By Ben Nadel on July 14, 2014

If you follow this blog, you know that I'm a super-fan of Plupload for client-side file uploads. But, one thing that I've always wanted to experiment with is parallel uploads. By default, Plupload uploads one file at a time. But what if we clustered several instances of Plupload? Then we could dist... read more »

Migrating From ui-if To ng-if In AngularJS

By Ben Nadel on July 12, 2014

When I first started using AngularJS a few years ago, I also started using a library called Angular-UI. This was a supplemental module that filled in a few of the holes in the AngularJS core. For me, the best part of Angular-UI was a directive called "ui-if". This directive conditionally included D... read more »

Using Scope.$watch() To Watch Functions In AngularJS

By Ben Nadel on July 11, 2014

Most of the time, when I use $watch() in AngularJS, I am watching a $scope reference contained in a String value. But, you can also watch a Function. When you do this, your $watch function gets called multiple times per digest; and, if it returns a value, that value gets used, by AngularJS, to dete... read more »

Experimenting With Compress() And Uncompress() In MySQL

By Ben Nadel on July 10, 2014
Tags: ColdFusion, SQL

The other day, I was talking to Alexander Rubin from Percona about some MySQL optimization techniques when he mentioned that MySQL has compress() and uncompress() functions. I had never heard of these before; but, they do exactly what you think they might - compress and uncompress text values. Th... read more »

Url-Encoding Amazon S3 Resource Keys For Pre-Signed Urls In ColdFusion

By Ben Nadel on July 9, 2014
Tags: ColdFusion

Yesterday, I looked at which characters where being encoded by ColdFusion's urlEncodedFormat() function . This exploration was prompted by some recent trouble I'd been having with generating pre-signed URLs for Amazon S3 objects. I've been using Amazon S3 for a while now without issue; then, recen... read more »

Which ASCII Characters Does urlEncodedFormat() Escape In ColdFusion

By Ben Nadel on July 8, 2014
Tags: ColdFusion

urlEncodedFormat() is one of those functions that I've been using forever; but, when I stop and think about it, I'm not 100% sure what it actually does. I mean, I know that it prepares a value to be used in a URL; but I don't think I've ever actually read the documentation on it. And, I've definite... read more »

Showing Client-Side Image Previews Using Plupload Before Uploading Images To Amazon S3

By Ben Nadel on July 7, 2014

Last week, I took a look at generating per-file Amazon S3 upload policies using Plupload . As a follow-up experiment, I wanted to see if I could augment that demo by adding a client-side image preview before the images were actually uploaded to the S3 bucket. This would (or could) give the user ... read more »

Using BeforeUpload To Generate Per-File Amazon S3 Upload Policies Using Plupload

By Ben Nadel on July 3, 2014

As I've blogged about before, you can use Plupload to upload files directly from the client-browser to Amazon S3 . But, in order to do so, you have to generate an Amazon S3 upload policy and pass it along with the file upload. Hard-coding this policy at page-load can be problematic because it has ... read more »

Using Plupload To Upload Files In AngularJS

By Ben Nadel on July 1, 2014

Plupload is a very powerful JavaScript library for local file access and file upload . I've been using it for years and absolutely love it. But, I haven't yet done much with it in AngularJS. Sure, I've uploaded files; but, I haven't leveraged much of the Plupload 2.x features in my AngularJS appli... read more »

Looking At $compile() And MaxPriority In AngularJS

By Ben Nadel on June 26, 2014

The other day, I was looking through the AngularJS documentation for funzies ( thug-life! ) and I happened to notice that the $compile() service took some optional arguments, one of which was called "maxPriority". I immediately thought of being able to defer the linking of directives until a later ... read more »

Looking At Attribute Interpolation Workflow Changes In AngularJS

By Ben Nadel on June 24, 2014

When you create a directive in AngularJS, you can consume the attributes associated with the current element. And, if a given attribute uses interpolation, AngularJS provides the $observe() method for monitoring the dynamic, interpolated value over time. But, in this post, I want to look at the ini... read more »

Embedding Images As Base64-Encoded Data URIs Using Less CSS

By Ben Nadel on June 23, 2014
Tags: HTML / CSS

One of the things that I really like about Less CSS is the ability to embed images directly in the generated CSS files using data URIs. A data URI allows one type of content (a CSS file in our case) to embed another type of content (images in our case). Since images are binary, the image content ha... read more »

Inspecting Attribute-Normalization Within Directives In AngularJS

By Ben Nadel on June 20, 2014

This is a small but rather important post. I never noticed this before, but the attributes collection, that gets injected into the compile and link functions in an AngularJS directive, contains an "$attr" object. This object maps the normalized attribute names onto the attribute names used in the H... read more »

Shadowing Isolate Scope Behaviors In AngularJS

By Ben Nadel on June 17, 2014

Yesterday, I took my first look at using the Isolate scope within directives in AngularJS . In the 2 years that I've been learning about AngularJS, I never took the time to learn about the isolate scope because I never quite understood the use-case. I do like that the isolate scope forces you to t... read more »

Using Isolate Scope In Directives In AngularJS

By Ben Nadel on June 16, 2014

The other day, in my AngularJS "code smell" blog post about directives , I stated that the content may not apply to directives that use the "isolate" scope. The truth is, I don't know too much about the isolate scope feature since I never really understood the use-case. But, I'm tired of not knowi... read more »