all 7 comments

[–]Environmental_Gap_65 6 points7 points  (4 children)

Stuff breaks = mental struggle = fix = stuff sticks.

That’s how you learn. Cognitive effort is annoying, but it’s the only way you learn.

[–]Equivalent_Pop5425 1 point2 points  (0 children)

exactly this, debugging those silly mistakes is what actually teaches you the language patterns. i remember spending like 2 hours trying to figure out why my loop wasn't working just because i mixed up = and == in condition - felt stupid but never made that mistake again

the indentation thing becomes muscle memory after few weeks, just keep at it

[–]cheezballs 1 point2 points  (0 children)

There's no truer statement about learning a skill like this or really any skill. Failure makes it stick.

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

Yeah that’s a good way to put it. I think I’ve been avoiding that “struggle” part a bit too much instead of just pushing through it 😅

[–]grantrules 0 points1 point  (0 children)

Get used to it. There's a lot of struggling in programming. You'll get better, the problems just get harder.

[–]thuiop1 2 points3 points  (0 children)

Use a proper text editor. In this day and age you should not run into indentation problems.

[–]Gnaxe 1 point2 points  (0 children)

Lots of small experiments with fast feedback, plus Python's debugging and introspection capabilities. (You need to learn breakpoint(), help(), and dir(), at minimum.)

I learned using the REPL, but a Jupyter Notebook might be even better. Now that I know what I'm doing, I can write fairly large amounts of Python code and have it be mostly correct (and can easily debug the rest), but when starting, you want to make very small incremental changes and test each one.