It is not enough for code to work. Code that works is often badly broken. Programmers who satisfy themselves with merely working code are behaving unprofessionally. They may fear that they don’t have time to improve the structure and design of their code, but I disagree. Nothing has a more profound and long-term degrading effect [...]
Type Hinting in PHP
Category: PHPSince PHP 5 , php has started supporting type hinting like other OOP languages. Hence, you can enforce your functions to get an argument of particular object type. PHP will check if the particular argument is of that type, if not will raise an error. However it still doesn’t support type hinting for scalar data [...]
My Royal Enfield and Accessories
Category: Royal EnfieldThis is a no bullshit post. Just straight words and a special thanks to Anil Sir. I bought Royal Enfield Classic 350 (maroon) in August 2012 which has completed 7500km till now which includes two trips to Gharwal, Uttarakhand and one Jaipur Ride besides Delhi-Noida-Gurgaon weekend trips. Here are the pics from recent Jaipur Ride. Today [...]
Enable wireless in Ubuntu 12.04
Category: LinuxSo, you installed Ubuntu 12.04 with high hopes and found that wireless is not working with message “firmware is missing”. You can google about it which will give shit load of links with all the unix commands and info. The basics is that this problem is with Broadcom wireless network cards and the kernel’s default [...]
Use your putty ppk file to ssh remote server in ubuntu
Category: LinuxProblem : You have been using winscp tool in windows to access your remote server. Now the geek inside you make a move to linux and you are stuck how to use the passkey used in winscp with openssh client in linux. Solution: First of all, the .ppk file is putty specific one and you [...]
Google Analytics “Multiple decimal separators in pattern” bug
Category: Random WebRecently, while checking the e commerce overview on google analytics i got the message on some reports in red background. “Multiple decimal separators in pattern “Rs.###,##0.##”×” This is a bug in google analytics. The google analytics appends . after Rs symbol which causes some parsing problems on generating reports. The work around for it is [...]
Missing the mountains
Category: PersonalSince past two months, i have not been to a long trek. It feels like it has been now a part of me, to atleast go to mountains once a month. So, to cover up all this, i have been watching a lot of mountaineering movies and started reading the novel “The road to a [...]
GIT Quickstart
Category: DevelopmentQuick description of git says: Git is a free & open source, distributed version control system designed to handle everything from small to very large projects with speed and efficiency. Every Git clone is a full-fledged repository with complete history and full revision tracking capabilities, not dependent on network access or a central server.Branching and merging are fast and [...]
Advent, Use and Abuse of Web in dark alleys of Pantnagar
Category: College Days, PantnagarThis was a old post written by Arib Sir for my blog. Those were the good old golden days of college. I thought this excellent piece of writing need to be indexed by google and should exist in cloud, so i am posting it here again. If you like this, you can follow his blog [...]
How to add splash screen to an android app in phonegap
Category: Android, Mobile app devTo add a splash screen to your android app in phonegap, you need to make sure of few things. You are using 0.9.3 or higher version of phonegap. Add super.setIntegerProperty(“splashscreen”, R.drawable.splash); to DefaultActivity.Java (which is your main java file) in the onCreate method just before the loadUrl(“file///asset_android/www/index.html”) Make sure splash is the name of your [...]