r/Python • u/RickSore • Nov 14 '17
Senior Python Programmers, what tricks do you want to impart to us young guns?
Like basic looping, performance improvement, etc.
1.3k
Upvotes
r/Python • u/RickSore • Nov 14 '17
Like basic looping, performance improvement, etc.
1
u/Manhigh Nov 14 '17
Test early, test often.
Use the unittest package to construct tests for your code. Run those tests often (automatic CI like travis or circleCI is great for this). Use something like nose or testflo to recursively run all tests in your package and report out coverage, so you can know which pieces of your code you haven't covered.
As someone else mentioned, a linter is a good idea. Try to follow PEP8 as much as possible (I know a lot of people are lax on the 79 character limit but you can have the checkers ignore that.