Undefined NULL - by Shidhin

Scribbles of a UI developer, JavaScript enthusiast

AngularJS: Real Time Model Persistence Using Local Storage

| Comments

Last week, I came across a situation while working on a simple AngularJS application. I’d to sync the data between multiple open tabs. As you guess, the easy way to sync data between multiple tabs is through local storage. Ofcourse there are better ways of doing this using websockets; but here I am going to explain the client-side way –– using local storage and real time updating other tabs.

Mastering the Scope of the Directives in AngularJS

| Comments

What are Directives

Directives are one of the most powerful features of AngularJS. You can imagine them as building blocks ( aka re-usable components ) of any AngularJS application. Mastering all the directives, is totally out of this article’s scope. For that, I would really recommend this book; it covers everything you need to know about directives. Here, we’ll discuss one aspect of directives called : “Directive scope”.

Multiple Left-hand Assignment in JavaScript, Is Really Bad. Think Before You Do It.

| Comments

“JavaScript allows multiple left-hand assignments”

You may ask, what does that mean ? Well, if you’re not familiar, in JavaScript you can write the variable assignment expressions like this.


var a = b = c = d = 10;

The assignment expressions are always evaluated from right-to-left. So what the above expression actually does is, assign the value 10 to the variable d, then assign the value of d to c and so on.

Octopress Blog Tweaks: Adding Author Info Section Below Each Posts

| Comments

A good blogging platform is one which allows easy customization. I’ve been using Octopress for more than 2 weeks and happy to tell that it’s one of those allows customization with out any pain. I want to share a tweak I added to my blog recently : It’s an author information section below every post. Let’s see how I built it and added to my blog.

Some Gotchas in Arithmetic Expression Evaluation : JavaScript

| Comments

Solve a small problem in JavaScript

This post is just for recollecting some of the basics of JavaScript. Let’s start with a small JavaScript code. Here is the code –– Solve it with out using the console.

var a = 5, b = 3;
a = ( a - ( b = ( a = a + b ) - b ) );

Take your own time to come up with an answer before moving to the next section.

Starting My New Blog: Finally Octopress

| Comments

Finally Octopress !!

I wanted to start writing blog ever since I started coding. I never had a success setting it up because of time constraints and many other reasons. During this time, I’ve evaluated a number of blogging platforms and eventually I thought of using wordpress as my blogging platform when I start my blog.

Now finally I’m having some time. I decided to spend some time everyday dedicating to my blog. So first thing I need to do is setting up a wordpress blog with default template.

I started browsing to find a good theme for the wordpress blog before setting up anything. While browsing, I opened paulirish.com and saw that he’d recently switched his blog to some new blogging software called Octopress.