Friday, December 31, 2010

Don't be in love with programming language

If you are like me, who does programming for living, if you are very passionate about one language and would never ever think of switching to any other language?

Then this blog post if for you.

During my engineering days, i was very passionate about C++ and only C++ (does not mean that, I am any less passionate about C++ today). I wanted to do programming only in C++. I thought I can do anything and everything in C++. But i had no idea there exists a altogether different world outside C++ ecosystem. I was very apprehensive to do programming in any other language.

Then during my final year summer break i read Java after lots of coersion from my friend ovais. And i started appreciating java because of its clean pointer-free syntax. It does not mean i am scared of pointers but that now i can be more focused on problem solving. How elegantly it does memory allocation and garbage collection etc. I started appreciating the high productivity I could get using Java.

Than i joined TRDDC and went on writing java code for more than 2 years. But meanwhile i got interested in distributed computing and machine learning stuff. And while reading machine learning blogs, python piqued my interest. I did a little bit of python on my own and realized the power of dynamic language. But real power of dynamic language dawned to me when i started using ruby and rails.

In a week long bootcamp at Thoughtworks i also touched the basics of C# and realized it is actually very similar to java and i was productive in less than 1 hour. In last one year i have also done some hello world kind of stuff in erlang, clojure.

All in all, learning each language has given me a different perspective to think about the problem i am solving. It introduces me to a altogether different world like ruby ecosystem is full of gems and if you don't like certain gem fork it on github and make changes as per yours wish. .Net world is very organised and Microsoft provides a very rich API set and also they have done a tremendous job in building their visual IDE. Java has largest ecosystem with big communities like apache, eclipse and corporates like oracle, IBM, Google.

Loving one programming language means you will miss the other worlds. Moreover most of these language implement same concepts i.i OOPs. So moving from one to other should be a fun journey of comparison and discovery of little variations of same concept.

Thats why i say Don't be in love with programming language, love concepts ;-)

With this note i close the 2010. Hope to learn more concepts in 2011.

Cheers,

karoge yaad to

karoge yaad to har baat yaad aayegi
gujarte waqt ki har mauj tahar jayegi
karoge yaad to

ye chaand beete jamaano ka aaina hoga
bhatakate abar mein chehara koee bana hoga
udaas raah koee daasta sunayegi
karoge yaad to

barashta bheegta mausam dhua dhua hoga
pighalti shammo pe girta mere gumaa hoga
hatheliyo ki heena yaad kuch dilaayegi
karoge yaad to

gali ke mod pe suna sa koi darwaza
tarashti aankhon se rasta kisi ka dekhgega
nigaah duur talaq ja ke laut aayegi

karoge yaad to har baat yaad aayegi
gujarte waqt ki har mauj tahar jayegi
karoge yaad to

Sunday, December 26, 2010

andaaz-e-ghalib

ye na thee hamaree qismat ke wisaal-e-yaar hota
agar  aur  jeete  rehte   yahee   intezaar  hota

tere  waade par jiye ham  to ye jaan jhoot jana
ke  khushee se  mar na jaate  agar eitabaar hota

koi mere  dil se pooche tere teer-e-neemkash ko
ye KHalish kahaaN se hotee jo jigar ke paar hota

ye kahaaN ki dostee hai ke bane haiN dost naaseh
koee  chaarasaaz  hota,   koee  GHamgusaar  hota

rag-e-sang se Tapakta wo lahoo ki fir na thamta
jise GHam samajh rahe  ho, ye agar sharaar hota

GHam agarche jaaN_gulis hai, pe kahaaN bachaiN ke dil hai
GHam-e-ishq    gar   na   hota,    GHam-e-rozgaar    hota

kahooN kis se maiN ke kya hai, shab-e-GHam buree bala hai
mujhe   kya   bura   tha   marna ?  agar  ek   baar  hota

hue mar ke ham jo ruswa, hue kyoN na GHarq-e-dariya
na  kabhee janaaza  uThata, na  kaheeN  mazaar hota

usse  kauN  dekh  sakta  ki yagaana  hai wo yaktaa
jo dooee ki boo bhee hotee to kaheeN do chaar hota

ye   masaail-e-tasawwuf,  ye  tera bayaaN  'GHalib'!
tujhe ham walee samajhate, jo na baada_KHwaar hota

Saturday, December 25, 2010

Possible reasons why you don't write test

If i have to choose the biggest thing i learnt in 2010, then it would be Test Driven Development. Before i joined ThoughtWorks (we are hiring) i had just heard of it and never realized how important it is to write code and know that it works for X condition for sure. Now it freaks me out that lots of people dont write test .
There could be several reasons for not writing test.

  • It takes too much time.
  • It is not worth it.
  • I am too lazy.
  • I don't know how to do it.
  • I know my code works because i ran it once and it worked
  • I am a superhero, i don't make mistakes.
Unless your answer is last one (in which case i envy you) you should start reading more about testing and TDD.
Best resource to begin with is TDD by Example..

Sunday, December 19, 2010

ghalib ke andaaz

Yeh chamanzaar, yeh jamuna ka kinara, yeh mahal
Yeh munaqqash dar-o-dewaar, yeh mehraab yeh taaq
ek shahenshah ne daulat ka sahara lekar
hum garibon ki mohabbat ka udaya hai mazaak
meri mehboob meri mehboob,
meri mehboob kahin aur mila kar mujhse

Gentoo-ism

First of all, a big big thanks to ubuntu team and ubuntu is an amazing distro and they have single handedly made linux experience so awesome. I was using it for past 2 years and never i had any issue with it. 
But recently Ubuntu released natty narhiwal 11.04 alpha 1 and i upgraded to it on the first day. And it created hell lot of problems. They switched to a new window manager unity which i found to be very flicky and unstable. So i decided to take the pill . This weekend i finally installed a bleeding edge distro .. the distro for geeks and nerds .. yeah you are absolutely right its GENTOO
Its not the first time i have installed gentoo i was a ardent fan of of gentoo in my engg days and probably the only guy who installed a non  GUI-installer based linux.
Working on gentoo gives you a lot more inside info which i really like .. my basic OS installation is ready and now i guess i will need to create a overlay to maintain my favorite ebuilds ... okay time to go figure overlay stuff.

Monday, December 6, 2010

recover git-svn clone after it gets interrupted

I keep running into this problem especially when the repo i am cloning is huge or the network is flicky. Before this i had no idea how to pickup the process from where the network problem happened so i use to delete the repo and re-clone the entire thing from the start. But this is a extremely frustrating and waste of time.

Fortunately, this is not necessary; just go into your partially retrieved git-svn repo and execute git-svn fetch. This continues fetching the svn revisions from where you left off.

# git svn clone git://url/project.git
..... connection breaks :(
#move to project directory
# cd project
# git svn fetch
.. fetch continues from where the connection was lost

This works like butter but if you gets a empty directory after git-svn fetch completes. Don't worry, just rebase hard the project

# git rebase --hard

and you are ready to code next generation features in the project you donwloaded ;-)

Cheers,

Support WikiLeaks

I am truly shaken from the ferver attempts with which American govt has tried to intimidate Wikileaks. They wants to crush transparency and silence the debate on the issues raised by the leaks.

In 2007 the median number of Iraqi civilians deaths due to the invasion estimated by the American public was 9,890. The minimum number credibly reported was over 40,000 and other studies have come up with estimates ranging from 200,00 to 700,000. This excludes the many hundreds of thousands of children who died from malnutrition during the preceding embargo. These, the consequence of silence and secrecy.

“In March 2006, after an afternoon of card playing, sex talk and drinking Iraqi whiskey, Pfc. Green and three other soldiers went to the home of 14-year-old Abeer Qassim al-Janabi near Mahmoudiya, about 20 miles south of Baghdad. Green shot and killed the teen's mother, father and sister, then became the third soldier to rape the girl before shooting her in the face.” (MSNBC).

The recent WikiLeaks points to a consistent policy of allowing mercenaries like Blackwater to murder innocent Iraqi civilians and remain unpunished. It is these and the many stories of innocent Iraqi deaths that should be told all over the world. The lack of information on these events has allowed western society to lose its moral compass on the true human cost of the aftermath of 9/11. The release of these documents should be resulting in war crime charges and a sense of revulsion in every city of the world.

I urge you to support WikiLeaks.

Wednesday, September 1, 2010

Apache Thrift

Yesterday I spent the day with Thrift. Thrift is a framework developed at Facebook for “gluing” together programming languages. The Thrift framework enables efficient and scalable communication between C++, Java, Python, PHP, XSD, Ruby, C#, Perl, Objective C, Erlang, Smalltalk, OCaml, and Haskell. Thrift allows you to chose the right programming language for the job at hand. With Thrift you won’t have to chose between development speed and performance – you can have your cake and eat it too. Thrift is still very much in its infancy.I hope to shed some light on Thrift and make it just a little bit easier to get up and running. I will write a follow-up post on how to use Thrift to communicate between Java, Python and C++.

Cheers,

Thursday, July 29, 2010

Syntax Highlight test

finally i configured syntax highlighter on blogger.

Here is the test. If it goes well i hope to share more code snippets and discuss about the interesting part of them.

so without waiting lets see if this works or not.

#include < iostream >
using namespace std;

int main() {
     cout << "Hello World!" << endl;
}


puts "Hello World"

it reflects my state of mind

I know why you're here, Neo. I know what you've been doing... why you hardly sleep, why you live alone, and why night after night, you sit by your computer. You're looking for him. I know because I was once looking for the same thing. And when he found me, he told me I wasn't really looking for him. I was looking for an answer. It's the question that drives us, Neo. It's the question that brought you here. You know the question, just as I did


Tuesday, July 27, 2010

I'm back

Guess which computer science field helps in estimation of amount of glucose in blood of a diabetic person, from the infra-red absorption spectrum of that person's blood.

tell tell ;-)

yes im back,,,, not able to find a decide a new place so thought will come back

kahte hai subah ka bhula sham ko ghar chala aa aaye to usse bhula nahi khate :P    

Cheers,

Sunday, June 13, 2010

Abondaned !!

I am in destructive mood these days... after deleting facebook account, disabling google buzz, removing everything from orkut profile .. i guess its time to abandon blogger as well.. will create a fresh blog somewhere .. just don't know where and when ....
Alvida..

Sunday, May 23, 2010

Status Update

It is not new for me to try new things.In fact yesterday i told saleem that im like air always changing direction always try something new. but in past 2 months im experimenting in far far greater speed.I dont know whether it is good or bad but im experimenting and will continue to do that.
I have tried erlang(a funtional language), C# (big step for a (ex?)M$-basher), python in the gap of few weeks. Pair programming, Agile, Test driven development are new practices that i learnt. But the best thing happened to me is my growing interest in Distributed applications. For past few weeks im trying out a project called Hadoop.
It is an opensource projects under the umbrella of Apache foundation. If to put in a single line, it is opensource implementation of the MapReduce algorithm which is the core of Google empire. Hadoop opened a plethora of questions to me. What is Big Data? How it affects me ? Why we need a non-rdms approach towards information-retriewal ?
So i am starting a new journey to get answers to those . If i dont show here soon , assume im still looking for the answers ;-)         

Monday, April 12, 2010

Design of design


A new book by Fred. (Mythical Man Month) Brooks is out in the market.

The Design of Design: Essays from a Computer Scientist



Mythical Month is a great book ... will this be a worthy successor of that book ??

i am going to find out soon.

Wednesday, April 7, 2010

bahut din ji liya maine

mohabbat tark ki maine garebaan si liya maine
zamaane ab to khush ho zahar ye bhi pi liya maine

abhi zinda hu lekin sochata rahata hu khalvat me
ki ab tak kis tamannaa ke sahare ji liya maine

unhe apna nahi sakta magar itana bhi kya kam hai
ki kuch muddat hasin khavaabo me kho kar ji liya maine

bas ab to daaman-e-dil chod do bekaar ummiido
bahut dukh sah liye maine bahut din ji liya maine

Friday, April 2, 2010

Old habit die hard

If one thing i have to learn than i would learn how to fight back from dada aka saurav ganguly. Everytime he is pushed to corner he fight backs like a tiger he is . go dada go !!

Saturday, March 20, 2010

Quit TRDDC

Its long time since i last time a posted a entry. Many things have changed since than but biggest change is this.
its almost a month since that happened... but its one of those things that you have to blog about... initially i thought i ll write a detailed post with the reasons and my half baked plans, then i thought i'll write an emotional one, then a funny one... but now i have had enough of thinking about it... so there you go... i just put it in the title :-)