• Fast Python! Coding competitions with CPython and PyPy - EuroPython 2017

    In a coding competition you want to solve problems “fast”… why would you choose a “slow” interpreted language like Python? Because the “slow” Python wins competitions more often that most people think. We will show how coding competitions work, what are the resources and constraints that competitors need to take into account, and we will find out that, like very often in real life, the actual processing time is only a small term in the complex equation that describe a competition. The “faster” PyPy may help in gaining raw speed, but that is not the real advantage it gives you in a competition.

  • Solving the web most popular code shortening competition with Python 3 - PyCon.it 2017

    “Code shortening” is the “sport” where participants strive to achieve the shortest possible source code that solves a programming problem by exploiting all the tricks and quirks of the language. The SIZECON problem on SPOJ is one of the oldest and most popular code shortening problems on the web with a bizarre twist, only character above ASCII value 32 are counted for the penalty. During the talk we will take a journey into some frightening depths of the Python language in order to write shorter and shorter solutions to SIZECON until, exploiting a number of mind-blowing tricks, we will reach the current record solution for Python 3 of 31 characters. I promise I’ll show you the most obfuscated, contrived and sick python code you have ever seen and (hopefully!) will ever see.

  • Solving the web most popular shortening contest with Python - EuroPython 2015

    “Code shortening” is the “sport” where participants strive to achieve the shortest possible source code that solves a programming problem by exploiting all the tricks and quirks of the language. The SIZECON on SPOJ is one of the oldest and most popular code shortening problems on the web with a bizarre twist, only character above ASCII value 32 are counted for the penalty. During the talk we will take a journey into some frightening depths of the Python language in order to write shorter and shorter solutions to SIZECON until, exploiting a number of truly mind-blowing tricks, we will reach the current record solution of 28 characters (above ASCII 32!). I promise I’ll show you the most obfuscated, contrived and sick python code you have ever seen and (hopefully!) will ever see. Full talk online at: https://www.youtube.com/watch?v=4-3zLTg3GKk