Monday, July 11, 2011


I have been trying out tumblr and I must say its super nice to use. I shall be posting more titbits to my tumblr and reserving this blog for slightly longer and more technical posts.


Note: cross-post from here

Sunday, July 10, 2011

Gist Github

A while ago, I used the subdomain feature of pastebin to keep track of my public pastes (e.g., but it seems that pastebin has disabled this feature, making retrieval of old pastes difficult (of course, you can sign up). Hence, I am moving over to the really awesome github gist, which supports various markups such as markdown and reST on top of source code syntax highlighting. I also like the fact that there is a "revisions feature" to see previous revisions.

In other news, github released Github for Mac (more about the design)

Saturday, July 09, 2011

Geeks and Geezers

A long time ago, I read Harvard Geeks and Geezers: How Eras, Values and Defining Moments Shape Leaders (by Warren G. Bennis and Robert J. Thomas)

"Big four" qualities of leadership:

1. Adaptive capacity
2. Engaging others through shared meaning
3. A distinctive voice
4. Integrity

The book also stressed the power and influence of the crucible, and it create exceptional leaders.

Stuff about Python

The stuff here should be seen in the context of CPython unless otherwise stated.

  1. "import this" easter egg
  2. the pass keyword
  3. Remember to have to you modules. You can put code in too! (e.g. for initializations, and functions in there can be imported)
  4. Single underscores should be used for private variables.
  5. re.match() only attempts to match a pattern at the beginning of a string where will match a pattern anywhere in a string.
  6. Readline configuration for python
  7. Else clauses on for loops (or even try-except statements)
  8. Function closures

  1. unittest module
    There is so much magic happening behind the scenes that I recommend taking a look at the source code to understand what's going on.
  2. Design Patterns in Python
  3. More Design Patterns (slides) (from Google)
  4. Use coroutines via enhanced generators (PEP 342). A cool networking/threading library written using coroutines. More about coroutines via PFPL chp 33.3
  5. Mixins
  6. Decorators (tutorial, advanced)
  7. What you should know about exec and compile
  8. New and old classes
Implementations of Py
  • CPython
  • JPython
  • IronPython
  • StacklessPython

Note: This post is a work in progress.

Thursday, July 07, 2011


Free open source full-stack framework for rapid development of fast, scalable, secure and portable database-driven web-based applications. Written and programmable in Python. LGPLv3 License

Wonders how web2py compares against django.