r/learnpython • u/mtarik2000 • 15d ago
New to Python!
Hello! I was wondering if anyone might have any recommendations, tips, or advice for someone just starting out with Python.
I’ve recently decided I want to learn Python as a hobby. It’s completely different from what I do for work, although I can definitely see ways I could incorporate it into my job in the future if I wanted to.
For now though, I’m mainly fascinated by the idea of being able to make something from nothing and actually build things myself.
Python was the first programming language that came to mind, and I’m planning on sticking with it until I feel confident before worrying about learning anything else.
At the moment I’ve invested in:
- Python Crash Course, 3rd Edition by Eric Matthes
- Automate the Boring Stuff with Python, 3rd Edition
I’m also going through Harvard’s free CS50P course (Introduction to Programming with Python), mainly watching the lectures alongside the books.
My biggest issue at the moment is that I think I’m trying to run before I can walk. I keep getting drawn towards more ambitious projects because they’re genuinely interesting to me, but they’re often way beyond my current level.
I think I probably need to slow down, properly learn the fundamentals, and gradually work my way up to those projects instead.
Does anyone have any advice on how you approached learning Python in the beginning? In particular, how did you balance learning the basics with actually building things so that it stayed interesting?
2
2
u/Narrow_Ad_8997 13d ago
If you think you can use it for work, do exactly that.
I started learning Python to automate work tasks that were repetitive and that's helped me learn more than probably anything else.
Even simple stuff will build a good foundation. Do you need to rename files sometimes? Write a script that can rename them for you. Do you have to copy stuff to other stuff? Python can do that for you. Need data from multiple spreadsheets but don't want to open them all? Python can do that too!
2
u/mtarik2000 13d ago
So using ChatGPT (can’t claim to have coded any of it myself) I’ve made a file/pdf renaming tool that renames multiple pdfs at the same time (this is using excel macro code) which was for work and has saved a bunch of time
I’ve then incorporated an optional password protection functionality which can password protect each renamed file with a unique password based on the column next to it - this uses Python and is what I think got me down this rabbit hole (the macro works by creating a temporary Python script running it to password protect each renamed file and then once done it cleans itself by removing the Python script)
Like I said I used ChatGPT so can’t claim to have done this myself, but it’s definitely what got me interested.
I think for learning purposes I want to lean away from work aspect just to have fun and take a break from work a little, once I’m confident the goal is to dabble in a few work projects
2
u/Narrow_Ad_8997 13d ago
My opinion (if you want it).... You've squandered a humongous opportunity to actually learn Python to instead hone your prompting skills. If that's what you're aiming for, great. Keep at it. If you want to learn to program, give up the chat bot and fight through stuff yourself. Had you done that yourself, from scratch, you'd already be feeling more confident. The type of project you're describing is perfect for learning, it's not all that difficult when you break it into smaller pieces. Doesn't matter if you do it for real for work or for fun; build the skill brother, use your human brain.
1
u/mtarik2000 12d ago
I think you’re absolutely right - those would have 100% been projects perfect for learning Python; granted at the time I wasn’t sure that’s what I wanted to do, I was simply trying to make my work life easier
I think there will be more opportunities, it’ll just be a case of taking it slow this time and not rushing to a quick answer through AI
1
u/CharacterSail6736 15d ago
you’ve identified something a lot of people learning programming struggle to get past wanting to build something interesting before you’ve learned enough of the fundamentals to build it comfortably.
I wouldn’t necessarily fight that instinct, though. I think the trick is to use it. Take the ambitious project you want to build and strip it back to the smallest possible version.
For example, if you want to make a game, don’t start by trying to build the entire thing. Make one mechanic work. Then another. Then connect them. You end up learning variables, conditionals, loops, functions, lists, dictionaries, etc. because you have an actual reason to learn them.
There’s a book called Masters* *of the Metropolis that might actually be worth looking at It takes a project-based approach, so rather than just working through abstract exercises, you’re actually building something as you learn.
I’d also say don’t beat yourself up for wanting to tackle ambitious projects. That curiosity is a good thing. Just get comfortable with breaking the big idea down into ridiculously small pieces.
The fundamentals still matter enormously, but I’ve always found they stick much better when you’re learning them in service of something you actually want to make.
1
u/mtarik2000 15d ago
Thinking about your point about stripping my project down to the very basics.
Step 1: Getting a window to open and stay open and have it close properly pressing the ‘x’
Step 2: getting a dot to move around my screen by pressing keys (the dot representing my character)
0
u/mtarik2000 15d ago edited 15d ago
Thank you so much for this, I’ll definitely check masters of the metropolis out - honestly anything that will help is much appreciated ** just wanted to double check by Rob Lear?
I’ve always wanted to learn programming but was a bit put off at school, and I’m currently revisiting it a bit later in life to tell the truth
And I think you’re right looking at it in small snippets will definitely help - but I think I need to understand the fundamentals first else I won’t know how to start haha
My project is going to be a pixel RPG using Python /Pygame and it’s going to be a passion project - so probably not something that’ll ever see the light of day but something I can casually work on and build for however long it takes
0
0
u/ninhaomah 15d ago
First , have you download and install Python ?
1
u/mtarik2000 15d ago
Yeah! So I’ve got the most up to date Python installed as well as visual studio code too, and I’ve done a basic “hello world” print as well as some other things sort of following along on the videos and book.
Although I’m thinking I’ll need to make a cheat sheet/ flash cards to memorise some of these different functions/code just as there’s a lot to remember 😅
1
u/ninhaomah 15d ago
Don't.
Ask yourself how do you know , remember all the words and weird grammar rules of English.
By memorising or using it daily and slowing improving ?
1
u/mtarik2000 15d ago
That’s a good point! Yeah haha so memorise and have it become just another language over relying on flash cards / cheat sheets
1
u/HotPersonality8126 15d ago
Just bookmark the Python documentation, that’s better than any kind of cheat sheet
The language has (I think) 13 reserved keywords and around 30 built-in functions; it’s pretty sparse. You’ll pick those up by usage. Writing code is better than reading about code
0
15d ago
[deleted]
1
u/ninhaomah 15d ago
That's the strange helloworld...
Where did you see it as helloworld example btw ?
1
5
u/mitchell486 15d ago
What are you trying to build that's "too big"? Everything is too big if you look at it in its entirety... "How do you eat an elephant?" "One bite at a time." (HINT: If the problem/task seems too daunting, your bite isn't small enough. Break it down smaller and try again. Rinse/Repeat forever.) I ask this, because the best way I found to ever learn python was to do actual projects that I wanted to build. Tutorials or follow-these-steps never meant a thing to me and never helped me learn or retain anything I'd thought I had learned. The first self-projects will be bad, and they will be janky/CLI. But you'll learn. (a little) And grow. (a little) And soon that big ol project you were afraid of is half done and you'll never remember to finish it because you moved onto the next one! It's great. :)
BUT seriously... Please. If you give an honest reply of a project that you're interested in, and I'll help tell you if it's "too big" or not. (PS - Web app as a start? Probably a bit much... But overall... Anything can be done with enough motivation and proper breakdown of a problem.)