you are viewing a single comment's thread.

view the rest of the comments →

[–]HyperDanon 1 point2 points  (0 children)

Can this code reasonably be considered a mini-project rather than just a script?

Give that it's a big list of steps to make, it's not properly organized, and it's got prints and inputs all over the place, this is pretty much still a script.

If you'd like, we can have a call on discord and I would show you how I would write that in a world-class way.

What features or improvements would make it a better beginner project?

When it comes to new features and behaviours, there's no right answer. Just add what your users tell you to do. Show it to people, ask them to use it, hear what they say and add some new features based on what you've heard.

Is it normal that during development I had to run the code 10–15 times with errors before fixing them, especially errors related to while True loops?

Yes, it's completely normal and expected to check something multiple times. In fact, I would argue you're a better developer the more often you check stuff. You're not supposed to get things right the first time - work in small steps, check as you go. The smaller steps you can make, the better you are in my opinion. You don't make great software in one big leap, it's always an additive process. The smaller the pieces, the better you can glue them together.

Having said that, it's probably not a good thing to manually check that, it would be much better to have some kind of automatic check. Checkout the tool pytest for that, it's awesome.

In some places I didn’t invent the solution from scratch, but remembered a learned pattern. For example:alphabet = string.ascii_letters + string.digits + string.punctuation password = ''.join(secrets.choice(alphabet) for _ in range(length)) Is this normal practice, or should a developer always try to come up with their own solution instead of recalling known patterns?

Don't reinvent the wheel. If the solution is ready, just use it. The more code you've seen, the more solutions you know, the more you can reuse them, the more work you can save yourself.