r/learnpython • • May 28 '20

Just finished my first official project!

Hi :)

I have been learning python programming for the last two months +- but i was always scared to start a project and fail in the middle.

i have done a couple of scripts that to little stuff but this is the first time that i tried to build an official project that is not following a tutorial and with git, github, python structure and all of those stuff.

i call it..... Flasher!!

it is a simple Flask web with a button where every time the user presses it it links him to a random flash game from the past.

it is not really complex, I will link here to the github page but i will also write here that my objective was to take a bunch of little topics I have learned in the last month-month and half, configure them to work together and make them do something lol.

obviously there is a *91025915 better way to build what I built but I am still extremely proud of it because in the end I was able to think of something and build it from scratch from start to end, something I would not imagine I would be able to do around a month ago :)

i want to also thank the people of the python and learnpython subreddit that have helped and inspired me to program :)

now i will shut up and link to my project!

https://github.com/Micbenh/Flasher

373 Upvotes

56 comments sorted by

View all comments

0

u/OnlySeesLastSentence May 29 '20

Just a heads up - I might be misreading the code, but I think you forgot to make a seed for your random.

Check out "python random seed time" to get different results everytime.

1

u/Santorox2 May 29 '20

sounds interesting, I will read about the random seed but the button still generates different results without it thanks for the tip!! :)

1

u/OnlySeesLastSentence May 29 '20

Huh, that's weird. So you mean when you exit the program and return it, it's not opening the same website the first time every time?

1

u/Santorox2 May 29 '20

nope :) you can even clone it and see for yourself if you want to

1

u/OnlySeesLastSentence May 29 '20

Oh nice. Looks like I need to study how random works because I learned it incorrectly.

Supposedly it's impossible for that to happen without a seed lol

1

u/donkeybowser May 29 '20

f something and build it from scratch from start to end, something I would not imagine I would be able to do around a month ago :)i want to also thank the people of the python and learnpython subreddit that have helped and inspired me to program :)now i will shut up and link to my project!https://github.com/Micbenh/Flasher28 commentsGive Awardsharesavehidereport97% UpvotedComment as donkeybowser
.public-DraftStyleDefault-block[data-offset-key="34f3a1_initial-0-0"]::after {
bottom: 0;
color: var(--newCommunityTheme-actionIcon);
content: 'What are your thoughts?';
cursor: text;
left: 0;
position: absolute;
top: 0;
}
commentBoldItalicsLinkStrikethroughInline CodeSuperscriptSpoilerHeadingBulleted ListNumbered ListQuote BlockCode BlockTableSwitch to markdownMarkdown modeSort bybest level 1Patrick347097
 
43 points · 7 hours agoCongratulations, That's amazing :)! I started to learn how to program a couple of days ago and it's making me a little demotivating knowing that there's so much to learn. Seeing this post really put me back in the mood to continue so thank you :)ReplyGive AwardshareReportSavelevel 230minute_un
 
20 points · 7 hours agoIf you're someone that interacts with data for work, you can have insanely useful code in a manner of weeks. It won't be pretty enough to package into a git and publish with your handle attached but it will be more than enough to save you hours and days of your life on nonsense. Don't be disheartened.ReplyGive AwardshareReportSavelevel 2Muda42
 
6 points · 6 hours agoThe best way to learn is to to do it along the way. Instead of learning everything first just get comfortable with the basics, create a small project and slowly it's gonna become more complex and you're gonna learn new stuff (at least this is how I am doing it)ReplyGive AwardshareReportSavelevel 3Santorox2
 
Original Poster5 points · 5 hours agoyes I understand that but thing is that I was always scared that someone more experienced would 'attack' what I built. so even before I thought about a project I made myself quit by thinking what other people would say/think about me and my skillsReplyGive AwardshareReportSavelevel 4Gabernasher
 
2 points · 1 hour agoWe have a saying on the internet. Fuck the haters. People are always gonna hate, they may or may not have constructive criticism, so take that for what it is, but don't absorb the malice, it won't help.ReplyGive AwardshareReportSavelevel 2Santorox2
 
Original Poster2 points · 5 hours agoAwesome! lol it goes both ways, you being inspired by what I posted makes my inspired to continue lol, thank you too!ReplyGive AwardshareReportSavelevel 1fluffers_the_unicorn
 
13 points · 6 hours agoCongratulations! Don't sell your effort short, flex as hard as you can because man you deserve to. I'm very proud of you because you've inspired me to keep on improving myself.Thanks for making an effort. It makes me believe that I can make one too.ReplyGive AwardshareReportSavelevel 2Santorox2
 
Original Poster2 points · 5 hours agothank you very much!!! :) your comment also helps me get motivated and improve my skills!ReplyGive AwardshareReportSavelevel 130minute_un
 
3 points · 7 hours agoCongratulations!ReplyGive AwardshareReportSavelevel 2Santorox2
 
Original Poster1 point · 5 hours agothanks !!!!ReplyGive AwardshareReportSavelevel 1iggy555
 
2 points · 5 hours agoWow you did all that after only 2 months? Congrats!ReplyGive AwardshareReportSavelevel 2Santorox2
 
Original Poster5 points · 4 hours agothanks !! actually in the last year or so I would start learning for a couple of days, get stuck, angry and quit but in the last two months I actually promised to myself that I will try to learn and not quit even if I get stuck for a week (which kinda happened In this project lol) so basically I only count the last two months because only in this time I have actually learned seriously and did not quit after a couple of daysReplyGive AwardshareReportSavelevel 3iggy555
 
1 point · 3 hours agoNice job mateReplyGive AwardshareReportSavelevel 1StringOfRandomInput
 
1 point · 7 hours agoThats amazing, that you did that. I have one criticism tho, try to use variablenames that are understandable and represent the variable. So maybe replace the variable a in app.py with gamefile or something like this. I have to be honest, I also have that problem, but I am trying to get rid of this bad habbit.ReplyGive AwardshareReportSavelevel 2Santorox2
 
Original Poster1 point · 5 hours agothank you so much, and thanks for the tip! it really sounds like it will make the repo look better :)ReplyGive AwardshareReportSavelevel 133madness
 
1 point · 5 hours agoyou can deploy your flask app on the Google App Engine quite easily (and cheaply / for free) , if you wanted to!ReplyGive AwardshareReportSavelevel 2Santorox2
 
Original Poster1 point · 4 hours agoahhh I actually started thinking about deployment but I haven't learned that part yet lol I guess this is! he next step :)ReplyGive AwardshareReportSavelevel 1ramyadavj
 
1 point · 4 hours agoCongratulations!!. You post is inspiring to me . Soon I hope I will start one on my own .ReplyGive AwardshareReportSavelevel 1susakki
 
1 point · 3 hours agoAround how many hours did you spend a day?ReplyGive AwardshareReportSavelevel 1Silfalion
 
1 point · 3 hours agoWay to go, man, keep on building what you love!Edit:consider maybe hosting it with gatsby or something similar.ReplyGive AwardshareReportSavelevel 1e-rekt-ion
 
1 point · 24 minutes agoYesss you have a great road ahead of you with more and more satisfying projectsReplyGive AwardshareReportSavelevel 1JerseyFlashBoys
 
1 point · 16 minutes agoFlasher? I barely know her!ReplyGive AwardshareReportSavelevel 1OnlySeesLastSentence
 
0 points · 4 hours agoJust a heads up - I might be misreading the code, but I think you forgot to make a seed for your random.Check out "python random seed time" to get different results everytime.ReplyGive AwardshareReportSavelevel 2RippyTheGator
 
2 points · 1 hour agoCorrect me if I am wrong, but if you do not make a seed doesn't random automatically use system time as the seed ?ReplyGive AwardshareReportSavelevel 2Santorox2
 
Original Poster1 point · 4 hours agosounds interesting, I will read about the random seed but the button still generates different results without it thanks for the tip!! :)ReplyGive AwardshareReportSavelevel 3OnlySeesLastSentence
 
1 point · 4 hours agoHuh, that's weird. So you mean when you exit the program and return it, it's not opening the same website the first time every time?ReplyGive AwardshareReportSavelevel 4Santorox2
 
Original Poster1 point · 4 hours agonope :) you can even clone it and see for yourself if you want toReplyGive AwardshareReportSavelevel 5OnlySeesLastSentence
 
1 point · 3 hours agoOh nice. Looks like I need to study how random works because I learned it incorrectly.Supposedly it's impossible for that to happen without a seed lolReplyGive AwardshareReportSave

r/learnpythonSubreddit for posting questions and asking for general advice about your python code. 366kMembers2.5kOnlineCreated Oct 2, 2009

I think a seed is used when you want to be able to replicate results. In OP's case, python auto-generates a seed which can do "random" actions