今日推荐英文原文：《How I Taught My Mom to Code》
推荐理由：上个月我们刚刚介绍过 AutoHotkey 这个可以帮助你更方便工作的脚本语言，这次要介绍的是有关它实用的工具，库以及一些脚本的完成品。一些诸如自动补全和窗口管理这样的脚本能让你省下不少功夫，而如果你自己去实现它会花掉不少时间——别忘了你使用这玩意是拿来节省时间的，怎么省事怎么来才是好选择。
今日推荐英文原文：《How I Taught My Mom to Code》作者：Lee Stetson
How I Taught My Mom to CodeSo, you want to learn to code. I’m going to share 7 tips today that will help you succeed in learning to code no matter what your background, skills, or confidence. They helped my favorite, most inspiring student to learn how to code. She went from knowing zilch–zero!– about computers to building a website for her business.
That student is my mom.
My mom, LoriSue, felt unhappy and trapped in a job she hated. She needed to learn more about computers if she wanted to switch career paths this late in life (she’s 56). So she went back to college and enrolled in an introduction to computers course.
Or so she thought.
What my mom really enrolled in was a web development course, which was a bit too advanced for her. But since the course sounded fun, and was in-line with her ultimate goal, she decided to stick with the course.
People judged her because of her background. Almost nobody believed she would be able to complete the course and even if she did, they didn’t expect her to use any of the skills she learned. Her confidence dipped in those first few weeks as she struggled with the coursework and faced the negative feedback.
That’s when my mom asked for my help. She was overwhelmed but driven to succeed. So we put together a plan based on 7 strategies I knew worked from my experience teaching my clients, friends, and colleagues how to learn to code.
0. Believe in yourselfIt’s easy to feel like you don’t know what you are doing when you start writing code. It’s easy to give up–my mom sometimes felt that she should. But it’s important to admit when you’re feeling this way so that you can take a step back, focus on (and appreciate!) what you do know, and also positively frame the next steps you need to take to achieve your goals. Little by little, you can understand the gaps in your knowledge and overcome them. The more confidence you have in your work, the better you’ll be at it, too.
Tip: Have confidence in yourself. If you aren’t feeling confident, pause and reflect on everything you have learned so far in coding and how far you’ve come from day one. And if you need it, find someone–a friend, family member, or coach–who can reaffirm how much you’ve accomplished.
With my brothers, literally supporting my mother.
1. Write code every dayI made my mom commit to coding a little bit every day. Learning to program is like learning any other language: practice builds muscle memory and keeps the language fresh in your mind. You won’t go far if you just code on weekends or during class office hours. My mom practiced every day and I checked up on her to make sure that she did. I also called her after her lectures and had her explain to me what she learned, which helped the concepts sink even further into her memory and easily surfaced problem areas that she might have missed.
Tip: Practice every day, even if just for 10 minutes. Go over what you learned the day before to make sure you are building on the concepts and testing what you know.
2. Learn by copying othersAt first, I asked my mom to type out the code that she saw in lectures, even if she didn’t understand what it did. And for the most part, she didn’t understand it. Not at first. Over time though, she started to see patterns and realize how the code fit together. Soon she was writing new code every day and even fixing bugs.
Tip: Pay attention to the examples in your introductory courses. If you can’t figure out how to write something, search on Stack Overflow.
3. Take advantage of free resourcesDon’t try to memorize everything–build a solid list of resources you can keep in front of you. Programmers hate memorizing things that can be easily looked up at the appropriate time. That’s partly why you find so many great resources on the web such as Stack Overflow, free tutorials, and language guides. Every now and then my mother would find herself overwhelmed by how much material there was. She kept worrying that she would have to memorize everything. You’ll memorize common functions and basic syntax for sure, but most of the time, you’ll be looking in documentation to remember how to use the pieces of code. Your job is to learn how to put it together, not how to memorize code.
4. Don’t be intimidated or think a question is too stupid to askWhen she started off, my mom didn’t understand the technical concepts of how a computer worked. She was intimidated to see other students goofing off when the teacher explained basic concepts she didn’t understand. They seemed to know something she didn’t. She was embarrassed to be so far behind! I worked with her to focus solely on where she was and how to keep improving. Over the course of the semester, I had her look at the code from class to find general patterns. I also encouraged her to ask questions and made sure to explain the technical concepts in layman’s terms, which she found incredibly helpful. Eventually, she was able to talk technically, and speak the language, all without putting a particular focus on the language specifics.
Tip: We all start somewhere. Focus on where you are on the next step you need to take to improve. A hard work ethic will pay off. Also, most programmers I know love to answer questions (when they know the answer) and won’t judge you for asking too simple of a question. Ask away!
5. Learn how to ask the right questionsYou’re going to get stuck when you’re writing code. I still do and I’ve been programming for 15 years! Sometimes it’s just a semicolon that breaks your code. As a beginner, you’ll spend hours trying to fix it. Frustration could lead you to focus on minor details instead the solution. When my mom got stuck, I’d encourage her to step back, think about what her code was supposed to do, and then compare that to what the buggy code was doing. By asking the right questions, she’d quickly find the errors and correct them with only the help of my guiding questions.
Tip: Embrace the process of learning how to code and it’s unloved cousin, learning how to debug code by asking the correct questions when your code doesn’t work. Have patience. And find a friend, mentor, online community, or coach who can help you learn how to ask the right questions when you get stuck.
6. Get a coachWhen my mom realized she was in over her head, she attempted to make use of the professor’s office hours to gain the knowledge she was missing. But the professor had to keep pace with his curriculum, and he didn’t really know how to help someone at her technical level get up to speed. He provided encouraging words, but couldn’t offer any guidance. That’s when she realized she needed someone who understood her challenges, as well as what steps were necessary to train her mind to think like a programmer.
Tip: Get a coach! We don’t just know these tricks, but we also know how and when to apply them for leverage. I’ve heard the argument that learning to code on your own is actually impossible. This might not be true, but finding that person who will invest in you, and has the coach’s toolkit will virtually guarantee real forward progress in learning to code.
Guess what? At the end of the semester, other students were coming to my mom for help on their final projects. She completed the class. In fact, she earned the highest grade out of all the students (she schooled them!). I was so proud of my mom. And so lucky to witness her growth as a programmer over the course of the semester. She’s already put what she learned into practice to build a website for her new side business. My mom’s story could easily be your story.
Whether you’re brand new to coding or looking to master a particular language; whether you’re young or old; no matter if you’re taking classes or learning on your own; if you’re just starting to explore coding or ready to apply for jobs, you can learn to code.