8 Feb
Following is an excerpt from a conversation between two developers -
dev1 : Hey! all web technologies just got owned by this super cool programming language developed by Facebook. Its called FBlang!
dev2 : ?? never heard .. Whats so cool about it? ..wait! AFAIK FB uses lamp, python among others.. are you sure ?
dev1 : yeah man .. facebook sure uses FBlang. Its awesome you know! a scripting language, a database query language and a forum moderation module packed into one.
dev2 : wtf!
dev1 : Best part is that since the code is simpler to understand than the application itself it is made public on the members’ walls..so now even the FB addicts will know whats going on behind while they are busy wasting their time! Here is a sample code which just popped up on my wall as a feed,
If 100000 people join this group, facebook will delete group ‘fuck india’
For the lucky few of you who don’t know yet, here is the link to the epic group on Facebook which already has more than 300,000 members and is still growing strong ![]()
Well I seriously doubt if I would have ever known about the crappy group had there not been any “If 100000 people…. ” feeds popping up every now and then.
2 Feb
Which means that i have upgraded this blog to the latest (2.9.1) version of wordpress. Not many layout changes this time .. but managed to speed it up a bit. Also, created two new pages to categorize the content into Code and Music and replaced the boring RSS icon with a youtube link that goes to my youtube channel which hasn’t been updated since ages.
And if you think this blog gets upgraded more frequently than it gets updated, then you are not only a genius but also my true friend! Just that I am more of a developer than a blogger or a writer. Thanks for visiting and sticking around.
Do come back for the stuff that’s lying around in the drafts.
5 Jan
I came upon a method for filtering records using jquery and php. I am sure there must be plugins available to do this but this one is super easy. Particularly for problems where the elements are to be filtered by multiple criteria and each element falls in more than one criteria at a time. Consider the following problem.
Read the rest of this entry »
17 Dec
Last friday as we resumed the daily knowledge sharing sessions at kodeplay, it was my turn first up and my topic for the day was eclipse & svn. For those who are not familiar, Eclipse PDT (PHP development tools) is an excellent IDE for php development and someone who is looking to move up from a normal editor to an IDE must certainly consider trying it out.
For those who are already fans of PDT like me and who are using it, I am going to share a few tips and discoveries that will make your life easy.
Read the rest of this entry »
22 Nov
We all know how good Firefox is and if something works in FF and doesn’t work in other browsers, we generally blame the others for not being as good. Recently I have started to discover a downside of using FF. I came across a few situations where FF was too lenient and I could realize my mistake only upon (accidently) checking the code in CHROME.
Let me give a few examples where FF covers your mistakes before I tell you what I understood from it …
Read the rest of this entry »
17 Oct
CSS class v/s id is a commonly discussed topic when it comes to CSS basics and the most significant difference is undoubtedly that an id must be unique in a document wheres class should be used for elements that are to be similarly styled. But what if you use an id for class or vice versa ? This issue has bugged me more than just the above reasoning because it appears as if CSS doesn’t care what you use. But when a certain h3 inside a div started misbehaving, I separated out the code and as I tried out various combinations, it became clear that in certain cases, CSS DOES differentiate between a class and an id as a selector.
The folowing example uncovers an important difference although it doesn’t tell exactly where to use an id and where to use a class.
Read the rest of this entry »
13 Sep
Very often it happens that more time goes into testing than writing code. Particularly when ajax is involved.
For example, imagine this scenario.. you are working on an online store and you want to allow a user to remove items from the cart using ajax. ie. when the ‘remove from cart’ button is clicked the item must disappear from the cart…
Read the rest of this entry »
23 Aug
Now this post has been in the drafts section for quite some time.. infact some posts which I started to write later made their way to the blog before this one.. Anyway, here it is!
When one of our clients asked for a slider to show featured products on his online store, I felt before going for the ready made plugins available on the internet, I could try to create one on my own. Although it would be wrong to call this a plugin, it did turn out pretty well. Finally we decided to use JCarousal (as its obviously far better), but thats a different story.
Anyways I am posting it here as its done by me. I would be glad if anyone finds it helpful.
It is done using Jquery so you will need to download and include the jquery library to try it out. Here is the code and a working demo
Read the rest of this entry »
4 Aug
It happens so many times that I need to code something to make the UI fool proof. While I have the logic clear in my mind, i often find that javascript is of little or no help at all….Whats amazing is that 99% of the time jquery does the trick with minimum code and the ‘why-didnt-i-look-up-the-docs-first’ feeling strikes!!
Jquery can be used as follows to check if at least one checkbox (any input field actually) from a number of checkboxes is selected before submitting the form on the client side. I came across this when I was trying to figure out a way for similar validation when the number of check boxes was driven by the database and it was not possible to have a common className for them.
function validateCheckbox() {
var n = $("input:checked").length;
if(n == 0) {
return false;
}
else {
return true;
}
}
‘input:checked’ matches all the check boxes which are checked.
1 Aug
PS: This blog is a continuation of my previous blog which can still be found
here. But I ll be posting stuff here from now onwards..