Contribute Media
A thank you to everyone who makes this possible: Read More

Solving the web most popular code shortening competition in Python.

Description

Alessandro Amici - Solving the web most popular code shortening competition in Python. [EuroPython 2015] [24 July 2015] [Bilbao, Euskadi, Spain]

“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][1] 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. I invite participants to give [SIZECON][1] a try and check their score against the [Python2][2] and [Python3][3] SPOJ rankings.

Slides: [http://slides.com/alessandroamici/solving-the-web-most- popular-shortening-contest-with-python][4]

[1]: http://www.spoj.com/problems/SIZECON/ [2]: http://www.spoj.com/ranks/SIZECON/lang=PYTH%202.7 [3]: http://www.spoj.com/ranks/SIZECON/lang=PYTH%203.2.3 [4]: http://slides.com/alessandroamici/solving-the-web-most-popular-shortening-contest-with-python

Improve this page