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 TechCrunch Disrupt (New York, NY) with:

Recent Blog Posts by Ben Nadel

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 »

Thinking About Strings, Quotes, Tokens, And Tildes In Less CSS

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

When you've programmed in more traditional programming languages, the use of String values in the Less CSS preprocessor can be somewhat confusing. Less does have Strings (and an isstring() validation function); but, they don't play a major role, like they do in other languages. In Less CSS, you hav... read more »

AngularJS Code Smell: Defining $scope Methods In Directives

By Ben Nadel on June 12, 2014

I've touched on this idea before, in my AngularJS directive mindset post ; but, I've seen this happen so many times that I wanted to call it out again, as its own concept. If you define $scope methods inside of your AngularJS directives, you might want to consider this a "code smell." Take a momen... read more »

Cache-Busting CSS Images With Less CSS

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

This is a really minor post, but one of the features that I love about Less CSS and variable interpolation is the ability to cache-bust the images you consume in your CSS. Since the browser caches your CSS files and your images as separate items, it's easy to remember to cache-bust your CSS file, b... read more »

Understanding Variable Scope And Variable Injection In Less CSS

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

The Less CSS preprocessor allows you to define variables that can be used throughout your CSS structure; however, as I have been digging into Less CSS more, I have found the rules around variable assignment and variable visibility to be a bit confusing. Sometimes variables can be overridden; someti... read more »

Normalizing Less CSS Mixin Arguments For Use In JavaScript Variable Interpolation

By Ben Nadel on June 8, 2014

As I blogged about before, you can execute JavaScript code in your Less CSS . You can even pass Less CSS variables into the JavaScript context using variable interpolation. The problem with variable interpolation, however, is that it can corrupt the isolation of each argument and/or cause JavaScri... read more »

Normalizing String Values In Less CSS Mixins

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

When you're writing straight CSS, it doesn't matter that you have different opinions about which values should be quoted; but, when you write Less CSS mixings, a difference of opinion can lead to buggy code. As such, it would be nice to normalize string values inside of your mixins such that you co... read more »

Passing Rulesets To Mixins In Less CSS

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

Recently, I've been making a concerted effort to actually learn more about Less CSS - the CSS preprocessor. As I was reading through the documentation, I came across the ability to pass rulesets to mixins where they could be evaluated. I was having trouble wrapping my head around the concept, so I ... read more »

Executing JavaScript In The LESS CSS Precompiler

By Ben Nadel on June 5, 2014

The other day, when I upgraded my LiveReload app, some of my LESS mixins started to break. During the debugging process, I discovered that some of the mixins were executing JavaScript code directly in the LESS CSS markup. I had no idea that this was even possible in LESS CSS; and so, as with all th... read more »

The User Experience (UX) Of Trello Comments

By Ben Nadel on June 3, 2014

I've been using Trello for about a year now and I really like it. As with any project management (PM) system, it has its strengths and its weaknesses; but, overall, it's the best PM application that I've tried so far. It does a lot of things right - one of which is "comments." But, I didn't alway... read more »

Spliced - A Version Of Splice() That Returns The Original Array In JavaScript

By Ben Nadel on June 2, 2014

This isn't really a blog post so much as it is a stream-of-consciousness; but, sometimes I think it would be nice if JavaScript had a version of splice() that would return the mutated array rather than the collection of deleted values. To demonstrate, I've augmented the Array.prototype to include t... read more »