Wednesday, February 2, 2011

Iron-Python first impressions


In my previous post 'IMDb search for a given trailer', I've showed some code in Python.

I'd like to say that I'm really impressed by the easy, fast and clear code I can now manufactured with Python.

I see it as a beautiful, humanoid, cross platform, code experimental, scripting language, fast POC tool and a great development phase language.


It should be the holy grail, but....


I've compared the performance between same code in C# and Python, and not to my surprise - it's also slower, much slower, 10x times slower than a static language like C# (which is also slower compared to C++).

So, it's a 'development phase' language, where you want to deliver fast, but if we combine it with C#, like Iron-Python does, write the skeleton in python than in the 'performance phase' we move the slowest parts to C#, we have a winning combination. Almost...


'Maintenance phase'


In this phase we need a programmer familiar with python OR is willing to mess his hands with python, this can be harder to find than the horde of C# programmers.
The advantage, on the other hand, is that the code is: cleaner, more redable, less code lines ==> Easy to maintain!! ==> less time to maintain ==> Faster stable version ==> we can port the stable code to C# and have time for another coffee.


'Bug/Debug phase'


I found it very easy to debug Iron-Python, while playing it with C#-Express. But still when you put your hands in the dirt and start debuging, you can feel it's not that mature for debugging, not yet.
Still, the time i spent on curving my knowladge on python + debugging it was still less than if i had to code it in C# and debugging the same bugs.


Conclusion and personal opinion


My guts telling me - 'It's worth it'.

Go for it, but start with small projects, not important ones, not risky ones.
Try to automate monotonic stuff you do in your daily work ('Manual monitoring network drive to see if a folder changed, if it changed copy it to my personal backup folder, so i can work from home...' stuff like that...)

2 comments:

  1. Your guts are right: it's definitely worth it. For confirmation, please see this old but great and still relevant research paper:
    http://page.mi.fu-berlin.de/prechelt/Biblio/jccpprt_computer2000.pdf

    ReplyDelete