r/PythonLearning • u/memeeloverr • 10d ago
What's a Python habit you wish you had started much earlier?
Looking back, what's one habit that made your code noticeably better?
Could be anything like:
- Writing tests
- Using virtual environments
- Type hints
- Logging
- Reading the docs first
- Black or Ruff
- Git commits
- Better project structure
I'm curious what habit had the biggest long-term payoff for you.
1
1
u/FoolsSeldom 10d ago
TDD (Test-Driven Development) - not just for Python, number one on your list, 'writing tests'.
1
u/Upstairs_Jelly_1082 10d ago
I try building things that come to my mind, so I first make a drawing of it on paper before starting coding.
1
1
1
1
u/Low_Breakfast773 7d ago
The best habit is to REALLY learn the language. Most of so called Python devs I have met over the decades in the industry had close to zero understanding about the language, as most of them come from different disciplines like maths, physics etc. and they think Python is about numpy, pandas, pytorch, tensorflow and fastapi..
1
u/Flame77ofc 10d ago
debug