Click here to code!

4 Common Mistakes When Learning Python and Programming

Posted by Bob on Thu 19 March 2020 in Learning • 3 min read

How are you progressing with your Python? What could be holding you back?

I gave it some thought and identified 4 issues we commonly see that hold people back from becoming a proficient Pythonista and programmer.

1. Tutorial paralysis

This by far the pitfall we hear about the most: having to read 4+ books in order to start writing code. Wrong. These resources are most effective if you alternate them with writing code. So the sooner you write code and FAIL the better.

2. Improper sequencing

Taking too many steps at the same time.

I literally saw somebody in a group asking: "I need a learning path for ML. I don't know programming yet". My reply was: "Try to crawl then walk then run. Start with the basics of Python / programming first."

The same is true with other parts of your programming journey:

  • Yes it's important to write thorough test code, but don't obsess over pytest features (yet), simply assert your function outputs for starters.

  • Yes it's important to know data and web (where Python is used a lot), but learning a web framework without knowing at least the basics of classes, databases, some html/css, you set yourself up for a rough ride.

  • Yes it's important to write clean and fast code, yet in your first iteration you should really focus on getting something to work first (sad realization: how many great apps were never written because their creators were stalled by perfectionism?).

  • Yes you might be asked about binary search in a coding interview, but if you distill it down all complex problems are made up of simpler subproblems. So focus on the basic data structures/ concepts first: list vs dict, mutable vs immutable, etc. They form the fundamental building blocks of your programs.

We estimate that with ~20 well selected Bite exercises on our platform you will get further than banging your head against the wall trying to absorb a coding interview book (see 1.)

spiderman reading a book while balancing

(Photo by Road Trip with Raj on Unsplash)

3. Obsessing over Pythonic code

As important it is to know to effectively use Python constructs and writing Pythonic code, you should equally invest in learning about software best practices:

  • Use meaningful names

  • Use proper scoping / modular code

  • Write short and testable functions / methods

You can write very Pythonic code but if your functions are > 100 LOC and have a lot of cyclomatic complexity, you won't be (perceived as) an effective programmer.

Aim to read a software book each month and spend at least 1 hour a week reading top quality open source projects like requests, Flask, Django or OpenCV.

Awesome Python provides a curated list of awesome Python frameworks, libraries, software and resources. This is a great starting place and with the Github mobile app it's even easier now :)

4. Going on your own for too long

My first Python code I wrote as a support engineer among fellow support engineers.

I became the tool developer expert, the go-to guy. It felt great but cheerleaders are bad for growth. And ego is bad for growth. So I took an honest look:

  • I was not exposed to a large professional code base.

  • I did not use any advanced Python tooling.

  • I was not surrounded by Python developers that were doing this for many many years.

As we always say at PyBites: if you're comfortable for too long, alarm bells should go off.

Remember: success leaves clues! Merely by surrounding yourself by experts you will inevitably grow (it's like gravity).

So we challenge you: become a small fish in a big pond again and your future self will thank you.

I hope this is helpful. Comment below if you see any other common mistakes people make when learning Python / programming.

Keep Calm and Code in Python!

-- Bob

With so many avenues to pursue in Python it can be tough to know what to do. If you're looking for some direction or want to take your Python code and career to the next level, schedule a call with us now. We can help you!

See an error in this post? Please submit a pull request on Github.