Recent Web Log Entries By Ben Nadel
Using Plupload For Drag & Drop File Uploads In ColdFusion
Posted: August 30, 2012 at 10:43 AM by Ben Nadel
Over at InVision , we use Plupload to enable users to drag files right from their desktop onto the website in order to upload the files to our service. While Plupload has proven to be fairly awesome, getting it up and running smoothly can be a bit of a headache. As such, I thought it would be good to put together a demo project that encapsulate... read more »
Comments (20) | Post Comment | Ask Ben | Permalink
ColdFusion / JavaScript Genius? Join Me, And My Growing Team At InVisionApp.com!
Posted: August 28, 2012 at 6:58 PM by Ben Nadel
InVision , the venture-backed startup I co-founded, is on the lookout for a new addition to our development team . Experience with FW/1 and modular JavaScript application architecture (ex. Angular.js, RequireJS) is a huge plus. If you're interested, please fill out our application . P.S. Even if you've applied in the past, we still want t... read more »
Comments (7) | Post Comment | Ask Ben | Permalink
Converting Between String And Binary Values In ColdFusion
Posted: August 23, 2012 at 9:17 AM by Ben Nadel
For years, I have been using the toString(), toBase64(), and toBinary() functions to convert values back and forth between String and Binary formats in ColdFusion. According to the documentation, however, these methods are mostly deprecated. A few people have told me to use the charsetEncode() and charsetDecode() functions instead. And, for years,... read more »
Comments (6) | Post Comment | Ask Ben | Permalink
Converting Data Between String, Binary, Hex, And Base64 Format In ColdFusion
Posted: August 22, 2012 at 10:16 AM by Ben Nadel
The other day, when I was looking up test cases for my Crypto.cfc project , I came across some hex-encoded values that I needed to convert to plain "String" values before I could easily use them in my Unit Tests. After doing this, it occurred to me that it might be fun to wrap the ColdFusion functions, binaryEncode() and binaryDecode() , into sm... read more »
Comments (7) | Post Comment | Ask Ben | Permalink
Pusher.cfc - A ColdFusion Wrapper For Pusher.com v1.12 REST API
Posted: August 21, 2012 at 10:44 AM by Ben Nadel
Yesterday, I launched a project - Crypto.cfc - for generating Hashed Message Authentication Codes (Hmac) in ColdFusion . As a follow-up, I wanted to quickly launch an updated Pusher.cfc ColdFusion component , which makes use of Crypto.cfc's hmacSha256() method when communicating with the Pusher.com REST API. Additionally, this Pusher.cfc updat... read more »
Comments (8) | Post Comment | Ask Ben | Permalink
Crypto.cfc For Hmac-SHA1, Hmac-Sha256, and Hmac-MD5 Code Generation In ColdFusion
Posted: August 20, 2012 at 9:17 AM by Ben Nadel
Last week, I talked about using binaryEncode() as an easy way to hex-encode binary values in ColdFusion . This is a processing step commonly used when generating a Hashed Message Authentication Code (Hmac) needed to sign a 3rd-party API request. As a follow-up to last week's post, I wanted to present a project that I created for generating Hmac v... read more »
Comments (10) | Post Comment | Ask Ben | Permalink
Using Underscore.js Templates To Render HTML Partials
Posted: August 17, 2012 at 10:38 AM by Ben Nadel
I've never used Underscore.js before. But, we're going to start using some Backbone.js at InVision ; and, since Underscore.js is a hard dependency of Backbone.js, we decided to use Underscore's template() method as our client-side HTML partial rendering engine. All client-side template engines attempt to answer the same question: How do I me... read more »
Comments (15) | Post Comment | Ask Ben | Permalink
Hex-Encoding A Binary Value / Byte Array In ColdFusion
Posted: August 16, 2012 at 10:18 AM by Ben Nadel
When you start dealing with 3rd-party APIs, hex-encoding a byte array becomes a surprisingly common task. This is because 3rd-party APIs often require you to "sign" the request using your secret Key to produce a Hashed Message Authentication Code (Hmac). EmailYak uses the MD5 hashing algorithm ; Pusher uses the Sha-256 hashing algorithm ; and T... read more »
Comments (0) | Post Comment | Ask Ben | Permalink
Syncing %{REQUEST_URI} Behaviors In Apache mod_rewrite And Helicon Ape mod_rewrite
Posted: August 13, 2012 at 10:15 AM by Ben Nadel
In my local development environment, I have Mac's OSX and I use Apache mod_rewrite to handle URL rewriting. In my production environment, I have Window's 2008 Server and I use Helicon Ape mod_rewrite to handle URL rewriting. While Helicon Ape does a pretty good job of matching Apache's URL rewriting behavior, it differs from Apache in one extrem... read more »
Comments (8) | Post Comment | Ask Ben | Permalink
Chrome Dev Tools "Live Update" In The JavaScript Console Is Confusing
Posted: August 9, 2012 at 9:33 AM by Ben Nadel
Yesterday, I was on a screen share with Ryan Jeffords and Alan Quinlan trying to help debug some JavaScript code. And, like so many developers, we made healthy use of "console.log()" as a means to debug when and where code was going wrong. Only, we were using Chrome as our development browser - not Firefox with Firebug. As such, we got burned ... read more »
Comments (16) | Post Comment | Ask Ben | Permalink
JavaScript isNaN() Coerces Values When Testing For Numbers
Posted: August 8, 2012 at 9:31 AM by Ben Nadel
Recently, I was tripped up in my JavaScript debugging due to the way that the isNaN() (ie. is "not a number") function treats its argument. I was trying to track down an elusive bug that would occasionally present a numeric ID as the empty string (""). To figure out why this was happening, I put an isNaN() check in place in order to perform loggin... read more »
Comments (0) | Post Comment | Ask Ben | Permalink
Mapping CSS Sprite Image Coordinates With ColdFusion
Posted: August 7, 2012 at 10:19 AM by Ben Nadel
Last week, I got the idea to upload a CSS Sprite image and have ColdFusion scan the image in order to calculate the coordinates and dimensions of individual sprites contained within the image. And, about five attempts later, I had nothing! What I had assumed would be a rather simple task turned into a complex task, fraught with stack overflows, ex... read more »
Comments (6) | Post Comment | Ask Ben | Permalink
Using The Quality Attribute With The CFImage WriteToBrowser Action
Posted: August 3, 2012 at 9:33 AM by Ben Nadel
The other day, I needed to do some on-the-fly conversion of PNG image files to JPG format in ColdFusion. This was part of stop-gap measure at InVision for mobile devices that can handle more JPG data than they can PNG data. ColdFusion makes this kind of process super simple with the WriteToBrowser action of the CFImage tag. All I had to do was t... read more »
Comments (2) | Post Comment | Ask Ben | Permalink
Compiling / Optimizing A Subset Of A RequireJS Application
Posted: August 2, 2012 at 10:26 AM by Ben Nadel
In my last few blog posts, I explored the lazy-loading of a RequireJS module within a modular JavaScript application . I don't know if such an approach is really worthwhile - I'm not convinced that it wouldn't just be better to concatenate everything into a single, front-loaded file; but, I thought it was a fun mental exercise. To continue on in ... read more »



