Perl-A new tool under my belt

This summer was yet another cool summer and as a part of summer learning I learnt Perl the most awesome language under my tool-belt. It all started with a mission of learning a new scripting language. With two options in my head, Python and Perl, the choice was obvious due to my history with Python. So I grabbed a copy of Learning Perl the best book for the beginners. In fact its the best book I have read till the date.  Its concepts are divided into three levels/books namely Learning Perl, Intermediate Perl and Mastering Perl. I started reading the book and found myself enjoying the concepts. One best thing about the book was exercises after every chapter to gauge your learning and it proved its worth. I read the book from cover to cover and did all the exercises. It took me 20 days to read the book and you can find my solutions at my github repository.

I want to share some of the coolest features of the language

  • Perl is the language with the most cryptic syntax, yet its cool.
  • It has a very strong and powerful regular expression engine which has loads of features which is not available in languages.
  • Binding Operator (~=), Substitution (s///) and Smart Matching (~~) are another cool features.
  • Highly useful control structures like given-when and naked block control.
  • It has redo operator which is not available in other languages.
  • It has a huge community in form of PerlMonks and a huge modules repo CPAN.

I loved my learning of this cool language and still continuing my voyage..

P.S. Currently I’m reading Intermediate Perl.

Creating ODBC data source in Windows 7

This post is little off topic, In this post i’ll share how to create an ODBC data source in windows 7.  So lets start it.


Below you will find step by step instructions with screenshots of creating an ODBC data source. For the purpose of this tutorial i’m creating a MS Access data source but same steps can be followed to add other data sources like XLS, CSV etc.


1.) Goto Contol Panel > Administrative Tools

Control Panel > Administrative Tools

2.) After clicking on it a new window will open with following options choose the Data Sources(ODBC).

Select the Data Source (ODBC)

3.) After this a new dialog will popup as shown below. Click on add button.

4.) As I already mentioned that for this post i’ll be using a MS Access database file. Hence select the appropriate option based on the data source type. I’m using MS Access hence i have selects (*.accdb). Click on finish.

Select the database for this data source

5.) Enter the name and description (optional) for this data source. Then click on select and browse your accdb file. In this step you basically tell which database to use for this data source. Click OK  and OK again.

Add name and description

Add the file


Bingo!!! You have successfully created an ODBC  data source.


The Injustice

8 moths ago i started this blog to share my coding experience but since then i found it very hard to take out some time and write for the blog.  I almost forgot about its existence , but toady i got some free time and i thought to pen down my feelings about not being able to do justice to this blog .  Hence i have promised to myself to take out some time weekly and write , although i’m not very good at keeping my promises but just hope to live up-to it . From now onward i’ll try to share the  stuff with everyone ( well another promise ) and keep this blog updated .

In my next post ( which will be coming very soon ) i’ll share  my experience of Java Atmosphere Framework . Till then just hoping to find out some spare time to write.

YouTube Reverse Engineered !!!

This is the blog post which i wanted to write since i created the application named “YTGrabber“. Its a youtube video download api, sounds weired huh? But that’s true, it actually gives you the download links for youtube videos from their watch url  (eg. ). This api is RESTful in nature and gives response in JSON format hence its integration with any programming language  is easy.Moreover i built a web application based on this api. You might be thinking what’s the need of another software when there are several already. But thats the difference, downloaders available in diffrent types like browser extensions or even web apps all have some dependencies,some requires client side java others requires you to use specific browsers.This application cuts all the  crap of client side java etc. and just needs a web browser to function properly. This application can work smoothly on older browsers too (with some minor defects in UI which i’ll fix soon) but an HTML5 and CSS3 compliant browser is a plus point.Moreover this application gives you all possible format options (like MP4,3GP,flv) including HD ones.Creating such application filled me with great enthusiasm and joy. Will look forward to reverse engineer some other Google services (next up is Google Books).

P.S. This application is hosted here on Openshift cloud hosting.Source code of the api is there on github.

Caching in the cuisines

With every new semester comes a new project;) . and for this semester it was call for a Web Tech. project.I chose an entirely different concept for it ,giving cuisines and beverages against their geographical locations. It sounds weird  but that’s the challenge,so i started picking up the services which can be helpful. After 2 days i was all prepared to start working on it.With JSP and Servlets  for my webapp i choose Openshift cloud hosting and other handful of services namely Google Maps,and Yummly Recipe Search.Giving UI was not a tough task, few days of work and a good UI was there. The most difficult task was to cache in the cuisines and beverages for all the countries (there are 190 countries listed on gmaps) .After searching for an authenticated source of such information wikipedia and some other websites (with limited information) were my options. I started caching dishes by making a crawler in Java ,tweaking that crawler so many times for just one website,and soon i had 860 dishes for just 64 countries. It was not a bad start,i was really happy that investing 3 hours in this paid off but when i checked these dishes against my recipe provider the things were not the same ,recipes of many dishes were not there . I decided to make another crawler which will check the cached in dishes against the recipes. That crawler seemed to work fine for first 200 or so dishes but all of a sudden it gave me a NullPointerException which was of no meaning there, after some tweaks i ran it again but with no luck it failed again. After some more tweaks i ran it again and fortunately it ran correctly this time and it counted 587 dishes with recipes. Now was the time to save all those dishes in a  markup file ,so that i don’t have to fetch them all the time but again the crawler start giving me random shit.Keeping my fingers crossed i’m still trying to figure out the cause of exception.Wishing for good results.

Hello Blogging!!!

Inspired by my friend’s habit of blogging and sharing what they do i planned to have my personal blog started and after two hours of this thought here it is my own blog. This is my first blog post so it’s a bit random , its about my experience of getting this blog up. After the thought of having my blog struck my mind the next word that came to my mind was “WordPress”. For those who don’t know what WordPress is here is a definition copied down from there website.  WordPress is web software you can use to create a beautiful website or blog. We like to say that WordPress is both free and priceless at the same time. My next question was where will i host my blog, with two options in my mind (1) default wordpress hosting and domain (2) OpenShift Cloud hosting with my own domain i chose the second one because of easy setup of wordpress application with OpenShift. With only two clicks and entering  my application name my blog was up in few minutes ,but editing the default template provided by wordpress and selecting a good looking theme, changing appearance of the blog took a lot of time. After all this the time was to have my first blog post. With no experience of  writing blogs it was a tough task to pen down my first post so i thought to make it as simple and short as possible. Setting up the blog and writing down my first blog post filled me with great enthusiasm and i felt the wowness of writing blogs and sharing your experience with other.