r/learnpython • u/That_Rich_Guy • Mar 22 '23
What do you even code?
I am a beginner to python and all coding. I don't know much. All the recommendations are "code everyday". Practice every day is great but what do I practice? Do I open up an empty IDE and code what? I don't know how to do any projects on my own. Do I just YouTube crap and copy them or what? What do I actually code?
18
u/unsourcedx Mar 22 '23
If you want quick coding problems: Codewars Advent of code Leetcode
I’d start with codewars since the other two might be more advanced for you. Harder codewars problems and harder advent of code problems can be almost like mini projects
7
13
Mar 22 '23
Don't just copy, understand it. It's okay to follow along a YT video while you're learning, but eventually you reach a point where you start to build your own thing. Find a problem or issue (can be just something small), and try to figure out a way to solve it. Build a project, there's many out there. I'd recommend this project-based learning repo as a guide.
9
u/ramenmoodles Mar 22 '23 edited Mar 22 '23
What do you want to code? There might be things in your life you think could use some improvements/streamlining. If not there are plenty of things you might be curious in. Game development? Chat bots? Gui applications? Mobile applications? If you are curious on the more theoretical side you can take a look at things like the odin project to get a better understanding of computer science as a whole.
8
Mar 22 '23
My learning comes out of necessity. In my line of study (civil engineering), sometimes I have to treat amounts of data where it makes the most sense to use Python (smaller = Excel, bigger = something else?). I've written scripts to convert between file types, plot strange file formats, extract specific data, and generate files for simulations (the latter in bash, as it's more convenient for this purpose). Along the way, I've learned how to parse arguments, use modules effectively, and figure out best practices for treating large-ish data efficiently.
There's nothing like having an actual problem to solve if you want to be motivated, imo. When I was a teen, I wanted to "learn to code" but had no practical problems to solve, so I found it difficult to learn as all the exercises in tutorials felt pointless. Occasionally, I'd find something fun (to me) that I wanted to code. Now, I code as I need to and build on previous knowledge to do more advanced stuff (or nope out and ask ChatGPT for help).
That said: what interests you in general? Math and science? Gaming?
23
u/halfdiminished7th Mar 22 '23
Leetcode is a good option (and free); just work your way through the list of problems, making note of the ones you skip over so you can return to them later when you've learned more.
0
Mar 22 '23
[deleted]
7
u/Anti-ThisBot-IB Mar 22 '23
Hey there kinjiShibuya! If you agree with someone else's comment, please leave an upvote instead of commenting "This."! By upvoting instead, the original comment will be pushed to the top and be more visible to others, which is even better! Thanks! :)
I am a bot! Visit r/InfinityBots to send your feedback! More info: Reddiquette
0
13
u/Double-Beyond4555 Mar 22 '23
I too suggest asking ChatGPT for basic coding exercises. I've seen other people very happy with the results of doing that. Bonus, you can ask for the exercises to emphasize some aspect you find interesting or necessary, like sound & music, graphics, automation, whatever. I also suggest you browse https://makezine.com/ or https://magpi.raspberrypi.com/ to see how much fun a project can be, and see if you get ideas. Maybe not the whole project, but just slice off a bit like, "what would the command interface look like, how to code that?"
5
u/RajjSinghh Mar 22 '23
If you have any interests, try building them. Spend some time doing research into libraries or similar projects then start coding. Over my degree, some of my projects have been on theoretical computer science problems, machine learning and a chess engine. If you have your own interests, persue those.
If you can't think, try leetcode. It gives you a problem and tells you to solve it. If you don't know about data structures and algorithms or maths it can be hard, but it's worth doing.
5
u/littlenekoterra Mar 22 '23
So your a beginner. First start with values and passing them around. Then try getting values from files, then write some. Now do something with the values. What should you do? Go alter an open source game they normally use json values for items and such. Make the game your bitch using this newfound power. Congrations you now understand the basics.
Now for something slightly harder. Let's make an app. Get pysimplegui it'll be the easiest to start with. Make a window that uses every element. Make the elements output their values to a file. Oops that went full circle. Might as well make the changes to the game also be done in your app. Congrations you now understand intermediates.
Now for the hard stuff. Let's make an ai. Grab pytorch. Get a feel for it. Let's automate making the game your bitch. When the game is ran lets have the ai rebalance it completely. Oh...that's alot of data..no worries we can multithread it and use pandas to assist with the handling. Congrations, you used industry standard tools to make a small project an efficient big one.
4
Mar 22 '23
I like coding things I'm interested in. So I like certain games. I'll practice making mods for them.
Or I like Rainmeter. I've coded things in python to interact with Rainmeter's skins. Good practice for me.
4
u/Acurus_Cow Acurus Mar 22 '23
Find something you want to build and build it. From there you can expand on it. Rewrite it, when you have learned a lot. Or New ideas will come on the way. But find something you want to build.
Dont worry if its done a million times before.
4
u/valhalla_11 Mar 22 '23
I recommend Advent of Code(https://adventofcode.com/), fun thing to do and you can learn a lot, you can do I problem a day and there are a lot of youtube videos and articles to help you when you get stuck
6
u/Schizm23 Mar 22 '23
Google “learn Python the hard way” click on Python 3.0 and scroll all the ay to the bottom and click the link for the next article. There’s a pretend paywall and if you have the money go ahead and buy the version that has videos to follow, but otherwise the whole written class is actually completely free if you just scroll down and keep clicking for the next section. :)
8
u/Cha_r_ley Mar 22 '23
Start simple
Make lists of things- names, foods, countries, car models, whatever. Then start building functions that get gradually more complex.
Write codes to
choose 15 random items from the list
to check if those items start with a vowel and if so, add them to a new list
write the new (vowel-starting) list to a .txt file
read BACK the txt file, form a new list and select a specific item from it by index
iterate through the list sorted alphabetically, or by word length, or iterate through in reverse
prompt a user for an input, check if the input already exists in the list. If not, it adds it to the list
count the number of items in the list. If it’s even, that’s fine. If it’s odd, delete the last item.
You start with something small and simple that gets you used to the formatting and the syntax, then you start branching out into other areas. It’ll give you ideas for stuff to build, and prompts to look up more complex code.
Once you start to feel more confident, I highly recommend joining Codewars.com to try some of their challenges. They cover a lot of different programming languages and ability levels. It’s a great learning resource!
3
u/SleepWalkersDream Mar 22 '23
Because plotting and modelling in excel is a pain in my butthole, and I refuse to do it unless ordered to.
Slightly off topic: A colleague was simulating some space-emporal heat evolution in excel. The simulation would mostly explode, because you can not use implicit time discretization of that system without some code involved.
Edit: Misread the title as "Why do you even code".
3
u/ahoodiewithaboogie Mar 22 '23
Haven’t seen anyone mention CS50 Python, its a completely free intro course to python by Harvard with lecture videos and homeworks that you can submit at your leisure to see if your solution(s) are valid. iirc there are about 5 problems per assignment and like 9 or 10 assignments covering everything from loops to classes to regular expressions.
3
u/Maximus_Modulus Mar 22 '23
At home I coded a tropical fish tank LED light controller on a raspberry pi zero in python. It had a web based front end. More recently I wrote a little script to find Wordle words based on scores on tries I had made.
5
u/Feroc Agile Coach Mar 22 '23
Why do you want to code? What's your goal?
The programming language is just a tool that helps you to create something. It's like saying "I want to learn how to hammer", usually that's not a thing. You need to learn how to use the hammer if you want to build a cupboard, a mailbox, a dog house... depending on what you want to build you may have to learn different hammering techniques or even a different hammer.
So, what's your goal? What do you actually want to build?
7
u/SquaremanJ Mar 22 '23
While it can be like that at a high level, on paper, it’s not really a fair comparison; especially not for the question OP posed to us.
He didn’t ask about the hammer itself. He asked about the cupboard — but not directly. He doesn’t even know the cupboard exists yet. He just knows that he wants to practice hammering, but doesn’t know how to practice hammering!
I had this same problem early on (only a junior (career-changing) CS student, so I’m no pro!)), where I had no clue what the hell to code. I had no “problems” I needed solved, and nothing in my life that could benefit from automation. My mind went blank, from a creativity standpoint, when it boiled down to actually figuring out something I wanted to build, so I could practice practical coding.
I’m pretty sure that’s what OP is getting at here.
1
u/Feroc Agile Coach Mar 23 '23
Yes, comparisons always lag somewhere.
I think you should still have a goal in mind, something you want to work towards. Depending on the goal, the way to get there can be different.
To come back to the comparison: I wouldn't recommend building fine kitchen furniture if he actually just wants to do some outdoor crafting.
2
u/elgatothecat2 Mar 22 '23
You can try Learn Python By Solving Problems. You’ll walk through some problems and solutions with him, then do some by yourself.
The cool thing is you’ll learn how to think like a programmer while doing it.
2
u/ShroomSensei Mar 22 '23
Depends on your endgame. If you’re just trying it out right now either find something interesting to you or just learn python basics and reinforce them with leetcode.
2
u/Mrrobinhood55 Mar 23 '23
If you like solving puzzles do daily challenges like in codewars.com or join a discord with others that are also learning like beginner.codes
2
u/anantnrg Mar 23 '23
Actually pretty simple. First think of something you want to do. If you're very new to programming, I recommend you start with some basic math like generating Fibonacci numbers or some complicated math equations. You can always refer your old math textbooks or smth. Then try to figure out some logic on how you can achieve the end result. Making up the logic of an app is 80% of work. Programming takes the rest 20% of work. Then try to implement this in your code. If it doesn't work, try to find some resources online and try to understand them, don't just copy and paste. Then implement it in your code. Do this everyday and you'll be programming like its nothing
2
u/SILENCE_Vee_is_typin Mar 22 '23
Maybe it's already somewhere in the answers, but chatGPT is a quite good help as learning tool. You can ask for simple beginners level tasks and work your way up. That's what I'm doing too.
2
u/antiproton Mar 22 '23
Did you try Googling "beginner coding projects"?
Python Project Ideas: Beginner Level
Create a code generator.
Build a countdown calculator.
Write a sorting method.
Build an interactive quiz.
Tic-Tac-Toe by Text.
Make a temperature/measurement converter.
Build a counter app.
Build a number-guessing game.
2
u/Necessary_Advice_348 Mar 22 '23
Chat gpt is a great way to get project promts and can ask it for a steps breakdown as well. Examples if your stuck and can copy your code to let it analyze it. Helpful for me at least.
1
u/Ok_Fox_7716 Sep 02 '25
you can first make calculator, i did it, i did few more things, but i am wondering too
1
u/pro_questions Mar 22 '23
Just things I want someone else to make but that haven’t been made mostly. I was just learning PyTorch so that I could separate my VR videos from regular videos, and it has a Django front end because why not?
Just today I started on an application to analyze my Google Takeout (specifically emails) and identify who I’m getting the most spam from so I can finally take care of my 40,000+ unread emails. It’s going to have a Django + React front end so I can do some cool visualization things with it. I don’t know React and I suck at Django, but I want this to be a thing that exists. The base is there but unfortunately I need to wait a few days for Google Takeout to process my emails and give me a file I can work with.
I want a recipe management app that’s cross platform with git-like version control, fully integrated sharing and collaboration, plus every single feature I like from all of the other recipe apps that exist. That’s the big one I’m working on. If I mention it in enough comments, someone better than me might just make it so that I can buy it. Until then, I’m going to chip away at it day by day.
I keep a list of every minor inconvenience I’ve ever had that could be solved by a programming project. Some are one-off but cool enough to actually flesh out (the mail visualizer), and some are problems I want a permanent solution for that I want to make absolutely perfect (like the recipe app or a few different game ideas). I add something to this list at least once a week. It’s good and bad, but mostly good — I always have something to work on, but I spread my time very thin by jumping between a dozen different projects.
1
u/michael-streeter Mar 22 '23
Code a kata. Eg. The Bowling Score Game. Or Fizz Buzz using TDD. These could turn up in a proficiency test.
1
u/UpbeatCheetah7710 Mar 22 '23
Stuff like Code Wars can be good until you are more comfortable with stuff like Leet Code. But by then you’ll probably have some projects you want to make figured out that you’re working on.
1
u/psillusionist Mar 22 '23
As a beginner myself, trying to code common games like card games or simple board games give me a good challenge and an excellent amount of staring at the screen blankly for several hours. I think of learning programming in the same vein as trying to learn a new language. Repetition really matters. And being aware that you're gonna suck at this new thing and recognizing that this is normal, it's all part of the process.
1
1
u/Tureni Mar 22 '23
Well today, I'm working on a cloud function that helps a major retail chain in my country to show more or less ads. This chain has a specific item that you need to have an appointment to get. Think measuring feet for custom shoes for example.
It's obviously a part of a greater system (as in all work around IT), but my specific part is;
- Call the REST api that the chain has set up with their opening hours and appointments already made. Figure out how many available timeslots there are in the next x days.
- Find out how many total timeslots there were in the next x days, calculate a percentage utilisation and set a label; green, yellow, red. Green means more ads in the shops area, red means less ads.
- Write that to a CSV file in a GCS bucket.
- Have a second cloud function that reacts to the new file in the bucket, which writes the results for every store into BigQuery.
- All google cloud is done with terraform.
So; consuming APIs, doing business logic, using google cloud, converting data between different formats (rest response->dict->csv->whatever type of sql you use for big query).
My recommendation after learning the very basics is trying to consume an API. Find a free API, send some requests to it, see what you get back.
Then get into one of the big cloud operators - I use google because that is what my job says, but my last job was AWS. Learn one, then the others will be easier to understand.
Terraform is nice to have when you have large applications you manage, but we use it everywhere. Not totally necessary here, but a "nice to have".
1
u/funlightmandarin Mar 22 '23
I'm quite new to coding, but I code small things and bigger things that makes my life easier.
Like a calculator finding the unknown x in square equations, determinant in a matrix, make a stress-sttain chart from tensile test data and such.
You learn alot by doing.
1
u/swoged Mar 22 '23
You could do the easy questions on leetcode or openkattis 🤷♂️
For a basic level could make a text based game, I.e given a set of options and you input your choice and it's sort of a game of chance 🤷♂️ programming in rng, however skip the graphical side as that may be beyond you current experience
1
u/DumbOne_Rs Mar 22 '23
I'm willing to bet that there are dozens of people that mentioned tasks they were given when learning programming through some uni course or even lower level. Searching for these might give an endless amount of projects. Also some universities have their tasks public.
1
u/luckyjenjen Mar 22 '23
Try kattis. It's worked well for me.
You may have to Google solutions and it's frustrating if you can't find any but there's plenty of questions on there.
1
u/Amalasian Mar 22 '23
code something to answer a question or do a thing. need to know some math? code it. need to write a note? code it.
im also very new. and i made a program that i can now use to make notes with time stamps. and they save in different places depending on the notes used.
hell just re do old lessons and use your new tools to overdo the lessons
1
u/ASIC_SP learnbyexample Mar 22 '23
Find something that'd help to solve a real world problem for you. For example, I'm on Linux and use the terminal for many things. I wanted a cli tool to do simple calculations. There's bc command, but I couldn't get it working as I wanted at that time. So, I looked up how to write a cli in Python (I went with built-in argparse module) and made a tool that'd solve my small use case. Here are some resources that can get you started:
Projects with solutions — algorithms, data structures, networking, security, databases, etc
Project based learning — web applications, bots, data science, machine learning, etc
Books:
1
u/5erif ((√5+1)*.5)^n/√5 Mar 22 '23
When the Worldle game first started to rise, I made a clone.
When Numberphile presented the Monty Hall problem in one video and the Josephus problem in another, in each case I paused the video as soon as the problems but not the solutions were described, and I created simulations.
When NASA was doing something, I became frustrated that illustrations for public consumption never show things to scale, so I found all the figures, learned a graphing package, and created my own accurate scale model.
When I was having trouble tracking my mileage for reimbursement at work, I wrote a script to track my location by address range given to me by DHCP to know which site I was at, and to then generate the mileage paperwork for me. I wrote a Google Maps scraper for that too.
Occasionally something on r/puzzles makes a good programming exercise.
Card games are great for the terminal. I've made Freecell, Blackjack, and UNO clones.
1
Mar 22 '23
Here's some practice/examples: https://www.freecodecamp.org/learn/scientific-computing-with-python/
1
Mar 22 '23
Just start with random projects. It’s about exploration at this stage. Think of it as a journey.
1
u/js884 Mar 22 '23
I work in a high school i did a program with json to list students by class what their bus numbers are if they have allergies.
Think of something that you might find useful and try learning to build it
1
1
u/JuicyCiwa Mar 22 '23
Make a receipt creator, hangman, password generator, magic 8 ball, rock paper scissors. Those are usually the entry level projects people do after some initial lessons.
Once you get those, you can look at things that require UI or things that make things happen with a pi such as displaying things on a screen instead of the terminal, or turn something on/off.
1
u/Saaaahdude321 Mar 22 '23
I suggest coding calculators that’s usually my go to trying to calculate and figure out a scenario. Whether it is for fractions, bank accounts, or even coding a cash register. I personally believe calculators are the best thing to code daily.
1
1
u/deadeye1982 Mar 22 '23
Today I found an interesting news article (German) about an organization, which changes DNS-Entries, if there is a copyright infringement.
The page was blocked accidentally.
One commentator gave the hint about this URL: https://cuii.info/empfehlungen/
So, I thought why not write a short script, which parses the page and spits out the DNS-"blocked" WAREZ sites:
# requires requests and bs4 (beautiful soup)
import requests, bs4
def get_illegal_urls():
doc = bs4.BeautifulSoup(
requests.get("https://cuii.info/empfehlungen/").content, "lxml"
)
return [
"http://" + element.text.split()[0].lower()
for element in doc.select("span[itemprop=text]")
]
print("==== Good warez sites ====")
for url in get_illegal_urls():
print(url)To be able to access the links, you require an unfiltered DNS-Resolver or use Unbound.
1
u/xiipaoc Mar 22 '23
I don't know how to do any projects on my own.
Obviously. That's why you have to do them. You definitely don't know how to do any projects on your own until you figure it out, which is tough and slow and very, very necessary. Your code will be crap. You will, probably a few months in, look back at your code and cringe at how dumb you were. (I've been a professional developer for more than 10 years and I still do that with my months-old code.) But without that feeling of being lost and having to poke around in the dark, you basically can't progress, so that's what you should do!
1
u/agw76638 Mar 22 '23
How about a project of something about you are interested in? Or something that solves your problems. For example I am playing around with nasa api because I like space.
And also think about what do you want to do with learning programing .
1
u/IJop148 Mar 22 '23
hi, if you want to make coding a hobby then i recommend coding on little projects that you make,but if you are trying to make coding a job then i recommend looking at other peoples code and try to understand how and why they did it. (this is what i do).on top of these thing i recommend asking when you do struggle with something ask it on forms or on other places like here
but for your last question, i normally look at this website and sort on what programming langauge i want to do and what project i would like to do
https://github.com/codecrafters-io/build-your-own-x#build-your-own-programming-language
1
u/ClimberMel Mar 22 '23
I used python to automate tasks. I dl my brokerage account info and write it out to 30 some worksheets in an excel workbook. I created an app to check my gas mileage. I have a lot of stock market software that I have created... and the list goes on. Find something that interests you and start small and add to it. Python imo is best for data research which is why I got into it.
1
1
u/Perfect_Ad_8174 Mar 22 '23
Find something you want to do. Coding is a tool, and like any tools you need skill and expertise. My friend’s a great carpenter. He started by making small projects almost every day and they were frankly shit. But hard work and diligence pays off!
1
u/Quinnp28 Mar 22 '23
I can give u a few ideas that get harder and harder Make a program where u can type something and it will be printed A simple addition calculator (Getting into function territory ) Rock Paper Scissors A magic 8 ball A survey A text based adventure A addition subtraction multiplication and division calculator A database that you can ask data from
I recommend sites like geeksforgeeks and stack overflow A google search can go a long way
1
u/whatsupbr0 Mar 22 '23
This is not Python, but I have been working on a game in Unity for the past few months
1
Mar 22 '23
Build app clones with backends. If you don't want to do frontend, just put some basic shitty looking ui there and write backend from scratch.
1
Mar 22 '23
You find a problem that you have and you solve it. If the problem is shared across more than one person you can solve the problem for a lot of people.
1
u/MikalMooni Mar 22 '23
The part you’re missing is abstraction. It’s the central pillar of programming; the thing that makes it all make sense. Programming is numbers, math and logic states. That’s all it is. Programming languages make it easier to implement and understand control flows (if this is true then do that; try this, do this if it succeeds and that if it fails…) and it can handle arithmetic very quickly.
Your job, as a programmer, is to take those limited tools and use them to represent a more complicated idea.
For example, let’s say you need to keep track of the food in your fridge, and all of it’s expiration dates. You could mark everything in a paper ledger by hand, but that takes a lot of time and you have to do it every single time.
You could make an excel sheet or something, but it probably won’t be able to tell you on it’s own what needs to go and when, plus you’d still have to manually fill out the various tables and cells.
The obvious solution is to write a program to do it all for you. Now, it’s up to you to decide how to do that. Depending on your programming language of choice, this could take any number of different forms, but I’ll stick to Java, since I know it.
First off, you would need to break down each item involved into it’s most basic representation. You’re trying to track items of food inside of a fridge, so you need a fridge object and you need food objects.
What are things that each and every food object have in common, no matter what they are, as long as they have to go inside of a fridge? They have an expiration date and they have a quantity (or a weight/volume remaining; this is different from saying, “I have two cartons of eggs”. That’s two objects. Each carton might originally carry twelve eggs, and you consume eggs from the carton over a period of time…)
They also probably have names, but assuming you buy a lot of the same things over and over again, you’d probably want to make objects to represent each individual food type, since you would want an easier way to create the food objects faster.
Now, the question becomes, “what can I do with the programming language of my choice to make managing the food in my fridge easier?”
You could approach this any number of ways, but the exact implementation is better left up to you.
1
u/DaMarkiM Mar 22 '23
in my opinion it really helps if you can do some simple GUI stuff. Look up something like Tkinter. Once you got that down its mich easier to find little projects you can do. At least i find that i have a ,ich higher chance to start a project if its actually gonna see some use.
Stuff you do in your IDE only tends to be saved and then forgotten to never see the light of day again.
Once you got a graphical interface and executable file chances its gonna see some use is much higher. And once even a small number of people ise it you will get feedback and feature requests. And before you know it you are 30 versions in and constantly looking up new ways to do things you wouldnt have thought of yourself.
I find that there is plenty of inspiration just from daily life if you can actually deliver a working tool instead of a useless file of code. Write a little file format converter. Or a tool that helps with tedious spreadsheet work. Write a little game. etc etc.
Or - if that is more to your liking - learn to do a webapp yourself.
1
u/benabus Mar 22 '23
Think of an idea for a personal project and just start learning/coding stuff to make that better.
Like to read Reddit? Build a reddit reader. Like cooking? Make something that will scrape the web for recipes. Find something that you're interested in and automate it and keep building from there.
Makes it easier to keep working on if it's something you enjoy.
1
u/Naive_Programmer_232 Mar 22 '23 edited Mar 22 '23
Practicing by building small programs to large programs. It's vague because you really can do a lot with programming, it's hard to narrow it down into a single bunch of tasks. But I'd start with an outside purpose. For example, maybe you're really interested in the stock market and you like to trade stocks. So from there, you could research libraries that have something to do with stock trading, of which there are many in python, and figure out how to manipulate those tools for it to do what you would like to.
So the ideas of building something often times come from knowledge of some other discipline / purpose and then the programming is the tool you'll use to get that done. Now that's in the sense of building 'side projects'. You start with some kind of idea and expectation, then work on that to formulate a goal of what to build, drill down on what the things should do, develop a plan of how its going to work, do research into tools that make sense providing services that can accomplish pieces of those things, then go off and use those tools to implement it.
There's also the exploratory side of programming. Sometimes you just want to write programs to explore how things are working. For example, reverse engineering something that already exists and trying to remake it yourself. This can get pretty fun, cause once you know how it works and you can remake it, you can make it do anything
1
u/OldManActual Mar 22 '23 edited Mar 22 '23
Here is a quick Dice roller I coded up.
Mod it, fix it.
from random import randint
def ask_user():
go_no_go = input("Roll the dice? y/n: ")
return go_no_go
def roll_dice():
die_one = randint(1,6)
die_two = randint(1,6)
print(f"Die one shows {die_one}")
print(f"Die two shows {die_two}")
if die_one == 1 and die_two == 1:
return "Snake eyes!"
if die_one + die_two == 7:
return "Lucky Seven!"
return die_one + die_two
def main():
decision = ask_user()if decision and decision == "y":
print(f"The Dice came up {roll_dice()}")
if decision and decision == "n":
print("Good Call, gambling is stupid.")
exit()
main()
main()Start SOMETHING
1
1
u/DigThatData Mar 22 '23
follow a course for now. as your programming capability grows, you'll start to identify ways you can use coding to solve problems in your own life and it'll become a lot easier to justify spinning up side projects and such. don't stress.
1
u/MindTwister91 Mar 22 '23
Find 10 different ways to solve a sudoko, think of threads, think of async, think of weird ways, this might help
1
u/ReturnToTheHellfire Mar 22 '23
Im kinda in the same boat at the minute, spent a couple of months watching all the youtube tutorials and doing stuff like codecademy and mimo just for practice because i didnt know what else to do with it.
Not sure if it will help you at all but ive just started trying to write a simple programme for a text based game, which will give me a chance to practice calling variables, functions, doing comparisons and having user input. Can also expand it and make it as simple or as complex as i want.
smaller simple projects can be good for learning basics but if you pick something bigger that interests you (even if youre not sure youll ever finish it) that can encompass a variety of different things will make it easier for you to pick skills up, motivation to look up how new functions work if you wanna implement something you dont know already and can be easier to stay motivated with as it feels more like working towards something instead of just coding for the sake of it
just think about what you eventually wanna do/something else you enjoy (gaming etc) and pick the simplest iteration you can build something for to do with it and it should help you find a project
1
1
u/Reaushambeaux Mar 22 '23
This may or may not help, but my Major is Applied Technology and I've been taking Python courses as a result.
A book I picked up from Barnes and Noble is called "Python in easy steps" and it has a lot of good little practices in there you could look at.
It's also a good idea to install Visual Studio Code and add the Python extension. It can help walk you through the process of coding.
1
u/bladeofwinds Mar 22 '23
Find something that really annoys you but you’re familiar with. For example, my impetus was having to manually filter and copy time series data in one excel sheet and then copy and paste the data into another excel sheet.
Break that problem into steps e.g.
Open data in excel
filter column A by …
copy, paste
calculate
Now you can start googling “open excel sheet in python” and you’ll find this isn’t that much code. Get it working and then move onto the next step.
Try not to get caught up in “best practices” while you’re learning—that will come naturally later—just get the code working.
Breaking the problem into small digestible pieces allows you to get these small wins that are uber satisfying
1
u/DukeMaximum Mar 22 '23
Right now, I’m running a short script to test the Colletz Conjecture. It’s been for running for about thirteen and a half hours and it’s at about 1.78 billion.
I’m also working on a program to scrape stock price data, dump it into a csv, and then perform calculations and analysis on them.
I’m having trouble with yfinance, though. It seems to be really unreliable. So, I’ll probably have to find a new source for stock price data.
1
u/Gazzcool Mar 22 '23
Do a course. Complete the course.
Once you start to get the hang of it, You will probably start having some ideas for other projects you want to try building. Do that.
If you have no ideas, try building something that already exists, like a messenger app, or a todo list, or a twitter clone.
That’s it really.
1
u/ChipmunkCooties Mar 23 '23
Make a script to solve equations ? Or think of something you might use ? For example for me, I’m working on a script to collect data from realestate websites and analyse it
1
1
u/Particular-Floor-349 Mar 23 '23
I was in a class, they had us do a basic code to let someone “order a pizza” at first we just used text but then we learned about tkinter and started making GUIs. We also used Pygame to make a game
1
u/NoodleMcFringe Mar 23 '23
Great advice above. I'm in a similar position. I'm a surveyor who had seen a gap for a different type of surveying app. Although I'm relatively new to Python, I've studied a couple of books and courses and will use my work knowledge to implement it into a fundamental surveying programme. Out of curiosity, has anyone tried Tkinter?
1
u/findingdoryog Mar 23 '23
I did some snooping. Why don’t you try making a website related to Affiliate marketing? Have it process large datasets about finances, sales, market research, etc.
Or even better, create a web crawler that scours the web for opportunities, or automatically writes emails to customers and clients?
1
Mar 24 '23
Just find some possible prohect to code. There are many possibilities like making tic-tac-toe game, a bit tricky but it is a good exercise so that you can enhance your coding skill overtime.
-1
u/DrMrBomb01 Mar 22 '23
You can literally code anything. You can code triple A games all by yourself for 50 years in your mothers basement or you can type print("Hello World!").
Thats the beauty of programming you can do anything with a computer!
-3
Mar 22 '23
Do I open up an empty IDE and code what? I don't know how to do any projects on my own.
Well, then start with that. How are you going to learn how to do a project on your own until you try to?
0
u/Jimlowers Mar 22 '23
Maybe set up a digital alarm that plays Rick roll at a specific time, build one where you click on a bottle and it flips, build digital flash cards that you can write, delete, and update.
0
u/Synder934 Mar 22 '23
What really got me started developing my knowledge of python is making a discord bot, it teaches a lot and shows many ways of doing things!
0
Mar 22 '23
[deleted]
21
u/MrFresh2017 Mar 22 '23
Keywords beginner to Python. This means you have to learn the “silly functions” first, just so you can understand the more difficult (web based full stack software, etc) stuff (unless, of course, one wants to just copy and paste code at that level and not even understand why and what it’a doing.
6
196
Mar 22 '23
[removed] — view removed comment
237
u/AlSweigart Author of "Automate the Boring Stuff" Mar 22 '23
Hi, I'm the author of Automate the Boring Stuff with Python. Yes, all of my books are free under a Creative Commons license at https://inventwithpython.com
Specific to this question though, I'd recommend The Big Book of Small Python Projects. A lot of folks give the advice of "read the source code to open source projects" which is kind of lousy advice for beginners. Open source projects can be big, not well documented, and have a complicated set up process to even get it to run. The projects in this book are small (under 250 lines), fit in one .py file (easy to copy/paste everything at once), but are still complete, runnable programs. It's mostly stuff like small games and simulations.
My advice is to re-type the code yourself, play around with the program, and then try to recreate the program from scratch. You don't have to memorize the code and reproduce it exactly, but just try to make the same kind of program. This book just gives you ideas, which can then lead you to having your own ideas for projects you're interested in.
48
u/time_on_target Mar 22 '23
I watched your YouTube video on recursion. You explained it far better than my University lecturer 👈🏽🔥
27
0
Mar 23 '23
[deleted]
3
u/time_on_target Mar 23 '23
Beginners guide to recursion.
Tl; Dr: in almost all cases just use an iterative loop + plus a stack to keep track of how many iterations you've performed
4
4
16
Mar 22 '23
[removed] — view removed comment
1
-1
u/actuallyimean2befair Mar 22 '23
lots of free resources to learn online. does someone even need to pirate in the year 2023? just watch a free youtube video.
anyone who can't find resources isn't looking.
71
u/Auirom Mar 22 '23
I heard someone say once "anything" you program is practice.
Program something to flip any coin you want
Maybe take a random number and find out how many coins it'll take to make that number.
Maybe write some code that prints out a deck of cards with ASCII cards
Or how about something that takes a sentence you have to input and scrambles it? Maybe scrambles it and then attempt to descramble it randomly and see how close it gets
Point is that you don't need to program something meaningful. Just anything. That's practice.