Skip to main content

Julian Aubourg

Member since Feb 12, 2011

Recent Blog Comments By Julian Aubourg

  • I Finally Understand The Finally Part Of A Try/Catch Control Statement

    Posted on Mar 23, 2011 at 1:28 PM

    @Ben, This is pretty unique to JavaScript as far as I know. It doesn't really make sense when you think about it but is damn consistent across browsers. The only explanation I have is that, in JavaScript, you can pretty much throw anything. So if you take the example of throwing a number (like thr... read more »

  • I Finally Understand The Finally Part Of A Try/Catch Control Statement

    Posted on Mar 23, 2011 at 10:59 AM

    A try/finally construct has the advantage of not messing with debugging info: you keep the original exception intact. So if an exception is thrown into your try block, all the debugging information (function calls, file, line number, ...) will be the same as if there was no try block at all. This i... read more »

  • Using Deferred Objects In jQuery 1.5 To Normalize API Responses

    Posted on Feb 18, 2011 at 9:18 PM

    @Ben, Oh well, it's kinda imprinted into your brain after months deep down into code, refactoring, pondering design decisions, going back and forth because you're never sure what the best solution is, or if there actually is a "best" solution to begin with (I always feel like all I do is... read more »

  • Using Deferred Objects In jQuery 1.5 To Normalize API Responses

    Posted on Feb 18, 2011 at 7:22 PM

    @Ben, Yeah, this kind of trickery is exactly why closures are used to create the deferred objects rather than a more traditional prototype-based approach. It's actually used internally in ajax itself to attach the promise methods onto the jqXHR object. Glad I could help and thanks for all these a... read more »

  • Using Deferred Objects In jQuery 1.5 To Normalize API Responses

    Posted on Feb 12, 2011 at 11:50 PM

    Hi Ben, You could use an ajax prefilter to make the normalization process even more transparent. Prefilters are called before any callback is added to the ajax promise (even those provided in the settings object). So you can easily listen to the ajax promise, apply your normalization and then repl... read more »

I believe in love. I believe in compassion. I believe in human rights. I believe that we can afford to give more of these gifts to the world around us because it costs us nothing to be decent and kind and understanding. And, I want you to know that when you land on this site, you are accepted for who you are, no matter how you identify, what truths you live, or whatever kind of goofy shit makes you feel alive! Rock on with your bad self!
Ben Nadel