We all have to track variables;while debugging; generally the easier it is to monitor changes, the faster bugs can be detected and fixed. Web developer tools expose various methods for tracking changes in variable values. There are a couple of drawbacks e.g. non-uniform support across platforms) but again, half-bread is better than none :).
1. $_ $_ re-evaluates the last expression and is similar to the '_' command in python's REPL. However _ prints the last 'non-None' value while $_ prints the value of the last evaluated expression even if it is undefined. 2. $() and $$() selectors $() selects the first matching DOM element while $$() selects all matching DOM elements. Quite useful if jQuery is missing. … Continue reading 7 Cool tricks with Chrome DevTools
An explanation of scenarios where git stash comes in handy and how to apply stashing
Programmers usually spend a lot of time debugging and it can be a painful experience; some feel like tearing out their hair in exasperation, smashing their poor computers or even believing that their computers really 'hate' them! :) Actually computers do not hate people and the operating system is not conjuring bugs - the most likely reason is buggy code. Here are a couple of tips on debugging; hopefully these will help to reduce time spent, frustration and annoyance levels.
Programs do not acquire bugs as people acquire germs, by hanging around other buggy programs. Programmers must insert them... Harlan Mills Software breaks all the time: booting issues, corrupt software and files, crashes etc; nearly everyone has had a close shave or two with fragile software. Can programmers write 'perfect' fault-free software? I presume a trip to … Continue reading The Myth of Perfect Software
Although I have never tried out the Backbone framework, I had to review it some time ago when I had to select the JS framework to use. I wrote this last year so if anything has changed please let me know. EmberJS Strengths Allows developers to control the entire page at runtime and not just … Continue reading EmberJS vs Backbone
So I started on EmberJS some time last year; after spending an inordinate amount of time trying to design a prototype with people located all across the world. Finally, after several dreary demanding iterations and lots of work, we finally agreed on an implementation. One of the dev members suggested using EmberJS or backbone. Based on his review, backbone … Continue reading EmberJS: The Rant
AMD (No, not the chip maker) stands for Asynchronous Module Definition - a cool new way of loading scripts. AMD attempts to solve some of the limitations associated with the orthodox approach of loading scripts.
I already wrote about the awesomeness of GruntJS and here is how to set up your own Grunt system. 1. Installation GruntJS runs on nodejs so you need that installed first. Once nodejs and npm are installed, use the following command to install Grunt (the -g flag installs it globally). npm install -g grunt-cliThis installs the grunt … Continue reading Automate Builds using GruntJS
I try to do less to achieve more - it is good; it makes me do my job faster and more easily; you should do so too. Automate, use shortcuts, innovate; well the initial investment might take a lot of time but it's something you will be glad you did. You can learn a lot … Continue reading For Devs only
I actually wanted to write about PubSub alone: it’s a fascinating design pattern to me however, the thought occurred to me, why not write a design patterns’ series? It’ll be good knowledge for me and give good information. So here goes the first: PubSub.
Clean code is what we developers should aspire to write, it is clean, minimal, simple, easy to understand, free of extraneous details,
I first came across reflection when I needed to develop a PHP framework for my former firm. I started by reading the fuel source code (fuel is a PHP framework) and came across the reflection patterns in the boot strap. I seem to have a lot of first times with PHP. Well I have come … Continue reading Reflection : Arcane parts of Software Development
I stumbled upon the singleton pattern while reading a PHP book and fell in love with its simplicity. I rushed to use it at every single opportunity I got (when you have a hammer, everything looks like a nail, right?) until I got tired of it; now I can't really remember when I used it … Continue reading The Singleton Pattern
I used to wonder why people would refer to software development as an art; to me there was absolutely no correlation between programming and art. However, after hacking at software for years and writing all sorts of software: crappy ( I bet I'll would hide my face in shame if I see some of my old code), good and ugly, I believe it is an art.
The terminal is a very powerful tool and once you grasp its basics; you'll love it and use it in ways never imagined by the original developers. Here are some really useful commands. 1. Ls I use this tool everyday and it is a workhorse. It is great for listing directory contents and checking file … Continue reading Ten Useful Terminal Commands for Developers
Everyone seems to know that the web runs on HTTP, but what is HTTP all about? HTTP stands for HyperText Transfer Protocol; an application-layer protocol that the web runs on. Implemented as a client-server model; HTTP defines how clients should make requests to servers and how servers should respond. It is a stateless protocol because servers … Continue reading What you should know about HTTP
Popular opinion about open-source software - having access to the source code – does not adequately express the meaning of free software; it is even weaker than official definition of open-source as it includes lots of propriety and/or commercial programs.
Importing a remote Git project using Eclipse
I had to learn python about two weeks back and I felt I ought to do things differently this time; I resolved to learn using an editor and not go through the IDE route. So I fired up gedit and was enjoying it until I wrote a program that ran an endless loop and had to kill the gedit process. After that, my gedit was never the same and all my attempts at fixing it failed. Frustrated at this, I had to choose between kwrite and vim... my choice made me write today.
There are some tools that help me to achieve some of my daily tasks. One thing links all of them though, they are all free software and can be downloaded online. OpenOffice.org (Windows/Linux) This is an office software suite for word processing, spreadsheets, presentations, graphics, databases and more. OpenOffice.org is a good alternative to the … Continue reading My Top Ten Applications