Saturday, January 29, 2011
Facts and Views
The very powerful and the very stupid have one thing in common. Instead of altering their views to fit the facts, they alter the facts to fit their views . . . which can be very uncomfortable if you happen to be one of the facts that needs altering. --Doctor Who
Thursday, January 27, 2011
Civilized man
Civilized man refused to adapt himself to his environment; instead, he adapted his environment to suit him. So he built cities, roads, vehicles, machinery, and he put up power lines to run his labour-saving devices. But somehow he didn't know where to stop. The more he improved his surroundings to make life easier, the more complicated he made it. So now his children are sentenced to 10-15 years of school, just to learn how to survive in this complex and hazardous habitat they were born into. And civilized man, who refused to adapt to his surroundings, now finds he has to adapt and re-adapt every hour of the day to his self-created environment. For instance, if it's Monday and 7:30 comes up, you have to dis-adapt from your domestic surroundings and re-adapt yourself to an entirely different environment. 8:00 means everybody has to look busy. 10:15 means you can stop looking busy for 15 minutes. And then you have to look busy again. And so your day is chopped into pieces, and in each segment of time you adapt to a new set circumstances. No wonder some people go off the rails a bit...
Friday, January 14, 2011
Begin from the beginning
Once upon a time a programmer came across a book describing a funny
programming language. It had an unfamiliar syntax, equal didn’t mean
equals, and variables weren’t allowed to vary. Worse, it wasn’t even
object-oriented. The programs were, well, different....
Not only were the programs different, but the whole approach to pro-
gramming was different. The author kept on and on about concurrency
and distribution and fault tolerance and about a method of programming
called concurrency-oriented programming—whatever that might mean.
But some of the examples looked like fun. That evening the programmer
looked at the example chat program. It was pretty small and easy to
understand, even if the syntax was a bit strange. Surely it couldn’t be
that easy.
The basic program was simple, and with a few more lines of code, file
sharing and encrypted conversations became possible. The programmer
started typing....
Guess which programming language i am talking about ;-)
programming language. It had an unfamiliar syntax, equal didn’t mean
equals, and variables weren’t allowed to vary. Worse, it wasn’t even
object-oriented. The programs were, well, different....
Not only were the programs different, but the whole approach to pro-
gramming was different. The author kept on and on about concurrency
and distribution and fault tolerance and about a method of programming
called concurrency-oriented programming—whatever that might mean.
But some of the examples looked like fun. That evening the programmer
looked at the example chat program. It was pretty small and easy to
understand, even if the syntax was a bit strange. Surely it couldn’t be
that easy.
The basic program was simple, and with a few more lines of code, file
sharing and encrypted conversations became possible. The programmer
started typing....
Guess which programming language i am talking about ;-)
Saturday, January 1, 2011
Java mistakes which should be corrected in future.
These days i am re-iterating all my language concepts especially java concepts. Actually i am reading a book called Java: The Good Parts. So reading this after doing a good amount of ruby coding gave me some understanding of things which i would like to be changed in Java Future versions.
1. Primitive Types : Primitive types certainly breaks the notion of "everything is an object". It makes special rules for those small types. Yes Autoboxing is smart thing and we dont need to thing about conversion anymore but we can go one step ahead and replace primitives types by real objects and compiler can take care of optimization.
2. Static : First thing i learned in my pairing session at ThoughtWorks was not to use Static as much as possible instead create a singleton object. Reason again it breaks the "everything is an object" model.We lose the freedom to override the behaviour as static calls are are linked compile time. And testing a static method is lot more tough task as mocking is cumbersome.
3. Checked Exceptions : Because nobody use them anymore. Most of the time if problem occurs we can't do much other than telling user something wrong happened and continue or shutdown.
4. Every Object is a Lock Object : This i realized while reading the book and i was like what. I am doing java programming now for three years and i didnot realized this we can take lock on every object while writing synchronised block because every object has in-built lock. This sounds pretty waste of resource. Instead we can start using explicit Lock object like we do in C++.
If we try to make these changes than the resulting java will not be compatible with its previous versions but it will be lot more cleaner and awesome language.
And i also want ruby/python hash like datatype. It is so so awesome just like swiss army knife ;-).
I wanted to start the year with a bang just the way i ended last year thats why this post. So happy new year to all.
Cheers,
1. Primitive Types : Primitive types certainly breaks the notion of "everything is an object". It makes special rules for those small types. Yes Autoboxing is smart thing and we dont need to thing about conversion anymore but we can go one step ahead and replace primitives types by real objects and compiler can take care of optimization.
2. Static : First thing i learned in my pairing session at ThoughtWorks was not to use Static as much as possible instead create a singleton object. Reason again it breaks the "everything is an object" model.We lose the freedom to override the behaviour as static calls are are linked compile time. And testing a static method is lot more tough task as mocking is cumbersome.
3. Checked Exceptions : Because nobody use them anymore. Most of the time if problem occurs we can't do much other than telling user something wrong happened and continue or shutdown.
4. Every Object is a Lock Object : This i realized while reading the book and i was like what. I am doing java programming now for three years and i didnot realized this we can take lock on every object while writing synchronised block because every object has in-built lock. This sounds pretty waste of resource. Instead we can start using explicit Lock object like we do in C++.
If we try to make these changes than the resulting java will not be compatible with its previous versions but it will be lot more cleaner and awesome language.
And i also want ruby/python hash like datatype. It is so so awesome just like swiss army knife ;-).
I wanted to start the year with a bang just the way i ended last year thats why this post. So happy new year to all.
Cheers,
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,
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
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
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
Subscribe to:
Posts (Atom)