This page may be out of date. Submit any pending changes before refreshing this page.
Hide this message.

Introducing Python to College Graduates

Nanda KishoreNanda Kishore, Learning... Learning... Learning
As part of an initiative by Free Software Movement of India and Python Software Society I had to visit B.N.M. Institute of Technology to introduce Python to the college graduates. It turned out to be a pretty good visit. Here is my experience.

Many Students were really smart to pickup something on their own: When I was talking about function/method arguments some of them thought ahead and asked me how do you do the command line arguments.

Confusion related to how to run Python on Windows:
All the computers were loaded with Windows XP and had Python IDLE installed as their primary platform to learn Python: This created confused for many people to realize what is the real environment like. Meaning, as every python guy knows, there are two ways to execute python code. One through the Python shell(>>> thingy) and the other through running the modules through the Python executable. On linux there isn't any problem. Both the ways look similar. But on windows they are different. For the curious this is how it is:
on Windows:
Start Menu >> Python >> Python IDLE. That gives you a black command prompt with >>>
But to run modules(python files) you have to take a different path. Start Menu >> Run >> cmd. That gives you a similar black command prompt with the C:\Documents... etc... Over here one needs to enter a full python.exe path to execute the file.
C:\Documents and Settings\User\> C:\Python2.7\python.exe hello_world.py

Thats trickier for a guy who is new to Python. At-least thats what I have witnessed first hand. I had hoped that all the computers had at-least ubuntu/linux. Which was not the case and strange!

Amazed to see what Python can do: Here is what I have witnessed first hand from the students. (exaggerating a bit!)
  • reversed_string 
    = 
    string
    [::
    -
    1
    ]
    . Are you kidding me ? One line to reverse a string ? I am loving Python
  • string is a sequence ? You got be crazy.
  • Indentation is a necessity ? Can I marry Python ? Is it legal ?
  • No Braces for functions/methods ? Can I marry Python twice ?
  • No pointers, No prefix, postfix assignment ?
  • I take it from granted everything in Python is damn intuitive. Its pretty rare I have to check the docs. Wait what ? help(object) gives you access to the documentation right in the Python shell ? I feel I conquered the world!

Treating "Programming" as a tool to find a Job:
Just after I was done with half the slides and when we were about to enter the computer lab(to practice), some of the students were asking....
  1. Sir, Is this really a programming language ? I see that its really flexible and stupidly obvious to the eye. Programming languages are not supposed to be like that in our experience.
  2. Sir, Learning Python gets you THE JOB ?
  3. Sir, I heard Python is used for writing small scripts alone and not suited for writing big, complex applications. Is that true ?
  4. I heard Python is used for building Games! But you are saying it has a versatile usage. How is that possible ?
I had to explain to them what is the role of a programming language in general for solving problems. That its just "one of the means to a end.", "there is no such thing as Mastering X where X could be any programming language", "you had to solve the problem first and then code" and a few other things....

I don't blame the students. It just shows how disconnected colleges are, from the industry. And how the colleges are not encouraging them to see something from OUTSIDE. Even in cities like Bangalore which is otherwise known as Silicon Valley of India.

No Network Access in Lab: As part of the lab sessions, I wanted them to solve simple problems to start with. One of the problems was Printing the ASCII values of  a-z,A-Z. Without network access I am not sure how they would be able to find ord() or chr(). This is the norm in almost all typical colleges as far I know. No Network Access. (May be fearing the mis-use of it. But I am sure its not a such a complex problem to solve.)

College Staff and FSMK volunteers were very supportive: Right from coming up with plans to arrange sessions to altogether a 100 students batch in various halls, to making sure the speakers are comfortable in giving the Talk, they did a pretty good job. I saw that a few of the FSMK volunteers were also helping the students in their Lab sessions.

Learnt about FSMK here: This is the first time I heard specifically about how FSMK works. Although I guessed some things, but the initiatives FSMK takes, which I heard from one of their volunteers, were pretty great. Like meeting the Parliament people and discussing the online Freedom, privacy and few other related things. Their reach is pretty good and the kind of problems they are trying to solve are very good.

Learning to design HTML5 slides: This is the first time I designed my presentation in HTML5, so that its playable in any HTML5 supported browser(like Chrome for example). Its based on Google I/O 2013 slide deck template(io-2013-slides - HTML5 Slides for Google I/O 2013 - Google Project Hosting). I loved showing code in the presentation slides. This is the first time I got the code working with excellent syntax highlighting, indenting based on language the code belongs to INSIDE A SLIDE. You can check my slides here in this github repo : python_101. Open template.html in the browser and you are set. For any future presentations which involve code, I am not gonna go to some other tools.

End of the Day I got exhausted, but it brought back many nostalgic moments to me and I felt happy in making BNMIT students lives a bit better. I am sure they are gonna use Python for sure in their career, irrespective of the domain,job they are in. And appreciate Python as a language based on their passion to build things and Python helping them to achieve that, not BECAUSE THEIR JOB DEMANDS A LANGUAGE NAMED AFTER A SNAKE.
Comment

Blog

Author

Nanda Kishore
Nanda Kishore
Learning... Learning... Learning