Skip to main content

Justice

Member since Apr 30, 2009

Recent Blog Comments By Justice

  • Using JavaScript's With Keyword To Create A Dynamic Scope Chain For Method Execution

    Posted on May 27, 2011 at 4:43 PM

    @WebManWalking, Runtime resolution is not equivalent to lazy evaluation. In fact, most languages that feature runtime resolution nevertheless default to strict (non-lazy) evaluation. By contrast, the language Haskell features static resolution but lazy evaluation. - Justice... read more »

  • Using JavaScript's With Keyword To Create A Dynamic Scope Chain For Method Execution

    Posted on May 27, 2011 at 4:27 PM

    @WebManWalking, I haven't ever used it because I haven't ever liked it. Crockford put forward an explanation of why it's just not a good feature. But the stuff about the compilers and minifiers comes from following the compilers and minifiers. - Justice... read more »

  • Using JavaScript's With Keyword To Create A Dynamic Scope Chain For Method Execution

    Posted on May 27, 2011 at 3:40 PM

    @WebManWalking Property references are resolved at runtime, because the runtime must walk the prototype chain. See http://mckoss.com/jscript/object.htm Local variable references are generally resolved at compile time, *except* when in the presence of a `with` block. @Ben The `with` keyword of... read more »

  • Using Encrypted JSON Data To Hide Cookie Implementation In ColdFusion

    Posted on Mar 15, 2011 at 12:14 PM

    @Mike, If your website is served over SSL and all sensitive cookies are marked as SSL-only, then you will not have a FireSheep issue. If your website is not served over SSL or if sensitive cookies are not marked as SSL-only, then you will have a FireSheep issue where the attacker has the ability t... read more »

  • Using Encrypted JSON Data To Hide Cookie Implementation In ColdFusion

    Posted on Mar 9, 2011 at 10:29 AM

    Ben, A few points. 1. Do not tie the session to an IP address because IP addresses are not static over time and do not identify client computers. 2. Do not use CFMX_COMPAT - it's bogus and you might as well not be enciphering/hashing/authenticating. Use real crypto algorithms. AES-256 is a good d... read more »

  • Exploring Race Conditions In Javascript With SetInterval(), SetTimeout(), And AJAX

    Posted on Feb 10, 2011 at 10:14 AM

    @Craig, If you use google-chrome: * you can browse to about:memory to see memory usage per-tab * you can right-click the top and click Task Manager to see CPU usage per-tab * and you can hit ctrl+shift+j to see network requests (including timing, caching, etc) for the current tab and you get a cons... read more »

  • Exploring Race Conditions In Javascript With SetInterval(), SetTimeout(), And AJAX

    Posted on Feb 9, 2011 at 1:32 PM

    @Ben, Correct, web workers may run in their own fibers/threads/processes; but because they communicate with each other only via message-passing, and because web workers are not permitted to touch the DOM, you will not see odd race conditions with them. Each callback being executed on the main thre... read more »

  • Exploring Race Conditions In Javascript With SetInterval(), SetTimeout(), And AJAX

    Posted on Feb 9, 2011 at 11:34 AM

    @Ben, The browser JavaScript runtime has a single execution thread. You cannot create threads in JavaScript. For asynchronous or event-driven programming, you can schedule callbacks which the JavaScript runtime thread will execute in response to events. But the callbacks will be executed in the mai... read more »

  • jQuery Does Not Post Undefined Values In AJAX Requests

    Posted on Feb 8, 2011 at 12:33 PM

    @Ben, Note that in the sample code with screenshot, you did not include *null* values. You included *undefined* values. These are two very different things in JavaScript. In the example of clientSideData.c, c is undefined. What happens if you set clientSideData.c = null (rather than undefined, i.e.... read more »

  • Seven Languages In Seven Weeks: Ruby - Day 1

    Posted on Nov 28, 2010 at 8:41 PM

    Ben, StackOverflow and GitHub use backticks to denote inline code. Example: English English English `code code_code + code * code` English English. Or, you could just treat any regular code tag-pair where the beginning tag is immediately preceded by a newline and the ending tag is immed... read more »

  • Seven Languages In Seven Weeks: Ruby - Day 1

    Posted on Nov 25, 2010 at 1:14 PM

    Ben, Looks like my comment to you got ... formatted. Any chance you've got support for inline code formatting that will just format code, inline with the rest of the text, in a monospace font, rather than turning it into its own separate paragraph? Cheers!... read more »

  • Seven Languages In Seven Weeks: Ruby - Day 1

    Posted on Nov 25, 2010 at 1:12 PM

    Hal, If you want to go even more idiomatically Ruby, you don't even need to use "if abc.nil?" - you can use "unless abc" (so long as abc won't be a Boolean value). @super_programmer = SuperProgrammer.find_by_last_name( "Nadel" ) return false unless @super_progr... read more »

  • Seven Languages In Seven Weeks: Ruby - Day 1

    Posted on Nov 25, 2010 at 1:09 PM

    Ben, One of the purposes of Ruby is to read as closely to English as possible. Your goal, in writing a Ruby program, is to be able to read it as easily and as quickly as you read English. That's why, for examples, Ruby does not force you to use various keyboard symbols in the syntax, and t... read more »

  • What If ColdFusion's CFThread Tag Had An Interval Attribute?

    Posted on Aug 12, 2010 at 6:58 PM

    Note that JavaScript setInterval and setTimeout do not execute code async. They defer execution of the code, but the code is nevertheless executed within the ui thread (or, in a WebWorker, in the WebWorker thread).... read more »

  • The Content Of This Document Process Takes More Than 60000 Milliseconds To Process

    Posted on Jun 23, 2010 at 10:50 PM

    If the images are spread across multiple pages, you can render the pages separately in separate documents and then afterward stitch all the documents together. Additionally, you can drop down from cfdocument into iText, the open source pdf-rendering engine that cfdocument uses under the hood.... read more »

  • Learning ColdFusion 9: From SQL To ORM - A Conceptual Shift In Relationships

    Posted on Jun 7, 2010 at 8:36 PM

    @Andrew, A note: in Hibernate, objects do not have delete methods - the Hibernate Session object has a delete method, and is smart enough to batch together all the delete statements that it would generate and execute them all at once in a single database roundtrip. @Don, Hibernate is a Java ORM. ... read more »

  • Learning ColdFusion 9: From SQL To ORM - A Conceptual Shift In Relationships

    Posted on Jun 7, 2010 at 4:23 PM

    Don, Objects vs records makes a very big difference. ORM is the thing that lets you work with objects, and then have those objects be persisted to the database behind the scenes. Different ORMs work differently. An ActiveRecord-type ORM expects you to treat your objects merely as glorified record... read more »

  • Learning ColdFusion 9: From SQL To ORM - A Conceptual Shift In Relationships

    Posted on Jun 7, 2010 at 3:04 PM

    Don, With an ORM like Hibernate, you must think in terms of objects, not in terms of records. If you want to think in terms of records, Hibernate sometimes provides convenience methods (including a way to delete all records in a given table). But most of the time, if you want to think in terms of ... read more »

  • Let's Make A Deal - The Monty Hall Problem In ColdFusion

    Posted on Apr 7, 2010 at 9:45 PM

    I'm not sure that this example takes such a deep understanding to figure out. It just takes the skill to apply rigorous thinking, rather than intuition. I will assume, for the duration of this post, an at most rudimentary understanding of probability and statistics. I will then show how to take thi... read more »

  • Let's Make A Deal - The Monty Hall Problem In ColdFusion

    Posted on Apr 1, 2010 at 11:17 AM

    @Ben, Partition the doors into two subsets: the first subset includes the door you choose, and the second subset includes all the other doors. The first subset has a one-in-three probability of winning, and the second subset has a two-in-three probability of winning. When one of the doors is opene... 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