PyCon 2015: Day Two Keynote from Guido van Rossum
You have to actually understand your code! And so we've given you five more years. -- Guido van Rossum, on the difficulty of porting Python 2 code to Python 3
Python is exceptionally easy to use and easy to learn. If you’re using OS X or any Linux distribution, you can immediately pick Python up with minimal effort. If you’re on Windows, the installer takes one click to get up and running. Few languages offer this flexibility! Java – the old gold standard for education – doesn’t work easily on Macs any more, nor does it offer a comfortable environment to start punching commands in to experiment. Python lets the beginner learn but can handle a wide range of complexity, allowing new users to branch into data science, web applications, or desktop software without needing to immediately learn a new syntax.
But it’s Python’s opinions that make it a perfect language for the beginner.
The Python core team has always insisted that there is a proper way to write Python code. Sure, there may be another syntactically correct way to write code, but it won’t be the right way unless it follows certain guidelines. Those guidelines have been canonized in PEP8, a document that causes all manner of debate and consternation in Python developers. Still, the spirit of this approach matches with the realities of computer science. There may be a syntactically correct way to do something, but it’s often an approach that will cause an engineer or a team problems down the road.
Guido van Rossum discussed some of these problems with software engineering today while speaking on the move from Python 2 to Python 3. Though Python has had version 3 accessible for years now, many developers have never upgraded - in many cases, because their codebases rely on dependencies that haven’t been upgraded. And that’s a huge problem! Many developers are now hamstrung because their code simply copied and pasted someone else’s code, meaning we’re using and maintaining systems that we don’t understand. That’s bad for the craft of software engineering, and bad for the systems engineers build.
While Python has strong opinions and a hefty unwillingness to budge on the proper way to do things, it also makes efforts to include developers in ways that many communities do not. Guido spoke on the next iteration of Python (as expected), but he also made clear points to encourage diversity in the community. He stood on stage in a PyLadies shirt and praised the women who joined him at a Python meetup in Iraq. He lamented that women weren’t joining the Python language development process, but then took the next step: offering personal mentorship to women who wanted to become core contributors to the Python language. And finally, noting that women often don’t speak up and ask questions at tech conferences, he insisted that his first questioner be a woman, with women and men alternating on questions for the rest of the Q&A session.
There’s a right way to do computer science. It’s wrong to allow flippancy and bad habits in code, even for beginners, because bad habits are aggressively difficult to break and computers don’t make allowances. But it’s equally wrong to demand a certain system and not be willing to teach newcomers the details of that system. That’s where the Python community has excelled and continues to look to improve.