Do you know the following problem: you know you should write cleaner code—but you don’t actually do it.
My biggest struggle with Python so far is building good habits. Examples: To build an object model when it is warranted instead of trying to run functional code. Start with comments. Learn to use automatic testing.Niklas — Finxter Email Course Member
Most likely, you simply need to study more, improve your skills to a level where you cannot help to write better code, and seek interaction with professional developers. They will never accept bad coding habits without telling you about them. By interacting with others, your bad habits will vanish quickly.
Watch the video to learn a few simple techniques that will solve this problem:
Let’s summarize the ideas discussed in the video. How to develop better habits and write better code?
- Read more code (for example, solve Python puzzles daily).
- Write more code yourself (for example, start with those 10 practical projects).
- Make your code public (for example, publish all your code at Github).
- Be active on coder forums (for example, ask and answer questions on StackOverflow).
By completing these four steps, you’ll be able to overcome your bad habits.
Where to go from here?
Want to learn more about habits? Read the following blog article about the #1 coding habit you should implement today.
Also, check out the article 5 habits of highly effective coders.
If you use to procrastinate in coding, feel free to skim over this article.
While working as a researcher in distributed systems, Dr. Christian Mayer found his love for teaching computer science students.
To help students reach higher levels of Python success, he founded the programming education website Finxter.com that has taught exponential skills to millions of coders worldwide. He’s the author of the best-selling programming books Python One-Liners (NoStarch 2020), The Art of Clean Code (NoStarch 2022), and The Book of Dash (NoStarch 2022). Chris also coauthored the Coffee Break Python series of self-published books. He’s a computer science enthusiast, freelancer, and owner of one of the top 10 largest Python blogs worldwide.
His passions are writing, reading, and coding. But his greatest passion is to serve aspiring coders through Finxter and help them to boost their skills. You can join his free email academy here.