• About

    Swaroop C H is 27 years of age. He graduated in B.E. (Computer Science) from PESIT, Bangalore, India. He has previously worked at Yahoo! and Adobe.


    Email: swaroop (at) swaroopch.com

    Read more about him

  • Subscription

    If you want to know when new stories and articles appear on this website, you can subscribe to the RSS feed or have them emailed to you.

  • Want me to write about something?

  • I'm a Wannabe Hacker

    The Glider: A Universal Hacker Emblem

Archive for the ‘Python’ Category

Brazilian Portuguese Bytes of Python

Wednesday, June 14th, 2006

Samuel Dias Neto has translated “A Byte of Python” to Brazilian Portuguese.

Hats off to Sam!

Mukthi

Friday, March 17th, 2006

Today, I talked at Mukthi 6.03 at M S Ramaiah Institute of Technology.

First of all, M S Ramaiah is a huge campus. So huge that the students actually tell the teachers that they were late for class because they couldn’t find the class, and that’s a fact. I made sure that Srichand, the student who took me inside to the auditorium led me back to the front gate as well, so that I wouldn’t get lost.

The auditorium where the talk was scheduled was in the new building, so it was plush, comfy, and it wasn’t a big auditorium which was perfect. The talk (introduction to Python) went well, the students were alert and interactive (even though the talk was between 5-6 pm) and I was especially happy with the range of questions that came at the end of the talk.

After the talk was over, one of the students announced that Mukthi was originally planned as a 1-day event, but later they made it a 2-day event because I had informed them that I would be available only on 17th to present a talk and not on the 18th. Whoa!

Why won’t I be here on 18th? That’s where my next post comes in.

German Bytes of Python

Monday, March 13th, 2006

Yesterday, I got this mail from Christoph Zwerschke:

Thanks a lot for “A Byte of Python”. Since I thought it would be great if Python gets more popular in German, I participated in the German translation project at BerliOS started by Lutz Horn. Unfortunately, the translation progress stalled last year shortly before the work was finished since all of us were very busy. However, this weekend I found some time to finish the translation and cut a German release, which is now available at http://abop-german.berlios.de.

Greetings from Germany, Christoph Zwerschke

Hats off to Christoph, Lutz Horn and others who made the German version happen! Thank you guys :-)

Byte of Python is now a wiki

Wednesday, February 22nd, 2006

In a recent discussion on the byte-of-python list, an enthusiastic bunch of people were interested in seeing A Byte of Python available as a wiki so that readers can contribute directly as well.

So, I followed up and made this announcement on the list recently :

Hello all,

As we have discussed, suggestions that Byte of Python should be converted to a wiki garnered enthusiastic responses. I’ve finished converting the book to the wiki and is available at http://swaroopch.info/text/Byte_of_Python:Main_Page .

There are some Todos I’ve sprinkled across the book which I will be working on in the coming weeks. Few readers have taken the trouble in pointing out how to export a book from the wiki as well. Once I can work on the todos, I’ll work on a downloadable version.

A good advantage of the wiki is that my turn-around time to suggestions from readers have improved. For example, a user pointed out that ESR is not the one who coined the term ‘open source’ and I corrected it on the wikibook within 2 minutes.

If you want to add/remove/improve any text in the book, please feel free to register as a user on the wiki and start editing. However, if you only want to read the book, there is no need to register.

Help about how to use the MediaWiki is available at http://meta.wikimedia.org/wiki/Help:Contents .

MCC FOSS Day

Saturday, February 18th, 2006

Yesterday, I talked about Python at the FOSS Day at Mount Carmel College For Women.

I was not able to attend the earlier sessions in the day because my team (at work) is making a release soon and as expected, that means crunch time. I managed to make time for presenting my own talk and attending Shreyas’ talk (who spoke after me).

Before I started my talk, Surjo warned me to make my talk as non-technical as possible. I was informed that some of the earlier talks had not been well received by the audience since it was “too technical”. That reminded me of Guy Kawasaki’s notes from a Stevenote where he says it helps that Steve has a beautiful operating system to show off, and for me, it helps that I have a beautiful language to show off, heh.

Earlier in the day, I had reminded myself of Simon’s notes on public speaking where he makes two good suggestions:

  • Show, don’t tell
  • Never, ever put up a whole slide full of code

Following this advice, I had stripped down the content of my presentation (the same presentation that I have used earlier for beginner Python talks) to the bare minimum.

The mistake in my last talk at foss.in was that I had made the slides too detailed and I suffered by trying to “stick to the slides”. Since I had avoided that this time, I had a free hand in what I spoke and actually used the slides for what they were meant – a reminder of what topics to talk about and not a replacement for the speaker. As a result, my talk was better than I anticipated.

Since I was asked to try to make the talk non-technical and I had also perceived the audience to have a short attention span, I decided to make the talk more about interaction rather than about Python. Most of them knew about C, so I followed the principle of “always start from the known to the unknown” and kept comparing C to Python and that helped to keep them interested. I knew the talk was going well when I compared their 6-line version of Hello World in C to 1 line in Python, and when I demoed some simple statements and asked them “I just ran a program, but where’s the semicolon?” – that surprised them and they started clapping. From there on, it was all about keeping them enthused.

![100966772][Small][]

I asked them if they liked cricketers or film stars, and they gave an overwhelming response that cricketers were preferred. So, I wrote a Python list and added names of cricketers they liked (Irfan Pathan is popular indeed) and asked them how they would get the second and third cricketers names in a C array and compared that with slicing in Python and that received cheers as well.

One of the few mistakes I did was waste a lot of time in the last part of my talk trying to download FeedParser to demonstrate how to use it.

After the talk was over, I received some good feedback as well as questions, which is always a good sign. It’s good to know that I’m improving my speaking skills. I’ve come a long way from a kid who thought thrice before standing up in class.

Interestingly, this has been my 10th talk on stage.

ShowMeDo

Friday, February 17th, 2006

Ian Ozsvald and Kyran Dale have created ShowMeDo.com which is a hub for video tutorials. Very interesting idea! Currently, it has a special emphasis on Python. This should be helpful for beginners and perhaps teach experts a trick or two as well.

I found the Debugging with WinPDB video very useful.

Ian will be uploading some wxPython introductions shortly, and they’ve got matplotlib, PythonWin, PyDev and more planned.

Also, users can contribute their own videos as well.

Update : The wxPython videos have been already uploaded.

Disclaimer : I was asked for feedback before the website’s release, but I have no other involvement with the website.

Jump

Sunday, December 25th, 2005

Gopal, I’ve added the jump feature, but sorry, no UI for it :-)

Guido at Google

Thursday, December 22nd, 2005

Guido van Rossum now works at Google.

Text tables

Monday, December 19th, 2005

I was bored with a work-related issue, so veered off to do something fun. I ended up porting Sebastian Riedel’s Text::SimpleTable to Python. Here’s the result.

The module is in the CheeseShop list, for those of you who want to EasyInstall it.

Watching a person learn a skill

Wednesday, December 14th, 2005

I love the moment when you help somebody learn something and they have that sparkle in their eye when they realized they understood it. Here’s one of those virtual sparkles:

Oct 27, 2005:

Decided to abandon “Dive into Python” for the time being, it is REALLY frustrating for me to hanging at chapter 5 without moving forward for so long…. I think it is me, my limitation to understand. So, I decided to surf around the net to look for another tutorial, perhaps a gentler one. Foudn “byte of Python”, 110 pages in all, not too long. So, will give it a go. Hopefully within few weeks, this could equip myself better to go for “Dive into Python” again.

Nov 20, 2005:

Learning Python, still. So far so good, I am on page 85!!! So, that is only 20+ pages to finish it. I consider it a big achievement, hahaha. And, what pleased myself most is that, I finally get through object-oriented programming, hmmm, feel like celebrating already :-)

Nov 25, 2005:

Finished Byte of a Python tutorial, finally. I think the tutorial is good, especially for begineer. But I also think that it is too surface/brief if one really want to take a step further. So the tutorial itself did point out what to do next, where to go for further learning resources.

Dec 2, 2005:

I considered the basic of my contact completed. Now I have function to list out all contacts, add new contacts, delete contacts, and find a contact.

Nothing to shout about really, but the building up of this apps is quite interesting. I just create the barebone of the program to do the basic stuff, then add some validation, or extra functions, like before adding a contact, check if it already exist, if yes, ask whether the user actually want to replace the current one… etc.

Hey, I really enjoy the process. Now I am thinking of the next step, either create a better user interface with some GUI tool, or make it a web application thing. I don’t know if that is over ambitious since this is just the first actual program I wrote in Python, but we will see…

That last part about the contacts program is a task I have suggested to write a program for to test whether the reader has learnt enough about Python.