3 ms·
I started learning Python when I was 12 years old by reading books. I could understand the mechanics but I couldn't solve a problem I hadn't seen solved before.
by maxbond 4y ago
I started learning Python when I was 12 years old by reading books. I could understand the mechanics but I couldn't solve a problem I hadn't seen solved before. I tried to make a game of hangman, but I simply couldn't design it. I gave up on it.
Several months later, perhaps a year, I sat down to try it again. For some reason it wasn't so hard this time. I was able to get it to work.
I don't remember what my other projects were, but I remember struggling to design some more software. I couldn't tell where to begin or how stuff should work. So I'd just jump in somewhere and start somehow. I'd flesh out one component, and then when I'd go to write a component that integrated with it, I found my first design was wrong. I ended up throwing out drafts and restarting.
Through a grueling repetition of this I learned to have a better intuition. I increased my capacity to hold a large and complex program in my head, and to reason about it. I remember a job interview at 18 years old, when someone told me, "you write decent Python." I was quite proud.
I don't think they're was a single moment where it clicked. It was a painful teething process of repeatedly painting myself into a corner, throwing everything out, and starting again. I was very lucky to have supportive adults in my life who helped me out, along with kind strangers on the internet who looked at my broken code.
I'll tell you about one small moment of realization. Once I was asking for help online with a problem relating to my masking an import with a local variable, or something like that. After this was explained to me, Ned Batchelder gave me a command; "now, realize that importing is just a special case of assignment."
It legit blew my mind. It felt like a zen master had imparted special wisdom to me. It was a magical pedagogical moment I've never experienced again. Thanks again, nedbat.