r/learnpython • • 1d ago

After a while of learning programming

So I am stuck in tutorial hell for a long while and I had to realize that I have no idea what a program’s code looks like so I can’t compare myself from it and can’t learn from it. And tutorials don’t give practice lessons for some reason.

7 Upvotes

13 comments sorted by

5

u/mc_pm 1d ago

Start by typing in the code as you watch. When they type in code, you type in code. When they run their code, you run yours - and if it doesn't work you stop right there and figure it out (figuring out why something doesn't work is half the job).

Once you are used to typing in the code, it'll be easier to start fooling around with it, making small changes to see what happens, etc. Then, once you can type in the code and get it to work, then it's time to start solving little problems.

2

u/TJATAW 1d ago

Also, at the end of each tutorial, find some new feature, or multiples, to add to the code. Something you will have to research and do all on your own with no one telling you what to write.

I did a tutorial that created a browser based note taking app.

I added a time stamp to the notes, then created a way to see the notes organized by date, then a way to edit the timestamps so I could have them spread over multiple dates, then a calendar that showed me the number of notes on that date, and clicking on the date showed me all of that notes from that date, then I put in a feature to tag the note by project, so then I needed something to show me all the notes for that project....

I currently use that system to track what I do at work. It was invaluable for myself evaluation, as I had notes for everything I did, for every project I worked on, everyone who was involved with those projects, etc.

All in a simple note taking app I built in a tutorial.

1

u/Adbelhak_Unsicker 19h ago

so true, passive watching feels productive in the moment until you actually open an empty file

2

u/Fast-Station1106 1d ago

schreib mal noch woher du deine holst YT? Bücher? Website? YT ist schlecht für Programmieranleitung, es ist stressig, sehen verstehen,zeitgleichtippen pause replay play werbung skip nimm lieber Bücher für Einsteiger und learnpython.org,

2

u/baubleglue 1d ago

Cs50p free online course has exercises.

1

u/TheRNGuy 1d ago

Make any software, after few years you'll get better.

Instead of tutorials make something you actually gonna use. If there's nothing with Python, then other language.

1

u/try_pull_the_other 1d ago

python crash course by Eric Mathes. Has exercises following the lessons. Do them.

1

u/conhao 1d ago

Code something you are interested in having from scratch.

1

u/frustratedsignup 18h ago

At some point, you have to put down the tutorial and actually create a solution to a problem you're experiencing. I use tutorials only when I need to learn syntax. Once I know the syntax, it's time to start solving problems. Yes, it's hard when you don't know all of the available modules, but the way you master them is by writing code and testing how things work.

My first script in python was for creating sftp accounts on one of the servers at work. The procedure we had been following up until that point took 20-30 minutes per account. It was tedious because you had to lookup an available user id, run the useradd command with a half dozen arguments, set the password on the account, and duplicate a chroot configuration so that one user couldn't see another user's files. The script reduced the wait time to under a minute per account. Little did I know it at the time, but there were projects coming up that would end up requesting that I create dozens of these accounts in a day. The time it took to write the script easily canceled out the effort that would have been required if I didn't write it. If I recall, it took me half a week of struggling to get it working.

0

u/notacanuckskibum 1d ago

TBH if it hasn't clicked by now then maybe programming isn't for you. Some people find programming easy, some don't

1

u/Far-Imagination3226 1d ago

My first semester in Spanish, I got a D- when the Teacher said he really should have given me an F. I was COMPLETELY lost AND clueless. The next semester, much better Teacher, and I went from a D- to a B+, and then nearly straight A's the other 3 years. I just published a book in Spanish 2 years ago. Sometimes it's not the person. Sometimes it's not the student who's clueless, it's the Teacher.

1

u/notacanuckskibum 1d ago

Maybe. But I feel that programming is different from most subjects, is a style of thinking. Every good programmer I know got it quickly, even if try had a bad teacher.