I'm Hoang Quoc Dat. I write short, practical notes on the small Python habits that make code easier to read, easier to trust, and a little more fun to write.
Most Python content either stays at "hello world" or jumps straight to frameworks and buzzwords. I wanted a middle ground: short, honest posts about the habits that quietly make a codebase better — naming, structure, small refactors, and the standard library features that don't get enough credit.
Every tip on this page is something I've actually used in real projects, not just read about. My goal isn't to impress you with clever one-liners — it's to help you write Python that your future self, and your teammates, will thank you for.
Small changes, picked for how often they come up in everyday code.
When you're building a new list, set, or dict from an existing one, a comprehension usually reads clearer than a manual loop with .append(). It keeps the "what" separate from the "how," and it's often faster too.
If you need both the index and the value while looping, enumerate() says exactly that in one word. It removes an entire class of off-by-one bugs and makes the intent obvious to anyone reading it later.
f-strings are easier to read than %-formatting or .format(), and they let you call functions or do quick math directly inside the braces. They've become the default for a reason.
A fresh venv per project keeps dependencies from bleeding into each other, and it means "it works on my machine" becomes a much rarer excuse. Pair it with a pinned requirements file and future you will be grateful.
No spam, no growth-hacking newsletters — just the same short, practical notes on writing calmer Python.
Get new tips by email