Date: Mon, 18 Dec 2017 18:48:08 +0000
<p>Roger explains why everyone should learn to code, even if they don't intend to go pro. "Learning something difficult, however, is beneficial in and of itself. The process is the prize. Struggling with code, while frustrating, is medicine for the mind."</p> <p>Written and Read by Roger Collier: <a href="https://twitter.com/RogerAFCollier">https://twitter.com/RogerAFCollier</a></p> <p>Original article: <a href="https://fcc.im/2keLLrU">https://fcc.im/2keLLrU</a></p> <p>Learn to code for free at: <a href="https://www.freecodecamp.org">https://www.freecodecamp.org</a></p> <p>Intro music by Vangough: <a href="https://fcc.im/2APOG02">https://fcc.im/2APOG02</a></p> <p>Transcript: </p> <p>It was far past midnight. My wife and kids had long gone to bed. But sleep was not an option for me. I had to figure it out. So I tweaked the code again, for the googolth time, and hit run.</p> <p>Hmm, looks promising.</p> <p>If I click here, the program should call the “compute next move” function. Yes. And if I click here, that function should call itself. Good. Now, if I click here, I should get…not that.</p> <p>Argh.</p> <p>More tweaks. More errors. More hours tick by.</p> <p>Learning programming is hard, I thought. My next thought?</p> <p>Yes, and that’s why I like it.</p> <p>How programming became my hobby</p> <p>I began to learn how to code using JavaScript four months ago, starting with freeCodeCamp’s front-end curriculum. For me, programming became a hobby.</p> <p>Over the past few years, I had become disappointed with my creation-to-consumption ratio. Too much of my free time was spent consuming. Netflix, podcasts, Twitter, magazines, televised sports, Facebook, blogs, Medium, newspapers, novels — the list goes on.</p> <p>There is nothing wrong with any of these activities, but they are all pure input. Even reading a great book is an act of consumption.</p> <p>Sure, I was generating plenty of output in my job as a journalist, but I could no longer accept the fact that hard work was something I did only when it would result in a paycheck.</p> <p>With a family and a career and other obligations, I had only so much free time. I was spending far too much of it scarfing down media. And I felt like a pig.</p> <p>So far, my programming hobby hasn’t result in all that much output. I made one simple app, which I wrote about in a previous article. I’ve completed all the front-end challenges and projects on freeCodeCamp.</p> <p>But it’s a start. My goal is not to create amazing things to impress people. It is simply to immerse myself in the act of creation, to challenge myself, to attempt something difficult — if for no other reason than to finish it.</p> <p>Harder is better</p> <p>In my home province — Ontario, Canada — there is a movement to improve physical health called Make Your Day Harder. The basic premise is that making small tweaks to daily routines to increase physical activity can add up and improve health.</p> <p>Take the stairs instead of the elevator. Get off the bus one stop before your destination. Take the parking spot farthest away from the entrance at work.</p> <p>I couldn’t agree more. Those elevator-hating far-parkers are onto something.</p> <p>Of course, sitting in front of a computer writing code isn’t going to improve your physical health. JavaScript is great for building apps, not abs.</p> <p>I don’t think it’s too much of a stretch, though, to suggest that learning how to program is healthy for your brain. Healthier, at least, than bingeing Iron Fist or thumbing through celebrity Instagram accounts.</p> <p>For me, even after I started coding, the default during downtime is still too often leisure. This month, for instance, I have already spent dozens of hours watching genetic outliers throw a ball at a metal ring. This is otherwise known as the NBA playoffs. Since I’m a Toronto Raptors fan, you could also call it self-induced torture.</p> <p>Does watching so much basketball — alone, in my basement — benefit me in any way? Well, I drink more beer when I watch sports. I eat more nachos and wings and potato chips. Mike and Ikes have made several appearances. Oh, and I often stay up late to watch the West Coast games, so I’m getting less sleep.</p> <p>In other words, watching sports, for me, is a vice. I enjoy it, but it’s actually bad for me. It provides me with entertainment, but nothing else. Except for love handles and the occasional mid-afternoon yawn attack.</p> <p>But it’s easy. It’s oh so easy. Plop on couch. Crack open Corona. Kick up your feet. Sit there for three hours.</p> <p>The easy path is more tempting. The difficult path is more rewarding.</p> <p>Embracing difficulty</p> <p>I was again reminded of the value of embracing difficulty while watching the movie Hidden Figures. The film featured an excerpt of John F Kennedy’s “We choose to go to the moon” speech. The United States pursued space travel not despite it being difficult, the president declared, but rather because it was difficult.</p> <p>“We choose to go to the moon in this decade and do the other things, not because they are easy, but because they are hard, because that goal will serve to organize and measure the best of our energies and skills, because that challenge is one that we are willing to accept, one we are unwilling to postpone, and one which we intend to win, and the others, too.” — John F Kennedy</p> <p>The words “hard” and “difficult” are often used to describe something negative. In many cases, that’s appropriate. It is hard to watch a loved one fall ill and suffer. It is difficult when a relationship fails or a pet dies. Some situations are all pain, no profit.</p> <p>Learning something difficult, however, is beneficial in and of itself. The process is the prize. Struggling with code, while frustrating, is medicine for the mind.</p> <p>If you happen, along the way, to create something amazing and users flock to your app with open wallets, that’s great. If not, code anyway. If you master JavaScript and become a YouTube guru with more subscribers than the New York Times, that’s great. If not, code anyway.</p> <p>Many people learn programming to attain a specific goal. Perhaps your job is boring and you want a more challenging one. Nothing wrong with that. Maybe you want to break into tech because you need a higher income to support your family. Hey, someone has to buy the bagels and flip flops, and keep the WiFi pumping.</p> <p>But you don’t need an endgame in mind to start your coding journey. Just begin. And if that journey becomes difficult, don’t despair. It means you’re on the right path. The hard one.</p> <p> </p>