Ajit K

June 20, 2007

Python gotchas!

Filed under: Programming — AjitK @ 4:33 am

http://www.ferg.org/projects/python_gotchas.html

http://zephyrfalcon.org/labs/python_pitfalls.html

March 25, 2007

Path to Perfection

Filed under: Programming, Ideas, Design — AjitK @ 6:28 pm

As the writer, adventurer, artist, and aeronautical engineer Antoine de Saint-Exupry once put it, writing about the design of airplanes:

La perfection est atteinte non quand il ne reste rien ajouter, mais quand il ne reste rien enlever.

It means: “Perfection is attained not when there is nothing more to add, but when there is nothing more to remove”.

Taken from ESR’s writing available here.

March 24, 2007

A bit of pythonic humor

Filed under: Food for thought, Programming, Design — AjitK @ 12:18 pm

Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren’t special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one–and preferably only one–obvious way to do it.
Although that way may not be obvious at first unless you’re Dutch.
Now is better than never.
Although never is often better than *right* now.
If the implementation is hard to explain, it’s a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea–let’s do more of those!
–Tim Peters, “The Zen of Python”

March 20, 2007

Regular expressions tutorials and howtos

Filed under: Programming, General — AjitK @ 6:52 am

Some links for self-study on regex (for python):

http://www.amk.ca/python/howto/regex/

http://www.xellsoft.com/regular_expression.html

http://it.metr.ou.edu/regex/

http://gnosis.cx/publish/programming/regular_expressions.html

http://www-128.ibm.com/developerworks/library/l-python5.html