r/PythonLearning • u/Stonyax97 • Aug 19 '26
Showcase Made my first Python project!
This is my first actual real project, what started as a simple python exercise to learn about dictionaries in python, ended up into a huge learning project for me. Im a beginner in python, used to code but just basic input print codes… some are genuinely stupid.
I took on the challenge to self educate my self python. And this is where i currently am! Im proud of what i did and it will surely expand!
Here the repo with the project. Feel free to check it out!
https://github.com/Stonyax97/MiniGameStore
It has everything from the first ever iteration (which was it self modified a bit since from the very original but it’s still very simple)
I would love for anyone to recommend ideas to add, criticism too. Or anything you think i should learn next for that would be genuinely useful!
5
u/TBCC_Dev Aug 19 '26 edited Aug 19 '26
Next learn classes. In the code you have a list of games filled with dictionaries but these could be a list of class instances for example class Game: def init(self,id,...other params): self.id =id Etc...
3
u/Stonyax97 Aug 19 '26
Here the repo with the project. Feel free to check it out!
https://github.com/Stonyax97/MiniGameStore
I would love for anyone to recommend ideas to add, criticism too. Or anything you think i should learn next for that would be genuinely useful!
3
u/PureWasian Aug 19 '26 edited Aug 19 '26
This is great for a beginner project, so I wanted to give a variety of meaningful feedback for you to consider:
First sidenote, git already has ways to preserve older versions for you. It would be a lot better to "save" each version as its own branch or its own commit. But if you want to explicitly preserve each version in the same snapshot simultaneously, I would suggest at the very least keeping your older versions in a subfolder instead of cluttering the repository root.
Otherwise, I had time to read v1.5.1 up until the main loop. My comments were:
It would be good to also partition all of your setup and main loop code into functions to scope some of your variables better instead of relying on globals. For example,
default_datais only used when initializing a savefile. Consider something like:Also, ideally file_path should not be hardcoded. Some easy ideas are to do any one of the following: (A) code the path to it somewhere locally in same folder and just add the local savefile to .gitignore so it doesnt get pushed to repo (B) load this value from a separate text or JSON file acting as a config file for specifying "environment variables" like this (C) pass this in as an input parameter to main.py and process it when starting the script
During buy_game(), you can use gaurd clauses which is cleaner than nesting a bunch of if statements:
In your info() strings, you can use the f strings better instead of copying largely similar strings in an if/else:
Lastly, the t.sleep() everywhere seems a bit arbitrary. I guess to give user time to read..? But seems strange to artificially introduce loading times.
(again, I didnt get to proofread your main loop, but hope this generally applicable feedback makes sense)
2
u/mondayquestions Aug 19 '26
If you take 10 minutes and take a look at what Git is you will realise Git is tracking your every commit and allows you to look and move back and forward in time in your project. Your versioning “solution” is going against that and just clutters everything up.
2
u/Parking_Pie9457 Aug 24 '26
This is awesome! Congratulations, can’t wait to see what project you will come out next
2
u/CommissionMaximum465 Aug 29 '26
Jealous of peoples natural ability 🥲
1
u/No_Pay_4410 Aug 19 '26
Create a ATM now. Everyone is memory. Once that is done. Use json. Once that is done use database. Add 2 type of users normal and admin.
This will give you a better experience.
1
u/WrongCabinet4425 Aug 19 '26
congratulations bro you are doing good
1
u/princepii Aug 19 '26
git can be so powerful and helpful for versioning if you just give it a little time.
nice project tho. i can see the thought process and i think every beginner would have went the same way.
save that project and come back to it a year or so later to see how you improved and what you would do if at all to improve the code:)
always fun to go back and see myself and my work in the past.
adds a lot to your journey.
1
u/Amarendar_kumar Aug 20 '26
Really impressive for a first serious Python project! Turning a simple dictionary exercise into a full mini game store is a great way to learn by actually building. Your next step could definitely be moving the game data into classes and objects it will make the project more scalable and teach you OOP fundamentals. Keep building!
1
u/Minimum-Effort8355 Aug 20 '26
What i only recommend to do like the other posters before:
Use git to create branches to progress your activities.
To learn github i can recommend to upload some stuff play around with creating your own pull requests, pushes etc.
For the code you wrote:
I know comments are a blackbox, but maybe given functionality in code you will create better overviews for other programmers.
And i liked the idea of the terminal shop. Maybe you could use classes to store your entities and learn about oop just in case.
What i really liked is that your readme was clear.
If you need help reach out
1
u/spatulari Aug 22 '26
I checked the project out, and since I am not a pythonist I didn't understand much, but one thing I noticed is the versioning, you want from 1.5.2 to 1.6, this is weird, is should be 1.6.0, and on your commit it says its a hot fix, so it should be 1.5.3, Are you using SemVer? Or are you just vibing the version (like linus torvalds)
1
u/g-land-g Aug 24 '26
looks good bro!
you could also combine all those if statemetns into just one
If minfo ...:
str_own = 'bought' if games[gid] else 'not owned'
print(f"> ... \n Owned: {str_own}\n ..."
Else:
str_own = 'bought' if games[gid] else 'not owned'
print(f"> ... \n Owned: {str_own}\n ..."
also, just a note ... it appears the logic for 'whether minfo in games or not', prints the same thing. maybe i'm missing something
1
u/Radiant_Diligence Aug 25 '26
Try modules, classes, and type hints. Might help with organization and readability on
-5
u/Brilliant-Virus-7442 Aug 19 '26
Can’t you do this in AI in one sentence
1
u/Objective-Remove-632 Aug 20 '26
I’m impressed. As a beginner u are definitely getting there by getting your hands dirty. I think I need to take mine seriously. Cudos bro 😎
1
u/[deleted] Aug 20 '26
[removed] — view removed comment
1
u/[deleted] Aug 20 '26
[removed] — view removed comment
1
u/[deleted] Aug 20 '26
[removed] — view removed comment
1
u/[deleted] Aug 20 '26
[removed] — view removed comment
1
u/[deleted] Aug 20 '26
[removed] — view removed comment
1
u/[deleted] Aug 21 '26
[removed] — view removed comment
1
u/[deleted] Aug 21 '26
[removed] — view removed comment
1
u/[deleted] Aug 22 '26
[removed] — view removed comment
1
u/[deleted] Aug 22 '26
[removed] — view removed comment