Idiomatic Programming - Getting the best out of your Python code
by Anand B Pillai (speaking)
- Technical level
A worskhop that would introduce the many facets of idiomatic programming with Python.
My hope and expectation for this session is - after one attends it, one would have the incentive to write clean, idiomatic Python code making use of its many data structures in the best, optimal and efficient way possible.
We would cover basics - including lists, tuples, dictionaries and go all the way to functional programming, function currying and (if time permits), the collections module.
I see two other talk proposals suggesting a similar theme - hence I have made mine into a workshop.
In my many long years of experience with coding - with Python and other languages, I have seen that most people pick up languages based on their past experience. While this is good to get a quick start on a language, as time passes it constraints the skills one picks up on the language, because one tends to see what one has already seen.
Python is a very versatile language which allows one to program in a multitude of styles. One can choose a pure imperative C style, a pure functional style, an OOP style (aka Java) or a mix of styles. However, what matters is the way one takes advantage of the data structures in the language and writes optimal code in them.
Quite often, even experienced programmers tend to get stuck in a rut of coding style. In Python which is a dynamic language both in its runtime and the way it develops, many features allow one to get things done quickly and more efficiently if one understands the "Pythonic" way of doing it. However, one more often that not, tends to see Python code getting written in "C" style or (worse) "Java" or (horrible) Perl style.
The session will try and cover a number of common aspects and introduce many tricks and trades of the professional Python programmer to get to one object - "Writing clean, idiomatic, efficient code in Python".
- A laptop with the latest Python 2.x installed.
- Python >= 2.6.x , 2.7.x is advised.
- My sessions would use ipython-notebook so would be nice if the participants can install at as I would upload the ipynb files here before the session.
Long-time developer, Python coder, coding since 1998 in a variety of languages and platforms.
Started off with C/C++, went through Java, Lisp, Perl and finally settled at Python and been there ever since.
Founder of BangPypers, Co-ordinator of PyCon India since its early days.
Currently works as Independent Consulting Software Architect/Developer.
My interests are mainly in the back-end - Servers, Cloud computing, Python web frameworks, Apache/PHP, Iaas, SaaS and almost anything Pythonic.