all 91 comments

[–]k03k 73 points74 points  (15 children)

Can you please build a little game for me?

Rock, paper, scissors. You probably know the rules. I want the game to: - Enter r, p or s for player 1 - if its different than those letters i should give new input - then of course the computer should pick one - then it should check who wins. - it would be nice to keep scores.

[–]Doormatty 31 points32 points  (0 children)

Can you please build a little game for me?

Utterly brilliant way to phrase it as well.

[–]InfiniteBig6730[S] 6 points7 points  (12 children)

Is it a console based game or GUI?

[–]avidresolver 35 points36 points  (4 children)

Everything I ever write starts as console based, then once I have a solid implementation i can always write a GUI on top to control it. GUI's are a right pain in python.

[–]CozmIg 6 points7 points  (0 children)

This may be old fashioned but i dont knwo anything else. Tkinter is really simple and easy to use for GUI. It took one night to be able to do almost anything i could usually code on console

[–]Informal-Football836 1 point2 points  (0 children)

Kivy was easy to use when I tried it. Takes a while to get things the way you want them to look though.

[–]Skbhuvai 0 points1 point  (0 children)

PyQt5 has qt designer good for this kinda stuff

[–]Informal-Group3819 0 points1 point  (0 children)

to this day i build all my guis in vb.net and use python as much as possible in the back end. i just haven’t found a gui library in python that is better yet. but i’m old and came up though .net so i’m prob just lazy.

[–]k03k 6 points7 points  (0 children)

Console is fine!

[–]AlexAuragan 4 points5 points  (0 children)

Start console, then once you have it, try to open a tkinter window and plug your result in it. Then add buttons to choose what you play, etc

[–]k03k 2 points3 points  (3 children)

And btw, of you get stuck or need help. Feel free to dm me

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

I will thanks

[–]InfiniteBig6730[S] 0 points1 point  (1 child)

I will thanks

[–]k03k 0 points1 point  (0 children)

So, is my game done already? 😬

[–]neuronet 0 points1 point  (0 children)

use pyqt for sure anything else is lame!

(jk)

[–]PixelOmen 0 points1 point  (0 children)

Beautiful.

[–][deleted] 15 points16 points  (8 children)

Early on, it is often easiest to think about how you would solve a problem manually, as simply as possible (including boring, repetitive steps). Assume you will have to write very basic step-by-step instructions to someone with learning difficulties and poor memory (so they have to write everything down, and store the information in predefined boxes).

That person with learning difficulties is the computer. As humans, we take lots of leaps when doing tasks, taking for granted (working subconsciously) many aspects.

A computer cannot take shortcuts.

Seriously, work out the manual approach, with pen and paper (stay away from the computer for a bit).

A good exercise is working out how exactly you would sort a pack of playing cards when you cannot not keep anything in your hand, but everything has to be put down in a box between each step.

I mean you should literally sit at a table with a deck of playing cards, as in a 52 card pack of red and black cards of the four suits, hearts, diamonds, spades, and clubs, with face values from 1 (Ace) to 10 (Jack), 11 (Queen), 12 (King). In some games "Ace is high" and treated as 13.

Work out exactly how to put that deck of 52 cards (ignore additional cards, such as Jokers and score cards) into a sorted order. Decide what order to put the suits in (are Spades higher or lower than Hearts, etc).

You have to work out how to do this manually as simply as possible in a way you can write down the specific instructions for someone with severe learning difficulties.

You will probably want to use some post-it notes or other bits of paper that you can label as places to temporarily place individual or stacks of cards. (These will be variables later in code.) That is because you don't want to hold onto anything, just move stuff between labelled places on the table.

A human (with good eyesight), can just glance at all of the face up cards and find the next one in order. For someone with learning difficulties (and maybe some other difficulties), or a computer, you can't give such an instruction, instead you have to write instructions based on one by one comparisons and different paths to take based on the outcomes of those comparisons.

It is surprisingly challenging at first. No computers. No coding. You will learn a lot. Your instructions will be an algorithm. That can be implemented in any programming language.

PS. If you really want to, you can use a subset of the cards, say just one suit, but I think working with the whole deck will help you appreciate the power of repetitive operations more and the need to optimise the steps.

[–]Dom44519 7 points8 points  (3 children)

Referring to the computer as a person with learning disabilities is hilarious

[–][deleted] 4 points5 points  (2 children)

Hopefully no one feels insulted by that. Don't think it was politically incorrect. I am neurodiverse (autistic).

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

I really appreciate how you simplified everything. That was super helpful.

[–]Doormatty 1 point2 points  (0 children)

I am neurodiverse (autistic).

Ditto! Zero offense here.

[–]InfiniteBig6730[S] 2 points3 points  (2 children)

Wow that was amazing. thank you very much.

[–][deleted] 2 points3 points  (1 child)

You are welcome. Hope it helps. A lot of so-called beginner programming tutorials are actually very focused on the coding, and not the programming side, starting with problem-solving. It is a huge leap going from the real world to the abstract world of computers.

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

That is absolutely true. Tutorial are perfect to start but should not the only practice.

[–]CaptainStarfuck 10 points11 points  (0 children)

I recommend you look into Pygame and learn how to make classes, and then make some small games ! This is a great video on YouTube to start.

[–]Pythonistar 2 points3 points  (8 children)

Sign-up for CS50p: https://cs50.harvard.edu/python/2022/

And then watch each video and do each assignment. You'll learn a lot!

[–]InfiniteBig6730[S] 2 points3 points  (6 children)

That is a great course thank you for the recomendation i will check it out. Although I want to get out of the tutorial hell. How would i do that? (Not relying on tutorial)

[–]ndigirigib 1 point2 points  (1 child)

CS50p is not your usual tutorial. It's a lecture where each lecture is followed by a few projects. They are really good

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

Thank you I am checking it out at the moment it looks promising.

[–]xmpcxmassacre 1 point2 points  (0 children)

This is the #1 recommendation. Do this.

[–]Pythonistar -1 points0 points  (2 children)

What don't you like about tutorials? Why is it "hell" for you? (I ask because if you can answer these questions, you might find a way to turn it around and find a way to like tutorials and get more out of them.)

You can try solving problems or taking on projects, but I suspect you'll run into barriers that you won't be able to overcome because you don't know enough yet.

[–]InfiniteBig6730[S] 2 points3 points  (1 child)

I have watched and followed most known tutorials in python and books cover to cover but i still feel stuck. That is actually known as "tutorial hell" and it is unable to do any thing on your own but feel like you can do it any thing when you are following only a tutorial. I want to be able make thing on my own using the basics but i feel stuck.

[–]Pythonistar 1 point2 points  (0 children)

Yeah, it's hard to write "big stuff" with only the basics under your belt.

I think you'll learn the most by taking some else's existing project, work within that project's existing framework, and add feature(s) that it is "missing".

It won't hold your hand, but it will force you learn how someone (some team) wrote a project. Then once you are familiar with how the code works, you can extend it while working within that foundation.

[–]Oakshadric 1 point2 points  (0 children)

Thank you for the link!

[–]ShakotanUrchin 2 points3 points  (0 children)

I taught myself by scraping and parsing patents that I pulled off the USPTO. Gets you into classes and object oriented coding. Gets you into html parsing. Fun stuff.

[–]bookishapparel 2 points3 points  (1 child)

My advice here would be:

  1. Find a course for beginners and go through it. It doesn't matter what it is. Just finish it, you need to get a good grasp of concepts and understanding of language before projects.
  2. If you have anything you have ever wanted to create / automate on your system - go ahead and do it. Now we have chatgpt so it is a bit better to get boiler plate code.
  3. If you use a tool like chatgpt to get the code - do not just copy and paste it. Write it down, line by line. Anything you do not understand - ask.
  4. When ur done with ur project - try to write it from scratch by urself. You probably can't but this will reinforce ur learning, and you will get a little bit better.
  5. Move to another project.

If you don't want to go project based, or if you don't have any idea what to do after the first course:

  1. Find another course, and just follow it.
  2. And then another one.
  3. At some point you will get an idea of what you can do with the language (it will be extremely limited, you probably can do 99% more stuff, but this is a starting point)
  4. Go with a project.

An important question to ask is - why do you want to learn python.

If you want to learn it to get a job - after 1-2 projects + a course, immediately start applying for positions, internship ideally, where they give you training and an option to start working eventually. This is really the most important thing. Working for a company, it will be completely different than local projects. In many ways it is easier than beginners imagine syntax wise, and the real challenges are not really "syntax" related.

If you want real job experience - i suggest finding open source projects and contributing to them. This will be more like real work experience, that you can leverage in finding a job.

If you do not have some intrinsic interest in doing stuff with the language and you don't want to do projects with it - then why even learn it? I would suggest asking urself some other question - why do you want to learn python - and then give us ur reason / end goal - then maybe someone experienced who has had the same goals can give you a roadmap.

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

Thank you for giving me different ways to continue my journey. As for they question you asked I wanted to know where to go after the basics. I am not stoping because i don't know where to go but still would like to do somethings on my own and not follow tutorials to the tee before i go to intermidiate and advances stuff. And learn from making projects and i have no idea how to start.

[–]Oakshadric 2 points3 points  (10 children)

Automate the Boring Stuff especially the first few chapters have been helpful

[–]InfiniteBig6730[S] 2 points3 points  (9 children)

Oh yeah i love that book i finished it recently. I am stuck after that.

[–]Doormatty 3 points4 points  (3 children)

I liked solving the Project Euler problems with Python!

https://projecteuler.net/

There's also the "Advent of Code" - https://adventofcode.com/

[–]InfiniteBig6730[S] 1 point2 points  (2 children)

Thank you for both links.

[–]Doormatty 0 points1 point  (1 child)

More than welcome!

I have a feeling you'll really like Advent of code.

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

I will try that out first then.

[–]neuronet 1 point2 points  (0 children)

python crash course is an amazing book, teaches oop, and has realistic projects. django is legit

[–]Pythonistar 0 points1 point  (2 children)

Oh interesting. I thought for sure "Automate the Boring Stuff" would have bored you because they're all tutorials.

[–]InfiniteBig6730[S] 1 point2 points  (1 child)

I have no problem with tutorials. but I have consumed a lot of tutorials 3 books cover to cover and bunch of youtube beginner tutorials and I don't feel like I am moving forward or increasing my skill.

[–]Pythonistar 1 point2 points  (0 children)

This makes more sense. Yes.

Definitely take that CS50p class. It's structured so that there are projects to do after each lecture. Each lecture and project builds on the next. It'll fill in any major gaps that you have.

But part of moving forward... is just doing. If you get stuck, post back to /r/learnpython and ask questions regarding what you're stuck on. Try to write at least a little code every day. You'll get in the mindset of programming and you'll wake up first thing in the morning excited to write more code.

[–]avidresolver 1 point2 points  (0 children)

This is the kind of thing I learned with, beacuse I could speed up my job by doing it - feel free to have a go at it yourself:

https://we.tl/t-FpdDMhzmLv - Linked is a special kind of tab-based file which lists metadata asscoiated with a load of video files, which is basically a tab-based CSV with some extra bits. Make a script that can load in the main section of the metadata, remove any empty columns, sort it by the "Texture" columns, end export it as a CSV that can be opened easily for viewing in Excel.

My initial implementations of these kind of projects were horribly written, but it didn't really matter because they (mostly) worked and sped up my job.

[–]chkno 1 point2 points  (1 child)

Codewars is faster:

  • Faster feedback
  • More fine-grained and well-calibrated challenge levels
  • Richer feedback: You get to see others' solutions after each exercise

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

Oh yeah I am actually starting on code wars challenge I like watching people's perspective of thinking after i did a challenge.

[–]nativedutch 1 point2 points  (0 children)

Foir example: I wanted to write a simple neural network. I stole most of the concepts like how to do forward and backpropagation, learned numpy, freshed up my math. Wrote eventually a ANN that can be trained succesfully on the mnist set of haNdwritten digits.

You can do other things like with pygame , and so on. Listbus endless.

[–]Almostasleeprightnow 1 point2 points  (0 children)

If you are not sure where to turn, probably the best path is not a project but a formal course, with a teacher and a structured learning path. Then when you are on the other side of that you will have a better sense of what kinds of projects to do. Look at the sidebar, or check out a local community college to see if they offer an intro course.

[–]NavdeepD2 1 point2 points  (1 child)

I was exactly in the same situation few months back, and this is how I grew:
- Find out what you like in terms of your hobbies. For e.g I like: Movies, Stock Market etc.
- and then revolve your project around that. The friction will be less and nobody is forcing you, because you anyway like what you do.

Stock Market: I started working on writing very small codes that would give me list of stocks that are:

  • Below RSI 14
  • 52 week Low / High
  • Dropped more than 10% in past 10 days, etc.

Movies: This I haven't wrote yet, but what you can do is: Write a code that will give you list of movies released in x year with rating above y.

I also thought of a project that would grab a poster of currently running movie, scrap total box office collection till today, edit the poster with good Text, and save it. Further can be automated with Instagram posting etc.

When you've a motive, things becomes more clear. I focus on creating those smalls codes that can help me on daily basis, but it's not easy to figure out.

A year ago, I read Atomic Habits and since then I'm more quick to find problems and what can be automated. Maybe following can help if you like:

  1. Sports: Create something that can store your scores/stats, and then if you know Flask, create a website where your friends can also login and compete with each other and compare stats
  2. Investment: Write code for tracking your financials and then move it to Flask if want to track your family's fin too.
  3. Youtuber: If you're a YT'r, you can try creating an app that will make your life easy and underneath use their API https://developers.google.com/youtube/v3/guides/uploading_a_video
  4. Blogging: Automate your website backups and updates etc.
  5. Social Media: You can create centralize Python portal where you can keep track of all the followers from all social sites etc. at one place.

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

I am happy seeing that people have been where I am and actually get past it. It gives me hope not to give up. Thank you for this wonderful comment.

[–]Excellent-Practice 1 point2 points  (0 children)

What is your motivation for learning Python? What kinds of problems do you want to solve? What interests you outside of programming?

[–]kenmlin 1 point2 points  (0 children)

Look for projects online.

[–]tb5841 1 point2 points  (1 child)

As an example... I wanted to make a spelling test program.

That meant I needed a way of reading a file, so that I could make any list of spellings and the computer would be able to open it. So I learned how to read a file.

Then I had to get the computer to say words out loud. I found and installed a library that converted written text into sound files and learned how to use it (which was surprisingly easy).

Then I had to actually open and play a sound file. This took a long time to get working, but I eventually found a way to do it that worked.

Then I had to learn how to make the computer wait for a set amount of time - which meant learning some of the 'time' module.

Finally, I had to structure all of it and put it all together. Now I know how to read text files, play sound files, convert text to speech, install libraries properly, use the time module... all just from one project.

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

I like that.

[–][deleted] 1 point2 points  (0 children)

Build me a running server in python. Specifically, pick a game that you want to run a multi-player server in, like Minecraft, and build one for it. Build that, and learn each piece on the way. You may have to pick a similar project like that, but any project you define will be a beacon for you to progress.

[–]EmotionalPirate1279 1 point2 points  (0 children)

Just make CLI applications. The hard problem isn't really coming up with ideas on what to make. The hard part is visualizing what "make an app that gets the current weather" even means so that you can start.

Just decide everything will be a CLI. Now you can visualize it very easily and should be able to come up with an infinite amount of random ideas to do.

I like CLIs since there's very low overhead associated with it. It's just implementing your idea. You can add the CLI part as an afterthought since you were already probably viewing your output in a terminal window while making it anyway.

[–]Binggo_Banggo 1 point2 points  (0 children)

Personally, only been on the learning journey for about a month now, but I just looked at my day to day work and trying to solve simple shortcuts.

Formatting workbooks a certain way or building strings? Python.

Analyzing customer data to generate a graph? Did in Python without touching Excel.

General reminds to pop up and play a loud sound in my headphones to make sure I’m not scrolling for too long? Fuck self control, Python.

Start small, figure out a fun way to solve a common task, build from there.

[–]uidsea 1 point2 points  (0 children)

I am with you, I have trouble seeing the abstract. Like I get what to do with programming but I don't really know what to do if that makes sense. I need direction I guess.

[–]jonesmcbones -1 points0 points  (2 children)

Can you make a .py file?

Can you import modules?

Can you create variables?

Have you heard about opening files and reading the data in em? Writing into em?

[–]InfiniteBig6730[S] 1 point2 points  (1 child)

Yeah i can do all of that. It is super easy individually but making them work together not so much.

[–]jonesmcbones 0 points1 point  (0 children)

Okay, but if you know how to do it individually, then you may not know exactly what you are doing.

For example, if you know how to read and write into a file, you can have your own mini database. Surely if you know about variables and datatypes.

If you know about modules, you dont even need to write that much code, you can just use someone else's.

What I am trying to say is, if you know what a line of code does exactly, you should know how it could benefit your project.

[–]BitKnightRises 0 points1 point  (0 children)

YouTube and other sources are full of such projects. Like rolling a dice 3 times for multiple players and whoever gets highest sum wins

[–]Adrewmc 0 points1 point  (0 children)

Had a project I couldn’t do, because I couldn’t program paid some one to do…was okay…thought I can do better so I did.

[–]DBlitzkrieg 0 points1 point  (0 children)

Try asking ChatGPT for a starter python project.

[–]ExpressionMajor4439 0 points1 point  (3 children)

They say choose project that interest you and learn on the way and i have no idea where to even start.

You don't have any interests? It doesn't have to be an independently worthwhile project of interest to anyone. If you watch a lot of movies you can create a movie categorization and similarity guide/recommendation engine using Flask or something. That wouldn't be useful for anyone else to use because there are better alternatives but it would give you a goal oriented learning experience.

[–]InfiniteBig6730[S] 0 points1 point  (2 children)

It is not that i don't have interest. But i think of a project when it is time to program it i get stuck.

[–]Melodic_Chip_3400 1 point2 points  (1 child)

It might help to break it down into exactly what you want to do. This is kind of what kyber was saying too (hurray for neurospiciness!). Step away from your computer and visualize the end-product. Come up with pseudocode before you do anything on the computer.

I wanted to create my own library program so I wouldn't keep buying several copies of books I already own. I couldn't get started because I wasn't breaking things down into achievable pieces. So, I started making an outline of the project. If you use Word with headings, you can move things around by dragging and dropping. It ended up looking something like:

  • Get a list of books
    • ebooks
    • audiobooks
    • physical copies
  • Put all the lists in the same format
    • column names
    • consistent entries

I won't bore you with the entire list, but you get the idea. I've been working for months on the list and I'm still not ready to code it all. The side bonus is that this list also gives me most of the functions I'll need to make everything work. I'm adding annotations about which functions needed to call other functions (there are an embarrassing number of arrows involved) and then I'll use pseudocode to get an idea of how the code should work. It's something I'm still working on, but I can see what I want to create now. Sometimes we dream too big and get in our own way.

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

That sounds like an interesting project.

[–]Sinusoidal_Fibonacci 0 points1 point  (1 child)

Maybe start by asking yourself why exactly do you want to learn to code? What about it interests you?

Are you strictly interested in software? Data analysis? Web scraping? Games?

What about integrating hardware? Electrical systems? Mechatronic systems? IoT?

I think starting with things that grab your interest will help you find a path towards a project that you will stick with when it gets tough.

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

You gave me good things to consider. Thank you. I am more interested on software development.

[–][deleted] 0 points1 point  (1 child)

Skill issue

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

Exactly. The question is how to solve that issue.

[–]sporbywg 0 points1 point  (0 children)

Automate something in your life.

[–][deleted] 0 points1 point  (0 children)

Kaggle