Discover more from Deus In Machina
To Learn to Program You Must Learn To Fail
A self taught programmers perspective
In the beginning there was suffering
I started my programming career in grad school studying Bioinformatics. I needed to learn Python to perform the analyses on the sequencing data we were working on. We were the last class to learn Python 2, though all my subsequent work was in Python 3. I’m happy to say I was successful in learning the language, but it wasn’t without help from a great mentor.
I’d had a lot of false starts before then. I had tried to learn Python previous by watching YouTube videos,and courses on teamtreehouse but nothing stuck. The motivation would quickly die and I would run out of steam as things got harder. That combined with my poor math skills led me to believe I just couldn’t hack it as a programmer.
Being in grad school attempting to learn Python again and struggling to do a basic homework assignment, I felt the old feelings creep back in. My doubts in my cognitive abilities,the pressure of academia, and questioning whether I actually belonged in this program took a toll on my mental health. Staring at the screen I couldn’t figure out why my program wasn’t working and I was frustrated to the point of tears. I remember the feeling I felt when I finally got the program running, of the tension leaving my body. I think I just put my head on the desk. I was too tired to cheer.
Despite these experiences I still love coding. I love it so much I’m willing to give my hands and eyesight to it. But few things have been as frustrating to me as the act of learning to program. It can be so cruel. You can write hundreds or even thousands of lines of code, and if one part of the chain is incorrect, you either don’t get an output, or worse, you do and it’s wrong. There are many resources that programmers have today that make things easier. Stack Overflow, Discord, Discourse forums etc, but no matter how good you are you still are going to make mistakes.
Learn to Learn. And Learn to Fail
I realize now that the reason I had failed to learn to program was for a few reasons. One, I didn’t have any goal in mind. Now adays when I learn to program it’s for a specific purpose, and I spend as little time in the tutorial phase as possible. I try to learn enough syntax so that I can understand the library I want to work in, and then only go back to the learning materials during my free time, or when I get stuck.
Another reason is that I didn’t know how to learn. You’d think having gone all the way through to grad school that I would have developed good study habits, but that was not the case. My habits followed more of a boom bust cycle, procrastinate, panick, cram, and that extended to learning new skills as well. I would burn out learning for a few days, get stuck and frustrated and quit. I knew where I wanted to be and I wanted to get there as fast as possible. It’s especially hard in the beginning when you don’t know any programming languages, so the pressure to git gud feels greater. Now it takes me about two weeks of consistent practice every day to become familiar in programming languages that are similar to ones I know, and over six for the really weird ones.
Lastly when programs fail than can sometimes fail in the most unsatisfying, cryptic ways, with an extremely unhelpful error message. I’ve dabbled in other hobbies. There is always a learning stage. But even when projects don’t turn out well there is usually something to show. Sure I may have cut too deep here, or got some paint on the wrong piece there, but rarely do I miss the mark so bad that I end up destroying the piece I was working on. Not so with programs. I have dozens of dead repos across multiple platforms, where I have nothing to show but a bunch of dead code.
That last part is the hardest for me. When you fail with nothing to show for it, the knowledge that you gain feels like a small comfort compared to the work you put in. It can feel so blunt, and hours rerunning the same code and getting nowhere can break even the best of us. Then there are the projects were the failure is the is a failure to launch, because libraries didn’t work, dependency hell, or something else entirely.
You will become a better programmer
The knowledge from those failures will compound on itself. Hopefully in a way that brings wisdom instead of despair. I highly recommend going back to projects and languages you failed to learn or complete. You’re previous experience will get you to were you got stuck faster, and then hopefully push you past it. Think of failure like halts in buggy programs. Eventually the program will run you just have to get past the line that’s throwing the error.
It takes time to be a great programmer. I think about how in the beginning I never thought I’d have the capacity to know multiple languges. I’m now the programming language equivalent of a Linux distro hopper. Before I’d put Emacs in a state where the only way I knew how to fix it was to close the editor and restart it. Now I’ve rebound C-x C-z to suspend-frame so I don’t accidentally close out of it, and my Emacs uptimes are measured in weeks. There is a great quote by Zig Ziglar that I applies well to programming.
Anything that is worth doing, is worth doing poorly until you can learn do it well
I couldn’t agree more.
Thanks for reading Deus In Machina! Subscribe for free to receive new posts and support my work.