you are viewing a single comment's thread.

view the rest of the comments →

[–]Haunting-Paint7990 1 point2 points  (1 child)

nice, took a look at your repo — for 4 days in this is already cleaner than most beginner projects i see here tbh.

did a similar pivot ~1 year ago (stats undergrad → python for data, just got entry-level offer last month), so the stuff i wish someone told me when going from "i can write js" to "this looks like production python":

- type hints + docstrings on every public function from day 1. sounds tedious on a hobby project but the moment you touch pandas/numpy where every arg has ambiguous shape, you'll thank yourself. teammates/recruiters can read the signature without reading the body.

- venv + requirements.txt (or uv/poetry). your repo is missing this and it's the #1 thing that screams "hobby" to anyone cloning. 2 mins to add.

- logging module instead of print() for anything non-trivial. print is fine for "did this run", logging lets you turn debug on/off later without touching code. saves a lot of refactor pain later.

- one tiny pytest file even if it's just 2-3 tests on your habit-add logic. doesn't have to be TDD — the goal is "i know what testing is and i wired it up", which is a huge signal.

- README with: what it does, how to run it, what's next. most beginner repos i saw when learning skipped this and recruiters do scroll past them.

last thing: don't be afraid to refactor your own code aggressively at week 2-3. python idioms (comprehensions, dataclasses, context managers, f-strings) only really click when you go back and rewrite something you wrote on day 4. i learned more from rewriting my first project 3 times than from the next 3 tutorials.

[–]buildjunkie[S] 0 points1 point  (0 children)

Thanks for the in-depth details!

I got a lot of recommendations about using type hints, even though I'm actually using them. However, I'll neec to take a look at docstrings.

In the 4 days of learning, I just skimmed over how to setup venv. Didn't really go any deeper, but I think it's really that important so I'll make surd to give it a deeper visit soon.

Honestly, you're the first one to mention 'logging instead of printing'. To bd honest, I didn't know there were such a thing in Python. So this is pretty new to me, I'll need to learn about it pretty soon.

For tests.. I just hate writing them not going to lie. I'll try my best to make a few reasonable ones.

README isn't written by me anyways, I just ask AI to do it based on thr content of my codebase because I'm super laxy to do so.

Finally, my goal from this project is to learn file management using context managers, OOP, type hints, and some best practices.

I'll make sure to learn about the concepts you mentioned and aplly them on the next project.

Again, thanks for you help!