Lesson 11: Scope in JavaScript

In this lesson, I focus on the nitty gritty of Scope and Lifetime of variables in JavaScript Language. JavaScript has similar scoping model as most other C like languages with a minor difference in that it does not have block scope. Here is the code: 55-scope

Lesson 10: Prototypes in JavaScript

Sorry for the long delay between the last lesson and this one. Lots of travel and work got in the way of this post. Without further ado, here is the lesson on Prototypes. Prototype is much misused keyword in JavaScript. Prototype word in JavaScript is used interchangeably for two subtly different concepts. This has lead […]

Lesson 9: Constructor Functions

Constructor functions in JavaScript are special functions that allow you to create a factory function that can create many objects of the same type through code reuse. For Object Oriented programmers, constructor functions are a familiar concepts. The code for this lesson is here:  Constructor Functions

Lesson 8: JavaScript Functions

JavaScript functions are what gives Javascript its power. With JavaScript functions, you can break down your code into small modules which, helps with readability, debuggability and reusability of code. JavaScript functions double up as objects as well. Here is the code file for this sample: 50-functions.js      

Lesson 7: Assignment 1 – Etch-a-Sketch and CScript

Hello and Happy New Year! I am back in the new year with the first blog entry that will exercise your mind and give you some hands on experience as you progress through it. Reading input using node.js is not straightforward, and hence, in this assignment, I am having you guys use this tool called […]

Lesson 6: Arrays in JavaScript

Arrays are one of the built in DataTypes in JavaScript. They are on par, if not more useful than Objects. Arrays in JavaScript perform the function of Arrays and Lists/Vectors in other languages. Arrays allow you to traverse their contents in a serial manner using an index or allow random access to any element contained […]

Learning Expression Blend – Finally!

I have been developing Windows Phone apps for a while but like most developers, I had a bit of an block towards tools that require fiddling around buttons to change the UI. Windows Phone is all about XAML + C#. I know C# pretty well but XAML has always been a bit of mystery to […]

Windows 8: Finding the details of the current system (including processor architecture) from Win8 app

Someone asked me today how to find the details  of what system/processor architecture the metro app is running on. Searching on the Internet initially did not provide much help, but some deep dive finally did yield some results: On StackOverflow, someone pointed out that the C function GetNativeSystemInfo would provide all that information. I cannot find a […]

Windows 8: Sharing a HTML5 canvas as an image

Recently, I was working on a Win8 Javascript app where I drawing something on an HTML canvas. One of the requirements was that the user should be able to share the contents of the canvas as an image. The toDataURL function in HTML5 easily converts the content of the canvas to an image, so I […]