Ben Nadel
On User Experience (UX) Design, JavaScript, ColdFusion, Node.js, Life, and Love.
Ben Nadel at cf.Objective() 2014 (Bloomington, MN) with: Gert Franz
Ben Nadel at cf.Objective() 2014 (Bloomington, MN) with: Gert Franz@gert_railo )

Joseph Silber

Member since Jan 15, 2013

Recent Blog Comments By Joseph Silber

  • Shedding The Monolithic Application With AWS Simple Queue Service (SQS) And Node.js

    Posted on Mar 20, 2015 at 10:34 AM

    @Jeremy, That setTimeout was supposed to be a setInterval. @Ben Is there no way to edit comments here?... read more »

  • Shedding The Monolithic Application With AWS Simple Queue Service (SQS) And Node.js

    Posted on Mar 18, 2015 at 9:02 PM

    I would probably have something like this: function pollQueueForMessages() { receiveMessage().finally(function() { done = true; }); } var done = true; setTimeout(function() { if ( ! done) return; pollQueueForMessages(); done = false; }, 100); which is similar to what J... read more »

  • Shedding The Monolithic Application With AWS Simple Queue Service (SQS) And Node.js

    Posted on Mar 10, 2015 at 10:56 PM

    Interesting long polling technique. You're increasing the stack every time you make a new request. For a queue listener (which is meant to be alive for a long time), I would feel highly uncomfortable with this.... read more »

  • Canceling A Promise In AngularJS

    Posted on Feb 17, 2015 at 1:19 PM

    @ben, I usually use the FT polyfill service: https://cdn.polyfill.io/v1/docs/ The polyfill they use just monkey patches the target object, putting the values onto a randomly generated key: https://github.com/Financial-Times/polyfill-service/blob/master/polyfills/WeakMap/polyfill.js#L20 ,L36 This... read more »

  • Canceling A Promise In AngularJS

    Posted on Jan 18, 2015 at 5:41 PM

    This still feels kinda dirty, since we're attaching the httpTimeout promise to the promise itself, thus again exposing the cancelability of the promise. I tend to use a WeakMap for this (with a polyfill to support older browsers): function ($http, $q) { var requests = new WeakMap; return... read more »

  • Clearing Inline CSS Properties With jQuery

    Posted on Jan 15, 2013 at 2:29 PM

    Some time ago I answered a question about this on stackoverflow, and came up with a whole convoluted method involving a regex. Then, one day, I accidentaly bumped into this solution while fiddling aroud in the console, and updated my answer there. http://stackoverflow.com/questions/2465158/is-it-p... read more »