Skip to main content

Posts

I am going to vote this time, are you?

I had never been interested in polity. Neither in school, nor in college, and not even when I started rising the corporate ladder. I always thought I am created for more novel deeds and politics is only for subtle minds. I had always been a torch-bearer of the " sab-chalta-hai ", the cliché Indian psychology. I have bribed, favoured, broken rules and always gotten over clean, because, well, I, always had the support of some known faces. These minor acts of, lets say negligence, never got on to my nerves because everyone around was doing the same. And I did not want to play any different. Who, you ask, am I? Well, I am the educated, common, Indian citizen . I am you. I never really cared who my MLA is, or which party is in power. I have always enjoyed Election day as just another holiday. And I never, never gave a thought to casting my vote. However this is going to change this time. I am fed up now. I am fed up with this Govt. I am fed up with the state of law and o...

Before you fire that delete command

Rule of thumb for me is that every DELETE or UPDATE query should start life as a SELECT query. The eight stages of DELETE: SELECT what you're deleting; fix the mistake in the query (there's always one); SELECT again; BEGIN TRANSACTION; DELETE; SELECT to confirm the right deletion -- twice for good measure, and maybe ROLLBACK once or twice if you're feeling twitchy; Hover finger anxiously over the un-entered COMMIT command for several seconds while resisting Dunning–Kruger effect; COMMIT. :) Or alternately: Give the table an DeletedTimestamp and DeleatedReason column. Mark the records as deleted. Run around like a lunatic and fix queries so they don't show "deleted" columns to the rest of the app. Rather create a "view" which never sends out "deleted" columns and rows. Make a page in the application where people can "restore" deleted items. Because they do stupid things too once in a while

दुर्लभ सावन

सावन की मस्त फुहारों मे जो मचल गये तो बात ही क्या, उस अलबेले अपनेपन से ना अचल रहे तो बात ही क्या, ओ पथिक मेरे, तुझे पार है जाना, गर अधरस्ते मे ठिठक गये, ना पार गये, तो बात ही क्या! इस मतवाले मन को समझना मुश्किल है, आसान नही, किंतु इस दुविधा के क्षण मे, जो बहक गये तो बात ही क्या! ~ प्रिन्स मिश्र 'अरविंद'

What time is it? Now. The perfect time.

Our lives are so monotonous, so still. Time just passes by for us and we never care. Every single day is just like the previous one. All we care about is how to make good bucks and how to stay ahead in the race all the time. We never have time to do what we want to do. Study science because everyone says so, do Engineering because they all say it's cool, join IT because they say here is all the money in the world. When was the last time you took a decision that was completely your own and you stood by it? If you are prompted to look into discreet history for an answer, I tell you, you are doing it all wrong. You and I are on the same track and that track, my friend, is not the best one to ride on. Our lives deserve a better treatment from us. Now is the time to live your life. If you are my age, you have well settled parents, you are not married and you have some steady cash flow, now is the perfect time to live your life. Go out. Do a course you always wanted to do, ...

Push a little

The human body is some awesome piece of machinery. It will resist to any and all changes you give, but if you continue to push, it'll adapt! The key is to not give up. There will surely be a moment when you feel like giving up, but trust me, it's all psychological. If you can convince your mind that you can take more, you can take more! The first 100 meters are tough, but once that is over, body takes care of itself. Its a piece of cake thereafter. #weightloss

Been a while..

When I was in college, I remember my pass-out seniors telling me "life is not the same outside college, especially when you start working". Back then, I thought it is a statement for the weak heart as I was a firm believer of "you always have time to do what you want to do." Well, now that I have been out of college for almost 2 years, here's what I have to say. They were right. It's not. You don't necessarily have time to do what you want to do. There are always two sets of tasks boggling your mind - The important ones and the urgent ones. Important ones like going to the gym, learning a new language, writing blogs, keeping contact with old friends. You want to do each of them but you never get time. You are constantly boggled by the more pressing, more urgent tasks - that nasty bug in the code, that awesome plugin and what not. They always take priority. Always. So readers, find time for yourself. Regulate your life. Because if you just let...

include multiple jQuery Libraries on a single page

We have been using jquery 1.4.2 for all our plugins, but for one specific autocomplete widget, we required jQuery 1.5.1 After 1 hour of googling and another of playing around with the code, I figured the method as follows : include the new library first <script type="text/javascript" src="/js/jquery-1.5.1.js"></script> now include the dependent script <script type="text/javascript" src="/js/jquery.tokeninput.js"></script> assign this library to a different variable <script type='text/javascript'>   var jq = jQuery.noConflict(true);   </script> Now include older jQuery library and its dependent plugins!

Writing Shell Extension to display custom right click context menu

Programming is fun! So as part of my regular work, I had to write a shell extension that'll display some options in the right click context menu for some specific type of files. The first search took me to  http://www.codeproject.com/Articles/441/The-Complete-Idiot-s-Guide-to-Writing-Shell-Extens Its a cool tutorial, only that the demo is not in VC++ 2010 that I was using. I was initially using VC++ 2010 express, so it didn't have ATL. I had to download VC++ Ultimate. The tutorial says add a class in the classview. I couldn't figure out what it was. (I have never programmed in VC++!) It just occured to me and the classview was available in the VIEW tab. Another gotcha here. In the tutorial it says disable aggregation on Attributes page. There is no attributes page in VC++ 2010. That option is in OPTIONS tab. Eventually, with some hooking around asking for help, I was directed to a python implementation of the same solution, which, by the way, is pretty cool. So I went ahead...