<br><div class="gmail_quote">On Thu, Mar 17, 2011 at 9:46 PM, Layla Mandella <span dir="ltr"><<a href="mailto:laylamandella@gmail.com">laylamandella@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Glen, it's better to use the three equal signs. that's what i learned from "the good parts." That way a string doesn't also equal a number, and other weird stuff like that.<br></blockquote><div><br></div>
<div>Sounds like a good suggestion. I'd also suggest learning Jasmine or another JavaScript testing framework ... With JavaScript especially, I find that working test-first style (TDD/BDD) is really helpful. One of the big benefits of writing tests before code, is that it makes you think about how you can write your code in a way that can be easily tested, which often makes for better code. Also, as Layla pointed out above, it's really easy in JS to get confused by automatic type conversion (at least if you're coming from another language that doesn't work this way). I like Jasmine a lot because it's easy to use, especially for those of us who program in Ruby and are used to using RSpec. There are other testing frameworks that are popular, too, like the jQuery project's QUnit. </div>
<div><br></div><div><a href="http://pivotal.github.com/jasmine/">http://pivotal.github.com/jasmine/</a></div><div><a href="http://docs.jquery.com/Qunit">http://docs.jquery.com/Qunit</a></div><div><br></div><div>Also, if anyone is interested in exercises, I can ask some of my colleagues who've taught JS classes w/ Jasmine if they have any exercises that would be helpful to share (we have various exercises on GitHub but I'm not sure how easy they are to follow along with outside of the context of a class).</div>
<div><br></div><div>Jen-Mei</div><div><br></div><div><br></div></div>