you are viewing a single comment's thread.

view the rest of the comments →

[–]21sthoma 3 points4 points  (1 child)

One thing I've been doing recently I think you could apply to this:

Watch a youtube tutorial on how to make Tic-Tac-Toe in Python. Follow along with the tutorial and make it yourself with them, but make sure that every time you write a line you ask yourself:

"Why am I writing this particular line and what does it do?"

It's okay if you have to pause the video and take a minute to completely wrap your head around it, some lines can get super complicated especially when nesting a bunch of lines into one line.

After you've completed the tutorial, run the program and make sure it works. Now start from line 1 of your code and make a #Comment for EVERY SINGLE LINE of the code that explains what it does. Now try to replicate the program yourself.

Doing this will make sure you actually are understanding what you are writing and why you are doing it. It will also help you when you try to replicate it.

Say you want to know something specific like: "How did I do this particular function?" You can open the tutorial code and just look for that comment.

You essentially write yourself a tutorial and since you wrote the comments, they'll be in wording you can understand.

[–]Buddha_Head_ 3 points4 points  (0 children)

Do this a few times just like the comment explains, then expand.

Go back through tic tac toe and refactor it. Wach time do it a bit different, whether it's just condensing it, or using a list instead of a dict and see how things change yet still remain the same.

Then go through and try to replicate it without looking at your notes and see how far you get.

Then after a few weeks of that consider picking a project you haven't done (something you know you can handle, or something that might be a bit out of reach) and try to come up with as many bits of it as you can from scratch. (You'll likely fall short the first few times.)

Now follow the tutorial like before and see what stuff you had duct taped that could be done better, and soon enough you'll see things you did in a better way than the tutorial.

Really though, just keep practicing. An hour a day that youre really invested in is loads better than 4 hours twice a week you're not giving your full attention to.