Ask HN: Beginner to Competent in Python: How would you approach it?
Hello fellow HN users,
I expect to start a job soon where the main backend language is Python, with parts of Ruby and RoR in the stack. I have been a Ruby dev and have a beginner-level familiarity with Python - having read more than written.
How should I go about increasing my competency in the language to a decent level as fast as possible. I am talking about general fluency and knowledge about Python and not specific to the tech stack of the company.
I am sure there are excellent Python devs here and also devs who had to ramp up on the language for their job. As such, I thought I should get some guidance from the community.
Appreciate all opinions and pointers!
22 comments
[ 2.4 ms ] story [ 58.5 ms ] threadRead Effective Python.
Write more Python code.
He covers a lot of programming principles and good practice with realistic examples (i.e. _not_ "class Animal")
* Fluent Python by Luciano Ramalho — "takes you through Python’s core language features and libraries, and shows you how to make your code shorter, faster, and more readable at the same time"
I have more such Python resources here: https://learnbyexample.github.io/py_resources/intermediate.h...
Install iPython (the command line, not the notebook interface. The CLI is simpler). Install the libraries you will work with in your new software stack. Read the manuals, do the "hello worlds". Then type some variable and a question mark afterwords. This will show the documentation. Two question marks show the actual code of a particular function in question. This is great for digging around in the libraries. Many IDEs such as PyCharm have similar options when you have code and can navigate all the way down the rabbit hole in the libraries.
For many libraries in python, this attemp is not so useful. For instance, numpy delegates much work to actual C code and a lot of magic is involved.
Generally, Python has rather few specific syntax, compared to other languages. The language is rather small and you will spend more time on the libraries then on learning the actual language.
The best way to learn is by doing.
Maybe play around with making a web or cli based tool between now and your start date.
Get familiar writing code in a good IDE
As to the IDE, I am assuming they would be using PyCharm and that should be familiar since I use RubyMine. I'll check.
Something about writing out each example made it stick like nothing else.
It's going to be Webdev with Flask. This is another vote for Python The Hard Way - will take a look at it, and get some hands-on time with Python.
https://stackoverflow.com/questions/2573135/python-progressi...
You want to be a good python programmer, read other peoples code. Lots of it. Clone some big python projects and try to make changes. Get a feel for what is possible and look for common patterns in implementation.
You will always run into that classic mastery curve where initial success leads you to a false sense of mastery, before crashing hard and starting the actual climb to mastery. Get it over with as soon as you can by getting feedback on your early code, and don't take criticism personally.
[1] https://github.com/joaoventura/full-speed-python/