Showing posts with label jQuery. Show all posts
Showing posts with label jQuery. Show all posts

Thursday, November 21, 2013

JQuery Meetup & Unit Testing

Last night was a JQuery Meetup, hosted at Q. I decided to attend; I'm trying to push myself into the whole world of Javascript/JQuery. Which means, for a hard-core Java server guy, that I'm pushing myself out of my comfort zone.

That's always a good thing. TheHackerCIO believes in continuous pushing out of the comfort zone; pushing the edge-of-the-envelope.

The Transcript

I really like these Meetups, regardless of the underlying technology, because of the method of presentation. Natalie MacLees, who runs them enters her sample code and runs it all live. So any errors have to be resolved on the fly. This is amazing productive of insight. I love it. Last nights showed implementation of a slider.

The second interesting technique she uses is this: after the code works, she begins showing variants. For instance, you could have written this line in a shorter idiom, in this way. See the results! It's way cool. Last night she had at least three successively more condensed iterations.

The second presentation was on QUnit, a TDD testing framework for JS. I picked up one point about TDD worth reflecting on, since I don't do that many bug fixes these days, which was that prior to fixing a bug, you should write the test showing the code Red. Only then should you fix the bug and change state to Green. Thus you now have a regression test guarding against inadvertent reintroduction of the bug.

End Transcript

My own problems centered around getting jQuery installed on my follow-along PC. My sublime editor had to be reinstalled, then I had to get jQuery downloaded. So I fell behind in entering the code along with Natalie. But she promised to post a link to the code, which I will add here, when I see it.

I Remain,