77
How exactly does one get better at programming?
(lemmy.world)
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Follow the wormhole through a path of communities !webdev@programming.dev
After coding a lot, and talking to many people, I have decided that while most people can be trained to be decent programmers; the critical ingredient is both an interest and the ability to sit down and do it for long periods of time.
As long as you have both you will find your path.
For me I learned a lot by reading books, coding my own things, and reading other people’s code. Often on first read, I was intimidated. Sometime I had to take a while to figure out new things. More than once I had to stare at a few dozen lines of code all afternoon.
It really helps to have a debugger to step through each line of code as it runs . This shows the values of variables at each step
And that assumes the code runs at all. I learned to debug my own code, when it would not run, by making every conceivable error several times until I could read the output in my sleep and know how I messed up. That takes a while to make that many errors!
But debugging is definitely very important
Since the op is talking about python, I recommend pythontutor.com it is a visual debugger and not only shows the values of variables but shows the scope which each variable exists in.