PyCon UK 2016 - Cardiff
This was the first year that PyCon has been held at Cardiff - over 500 Pythonistas descended upon City Hall for 4 days of talks, workshops, welshcakes and sprints (use these links for the full programme and the video recordings).
The weekend also coincided with celebrations to mark the 100 year anniversary of Roald Dahl's birth in Cardiff (renamed, The City of the Unexpected). Outside of the conference there were many mysterious and magical Dahlian things to witness - how many conferences have you attended where you got to see a giant peach being paraded into a medieval castle?
One thing that we thought was quite magical inside the conference was the use of Speech-to-text technology. Two ladies transcribed every talk in the main hall almost instantaneously with near-perfect precision. Through years of practice and the use of specially designed keyboards and custom dictionaries of words, they were able to transcribe at speaking rates of up to 300 words per minute (around twice the average rate) from speakers of many nationalities.
Python vs Other Languages
Brandon Rhodes (chair of PyCon US) kicked off the conference with an interesting talk on Python and the Glories
of the UNIX Tradition highlighting the commonalities between Python and the OS programming language e.g. interactivity,
recursive data layout, first class errors, piping commands together, reference counting and the availability of inbuilt
'power tools' that are complex but simple to use (Python
sed commands). He pointed out
some of the things that we perhaps take for granted were seen as revolutionary approaches in the early days of UNIX.
For example, the hierarchical filesystem which stored file names and paths as plain text was frowned upon by
existing operating systems as they were thought to be slow to parse. However, the creators of UNIX believed that the negative impact
on speed was more than outweighed by the improvements in readability and user experience; a way of thinking that is very
Pythonic. Brandon recommends reading the July/August 1978 edition of the Bell System Technical Journal to
gain a deeper appreciation of UNIX.
The ever controversial Russell Winder gave a ~~rant~~ talk called Fast Python? Don’t bother! about the relatively slow speed of Python and its inability to take full advantage of parallel programming (to much disagreement from some audience members). Russell believes that using libraries such as numba, Cython or numpy to speed up Python performance is a flawed approach (why not just write C instead?) and that Python's comparative advantage as a language is for data rendering, rather than computation. He introduced the relatively new parallel programming language that he has been working with called Chapel.
Jenny Wong was a visiting PHP developer and delivered a talk titled Lessons learned from PHP. PHP is 4 years younger than Python, and is often viewed as cheaper and easier to deploy. Like Python, it has a large community, is used in web development and is considered easy to learn. It is seen by some as the gateway to programming, but also viewed as the "wild west" - romantic in parts and violent in others! Jenny believes the starkest difference between the two languages was the community, and how they behaved towards one another. PHP community events/conferences tend to be very competitive with each other and there is lots of conflict within the community on social media. She was not alone in praising the supportive and collaborative nature of the Python community, and she was grateful to the organising committee for welcoming her to a Python conference.
There were also fascinating talks about the usage of Python in non-English speaking countries and the importance of localisation. Rae Knowler gave an example in her talk about how the lack of support for the Turkish letter 'i' in a mobile device lead to the tragic death of 2 people.
Although Python 3 makes the use of unicode a lot easier, the conversion between upper and lower case for the multiple
versions of 'i' in the Turkish language are still incorrect, even with the
locale library. The talk also gave an
overview of the design challenges involved in localising for languages that have full-width versus half-width characters
and languages that are read left-to-right (LTR) versus right-to-left (RTL).
The last keynote speaker of the conference, Bashar Al-Abdulhadi expanded upon this topic and gave us An Arabish lesson: Introducing Django to the foreign world. As the name suggests, Arabish is Arabic written on an English keyboard using the Latin alphabet plus numbers, though it requires some imagination to see the mapping between Arabic letters and their Arabish equivalents, e.g. 3 = ع , a.k.a. "ayn", Ali = 3li).
Bashar also highlighted some challenges in making Arabic websites - the variety of fonts and how they treat joining the letters up, the lack of Arabic support in browsers means that sometimes images have to be displayed instead of text, and security issues with web address spoofing (some Arabic unicode characters look almost exactly the same when joined-up).
However, there are already many initiatives available to help take your website to Arabic speakers. arabeyes.org provides crowd sourced translation advice and RTL Dashkat or CSSJanus are LTR to RTL converters for CSS!
Pondering Puzzles with Python
There were a few different talks on how to use Python to solve specific algorithms. One of these was delivered by
David MacIver: Easy Solutions to Hard Problems. The talk gave examples of how
certain NP-Hard problems could be reduced to ones using integer linear programming.
The Boolean Satisfiability Problem was given as an example - working out whether there exists an
assignment of boolean variables that will satisfy a list of expressions involving those variables. An example would be
v3 need to be in order to satisfy all of these expressions:
The same problem can be expressed similarly in integer terms:
David went on to give an example of scheduling a conference with multiple speakers, rooms, slots within an integer
programming paradigm, using a library called
pulp to define the constraints. For example, there cannot be more than one talk in a
room in a given slot, all talks must be scheduled, speaker availability must be taken into account and we should
try and make sure the room has enough capacity relative to the number of predicted attendees. This prototype scheduler
was actually used at the EMF Camp conference and was particularly handy for updating the
timetable when speaker availability changed.
Zara Siddique also gave an overview of Addition Chains and an interesting problem related to how to find the
shortest chain for any given number. An addition chain is a chain of numbers that sum to the target number, using only
numbers that you have previously used - every chain starts with 1 and to get to 6 for example, you could just add by 1,
6 times in a row, but the shortest chain involves just 3 steps:
1 + 1 = 2, 1 + 2 = 3 and 3 + 3 = 6. The tree below
shows the shortest path for numbers below 149 (taken from this link)
Zara's demo involved a brute force approach to find all the addition chains EVER. For more information on addition chains, we defer to Volume 2 Section 4.6.3 of the timeless programming bible - Knuth's The Art of Computer Programming.
P is for People
One quote that we really liked from the conference was that "People skills are not soft skills - they are hard, much harder than technology". Saturday's keynote speech by Gail Ollis (a former developer who is now doing academic research on the psychological aspects of developer experience) highlighted that purely people factors are significant predictors of project trajectories. Regardless of the planning process/methodology/technology used, if you have good people, the project is likely to succeed. At the same time, this is somewhat of a fairytale because it is difficult to know ahead of a project who the best people will be, and by definition, not everyone can be above average. However, Gail's research has shown that when small teams work closely together over time, workflow velocity, communication and trust between the team improve. Larger teams tend to develop complacency, and individuals are more likely to exhibit herd mentality instead of voicing their concerns.
We were also treated to a brief demo of how Chloe Parkes has developed a chat bot for answering customer questions using PyAIML - a python interpreter for AIML (the Artificial Intelligence Markup Language). The code is rather intricate and verbose as it needs to account for a variety of contexts, but it seems to be working well in the wild.
Marc Tamlyn, a Django core developer gave a talk on Tech interviews that don’t suck. His top tips were:
- Involve future colleagues, team leads and non-technical people (Project Managers, Designers)
- Ask just one or two specific (closed) knowledge questions appropriate to level of experience (e.g. use it to double
check that a person with 10 years' python experience knows the difference between a
- Explain how the rest of the process will work and when the candidate will get feedback
- Account for interview pressure bias
- Find out what the candidate already knows, teach them something extra, and see how they use the new knowledge and respond to constructive criticism
- Assume that no GitHub profile = bad engineer. Similarly, a strong Stack Overflow profile may suggest a helpful nature or someone who spends too much time on Stack Overflow instead of working.
- Be overly formulaic and specific with interview questions - let the interviewee demonstrate what they know
- Be misleading about what the job will entail
- Give high amounts of pre-interview prep work - this unfairly disadvantages people with families
By the way, YPlan are currently hiring engineers! If you are interested in working with the people behind this blog and helping over a million users to live their city, we would love to hear from you.
Julie MacDonell gave a 'lessons learnt' talk about how the company she works at (Stylight) split their engineering team into smaller ("two pizza") teams as part of breaking up their backend codebase from a monolith to microservices. The idea was for the design of the code infrastructure to mirror the way their engineers communicated with one another. However, Julie found that breaking developers out into smaller teams does not automatically help to break the monolith. Aside from this, at Stylight they have started 'guilds' (a concept copied from Spotify) - this is where a group of people with similar interests get together to discuss high-level coding best practices e.g. test driven development, agile workflow etc.
Most Striking Lightning Talks
Sadly the legendary Lightning Talk Man could not attend this year, but he was replaced by Lightning Conductor Zeth, who enforced the rule of 5 minutes per talk, with a little bit of help from Helen Sherwood-Taylor's bluetooth controlled light bulb which went into a disco light frenzy when the speaker's time ran out. On the first day of talks, we also stood and sang together a rousing rendition of 'Men of Harlech', a battle song that ends with the lyrics Welshmen never yield - causing Adam to lament the fact that they are not able to use generators. Sigh.
- A lightning talk delivered entirely in emoji-speak, demo-ing: 🐍, a package that uses tokenize to compile Python code written in emojis!
- The BBC generously gave 300 free micro:bit devices to the conference attendees - one 14 year old budding Pythonista immediately started hacking away and within a few hours had created a calculator that would communicate with another microbit so that he could help his friends cheat during maths tests! What was that saying about the youth of today being the leaders of tomorrow....
- The respective organisers of PyCon Namibia, Swiss Python and PyCon PL advertised their conferences and had us wishing our budgets could take us to all of them
- Did you know 15% of global GDP is spent on government contracting projects? The Open Contracting Data Standard is an initiative that aims to make the usages of this money more transparent.
- Fewer than 5 people in the audience had heard of DNSSEC DANE - it stands for DNS-based Authentication of Named Entities and is a way to authenticate without certification authorities. getdns is an asynchronous API (with a python binding) that facilitates access to DNSSEC.
Diolch (thanks in Welsh!) to the organisers of PyCon 2016 for delivering a thoroughly pythonic weekend and the BBC for donating microbits to the attendees, we look forward to seeing you in Cardiff next year!