preface

Several students have asked me how to study. Today, I will talk about the opening article alone. Welcome to post your own learning methods in the comments section.

Here’s how I learn

Learn a language

  1. Generally have a look at the official documentation, not one by one carefully study, too time consuming and can’t remember, don’t worry, there is way behind to help you remember), English not good () my English compares slag recommended directly using Chrome + Google translation plugin throughout, understand the general meaning, and come back to see English document whether there is understanding deviation, pretty good 😉. If you have a background in another language, you can compare it to other things, find the differences, learn about its strengths and practical situations

  2. Look at the Awesome Lists compiled by our predecessors

    • If you don’t have what you need, add oneawesomeKeyword direct search, for example:Small program Awesome,react awesome
  3. What do you really want to do with this language?

    • If I wanted node.js to write a REST API, I would use Github to search: Node Rest API (preferably not in Chinese)
    • I will clone several projects that are well written and maintained by Readme directly to the local area, start to study the clone projects one by one, and finally compare them and pick out all their excellent points
  4. Take the express-MongooSE-ES6-REST-API project for example

    • When you open a project, you should first understand what folders/files are in the root directory of the project. This is where Google search comes in handy

    • You should look for entry files in package.json (similar in other languages).

    • You can read its source code directly from the entry file, probably a lot of contents are looking at a face of confusion, don’t be afraid, don’t be afraid, don’t be afraid (we can win)

    • I looked at package.json first when I read it. (The first time I looked at the code there was no order, it was just a feeling, it was a little bit of a detour at best.)

    • Attached is how I read package.json when I just learned the front-end last year. I used the package management website/Google search to figure it out one by one. Persistence is very important.

    • Looking back, what cool things have I learned through the above steps 😎

      • Express, Express development mode, three-party middleware commonly used for Express, and front-end security related things
      • Node.js log management
      • Validate data using JOI
      • JWT usage and application scenarios (not only for JS projects)
      • What is Babel? I started writing es6/7 code 😂
      • What is esLint that I used once I figured it out
      • What is gulp that starts trying to write the tasks I need
      • Learn to use Nodemon
      • Git Commitizen specification (not just for JS projects)
      • Server-side JS testing and coverage
      • Travis CI (not just for JS projects)…… There are others, not to mention them all
    • Now you can start to see the source code, do not understand the document (this time to see the document than before the direct look at the document remember skilled) 😃

    • Look at the first project is often the hardest, stick to it, stick to it later will be much easier (this is my stupid way)

  5. Take another example of learning other languages. Some time ago, I saw many friends around me playing answer games on mobile phones. I wanted to write an answer script to realize the function of automatic answer script

    • The first thing that comes to mind is to study the small program of wechatJump jumpThe implementation principle of scripts
    • I learned by searching on the InternetJump jumpThe general implementation principle of the script is as follows: Python starts a script to trigger the screenshots of ios devices through WebDriverAgent. According to the screenshots, Python analyzes the position of flags and the center point of the next block. According to the algorithm, python triggers the execution of WebDriverAgent
    • To start… A brief look at the python3.5 documentation and coding specification
    • There’s a related project on Github called wechat_Jump_Game
    • Learn the general process, and common tools…
    • Start to write their own projects, during the encounter to jump a jump is not quite the same place, answer games need text recognition, of course, or through the almightyGoogleTo find the answer:tesseract-ocr,Baidu OCRMost people on the Internet said that Google tesseract is not as good as Baidu OCR, so they directly use Baidu OCR
    • Finally, after writing the project, think about it
      • Example 1: How to play without using mobile screenshots (without using WebDriverAgent)? Can connect the computer through the phone, share the screen, and then computer screenshots, direct ImageGrab. Grab is very simple; Looks like we can hack the protocol
      • Example 2: You can even write a script like this to play around, haha
      • Example 3: How to play a little more advanced? Join face++ face recognition ah, calculate the appearance level, beautiful again like (joke 😂, mainly want to show that finished the project to think, do this project can bring you what)

Learn about an open source framework/tool

  1. Generally good open source frameworks/tools have good examples and well-documented projects in them, such as next.js, Redux, etc
  2. If there is no example, look at the documentation
  3. Encounter problems directly see the source code, breaking point debugging slowly, too complex cannot see see its issue, not to mention, carry out general to a period of time before someone back to you, this time can go to Google search on related issues, or into the herd of its organization, such as domestic ant (direct plus their WeChat/nailing group), abroad such as next. Js. Core maintainers will always keep Twitter in the document, just contact them directly (use Google Translate for those with poor English, and make up your Own English), and close the issue after solving the problem.

Enclosed in last lot, blog will be after the first time update to: https://github.com/Gavin1995 blog project issue