Brazilian Portuguese Bytes of Python
Samuel Dias Neto has translated “A Byte of Python” to Brazilian Portuguese.
Hats off to Sam!
German Bytes of Python
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
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 .
Watching a person learn a skill
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:
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.
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
![]()
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.
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.
foss.in day 2
Today morning, the first session was a Linux Kernel roadmap by Jonathan Corbet. Although I’ve never been a kernel-level guy, the talk was interesting and he clearly explained how features have been added and improved over the various versions, and how the development process has improved and become more “professional.”
Then, it was my turn to talk and I talked about TurboGears. The talk went pretty good and it was well-attended which made me quite happy even though I had some tough competition, heh.
I did make two mistakes. First was that I got worried about the time I had to finish the talk, and second, I concentrated too much on the slides. Whenever I have presented well (which has been most of the time, thankfully), I tend to leave slides as guidance for the audience, and have my thoughts free-flowing enough to be coherent and entertaining. Well, I don’t think I’ll be making these mistakes again. However, I did get good feedback about the talk from various people, and a good number of questions after the talk, which is always a good sign. For those who couldn’t attend, my TurboGears slides are online.
And one more thing … my book’s website byteofpython.info is now running on TurboGears! This is only the second public website ever running TurboGears after diggdot.us.
Then, I attended Gopal_V’s talk on programming in the Mozilla platform. He gave a very detailed approach to creating Mozilla applications and how to go about things. I must get the slides from him later, but it shouldn’t be a problem grabbing hold of him since he works in the same floor as me at Y! His slides are online.
I was on my way to the OpenLaszlo talk, but took a peak in the Ruby on Rails tutorial. Does Ruby on Rails really need the . Update: The new RoR migrations feature is simply brilliant. Thanks to Mark Ramm for the tip.CREATE TABLE SQL statements to be written by hand? …. I think I prefer the SQLObject approach of having all the database-schema in one place as simple Python classes instead of having separate database creation and database manipulation (ActiveRecord) parts.
Other than that, Rails looked cool. The directory structure created by rails as well as the test-driven nature was good.
Then, I got into the OpenLaszlo talk by Nirav Mehta. I had seen the OpenLaszlo demos before and used to follow Oliver Steele’s blog, but I never got around to writing anything with it. Nirav kept the audience engaged and showed off some eye candy stuff that OpenLaszlo provides from images to animation. Somebody in the audience asked him to put audio as well, but unfortunately, he didn’t have any mp3s.
Then, my friends and myself headed to the food court and then went around the FOSS Expo section. The Sun Microsystems booth was the best one and they showcased real open source projects such as Belenix (the OpenSolaris LiveCD) and NetBeans. I got a demo of OpenSolaris’ DTrace functionality and it was pretty impressive.
Sadly, the other stalls like the Google and Yahoo! booths didn’t showcase any open source projects at all! When Google has open sourced many projects and Yahoo! has contributed open source stuff such as the Alternative PHP Cache, why can’t they show it off and demonstrate they too are part of the community (and invite people to join the company), which I thought was the point behind the stalls…
Then, I saw Pramode in the Phoenix stall and it seems people are showing interest in Phoenix which was good to hear. Nearby, Anush and Tejas were in the Python stall and trying to entice people to talk about Python, heh.
Soon, we were back in the Intel hall for Jaya Kumar’s talk on GPL and non-GPL code interaction in the Linux kernel. He stressed that binary-only kernel driver modules are not a good idea and his explanation was pretty simple - it screws users on other architectures and users using different distro-compiler-etc. combinations. Another point is that they are not respecting the people who wrote the Linux kernel. He quoted Linus Torvalds saying it has to be a two-way street, if somebody wants to write something using the Linux kernel, they have to contribute back as well. Jaya Kumar was over-shooting his time slot but he had a lot of interesting examples and incidents to talk about. I think he had more than 100 (sic) slides in his presentation. Outside the hall, Jaya Kumar and Harald Welte were mobbed and they had a good time interacting with others.
Then, I attended the “FOSS in Education” BoF. Philip, Manish and Praveen were also there. The discussion involved quite a number of issues and Praveen has added a nice page in the FCI wiki regarding the discussion. The focus was mainly in creating awareness, and getting students interested, at the high school level. The emphasis shouldn’t be in simply using open source but stressing the points on why open source is good for everybody, and how the community is the core strength.
Phew. As you can gather, it was a long day but an exciting, educative and interesting one.
I was looking at planet.foss.in and hoping to look for any insights from the many talks that I missed today (there are 6 tracks running in parallel!), but it seems very few people write such long posts as dumb me!
Thout Bytes
OSoft, Inc. have released my book ‘A Byte of Python’ in Thout format. There are two aspects of Thout - one is that the Thout format is based on XHTML and second, the Thout reader software (similar to Windows .chm Help Viewer) is available for all the major platforms. I am excited about this because Thout provides some very cool functionality - for example, users will soon be able to "upload/download public notes that are placed at the point in the documentation the comment refers to".
There are currently three Python books in Thout format at the OSoft website - the official Python documentation, my book and ‘Dive Into Python’. There are lots of books in the other categories as well.
Btw, Thout software is OSI-certified open source, so it’s good to know that the Thout format itself is implicitly open as well.
First Official Meetup of the BangPypers
I am amazed at the number of messages today asking me about the photos and a blog post on Saturday’s meetup of the BangPypers - so here it is ;).
As I earlier announced, the meetup was at the Thoughtworks premises on Saturday at 4.30 pm. Most of the people had arrived promptly, but Pradeep and myself were a bit late. Well, what can we say, Pythons are slow
So the 22 of us got into a nice cozy conference room and Anand started to introduce the BangPypers group and general chit-chat on our love for Python. My slides were in OpenOffice format and the Windows machine in the conference room didn’t have it installed, so Suresh (one of our hosts) put it for download. In the meanwhile, Anand, Pradeep and myself were curious on how people got to know about the meetup as well as about Python itself. Well, interestingly enough, it seems lot of people got to know about the meetup from this very blog of mine
Then, we had a round of introduction about everyone. I think Bernhard, the anthropologist, was the only non-techie in the group. There were people from a wide range of companies - Infosys, ZeOmega, Thoughtworks, Yahoo!, Applibase, Encore, IndiaInfo, Bosch, LiveLogix, ….
Soon enough, we had OpenOffice up and running on Suresh’s machine to which we had a remote desktop connection and then we started off the first talk by me. This was an introductory talk on Python titled ‘Slither away with Python’ and it seems most of the people were newbies, so I was gladly rubbing my hands waiting to convince them about Python (but considering they took the interest to attend the talk, I think they already were convinced
). So, we went through the usual (that is, usual to me) ‘What is cool about Python?’, ‘Why Python?’, ‘Explicit is better than implicit’, ‘Beautiful is better than ugly’, ‘Readability counts’ and more about the Zen of Python. This was followed by the nitty gritty details of how to write Python programs and how different it is from other languages.
What was interesting was that this wasn’t the usual talk style I am accustomed to. This was more of a discussion where the newbies voiced their doubts and the experienced guys chipped in with their understanding and way of thinking. I liked the way everybody emphasized that programming in Python is more about ‘thinking’ in python and the ‘Pythonic’ way of doing things rather than just learning a new syntax.
We were having such a good discussion that I lost track of time but was immediately reminded about that. So, I had to hurry up the last part of my talk but everyone seemed to like the idea of Jython and IronPython allowing you to write Python programs and run it on the Java and .NET platforms.
This was followed by Pradeep’s session on Functional Programming using Python. I have never learnt a functional language yet but I have become interested about it off late, so I was looking forward to this.
Pradeep emphasized that a bit of functional style is good but overdoing it is bad. Well, I guess that applies to everything else in life as well
… he soon introduced the built-in map, filter, reduce methods as well as list comprehensions as well as using the Xoltar toolkit which allows you to do currying (still don’t know what means, though) and other functional-style stuff. We had a lot of discussion and interaction regarding the FP way of doing things.
After that, we had Anand’s talk on generators and generator expressions. He introduced how generators are used as a way of creating sequences and iterators. He showed a neat example of using list comprehensions and using a class and a __iter__ method to create a Fibonacci series. Following that was an example of generators to achieve the same. Needless to say, a simple yield keyword does so much.
He then introduced generator expressions and called it the child of the marriage between generators and list comprehensions
. I was amazed at how a simple change of square brackets to parentheses could mean so many changes in the actual background! Again, minimal effort, maximum effect. Just like Python.
By now, it was already 8.30 pm - we had spent 4 hours and didn’t even realize it! To finish things up, Anand asked me to talk about our CPAN-for-Python project. I have named this as ‘Project Uraga’. Here’s an excerpt of my earlier message to the group about the same:
I am hereby naming the CPyAN thing as Project Uraga. I got the idea from the book ‘Prince of Ayodhya’ by Ashok K Banker.
Excerpt: “Uragas, enormous reptilian brethren of the Nagas, flowed slimily among their cousin species, their enormous python bodies swollen with telltale lumps - the Ayodhyans they’d swallowed alive. Their deceptively human faces were cast in the apperance of beautiful girl-children, a detail that only added to the horror of their violations.”
Also, I came across this: http://www.harekrsna.com/philosophy/associates/demons/classes/nagas.htm
Excerpt: “Uragas are also serpentine demigods, who are not exactly demigods but between the demigods and human beings.”
Everybody liked it, so the name stuck. Getting back to what the project really is, to put it simply, its a way of automatically installing Python modules, just like how CPAN for Perl and Ruby Gems work. The idea is to make it dead easy for installing/upgrading/removing Python modules on any platform. This would be based upon distutils and we intend to work with the distutils-sig and the Chicago Python users group with this in future. Right now, we are still in the ideating phase. We will probably have a discussion about this in our next meet and draw up a roadmap or something like that.
Finally, it was time to go. We had a great fun evening. I hope we have more fun in future.
I would like to make a special mention of our ‘thoughtful’ hosts - Owen, Suresh and Ananda from Thoughtworks. Thanks guys!
P.S. The full-size photos are in my Yahoo photos and the presentations are available in the yahoo group.
Coming soon : Learn Python in German!
Lutz Horn, Bernd Hengelein and Christoph Zwerschke have volunteered and started to translate my Python beginner’s book to German! The project is hosted at developer.berlios.de/projects/abop-german.
If you know Python and German, you’re most certainly welcome to join the translation as well. You can start just one page at a time! Please contact Lutz Horn (lutzhorn at users.berlios.de) or myself (swaroop at byteofpython.info) for more details.
Thanks to Lutz, Bernd and Christoph for taking up this effort!
Learn Python in Chinese!!
Juan Shen has translated my beginner’s book on Python ‘A Byte of Python’ to Simplified Chinese! Juan Shen is postgraduate at Wireless Telecommunication Graduate School, Shanghai Jiao Tong University, China PR.
You can read the Chinese version online right now. More details about Juan Shen and his efforts to spread Python in China is in a appendix in the translated version. Huge hug and thanks to Juan for taking up this effort
Redesigned my book website
I have redesigned ByteOfPython.info and now have a nice and clean theme based on Negen.
The theme had the right combination of the two things I look for : simple and attractive. I usually like to hack up a theme myself just like I did for my blog, but this one was too cool to let go
The content on the website has been reorganized and updated as well.
Deliciously popular!
This is cool - ‘A Byte of Python‘ is the most popular link for the python tag in del.icio.us! In fact, its been bookmarked by 53 people (as of now)!
Thanks to Prem for telling me about it
Update: Its bookmarked by 119 people as of now.








