Join Eternal Thinker on facebook!

This pop-up will self-destruct in 20 seconds Close

Moons and stars and lots of code

This post haz teh codez. Not for the weak-hearted, but for the geek-hearted ;)


This is a quick post written in the middle of a silent night. I am continuously working on the major project, blissfully forgetting to eat and sleep then and now, as you may have already noticed.

Very similar to the weird guy in the foreground of Van Gogh's 'The Starry Night' above, I'm looking at so much of code, meant to produce some magical result when executed.

I'm writing this post to say something that is in it's freshest form in my mind: Learn Python (and try not to do your projects in Java).

I did my mini project in Python. And now the major project is done in Java, because only Java has web based applets.
The difference is huge. This, again, is multiplied tenfold because we're working on a very tight deadline.

Simply put:

In Python, you form an idea of what to do, and.. you just do.
You will hardly feel the effort of writing code.

In Java, you form an idea of what to do.
Now you spend some time figuring out how to write it's code.
After the code is written, and executed, you're greeted with exceptions you've never dreamed of in your darkest nightmares.
You get into a frenzy throwing and catching exceptions.
Somewhere along all this noise, you simply forget what you were trying to implement.

For a more specific scenario:

Suppose you provide a function with two parameters: a datastructure, say, an array filled with character strings, and another separate string.
Now, if the string is in the array, remove it. Otherwise, add it to the array, and sort the array. Return the new array.

In Python, this can be done in a single line of code. Yes.

And in Java, imagine how you'd do this. Think about the issues you'll have to consider. And the time you'll spend checking whether the code is correct.

The end

This is the best I can do to show you the light ;)
I took the effort to write this post before the demons of Java gobble me up.
The choice is yours. You can check some article here too.

I repeat. Learn Python.


Is it too late for a.. Good Night? :D

Image sources: 
http://www.fullasagoog.com/blog/ben-nadel
http://johanngomes.wordpress.com/2009/09/08/java-vs-python/

4 comments:

  1. I have a got a book on python for beginners. Will take a dip into it soon. :D
    Life is geek.

    ReplyDelete
  2. @ Ankita
    If you're starting with Python, go through 'A Byte of Python' written by Swaroop. You can get the free pdf online.

    I wouldn't say you don't read any other Python tutorial books; it's really good to go through a lot of examples.
    But, just.read.'A Byte of Python'.first.

    You'll understand why.
    Beware, Python will soon become your favorite programming language. :)

    ReplyDelete
  3. Also, that was one pretty mad post written when I was drowned in lots and lots of code. :D

    ReplyDelete
  4. try python..you'll fall in love with it :-)

    ReplyDelete