To celebrate the launch of Python Interviews, we ran a Q&A session on Twitter with some of the key contributors to the book. Author and interviewer Mike Driscoll (@driscollis), and experienced Python contributors Steve Holden (@holdenweb), and Alex Martelli (@aleaxit) got together to respond to your questions.
Here’s what happened…
Welcome to our #PythonInterviewsQA with our panel of experts! Mike Driscoll (@driscollis), Steve Holden (@holdenweb) & Alex Martelli (@aleaxit).
We're really excited to be here today so let's get this started! #Python
— Packt (@PacktPub) March 28, 2018
I'm Alex Martelli; 40 years' experience, at first designing HW, then as a self-taught programmer and manager. I wrote and co-wrote several books, most recently the 3rd edition of "Python in a Nutshell" with my wife @annaraven and @holdenweb.
— Alex Martelli (@aleaxit) March 28, 2018
I'm Steve Holden. I have fifty years experience as a programmer, over twenty of them now principally in Python. With Alex and his wife Anna I co-wrote the third edition of "Python in a Nutshell." I'm the CTO of a stress and resilience startup based in the UK. https://t.co/9vBAsAcdV6
— Steve Holden 🇪🇺 (@holdenweb) March 28, 2018
My name is Mike Driscoll. I have over a decade of experience in Python doing backend work, desktop UI, automated testing and more! #PythonInterviewsQA https://t.co/N16vzZXzyH
— Mike Driscoll (@driscollis) March 28, 2018
The future of Python
We then asked Mike, Steve and Alex what they thought the future of Python is going to look like.
It's getting richer (and thus more powerful, but also bigger and more complicated) all the time. So I think we'll see Python subsets emerge, either to run with fewer resources (as MicroPython already does) or to limit the learning needed for effective usage.#PythonInterviewsQA https://t.co/Bkxc4IyH9o
— Alex Martelli (@aleaxit) March 28, 2018
I've seen #Python grow from a secret weapon to a widely used language across many areas of science and commerce. PyPy has migrated to Python 3, and the closer they get to 3.7 the wider the audience for the reduced compute costs, as @glyph pointed out. #PythonInterviewsQA https://t.co/WbCDAOuBTW
— Steve Holden 🇪🇺 (@holdenweb) March 28, 2018
At the same time Python is close to becoming the de facto language for teaching programming, and MicroPython puts hardware programming within reach of millions more people. So it's going in diverse directions, all good. #PythonInterviewsQA https://t.co/WbCDAOuBTW
— Steve Holden 🇪🇺 (@holdenweb) March 28, 2018
I am hoping to see even more Python frameworks for mobile. @PyBeeWare @kivyframework #PythonInterviewsQA
— Mike Driscoll (@driscollis) March 28, 2018
How to get involved with the Python community
We then asked what our experts think is the best way for someone new to the Python community to get involved. With the language growing at an immense rate, more people are (hopefully) going to want to contribute to the project.
Pick an open-source project using Python and start contributing. Even if you think you don't yet program well enough to help with the code, improving *documentation* is a crucial task and will get you into the community!#PythonInterviewsQA https://t.co/G7I9b486or
— Alex Martelli (@aleaxit) March 28, 2018
Get to know people – on mailing lists, at Meetups, at local user groups, at conferences. Python people are almost all willing to share the magic of this language. If you want to start a local user group or other Python-related activity the PSF can offer help!#PythonInterviewsQA https://t.co/f3oqsTDwMd
— Steve Holden 🇪🇺 (@holdenweb) March 28, 2018
Advice for anyone new to programming
Programmings popularity as a career choice is growing. That’s not just true of new graduates but people looking to retrain and take on a new challenge in their career. But what should anyone new to programming know when starting out?
My first program ever, to learn Fortran, computed probabilities in contract bridge; later tasks included a "smart calendar"; for Python, my first self-imposed task was to learn to write a web application… #PythonInterviewsQA
— Alex Martelli (@aleaxit) March 28, 2018
Try and break it down into a series of small steps, so you get some idea of how you are progressing. Ask people to read your code and help you improve it.#PythonInterviewsQA
— Steve Holden 🇪🇺 (@holdenweb) March 28, 2018
Find a mentor(s). Join a user group. Start a project. You can browse Github for all kinds of neat ideas. #PythonInterviewsQA #python @PacktPub https://t.co/nDw8rN8KK0
— Mike Driscoll (@driscollis) March 28, 2018
Switching from Python 2.7 to Python 3
There’s been considerable discussion within the community on the merits of shifting from Python 2.7 to Python 3. But whatever the obvious advantages are, there will always be resistance to change when it requires an investment of time and effort. And if you don’t need to switch then why would you?
Here’s what Mike, Steve and Alex had to say…
Move: Python 3 is quite a superior language — unless you happen to maintain millions of lines of Python 2 code, in which case you'd better be already looking for alternative Python 2 maintenance after the PSF stops supporting it in less than 2 years from now.#PythonInterviewsQA https://t.co/JdGdAxY5om
— Alex Martelli (@aleaxit) March 28, 2018
Some have tied themselves to Python 2 with C extensions, and they may prefer to stay with 2.7 rather than face the pain of migrating. Remember, 2.7 support ends at 23:59 on 2019-12-31!
— Steve Holden 🇪🇺 (@holdenweb) March 28, 2018
There's no reason not to other than legacy code constraints. Python 3 is the future. Python 2 support stops in 2020. – #PythonInterviewsQA https://t.co/zUfOCn8aUx
— Mike Driscoll (@driscollis) March 28, 2018
What gives Python an advantage over other programming languages?
Why is Python so popular exactly? If it’s growing at such a fantastic rate, why are developers and engineers turning to it? What does it have that other languages don’t?
"It fits your brain" — an old motto, but still perfectly true for many of us. As a result, Python can make you much more productive at just about any application programming task (*system* programming may need lower-level tools…).#PythonInterviewsQA https://t.co/PVfUeRuJmw
— Alex Martelli (@aleaxit) March 28, 2018
Readability; simple syntax; powerful, easy-to-understand object model; great for beginners but able to satisfy the most sophisticated programmers.#PythonInterviewsQA https://t.co/5QicKH7lTf
— Steve Holden 🇪🇺 (@holdenweb) March 28, 2018
Clean, simple syntax while still remaining a very powerful language. You can use Python for pretty much any programming problem and it will work well.#PythonInterviewsQA"
— Mike Driscoll (@driscollis) March 28, 2018
Future Python releases
If Python’s going to remain popular, it’s going to need to adapt and evolve with the needs of the developers of the future. So what capabilities and features would our experts like to see from Python in the future?
I think it would be great if you could build an exe, deb, etc from within #Python #PythonInterviewsQA
— Mike Driscoll (@driscollis) March 28, 2018
Stronger type checking, w/runtime checks (not just static checks) performed fast by dedicating a separate core. This needs better concurrency, esp. locking, with many other benefits. Next, I'd love to see new, SAFE serialization — `pickle` is unsafe…:-(#PythonInterviewsQA https://t.co/LYdo22IOcv
— Alex Martelli (@aleaxit) March 28, 2018
I'm on record as saying that maybe the advanced features have gone far enough. Fortunately Python has always been good at maintaining backward compatibilty. I think a period of stability to absorb the new asynchronous paradigms would be useful.#PythonInterviewsQA https://t.co/rYb7Bll0N4
— Steve Holden 🇪🇺 (@holdenweb) March 28, 2018
What problems does Python face as a language?
Python doesn't have a great foothold in mobile dev or embedded, although that is getting better – #PythonInterviewsQA
— Mike Driscoll (@driscollis) March 28, 2018
Too much "new, shiny stuff" and insufficient attention to old problems that were never fully resolved satisfactorily, such as serialization, use of many cores, better garbage collection… bread-and-butter stuff which needs to improve.#PythonInterviewsQA https://t.co/ugf3Ry0P0T
— Alex Martelli (@aleaxit) March 28, 2018
The temptation to keep shoehorning new features in.
Providing more help with the transition to Python 3 for those needing to migrate, if only in the form of lore. https://t.co/ne8ryzV5GH— Steve Holden 🇪🇺 (@holdenweb) March 28, 2018
Why is Python so useful for AI and Machine learning?
AI is a growing area that has expanded beyond the confines of data science into just about every corner of modern software engineering. Python has been a core part of this, and in part it explains part of the rise of Python’s popularity – people want to build algorithms in a way that’s relatively straightforward.
I believe Python's simple, elegant syntax is what makes Python so appealing to scientists. Readability matters to beginners and to the experienced developer
— Mike Driscoll (@driscollis) March 28, 2018
My company, like a lot of startups, is using many open source libraries. If purchased as commercial software the prohibitive cost would mean companies like Google, let alone my own, which is tiny, would probably not have been viable.
— Steve Holden 🇪🇺 (@holdenweb) March 28, 2018
Of course this very fact inevitably means that there will be a lot of bad software written. Fortunately projects like Software Carpentry are also disseminating information about best practices in software engineering, and I hope they continue to grow and improve.
— Steve Holden 🇪🇺 (@holdenweb) March 28, 2018