Javascript

Quick Closure. How to write closures for simple Javascript Functions

This is a quick Example of usage of Closure in Javascript.
For this i am going to take the case of a small function which helps you convert Time stamps into Dates

Canvas Starfield

It was a totally disappointing week for me. But i tried getting all the frustration out through coding. Sat for a full night to get this done. Always wanted to have my own startfield to fly away into outer space. It came out decently. But i am planning much more to it now.
This is the initial version that was build
http://athousandnodes.com/labs/starfield
Code is available on github
https://github.com/naughtydavid/starfield

Starfield

Javascript Voice Debugger

What would be the easiest way to debug JavaScript. Especially when you are working on mobile devices. Wont it be nice if some one would just tell you that you forgot to add a semicolon. Or told you about an Exception.
Check this out.
> Download the files from https://github.com/ferrante/Voice-Debugger.
> Add <script src="voicedebugger.js"></script> to your page
> And start Debugging.

Remote Debuggin javascript Mobile/Web apps using jsConsole

Its easy to debug web application in a browsers as most browsers like Chrome and Safari ships with debugging tools. We also have Firebug; Not much has to be said about this one. But compared to this debugging web apps on mobile is a pain.

To make our lives easier @rem (Remy Sharp) came up with jsConsole. Its a simple idea which makes mobile web apps easy to debug; quiet as easy as working on firebug.

Try it out.

HTML JS Game. Parallax HTML Game

Even though i have been enjoying video games since i was 3 years old, I had never been successful in building my own games. Although i had build some basic games in DOS it never worked like a game at all.

A Weeks into my new company and with no work being assigned to me; Luckily i got a terminal; So i decided to try out my skills in HTML and JS and try to build a Right to Left Scrolling Game. Inspired by Space Impact; It was one of the best games featured on a Nokia phone.

Using requestAnimationFrame for Web Browser animations instead of setTimeout

For almost all the HTML5 games that come across these days, the game loop works with either setInterval() or setTimeout(). These are basic javascript timing functions. This works out for small games but when dealing with WebGL based hight end games this method ends up using a lot of System resources. One of the main concerns being pointed out is that, the browser doesn't have any control over setTimeout and setInterval hence it keeps running even if the window has been minimized or if the user is on a different tab.

Reducing web requests using DATA URI scheme (Alternate to CDN ??)

To decrease the loading time for web pages, we adopt different methods. One of them is to reduce the number of web requests. This is one of the reasons people opt for CSS Sprites in situations where you have many small images which are using in the HTML. But this works only when you are using these images as backgrounds for HTML elements. In cases where you need to display images with Image tags; we would try looking out for CDNs (Content Delivery Networks)

Fun with HTML5 Canvas ( HTML5 Canvas Free Hand drawing)

HTML5 Webkit GeoLocation

Html5 Webkit Geo Location brings users Geo Location co-ordinates into DOM. This has endless possibilities. From Geo Location Based Ads to Geo Location based Social Networking not just on Desktops but also on Mobile Devices. This can also help in recording the users movement just like how a GPS works

HTML5 Desktop Notification

I have wrote a jQuery plugin for Notifications. You can find it here 
http://athousandnodes.com/article/jquery-html5-desktop-notification-plugin
I have just came across a cool HTML5 Feature called desktop notifications. We have only been able to show messages inside the browser using HTML and Javascript But with HTML5 and webkit enabled browsers we can do quite a lot of cool stuff outside the browser
Subscribe to RSS - Javascript
Go Home Doodle, You are drunk