I thought I’d take a quick moment to provide some examples of making object properties read only in EcmaScript 5 (and by extension node.js). There’s several ways to accomplish it, so I’ll just iterate over all the different ways. Object.freeze The quickest way to make all properties of an object read only is by calling [...]
Archive for the ‘Javascript’ Category
Functional Programming in Javascript
Just a random, late night scribble for the boys and girls out there starting fresh with javascript and not understanding the power that you can harness with it. I’ve given this demonstration before, but it’s always fun to post because someone might learn something new. Anyway, you might be familiar with your usual function definition, [...]
TDD Javascript With berilos.de JsUnit
Evaluating this framework brings back memories… the year was 2005, I had been working for a small IT firm as one of the first developers hired, which as of 2005 included three developers. I had zero process in place and had never had any experience elsewhere as this was my first job. Somehow, from reading [...]
Javascript Test Driven Development With YUI Test
Tonight I’ve decided to bounce back and try out another testing framework that’s been on my list for awhile, YUI Test. From the site: YUI Test is a testing framework for browser-based JavaScript solutions. Using YUI Test, you can easily add unit testing to your JavaScript solutions. While not a direct port from any specific [...]
More Test Driven Development With Javascript: JsTestDriver
Just got back from the gym and it’s time for yet another evening of experimenting with test driven development in javascript. I’ve been hearing a lot about JsTestDriver lately, so tonight I’m going to see what all the fuss is about.
Testdriving Javascript With jqUnit
Whew… looks like my “Week of javascript TDD frameworks will really turn into a month of ‘em. Fine by me though, I like options. For a bit of randomness, I’m going to try out jqUnit. jqUnit is a TDD framework that takes quite a different approach… it is structured much like jquery is and tests [...]
Yet Another Day of Test Driven Javascript: Screw.Unit
First let me apologize for the delay in my posting. My intention was to post about a javascript testing framework each day, but the last couple of days I got a little stuck trying to get inspec to run.That coupled with the other things in life that compress my time I was just unable to [...]
Test Driven Javascript: Using JSSpec
For the first installment of my Week of TDD and BDD Javascript Frameworks I’m going to cover JSSpec. First I’ll cover some of the specifics and then jump straight into a demo of using it. The Dirty Details JSSpec, as the name implies, is a Behavior Driven Development framework based on the popular rspec ruby [...]
jquery-text-tools: Link urls with jQuery
Here’s a little something I threw together today that is simple, yet a bit useful too. I’ve been working on an application that consumes text from a JSON service on the client side and populates the page with the results, in real time. Some of the snippets of text have links in them, so I [...]
Adding New Methods To Existing Javascript Objects
Taking a lunch break from training today and I thought it’d be good to illustrate something that’s pretty standard in javascript, but might be pretty new for some. One of my favorite features is the ability to add new methods to existing object prototypes. For example, wouldn’t it be neat to be able to have [...]

