開源日報 每天推薦一個 GitHub 優質開源項目和一篇精選英文科技或編程文章原文,堅持閱讀《開源日報》,保持每日學習的好習慣。
今日推薦開源項目:《輔助功能 awesome-AutoHotkey》
今日推薦英文原文:《How I Taught My Mom to Code》

今日推薦開源項目:《輔助功能 awesome-AutoHotkey》傳送門:GitHub鏈接
推薦理由:上個月我們剛剛介紹過 AutoHotkey 這個可以幫助你更方便工作的腳本語言,這次要介紹的是有關它實用的工具,庫以及一些腳本的完成品。一些諸如自動補全和窗口管理這樣的腳本能讓你省下不少功夫,而如果你自己去實現它會花掉不少時間——別忘了你使用這玩意是拿來節省時間的,怎麼省事怎麼來才是好選擇。
今日推薦英文原文:《How I Taught My Mom to Code》作者:Lee Stetson
原文鏈接:https://medium.com/better-humans/how-i-taught-my-mom-to-code-9365db560140
推薦理由:且看作者如何教媽媽寫代碼

How I Taught My Mom to Code

So, 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 yourself

It』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 day

I 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 others

At 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 resources

Don』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.

Tip: Find helpful guides and bookmark them, save them as a file on your desktop, or print them out to keep next to your computer. I found a 1-sheet printable list of common functions in JavaScript that I sent my mother–she was so relieved and uses it to this day. You can find top guides through google searches or in forums.

4. Don』t be intimidated or think a question is too stupid to ask

When 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 questions

You』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 coach

When 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.
下載開源日報APP:https://openingsource.org/2579/
加入我們:https://openingsource.org/about/join/
關注我們:https://openingsource.org/about/love/