Skip to main content

How to Use the Book

Environment Setup

Python is a backend programming language. For teaching purposes, all JavaScript code in this book should be run in a Node.js environment unless otherwise specified.

Supplementary Code

This book contains numerous examples and code snippets. I encourage you to type them out yourself to deepen your understanding. Due to time and resource constraints, we do not provide a separate download link for the example code. We appreciate your understanding.

Refer to the Official Documentation

Official documentation is a primary source of information. Any materials translated, reproduced, or paraphrased (including this book) may be incomplete or contain errors, making it difficult to establish a comprehensive knowledge framework. When reading this book, if you encounter any problems, I recommend consulting the official documentation instead of searching for answers on search engines.

AI-Assisted Learning

ChatGPT greatly reduces the learning curve for acquiring a new programming language. Therefore, when encountering difficulties, asking ChatGPT for help is a highly efficient learning method. I have recommended ChatGPT to many of my developer friends, but very few have been able to use it effectively. I believe there are two main reasons for this:

  • ChatGPT has a learning curve and requires systematic learning to be utilized effectively.
  • The quality of answers obtained from ChatGPT is closely related to the questions asked. In other words, it tests the questioner's ability in analyzing, summarizing, and presenting the question. Many questioners are unwilling to spend time on these aspects, and they often ask ChatGPT questions without careful consideration.

For learning Python, a simple and easy-to-learn programming language, we do not need to master too many questioning techniques because the scope of questions is vertical and relatively narrow.

For example, when we need ChatGPT to explain how to achieve the same functionality as the JavaScript filter method in Python, we can ask:

Translate the following JavaScript code into Python:

const numbers = [1, 2, 3, 4, 5]
const odd = numbers.filter(x => x % 2 !== 0)
console.log(odd)

The example above demonstrates that there is often a need to transform the actual question we want to ask into a question that we can present to ChatGPT. I believe you have already understood the techniques involved through this example.

Now, let's open the door to the world of Python together!