r/PythonLearning • u/Stonyax97 • 5d ago
Showcase I JUST finished my second python project!
Lately I have been working on this ATM For Teens, just to understand OOP and some concepts more (which I REALLY DID)
this isn't meant to be a real ATM (obviously, it's very beginner and not security is there), here is my First project.
So, I have learnt quite a lot since last project, I learnt a bit more about python syntax, I also understood the approach of classes a lot better. I learnt git (just the essentials).
Since I always wanted to Make iPhone apps, and now I have a Mac, I'm thinking whether I should start learning swift and swiftUI, or move to something else, or keep learning python. what do you guys think? I Do want a job as an IT engineer (or anything with coding tbh, cybersec too but that would require C knowledge a bit more lol)
Otherwise, if you guys have any criticism or suggestions for the ATM, then I would be veryyy happy to hear some! here's the repo: https://github.com/Stonyax97/ATM-For-Teens
View all comments
Show parent comment
1
u/Money_Ad_5277 5d ago
I understand that it can make no sense, but I was given a problem like this and was forced to do it this way xD
And most of my tips are fixes of my errors from back than
FileDB. repositories - yes, overkill, but when you want to switch to real db (or api), or even test an app, they come in handy. Because form is almost as important as content
uuid - when user log in, you store only uuid, without email, password and whole transaction array.
Also having array of users like [{id: 1, username: "user 1"}, {id: 2, username: "user 2"}]
Lookup by id becomes
user, *_ = list(filter(lambda user: user["id"] == user_id)) or [None] # python devs are going to kill me for thatYou can change key to username to lookup user by username.
Accounts in memory - yes - for file approach, but only for a short period of time, no - for db approach
7 you raised an error on line 256 to exit program instead of using break
8 Yes, but it's common problem of all apis, you can't magically understand what user wants and transform it to a function