Return to Course Home Page


How to move from a beginner to a more advanced python user

Taken from Talk Python to Me, Episode #427, with some modifications.

Guest: Eric Matthes, author of Python Crash Course,(#1 Book on Amazon in the category of Open Source Programming.)

10 tips to move from beginner to expert

1. Know your goals

  • Why are you learning python?

  • Why are you learning data science?

2. Have a project in mind

  • What do you want to do with it?

  • Use python to solve a problem you are interested in solving.

  • Don’t be afraid to work on personal projects.

Some examples of my personal “problem-solving” projects

Biobib - Python code to make my CV/Biobib from a google sheets/.csv file.

Triumph - Python notebooks for a 1959 Triumph TR3A EV conversion project.

Stoplight - A simple python webapp for monitoring EDS217 course pace.

3. Don’t limit your learning to what’s needed for your project

4. Read good code

  • Libraries and packages have great examples of code!

  • Read the code (not just docs) of the packages you use.

    It’s okay if you can’t understand it all. Often you can understand intent, but not what the code does. How would you have done it? Why did the author select a different approach?

  • Github is a great place to find code.

5. Know your tools

6. Learn how to test your code

  • Testing code is part of writing code, and testing is a great way to learn!

  • Focus on end-to-end (E2E) tests (rather than unit tests)

    • Unit tests:

      Does it work the way you expect it to (operation-centric)?

    • End-to-end test:

      Does it do what you want it to do (output-centric)?

Testing for data science

Testing with PyTest for data science

7. Know what’s good enough for any given project

You’re not writing code for a self-driving car or a pacemaker.

  • Don’t over-engineer your code.

  • Don’t over-optimize your code.

  • Simple is better than complex.

8. Embrace refactoring

Refactoring is the process of changing your code without changing its behavior.

Ship of Theseus: If you replace every part of a ship, is it still the same ship?

  • As you learn more, you will find better ways to do things.

  • Don’t be afraid to change your code.

  • Tests (especially end-to-end tests) help you refactor with confidence.

  • “Code smells”… if it smells bad, it probably is bad.

    • Code Smells
    • Comments can be a code smell; they can be a sign that your code is not clear enough.

9. Write things down

Keep an ideas notebook

  • Write down ideas for projects

  • Write down ideas for code

Write comments to yourself and others

Write documentation

Write down questions (use your tools; github issues, etc…)

10. Go meet people!

The Python (and Data Science) community is great!

Go to Python & Data Science meetups.

Go to python and data science conferences.

  • PyCon 2024 & 2025 will be in Pittsburgh, PA
  • PyData (Conferences all over the world)

Go to hackathons.