Tuesday 19 December 2017

Python progression path - From apprentice to guru

itemprop="text">



I've been
learning, working, and playing with Python for a year and a half now. As a biologist
slowly making the turn to bio-informatics, this language has been at the very core of
all the major contributions I have made in the lab. I more or less fell in love with the
way Python permits me to express beautiful solutions and also with the semantics of the
language that allows such a natural flow from thoughts to workable
code.



What I would like to know is your answer
to a kind of question I have seldom seen in this or other forums. This question seems
central to me for anyone on the path to Python improvement but who wonders what his next
steps should be.



Let me sum up what I do NOT
want to ask first
;)





  • I don't want
    to know how to QUICKLY learn Python

  • Nor do I want to find
    out the best way to get acquainted with the
    language

  • Finally, I don't want to know a 'one trick that
    does it all'
    approach.



What I do want
to know your opinion about,
is:



What are the steps YOU would
recommend to a Python journeyman, from apprenticeship to guru status (feel free to stop
wherever your expertise dictates it), in order that one IMPROVES CONSTANTLY, becoming a
better and better Python coder, one step at a time. Some of the people on SO almost seem
worthy of worship for their Python prowess, please enlighten us
:)




The kind of answers
I would enjoy (but feel free to surprise the readership :P ), is formatted more or less
like this:




  • Read this (eg:
    python tutorial), pay attention to that kind of
    details

  • Code for so manytime/problems/lines of
    code

  • Then, read this (eg: this or that book), but this
    time, pay attention to this

  • Tackle a few real-life
    problems

  • Then, proceed to reading
    Y.

  • Be sure to grasp these
    concepts

  • Code for X
    time


  • Come back to such and such basics or move
    further to...

  • (you get the point
    :)



I really care about
knowing your opinion on what exactly one should pay attention to, at various stages, in
order to progress CONSTANTLY (with due efforts, of course). If you come from a specific
field of expertise, discuss the path you see as appropriate in this
field.



EDIT: Thanks to your great input, I'm
back on the Python improvement track! I really appreciate!



Answer




I thought the process of Python mastery went
something
like:





  1. Discover
    rel="noreferrer">list
    comprehensions

  2. Discover href="http://en.wikipedia.org/wiki/Python_syntax_and_semantics#Generators"
    rel="noreferrer">generators

  3. Incorporate
    map,
    reduce, filter, iter, range, xrange
    often into your
    code

  4. Discover href="http://wiki.python.org/moin/PythonDecorators"
    rel="noreferrer">Decorators

  5. Write recursive
    functions, a lot

  6. Discover href="http://docs.python.org/library/itertools.html"
    rel="noreferrer">itertools and href="http://docs.python.org/library/functools.html"
    rel="noreferrer">functools

  7. Read href="https://rads.stackoverflow.com/amzn/click/com/0596514980" rel="noreferrer">Real
    World Haskell ( rel="noreferrer">read free online)

  8. Rewrite
    all your old Python code with tons of higher order functions, recursion, and
    whatnot.

  9. Annoy your cubicle mates every time they present
    you with a Python class. Claim it could be "better" implemented as a dictionary plus
    some functions. Embrace functional
    programming.


  10. Rediscover the href="http://en.wikipedia.org/wiki/Strategy_pattern#Python"
    rel="noreferrer">Strategy pattern and then href="https://rads.stackoverflow.com/amzn/click/com/0596007124" rel="noreferrer">all
    those things from imperative code you tried so hard to forget after
    Haskell.

  11. Find a
    balance.


No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print &q...