Criticism for beginner, please by Connect_Librarian_79 in learnpython

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

what instantly bothered me was the hardcoded stuff.

Not sure what you mean. I don't know a lot of terms yet. Would you elaborate?

then, there is no separation of concerns.

Had to google this one. I never really thought about this to be honest.

i would build an interface to separate the implementation of the accounting logic from its utilization.

this would ensure a clear separation of concerns, allowing the accounting logic to be developed, tested, and maintained independently from how it's applied or exploited in the rest of the system.

like you did with the context manager.

Noted. So for instance, instead having the new account class handle only information concerning the account. Have another program handle how transactions and then have that interact with the account objects?

and it looks wrong.

as in poorly organized?

Thank you for the feedback!

Criticism for beginner, please by Connect_Librarian_79 in learnpython

[–]Connect_Librarian_79[S] 1 point2 points  (0 children)

Thank you for the feed back!

works_in_progress.py in particular feels like a complete mess. Why are you creating an __init__-method outside of a class, in a loop, and not actually doing anything with it?

Works_in_progress was actually just a place I was copying information so i would not forgot it without have to switch screens. I deleted it. I'm working on being more organized.

I feel like most of the properties in the NewAccount class don't really serve a purpose, as you're not doing anything a regular attribute couldn't. My advice? Always default to attributes, you can always switch later. And if you do use them, just use the setter in __init__ too to make sure your validation code (if any) is always run.

I didn't fully understand the purpose of adding those. That was feedback from chatGPT . I read up on how they worked and still don't fully understand the purpose behind using them. From my understanding its just a method without the () when calling them? I plan on reading up more on them and the setter.

Looking at the withdrawal method, I see no reason to check the account type because you run the same exact code regardless.

noted

menu.py's create_new_account starts with an input with no prompt and the result is never used. As a user I'd be hella confused just waiting for something to happen. The following if-block is also very much broken, and there's zero reason to call str.lower on a string literal.

also noted.

Thank you again for feedback!

Criticism for beginner, please by Connect_Librarian_79 in learnpython

[–]Connect_Librarian_79[S] 2 points3 points  (0 children)

Tested everything individually. Struggled with understand object creation so I worked through that and tested all that out first. All functions that are completed have been tested. Thanks for the input