Python Forum
intermediate book recommendation please? - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: intermediate book recommendation please? (/thread-19790.html)



intermediate book recommendation please? - jameson984 - Jul-15-2019

I hoping to get some advice on how to take myself to the next level in python programming. I've been using python for about 5 years, but just on my own, and not on a daily or even weekly basis (as it's not my core job), and not in a professional environment where I can learn on a daily basis from other more experienced coders. Learning by working on projects with expert coders and adopting their habits sounds like a great way to get better, but that's not really available to me since I work alone. All my knowledge of python is from first reading the books Think Python by Allen Downey and Python for Data Analysis by Wes McKinney (which I thought were both great) and then trying to code things, and using stackoverflow to figure out how to do it if I can't figure it out myself.

I am using python for data analysis purposes and have a fully working GUIless program that I've built over about 5 years off and on and has all the functionality I need, but it contains a lot of sloppy code and is an overall mess, and I now have the time and need to refactor the whole thing and maybe rebuild from scratch in a more proper way. As part of this refactoring project I'd like to do these things among others:

-Switch from python 2.7 to 3.7 (I have no experience with python 3)
-Switch from using Spyder to PyCharm (it seems most ppl think pycharm is the best IDE and I am willing to take on the learning curve)
-Adopt a version control system like github or svn (I have no experience with either so need to learn from scratch; right now I just make backup files of my code before editing but have no tracking of my code changes over time)
-Incorporate testing into my coding (I have no experience with unittesting but I've heard it's important)
-Upgrade from pandas 0.12 to 0.24 or the latest (I need to learn how to do this so my existing code doesn't break from the transition and deprecations)
-Learn how to better break up functions (my legacy code has many 20+ line functions which I now know are probably way too long and do way too much but I don't have a great framework for how to think breaking up the code)
-Learn how to better use classes and better know when to use them vs just functions
-Learn about decorators, descriptors, and other intermediate topics not covered in intro books
-Learn about overall software architecture and how to organize all my various modules (right now my program is split into about 6 to 10 modules all sitting in the same directory, but this all occurred over time as a need arose and without any overall top down planning)

I like to learn by reading about concepts and example code of those concepts, and then practicing them myself (as opposed to watching videos as that seems to be much slower) so I thought finding a good book or two might be a good way get a crack at the above. In my research on Amazon the following titles seemed like they might be relevant and were highly rated:

Effective Python: 59 Specific Ways to Write Better Python by Brett Slatkin (Maybe a good pick?)
Python Tricks by Dan Bader (Maybe a good pick?)
Clean Code in Python by Mariano Anaya (seems most relevant but is very new and has no reviews)
Serious Python by Julien Danjou

Anyway, I was hoping some of the Python experts on here could offer some advice. Thanks!


RE: intermediate book recommendation please? - metulburr - Jul-15-2019

You have clear and concise steps on what you want to accomplish. I would suggest to start doing those one by one. All of it can be learned online for free.

(Jul-15-2019, 01:23 AM)jameson984 Wrote: -Learn about decorators, descriptors, and other intermediate topics not covered in intro books
I would consider this stuff fundamentals that should be an an intro book. If you didnt cover this in a book, then i would consider that book not up to par. A book i still use as reference is Learning Python. It covers decorators, meta classes, etc. It also covers 2.7, so if you are not familiar with python3.x you can see the differences in their examples.


You can learn git with an interactive website
https://learngitbranching.js.org/

You can join a group of python programmers in some task (preferably geared to what your interested in). That way you can learn from them.

If you produce some code here and ask questions, usually you will get responses how to better your code as well as fixing it.