With the stunning world cup victory behind us, it’s time to reflect on what lessons we can learn from it. I am sure cricket needs no introduction, so let me get on with what I have learnt from mostly watching, and very little playing, cricket.

Uncertainty, the name of the game

Cricket is the game glorious of uncertainties, and developers’ lives are no less uncertain, just not glorious. Both cricketers and developers need to be flexible and adjust to new situations. Be it change in requirements or the target score. Deal with the uncertainties of the pitch or the legacy code base.

Continue reading

logo-easter We spent the long Easter weekend, lazing happily indoors since the weather did not permit going out. I wondered if the time could have been spent better, and started researching if my older daughter is old enough to start programming.

Little background

My daughter will soon be six and she can use the computer very well for the usual tasks and I think she is a bit ahead of the curve, but that might just be a father speaking 🙂

The big bottleneck, I see, is her poor English skills. English not being our native tongue and she going to a German kindergarten, has limited her knowledge of English to a few words and phrases. Thus reading and writing code is going to be a challenge.

Visual programming

Given the language ‘handicap’, I started looking out for what the best way to visually teach programming, which does not involve much reading and writing. A little research resulted in 3 options, 2 of which are old and I had come across and one that is pretty new.Continue reading

I was trying to explain paper-recycling to my daughter, then thought it is best we do it together. Thus came about a weekend project to make paper from waste papers. Although the end result was not that great, I think she understood the concepts.

She was super excited and did most of the steps herself, including taking the pictures.

Here is a pictorial guide to making your own ‘hand-made’ paper.

3 idiots I watched 3 Idiots yesterday, and could not resist reviewing it. This review is not about how great the movie is. There are several of those on the net.

Let me be quick in saying that my family and I loved the film and think it is one of the best movie. It is a good take on the state of education in the country, a subject I feel strongly about. This is also not about Chetan Bhagat, although the nit-picking could apply to Five Point Someone as well. But I haven’t read it, so can’t say.

I expected more from Aamir, the perfectionist.

I was born in 1978, the same year that Farhan Qureshi (Madhavan) was born. So I felt more connected to the movie than the current generation. This also means that the college period depicted in the movie was the same period I was in college, which is roughly 1995-1999.

So what?

Well you see, a few of the things shown in the movie are, let’s say, futuristic.

Mobile Phones

Mobile phones were launched in India after 1994. The call charges in a ‘scheme’ were 16 Rs. incoming/outgoing. They were not mainstream until 2000 when charges began to drop. Even then, in 2000, I was the only one in my MBA college to have a mobile phone, and that too was given to me by my employer.

So showing engineering college students carrying a phone, pre 1999, was a bit of a stretch.

Mobile Internet

Even if you think ‘chote’ (Rancho) was rich enough to carry a mobile, the movie shows mobile internet being used in the hospital for video conferencing.

  • Internet in 1999 was the good old modem based dialup internet at blazing speeds of 56 kbps. Broadband Internet was unheard of until 2005.
  • Mobile Data Cards / USB Modems were launched in 2008/2009.
  • Even then, I don’t think the speed that Airtel EDGE gives is insufficient for video conferencing. I don’t know for sure, since I am not using one.

Scooter

The scooter that Pia (Kareena) drives looks most certainly like Kinetic Flyte, which was only launched in 2009.

Bottomline

With a little research, which Aamir Khan is known for, the film could have been more realistic. Anyways, if you haven’t seen the movie, please do, it is really good.

P.S. Happy New Year.

Based on my current understanding of Django, this is how a user request is responded to.

Django Flowchart

  1. User requests a page
  2. Request reaches Request Middlewares, which could manipulate or answer the request
  3. The URLConffinds the related View using urls.py
  4. View Middlewares are called, which could manipulate or answer the request
  5. The view function is invoked
  6. The view could optionally access data through models
  7. All model-to-DB interactions are done via a manager
  8. Views could use a special context if needed
  9. The context is passed to the Template for rendering
  1. Template uses Filters and Tags to render the output
  2. Output is returned to the view
  3. HTTPResponse is sent to the Response Middlerwares
  4. Any of the response middlewares can enrich the response or return a completely new response
  5. The response is sent to the user’s browser.

Please leave a comment if I have got something wrong.

Spent the last week picking up Python and Django. Notes to self and anyone else who wants a quick start on Python/Django on Windows. Most Linux flavours already come with most tools needed for python development.

Requirements:

  • Installed ActivePython 2.6
  • Installed Komodo Edit
  • Installed Python Win32 Extensions (not sure why, but was recommended in some blog post and the project itself does not say much of what it does. Stuff like this gives me the heebie-jeebies.)
  • Installed Pinax, which in turn installed Django.
  • Installed PyQt4
  • Installed Eric4 (uninstalled after using it for 10 minutes)

Problems faced:

  • Pinax installation was a bit flawed, it could not install all dependencies. Worked around by manually installing (pip install else easy_install)
  • Windows 7 was not passing command line arguments to .py scripts. Had to hack registry and add %* to the end to make it work. See the Key and value below.

Registry screenshot

Getting started:

Python: Like everyone else, I followed and recommend ‘Dive Into Python’. But more importantly, this page of titbits is amazing extract from the book and quickly brings a Java dev up to speed. I should blog about ‘Python for Java developers’. Time spent 4 hrs.

Pinax: Stopped at the installation step. Will delve further after understanding Django better.

Django: Followed the tutorial, then the Django Book, and finally the Django Docs for a deep dive. Time spent 8 hrs.

Django is surely one on the best documented project and also very straight forward. It suits my style of writing code and I did not feel like giving up in few hours, like the experience I had with RoR. Will surely blog about Django more.