Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[译] [201] 为接下来的学习做好准备工作 #31

Open
cssmagic opened this issue Mar 1, 2024 · 0 comments
Open

[译] [201] 为接下来的学习做好准备工作 #31

cssmagic opened this issue Mar 1, 2024 · 0 comments

Comments

@cssmagic
Copy link
Owner

cssmagic commented Mar 1, 2024

2.1 Time to setup your computer to keep learning

2.1 为接下来的学习做好准备工作

Learning how to write software requires that you perform the task of actually writing software, not just reading about it. If this were a book on how to play guitar, would you keep reading it without ever trying to play the guitar? We thought not. Reading this book without following along and trying it out yourself would be like watching a marathon runner finish the race and thinking you’re ready to go run one yourself. We’ll stop with the analogies, but seriously, you need to get your software installed and running before we go farther.

学习编写软件的过程中,你需要亲自动手编程,而不仅仅是通过阅读来理解。如果这是一本教你如何弹吉他的书,你肯定不会在从未尝试弹吉他的情况下就继续阅读下去,对吧?我们认为你不会。仅仅是阅读而不亲自实践,就像观看马拉松选手冲过终点,然后误认为自己也已经准备好参加马拉松一样。我们不再用类比来说明了,但请你认真对待:在我们进一步深入学习之前,你需要先安装并运行好所需的软件。

What scares us the most right now is that we just hit the most common point where novices, even those eager to learn programming, tend to fail, and we really want to see you succeed. Now, you might be thinking, “Wait, really? We’re just getting started.” Yes, that’s exactly the point. In Leo’s popular Coursera course about learning Java programming [1], can you guess the point when most new leaners leave? Is it the challenging assignment that involves plotting earthquake markers on the globe in real time at the end of the course? No. It’s actually the warmup assignment where the learners must set up their programming environment. As such, we understand this could be a hurdle for you. We hope that with this not-so-subtle nudge, we can help you achieve all the goals you had in mind when you bought this book. It all starts with installing the software.

我们当前最为担心的是,我们恰好碰到了许多新手,包括那些热衷于学习编程的人经常失败的一个关键点,我们非常期待看到你的成功。此刻,你可能在想:“真的吗?我们才刚开始。”是的,这正是问题所在。在 Leo 主讲的热门 Coursera Java 编程课程 [1] 中,你能猜出大多数新学者选择离开的时刻吗?是否是课程最后那个挑战,即实时在全球地图上绘制地震标记的任务?不,并不是。其实是最初的热身作业,即学习者必须搭建他们的编程环境。因此,我们理解这可能对你来说是一大障碍。我们希望通过这一不那么含蓄的提示,帮助你实现购书时心中的每一个目标。一切都始于安装软件。

2.1.1 Overview of the software in your programming environment

2.1.1 编程环境软件概览

To set up and use Copilot easily, we’ll be installing the software editing tools used by novices and software engineers alike. The tools you will be using are GitHub, Copilot, Python, and Visual Studio Code. Of course, if you already have all these tools installed, jump to section “Our first programming problem” later in this chapter.

为了便于设置和使用 Copilot,我们将介绍初学者和软件工程师都会用到的软件编辑工具。这些工具包括 GitHub、Copilot、Python 以及 Visual Studio Code。当然,如果你已经安装了所有这些工具,那么请直接跳转到本章后面的“我们的第一个编程问题”部分。

GitHub Account

GitHub 账号

GitHub is an industry standard tool for developing, maintaining, and storing software. We won’t be using GitHub in this book, however. We’re signing up for GitHub simply because you’ll need an account to get access to Copilot.

GitHub 是用于开发、维护和存储软件的行业标准工具。然而,我们在本书中不会使用 GitHub。注册 GitHub 的唯一原因是你需要一个账户以便访问 Copilot。

Signing up for a GitHub account is free but, at the time of writing, they charge for Copilot. If you are a student, they will waive that fee. If you aren’t a student, as of writing, you can get a 30-day free trial.

虽然注册 GitHub 账户是免费的,但在撰写本文时,他们对使用 Copilot 是收取费用的。如果你是学生,可以免除这笔费用。如果你不是学生,根据目前的情况,你可以享受 30 天的免费试用。

You might ask why they charge for the service, and there’s a good answer. It’s expensive to build the GPT3 models (imagine thousands of computers running for a year to build the model) and there are costs they incur by providing predictions from the model (many machines are receiving your input, running it through the model, and generating your output). If you are not ready to commit to using Copilot, you could make a calendar note for roughly 25 days from the day you sign up and if you aren’t using Copilot at that time, just cancel. If, on the other hand, you have succeeded in learning how to write software with Copilot and are using it to improve your productivity at work or just as a hobby, keep it.

你可能会质疑为什么需要为这项服务支付费用,这有一个充分的理由。构建 GPT3 模型的成本极高(想象一下,需要成千上万台计算机运行一年时间来构建这个模型),并且他们在提供模型的预测服务时也会面临一定的成本(众多服务器接受你的输入,在模型中处理,并输出结果)。如果你对是否要长期使用 Copilot 还在犹豫,可以在注册后大约 25 天设一个日历提醒,如果到那时你还没有使用 Copilot,就可以选择取消订阅。反之,如果你已经利用 Copilot 成功地学会了编程,并且它正在提高你的工作效率或者成为了你的一项爱好,那么就继续使用它。

Python

Python

Really any programming language would have worked for this book, but we picked Python because it is one of the most popular programming languages in the world and is the language we teach in our introductory courses at our universities. As we said in Chapter 1, compared to other languages Python is easier to read, easier to understand, and easier to write. For this book, Copilot will primarily be generating the code, not you. However, you will want to be able to read and understand the code generated by Copilot and Python is great for that.

事实上,本书适合应用任何一种编程语言,但我们选择了 Python,因为它是全球最受欢迎的编程语言之一,并且是我们在大学基础课程中教授的语言。如第一章所述,与其他语言相比,Python 更加易于阅读、理解和书写。本书中,主要是由 Copilot 而非你来生成代码。不过,你需要能够阅读和理解 Copilot 生成的代码,Python 在这方面表现优异。

Visual Studio Code (VSCode)

Visual Studio Code(VS Code)

You can use any text editor to program. However, if you want a nice programming environment where you can write code, easily get suggestions from Copilot, and run your code, VSCode is our preferred tool. VSCode is used by novices learning software and is well liked by students [2]. It’s also used globally by professional software engineers, which means you’ll be able to work and learn while using this environment after finishing the book.

你可以使用任何文本编辑器进行编程。但如果你追求一个既能编写代码、轻松获得 Copilot 建议,又可以运行代码的良好编程环境,VS Code 是我们的首选工具。VS Code 不仅受到学习软件开发的新手欢迎,也非常受学生群体的青睐 [2]。它同样被世界各地的专业软件工程师所使用,这意味着在你完成本书的学习之后,可以继续使用这一环境进行工作和进一步的学习。

For VSCode to work for this book, you’ll need to install a few extensions that enable working with Python and using Copilot, but one of the great things about VSCode is that it makes it easy to install those extensions.

为了配合本书的使用,你需要在 VS Code 中安装几个扩展,这将使其支持 Python 编程和使用 Copilot,但值得一提的是,VS Code 的一个巨大优点在于它让安装这些扩展变得非常简单。

@cssmagic cssmagic changed the title [译] [201] 准备好你的电脑,继续深入学习 [译] [201] 为接下来的学习做好准备工作 Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant