Posted on June 11, 2014
null + null = 0, +new Date, and why loosely typed languages like Javascript are a pain
Javascript is a loosely typed language. This was done to expedite the writing of code and avoiding tedious tasks such as declaring variables and explicitly defining their types. You know, the kind of stuff only suckers would do…. Read More
Posted on June 5, 2014
Scoping of “this” – client side Javascript versus server side NodeJS
Every function in Javascript has a “this” object that behaves differently depending on the execution context. Everytime a function is executed in Javascript, there is an object context associated with it; “this” provides a way to reference that… Read More
Posted on February 7, 2014
Exploring Javascript closures
Javascript closures are a concept that is easier to explain by example: function outer(increment) { var outer_foo = 1; function inner() { outer_foo += increment; return outer_foo; } return inner; } var outer_instance = outer(2); var foo1 =… Read More
Posted on September 6, 2013
json-schema how to reference other schemas in jsonschema2pojo
I’ve been using the jsonschema2pojo utility at work to automatically generate java classes from JSON schemas, simplifying a lot of the tedious code that needs to be written for the marshalling and unmarshalling of JSON objects. JSON schema… Read More
Posted on May 24, 2013
Does Javascript pass by value or pass by reference?
Javascript exhibits quite interesting behavior when it passes object parameters. At first glance, it would appear that it passes everything by reference. Consider the following HTML page. <html> <body> <script type=”text/javascript”> function MyObject() { this.value = 5; }… Read More
Posted on December 23, 2012
CIW Javascript Specialist Certification
Last year I got my MCTS EXAM 70-433: Microsoft SQL Server 2008 Database Development certification and wrote about my experience. To recap, while I doubt that there is much intrinsic value in the certificate itself, the extrinsic value… Read More
Posted on October 8, 2012
Professional Javascript for Web Developers
Professional Javascript for Web Developers is a comprehensive 800+ page tome that does a deep dive on all things Javascript. It starts off with a brief history of the ECMAScript standard that Javascript is derived from, before launching… Read More
Posted on September 10, 2012
Javascript arguments.callee
All functions in Javascript are instances of the Function type, meaning that they are actually objects. And just like any other object in Javascript, they can have their own set of properties and methods. One such property is… Read More
Posted on August 6, 2012
Using closures to simulate encapsulation in Javascript
Javascript is not an object oriented programming language per se. Although everything in Javascript is an object, there is no real concept of a class construct; objects are simply a collection of key/value pairs. As a result, tenets… Read More
Posted on July 3, 2012
Javascript === operator
Like most scripting languages, Javascript is not strongly typed. This causes implicit typing to occur when two variables are compared, resulting in some interesting behaviors. A prime example of this is the equality operator ==. For example, if… Read More