My last report was about PyCon Finland 2011. Unfortunately last year I was unable to attend (just like in 2010). This year the conference was held in Aalto Design Factory, Espoo, right next to Aalto University on October 21st-22nd. The venue was much better than in 2011 – much more space, better coffee and it was much easier to get there.
As last time, I will summarize the most interesting talks I attended to. This time there was only one track, so it wasn’t possible to miss any of the talks.
“Keynote: Open Source Your Education” by Lynn Root (Spotify)
When I saw what the first talk was about I was quite surprised. First of all, the speaker was a woman which for some reason is really uncommon, both speaker and attendee-wise in PyCon. Secondly, it was about a subject that personally interests me a lot.
The main point of the talk was about higher education, programming and how to learn from your mistakes. In the US, too, programming courses in higher education hardly ever teach you things about the real world programming-wise. Yes, it teaches you about algorithms and problem-solving, but you really can’t do anything useful with a yet-another-tic-tac-toe game (and you really can’t find a business case for it). When others were making tic-tac-toe’s, Lynn made a website.
Another important point Lynn had was about the learning process itself. According to her, we’re in the middle of a software revolution; re-inventing the wheel is common, and we do the same mistakes all over again. That’s why networking plays an important role in the process of learning how to program. I couldn’t agree more. By looking at StackOverflow’s success and fame, it’s obvious. However, Lynn didn’t mention any downsides to this phenomenon. It’s great to have different kinds of “good” solutions, but blindly copying and therefore not learning at all is a risk. Being critical is as important as in any other media. Taking shortcuts is a no-no.
Lynn’s keynote slides are available here (PDF).
“My First Numba” by Saul Diez-Guerra
The second talk was a about Numba, a highly optimized JIT (just-in-time) optimizer for Python. Saul’s background is in Facebook advertising, which apparently requires a lot of bit-crushing. When Saul asked had anyone in the audience heard about the library, only 10-15 people out of 50 raised their hands. When he asked who has actually used it somewhere, only one person admitted using it. No one admitted using it on a regular basis.
Like many other optimizers, Numba is based on LLVM (Low Level Virtual Machine). Numba relies on NumPy, which is a scientific computing library for Python. NumPy itself is not an optimizer, although it’s implementation of the Python language is way more faster than pure Python. We went through some examples, starting off with pure Python programs, pure Python with generators, auto-JIT’d versions of the same Python programs and auto-JIT’d programs given with local variable types for efficient referencing. The latter one was very fast, going to 200 times faster than the equivalent pure Python program. Sounds amazing, but it only works on certain cases, and currently only on pure numerical computing problems.
As I expected, it had a lot of caveats:
- No assert
- No try-catch
- No lambda
- No raise
- No yield
- No generators
- No default arguments
At this point it was clear that this library wouldn’t be suitable for me. Refactoring a big project for this would take a lot of time, and the same optimization could be achieved with different libraries, such as NumPy or PyPy. However, Numba is a very active project and it is backed up by a company. The newest stable version seems to be 0.11 and during the last couple of months there’s been a lot of progression. Looks promising.
“Generators and Coroutines for Stream Data Processing” by James Powell
Probably the most useful talk of the day. Personally I don’t use itertools or functools that much, mainly because I find them hard to maintain and because without it it’s easier for others to understand what the code does. However, James’ examples were very insightful and I was convinced that generators are the best tool to create general methods for stream prosessing. Prosessing it’s output should be handled with iterators.
“Python bindings to Samba 4” by Alexander Bokovoy (Red Hat)
Last but not least was Alexander’s talk about Samba 4 and it’s Python bindings. Samba project has always been a mystery to me. It was very interesting to hear Alexander’s insight to this. He’s been the core developer of Samba since 2003 and currently works for Red Hat Inc. Since 2011 he’s been the core developer of FreeIPA.
Alexander then introduced us some aspects of the Samba 4 Python bindings – the bindings anyone can use to implement a FreeIPA-to-Samba 4 AD link (i.e. AD DC). The bindings are currently quite C-like, and they do not follow the standard Python-way of providing API’s and common Python syntax. This is because of the core Samba components, which, due to the old IDL code generator, has to be interpreted in an old-fashioned way. Also, another big problem is the complex SMB protocol.
Besides weird bindings, Samba 4 still has a lot of interoperability issues and stability in general. Apparently these will be fixed within a year. Waiting eagerly.
It was a fun Monday. I hope that I’ll be able to attend next year as well.