Chandresh Pant

Favorite Quote: ...it ain't about how hard ya hit. It's about how hard you can get it and keep moving forward. How much you can take and keep moving forward. That's how winning is done! (Rocky Balboa)
 

Fork me on GitHub

whoami

I am Chandreh Pant. I am a Web developer & programmer since 1999. I have developed using many programming languages including: ASP, PHP, Java, JSP, Perl, VB, VB.NET before settling with Rails. I love cutting edge and always seek ways to disturb my stable development environment and then spend nights finding solutions!
My current development environment:
- Linux (Fedora), Ruby 1.9.2, Rails 3.1.3
- Cucumber, Rspec, Factory Girl
- MongoDB , Mongoid.
- HTML5, Haml, SCSS, CoffeeScript, jQuery
My favorite editor is vi .. Off-late, I have started using RubyMine, specially once I got used to it's TDD integration.
 

Day one: flight to Kolkata, local taxi, lunch at Park Street and then travel in Train to Kharagpur

26-Jan-12, 08:55PM

It was Republic day; so we had planned to go early to Airport expecting heavy security in Delhi. We woke up at 4:30 and went towards Airport at 6:10. Reached airport around 7:10. We were traveling in the same flight as Anirban & family. Got our stuff checked in and then waited for Anirban & Mridu. Anandi bought a chips packet at 5 X normal rate. Anirban & Mridu and Anirban's Parents came at around 8:00. Anandi got friendly with Dadi (Grandmother; Anirban's Mother) . After security check-in when we were finally going to board the Airplane; Anandi almost screamed: Yeee! we are going in the Airplane.

Till the plane was at the Airport; Anandi kept saying: why the Airplane not fly; Airplane please fly; Papa, ask Airplane to fly :) 

Flight experience was ok; I did some work (worked on a Rails project), and read a book on my Kindle. Anandi was shouting, screaming, opening the tray and doing weird things! Shikha was mostly trying to sleep. We ate sandwiches.

We reached Kolkata  at around 11:30; took taxi for New Market. The taxi driver told us that market would be closed as it is Republic Day; so we went straight to have lunch at Park Street.

After lunch, we wanted to take a small steamer to Howrah; but again everything is closed it seems for Republic day. We took taxi to Howrah station....


Traveling to Kolkata & Odisha

25-Jan-12, 01:08PM
We will be going to Kolkata, West Bengal tomorrow to attend marriage of Mridu's brother (on 27th). We will then travel to Puri (Odisha) and will be stay there till 1st. There are many firsts: I will be going toward east first time; Shikha & Anandi will travel through flight for the first time; and on our way back; we will travel by Rajdhani (1st AC) first time :)  This will also be our longest tour.

And I forgot to mention, I would see sea for the first time!

Pizza @ home

23-Jan-12, 12:44PM
This Saturday, we (me & Shikha) made Pizzas at home. The first one got totally burnt, but the next five were totally awesome! After the first one my father said lets call Domino's and ask them to take all the material and make Pizzas for us!

 We put in a lot of vegetables: Capsicums, Onions, Mushrooms, Paneer  (Sort of cheese) and a lots of cheese. In the end it was a little heavy but  delicious. 





 Anandi (my daughter) enjoying the Pizza. All the kids liked the pizzas.






It took us about 2 hours for making the six pizzas, hopefully it would be quicker next time.

rvm notes is now rvm requirements

22-Jan-12, 02:50AM

Re-installed Fedora 16 today and installing Rails using rvm. I am so used to running rvm notes and copying & pasting required package names that, I got confused when I did not find the info there. After few tries, I finally read the rvm notes and it mentions to run "rvm requirements"!


Rails 3.1: new and build work alike !

19-Jan-12, 05:51AM

Just realized this today that in Rails 3.1 new and build work alike ! Here is an example:

Assuming we have two models: Client & Document and Client has many documents

In Rails 3:

new
build

client = Client.last

client.documents.new

client.documents => []

client = Client.last

client.documents.build

client.documents => [#<Document id: nil, client_id: 1>]

In Rails 3.1

new
build

client = Client.last

client.documents.new

client.documents => [#<Document id: nil, client_id: 1>]

client = Client.last

client.documents.build

client.documents => [#<Document id: nil, client_id: 1>]


Dawkins will be in India!

17-Jan-12, 05:12AM
Richard Dawkins will be in India to speak at the DSC Jaipur Literature Festival. I just checked the schedule and he will be speaking on 23 Jan and 24 Jan.

How I (finally) contributed to open source

17-Jan-12, 01:28AM
I started using Linux in 1999 and since then had an ambition to contribute to open source. I got many chances then, but let go of them. I joined local Linux User Group and started collaborating on mailing list - helping people and most of times getting help from there. At that time, I got in touch with a Linux Documentation Project who needed volunteers to write/update documentation about various aspects/tools of Linux. But around that time I got busy with my job and could not help much.

In 2004 Rails came, I got interested and tried using it a bit. It was in probably in beta at that time. But my job at that time was mostly Project management and I was doing very little programming. Gradually my job became more distant from open source as well as programming. Around up to 2009 I was mostly doing project management and business development. At which point I decided to get back to programming and I chose Rails.

After leaving job, I started learning Ruby & Rails and instantly fell in Love. I was again programming and I was again very busy. And I again was not contributing much to Open source! So after 12 years and I still could not do it. I was seriously thinking there is something wrong with me!

And then this happened ... around 10 days back I started using MongoDB and Mongoid. The switch was not easy, and I had to read a lot of material. And (monkey) patch some of the Gems that were requiring ActiveRecord. And on one of those Gems (Mercury) , I shared my patch with the contributor (Jeremy Jackson). He though it to be a good idea. He added the option to the generator ... and voila.. I was a contributor. I would like to add that it was very generous of Jeremy to credit me with that update.

I learned a lesson here, this is how Open source works! Rails was not invented from nowhere, it was part of a project (Basecamp) and similar was the case with MongoDB. You basically do something for yourself and then you feel others can use this and you share it with others - its that simple!

Why I reinvented the wheel!

16-Jan-12, 04:57AM

I am back to blogging.... I used to have a WordPress blog few years back which I made offline due to spam issues. But then never got time to get it back online. Now I am back with a hand coded (so to say) blog. 

So why I reinvented the wheel and did not use a Blog/CMS like: WordPress, Drupal, or Joomla ? 

I like WordPress which is now very mature as a CMS. And provides excellent features and tools. It has an ecosystem of plugins and you can get all the tools quickly. But Still I went ahead and created a system solution for me. Since I myself preach that we should use open source, I feel I should give reasons as to why I reinvented the wheel:
 
1. This is my playground or practice app. I do not usually get much time to practice things. So when I wanted to setup a blog, I though this is the chance. I can do whatever I want to do here and experiment. I don't have to build it for a client.

2. I don't like PHP. Don't get me wrong, PHP is good for developing website and I have spent about 4 years developing/managing  PHP projects. But since I started using Rails (& Ruby), I can't program in PHP any longer.

3. I don't like (mostly PHP based) CMS/Blog solutions available in general. They are bloated with unnecessary features and very traditional in their editing approach. I like something like a wiki, where I can edit it easily in-line.

4. Most importantly, I want to learn more about the wheels!