【编程实践】什么是计算机编程?定义软件开发。What is Computer Programming? Defining Software Development.

目录

什么是计算机编程?定义软件开发。What is Computer Programming? Defining Software Development.

What is Computer Programming? 什么是计算机编程?

Programming how to make a cup of tea编程如何泡一杯茶

How does your computer understand your code?您的计算机如何理解您的代码?

What exactly is a programming language?究竟什么是编程语言?

How do you know if a programming language is a programming language?你怎么知道一种编程语言是不是一种编程语言?

What are the fundamentals of a programming language?编程语言的基础是什么?

What is a 'for loop'? 什么是“for 循环”?

What is a conditional statement? 什么是条件语句?

What are data structures? 什么是数据结构?

What is an algorithm? 什么是算法?

What are the main programming languages used today? How many are there?今天使用的主要编程语言是什么?那里有多少?

Why are there so many programming languages? How have programming languages evolved?为什么有这么多编程语言?编程语言是如何演变的?

Compiled vs. interpreted programming languages编译型与解释型编程语言

What is a compiled language? 什么是编译语言?

What is an interpreted language? 什么是解释型语言?

Which programming language(s) should I choose to learn?我应该选择学习哪种编程语言?

What is software? 什么是软件?

What is software development? 什么是软件开发?

Current trends in Software Development and Computer Programming软件开发和计算机编程的当前趋势

Artificial Intelligence and Machine Learning人工智能和机器学习

What is Artificial intelligence? 什么是人工智能?

What is Machine Learning? 什么是机器学习?

What is the future of computer programming?计算机编程的未来是什么?

Final words 最后的话


什么是计算机编程?定义软件开发。What is Computer Programming? Defining Software Development.

Phoebe Voong-Fadel   菲比·冯-法德尔

My five year old son, Ramy, approached me one day while I was working from home and asked, “What are you doing Mama?”
有一天,当我在家工作时,我五岁的儿子拉米走近我问:“妈妈,你在做什么?”

“I’m working,” I replied.  “我在工作,”我回答。

He looked at my laptop screen and inquired again: “But what are you doing?”
他看着我的笔记本电脑屏幕,再次问道:“但是你在做什么?”

I paused and started to think about this. I’m a web developer and I’m programming in JavaScript. How do I explain this to a five year old?
我停下来开始思考这个问题。我是一名 Web 开发人员,我正在使用 JavaScript 进行编程。我该如何向一个五岁的孩子解释这件事?

“I write instructions for the computer and the computer does what I tell it to do. This is called programming,” I explained. Ramy looked puzzled.
“我为计算机编写指令,计算机按照我的指令去做。这叫做编程,”我解释道。拉米一脸疑惑。

I continued, “For example, I can give the computer instructions to add two numbers and it will give me the answer.” I wrote a function which added 2 + 2 and showed him the answer on my screen. His eyes lit up.
我继续说道,“例如,我可以给计算机指令将两个数字相加,它会给我答案。”我编写了一个函数,将 2 + 2 相加,并在我的屏幕上向他展示了答案。他的眼睛亮了起来。

From that point, I started to think what is programming? What actually happens under the hood? When I first started to learn to code in 2017 on freeCodeCamp, I used the inbuilt code editor on the website and would see the results. However, I didn’t really understand the magic that was going on behind the scenes.
从那时起,我开始思考什么是编程?幕后究竟发生了什么?当我 2017 年第一次开始在 freeCodeCamp 上学习编码时,我使用了网站上的内置代码编辑器,并会看到结果。然而,我并没有真正理解幕后发生的魔法。

I started doing some research and these were some of the terms I searched for: “What is computer programming? What is software?” There are over 600 million search results on Google for “What is Computer Programming?” It's a bit like going down a rabbit hole – it can be complicated and overwhelming.
我开始做一些研究,这些是我搜索的一些术语:“什么是计算机编程?软件是什么?” “什么是计算机编程?”在 Google 上有超过 6 亿个搜索结果。这有点像掉进兔子洞——它可能会很复杂而且让人不知所措。

I wanted to put together a comprehensive introduction to what computer programming and software development is for beginners. I will start with computer programming and then cover computer programming languages. Then I’ll talk about software and software development. Finally, I’ll move onto the current trends and the future of computer programming.
我想为初学者综合介绍什么是计算机编程和软件开发。我将从计算机编程开始,然后介绍计算机编程语言。然后我会讲软件和软件开发。最后,我将谈谈计算机编程的当前趋势和未来。

If you’re thinking about transitioning into the world of programming or are just interested in learning to code, then this will provide you with a general overview, without (too much!) technical jargon.
如果您正在考虑过渡到编程世界或者只是对学习编码感兴趣,那么这将为您提供一个总体概述,没有(太多!)技术术语。

Just one thing to note: you can use the words “Developer” and “Programmer” to mean someone who writes code.
只需注意一件事:您可以使用“开发人员”和“程序员”这两个词来表示编写代码的人。

What is Computer Programming? 什么是计算机编程?

On Wikipedia, the definition of “Computer Programming” is:
在维基百科上,“计算机编程”的定义是:

“Computer programming is the process of designing and building an executable computer program to accomplish a specific computing result.”
“计算机编程是设计和构建可执行计算机程序以完成特定计算结果的过程。”

But what does that mean?  但是,这是什么意思?

A computer itself isn’t smart. Yes they’re powerful and have the potential to carry out tasks much faster than a human. But computers need a human to write instructions and tell them what to do.
计算机本身并不聪明。是的,它们很强大,并且有可能比人类更快地执行任务。但是计算机需要人来编写指令并告诉他们该做什么。

Therefore, programming is the process of writing those instructions. We use a programming language to do this. These instructions are translated to a readable format which a computer can understand. The instructions are then carried out by the computer.
因此,编程就是编写那些指令的过程。我们使用编程语言来做到这一点。这些指令被翻译成计算机可以理解的可读格式。这些指令随后由计算机执行。

Programming how to make a cup of tea
编程如何泡一杯茶

Let’s take making a cup of tea as an example. If you were to give instructions on how to make a cup of tea, it would look like the following:
让我们以泡茶为例。如果你要给出如何泡茶的说明,它看起来像下面这样:

  1. Boil some water 烧开一些水
  2. Pour hot water in a cup with a teabag
    将热水倒入装有茶包的杯子中
  3. Let the tea brew 让茶冲泡
  4. Remove the teabag 取出茶包
  5. Add milk and/or sugar (if desired)
    添加牛奶和/或糖(如果需要)

Simple, right?  简单吧?

What we take for granted is that communication with a human being is different than communicating with a computer. A human has prior knowledge and life experience – they may know where to find the tea. We assume they know that milk is stored in a fridge.
我们认为理所当然的是,与人的交流不同于与计算机的交流。一个人有先验知识和生活经验——他们可能知道在哪里可以找到茶。我们假设他们知道牛奶储存在冰箱里。

Humans also have intuition. If you can't find a cup you might then search the cupboards instead. There’s also reading people’s non verbal cues like body language.
人类也有直觉。如果你找不到杯子,你可以去橱柜里找。还有阅读人们的非语言暗示,如肢体语言。

When it comes to programming, you have to be very specific. Continuing with how to make a cup of tea, you might write instructions in pseudo-code like this:
说到编程,你必须非常具体。继续如何泡茶,你可以用如下伪代码编写指令:

  1. Go to the kitchen 去厨房
  2. Locate the kettle 找到水壶
  3. Open the lid of the kettle
    打开水壶的盖子
  4. Fill the kettle with water 把水壶装满水
  5. Turn the kettle on 打开水壶
  6. Wait for it to boil to 100 degrees Celsius
    等它沸腾到100摄氏度
  7. Find a cup  找一个杯子

And so forth. 等等。

What if instructions like the ones above are not enough? You may need to add some logic to account for all scenarios. For example: 2) Locate the kettle. Well, is it an electric kettle or is it a kettle you put on a hob? You’ll need to add a condition that if it is an electric kettle, then do xyz. Otherwise, do xyz for a kettle that you put on a hob.
如果上述说明还不够怎么办?您可能需要添加一些逻辑来说明所有情况。例如: 2) 找到水壶。那么,它是电水壶还是放在炉灶上的水壶?您需要添加一个条件,如果它是电热水壶,则执行 xyz。否则,请为放在炉灶上的水壶做 xyz。

Even when you think that you’ve accounted for every possible condition and given very specific instructions, there are things that you may not foresee. You start making your cup of tea and something goes wrong. Oh no! Your kettle stops working after you start boiling it.
即使您认为您已经考虑了所有可能的情况并给出了非常具体的指示,但仍有一些事情是您无法预见的。你开始泡茶,但出了点问题。不好了!开始煮沸后,水壶停止工作。

What happened? There’s a bug in your code! A bug is an error or flaw in your code which might lead to unexpected results. In order to fix your code, you go through a process of “debugging”, which is where you find the problems in your code and resolve the issues.
发生了什么?您的代码中存在错误!错误是代码中的错误或缺陷,可能会导致意外结果。为了修复你的代码,你要经历一个“调试”的过程,这是你发现代码中的问题并解决问题的地方。

In this case, your instructions didn’t include filling up your kettle to 0.8 litres to cover the heating element. So the kettle switches off as a safety measure.
在这种情况下,您的说明不包括将水壶加满至 0.8 升以覆盖加热元件。因此,作为安全措施,水壶会关闭。

To prevent errors from happening after you run your program, developers carry out testing and unit-testing on their programs. Unit-testing is where you write tests for parts of your code. The tests either fail or pass.
为了防止在您运行程序后发生错误,开发人员对他们的程序进行测试和单元测试。单元测试是为部分代码编写测试的地方。测试要么失败要么通过。

For example, you write a function which adds two numbers: 1 + 1. You then write a unit test where the expected output is 2. All answers will fail unless it's 2.
例如,您编写了一个将两个数字相加的函数:1 + 1。然后您编写了一个单元测试,其中预期输出为 2。所有答案都将失败,除非它是 2。

You go through your code until everything runs without any unexpected problems. Programming is therefore a detailed oriented and iterative process where you are continuously improving what you have previously written.
你检查你的代码,直到一切运行没有任何意外问题。因此,编程是一个面向细节的迭代过程,您可以在其中不断改进以前编写的内容。

How does your computer understand your code?
您的计算机如何理解您的代码?

What most programmers write as “code” is a high level programming language. It is abstract by design. Abstraction in this context means that we are moving further away from machine code and programming languages are closer to spoken languages.
大多数程序员编写的“代码”是一种高级编程语言。它在设计上是抽象的。在这种情况下,抽象意味着我们正在远离机器代码,而编程语言更接近于口头语言。

But a computer can’t understand text based code. It needs to be compiled (translated) into machine code. Machine code is a set of instructions which can be understood by a computer’s central processing unit (CPU). Think of the CPU as the brain of a computer. Machine code is made up of ones and zeros. This is called binary.
但是计算机无法理解基于文本的代码。它需要被编译(翻译)成机器码。机器代码是计算机中央处理器 (CPU) 可以理解的一组指令。将 CPU 视为计算机的大脑。机器代码由 1 和 0 组成。这称为二进制。

For example, this is how you would write “Hello World” in binary:
例如,这就是用二进制编写“Hello World”的方式:

01001000 01100101 01101100 01101100 01101111 00100000 01010111 01101111 01110010 01101100 01100100

As you can see, binary is not easily readable for humans, so we tend to avoid programming in machine code!
如您所见,二进制对于人类来说不容易阅读,因此我们倾向于避免使用机器代码进行编程!

What exactly is a programming language?
究竟什么是编程语言?

Programming languages fall both within the spectrum of low-level languages, such as assembly, and high level programming languages, such as JavaScript.
编程语言既属于低级语言(例如汇编),也属于高级编程语言(例如 JavaScript)。

But what is a programming language exactly? The best analogy I can think of are the spoken languages we use today. All languages express the same idea, but in different ways to another person:
但究竟什么是编程语言?我能想到的最好的类比是我们今天使用的口语。所有语言都表达相同的想法,但以不同的方式表达给另一个人:

English: Hello 英语:你好

French: Bonjour 法语:Bonjour

Spanish: Hola 西班牙语:Hola

Programming languages are different ways of expressing the same idea, but to a computer instead. The following will print out “Hello” in three different programming languages:
编程语言是表达相同想法的不同方式,但对计算机而言。下面将用三种不同的编程语言打印出“Hello”:

JavaScript: alert(“Hello”); 脚本: alert(“Hello”);

Python: print(“Hello”) 蟒蛇: print(“Hello”)

Perl: print "Hello"; 佩尔: print "Hello";

Each programming language has its own syntax. In English, we have grammar. The same applies to programming languages – they each have their own set of rules.
每种编程语言都有自己的语法。在英语中,我们有语法。这同样适用于编程语言——它们都有自己的一套规则。

How do you know if a programming language is a programming language?
你怎么知道一种编程语言是不是一种编程语言?

This might seem like an odd question to ask. Is all code written in a programming language? Technically, no. For example, there is a misconception that HTML (HyperText Markup Language) is a programming language. It is in fact a “declarative” language, which according to Wikipedia is:
这似乎是一个奇怪的问题。所有代码都是用编程语言编写的吗?从技术上讲,没有。例如,人们错误地认为 HTML(超文本标记语言)是一种编程语言。它实际上是一种“声明性”语言,根据维基百科,它是:

“...a style of building the structure and elements of computer programs - that expresses the logic of computation without describing its control flow.”
“......一种构建计算机程序结构和元素的风格 - 表达计算逻辑而不描述其控制流。”

In other words, HTML provides the structure of a web page, but doesn’t control how the website behaves or functions.
换句话说,HTML 提供网页的结构,但不控制网站的行为或功能。

You can determine if a language is a programming language by whether it’s “Turing complete”. The Turing Machine is a hypothetical machine described by Alan Turing in 1936. For a programming language to be Turing complete it needs:
您可以通过它是否“图灵完备”来确定一种语言是否是一种编程语言。图灵机是 Alan Turing 在 1936 年描述的一种假想机器。对于图灵完备的编程语言,它需要:

  1. Conditional branching (which I explore below).
    条件分支(我在下面探讨)。
  2. The ability to read and write to an infinite paper tape. This essentially means being able to store data in memory.
    读写无限纸带的能力。这本质上意味着能够将数据存储在内存中。

I’m not going to explore this topic deeply, but if you are interested this video is a helpful introduction.
我不打算深入探讨这个话题,但如果您有兴趣,这个视频是一个很有帮助的介绍。

What are the fundamentals of a programming language?
编程语言的基础是什么?

There are some basic elements which are commonly featured. This includes variables, loops, conditional statements, data structures and algorithms. These are the building blocks of most programming languages.
有一些基本元素是共同的特征。这包括变量、循环、条件语句、数据结构和算法。这些是大多数编程语言的构建块。

What is a 'for loop'? 什么是“for 循环”?

For loops are useful if you have to execute a set of instructions repeatedly. For example, you have afternoon tea and have to make five cups of tea for your guests. In order to make one cup of tea, you have to follow a set of instructions, like my earlier example.
如果必须重复执行一组指令,for 循环很有用。比如你有下午茶,要给客人泡五杯茶。为了冲泡一杯茶,您必须遵循一组说明,就像我之前的例子一样。

Instead of writing the instructions five times, you can tell the computer to loop through the same instructions five times. This enables you to scale.
您可以告诉计算机将相同的指令循环执行五次,而不是将指令写五次。这使您能够扩展。

Below is an example of a basic for loop:
下面是一个基本的 for 循环的例子:

for (let i = 0; i < 5; i++) {
  console.log("Make Tea!");
}

//expected output: 
"Make Tea!"
"Make Tea!"
"Make Tea!"
"Make Tea!"
"Make Tea!"

What is a conditional statement? 什么是条件语句?

In JavaScript we have if...else conditional statements. These are used when you want to execute different actions based on a condition.
在 JavaScript 中,我们有 if...else 条件语句。当您想根据条件执行不同的操作时,将使用这些。

Going back to my earlier example, you ask the user if they want milk in their tea. If they do want milk, then add milk to tea, else do nothing.
回到我之前的例子,你问用户他们是否想在茶里加牛奶。如果他们真的想要牛奶,那就在茶里加牛奶,否则什么都不做。

Here is an example of an if...else statement in JavaScript:
以下是 JavaScript 中 if...else 语句的示例:

if(milk == true) {
  // add milk
  } else {
  // don't add milk
}

What are data structures? 什么是数据结构?

“A data structure is a way of organizing data so that it can be used effectively...They are essential ingredients in creating fast and powerful algorithms.”
“数据结构是一种组织数据的方式,以便可以有效地使用它……它们是创建快速而强大的算法的基本要素。”

(Data Structures Easy to Advanced Course, William Fiset)
(数据结构简单到高级课程,William Fiset)

Common data structures that you can find across many programming languages are arrays, objects, tuples, and unions. I’ll take arrays as an example.
您可以在许多编程语言中找到的常见数据结构是数组、对象、元组和联合。我将以数组为例。

In JavaScript, an array can store a range of data such as numbers and strings (text). I love biscuits with my tea so I’m going to store them in my array:
在 JavaScript 中,数组可以存储一系列数据,例如数字和字符串(文本)。我喜欢在茶里放饼干,所以我要将它们存储在我的数组中:

biscuits = [“shortbread”, “digestive”, “ginger nut”];

These biscuits are stored in the computer’s memory and you, as a developer, can access a specific biscuit by referencing its index. You start counting the index from 0. The index is like the biscuit’s position in a biscuit tin. You reference it by using the square bracket notation.
这些饼干存储在计算机的内存中,作为开发人员,您可以通过引用其索引来访问特定的饼干。您从 0 开始计算索引。索引就像饼干在饼干罐中的位置。您可以使用方括号表示法引用它。

biscuits[0]; // “shortbread”
biscuits[1]; // “digestive”
biscuits[2]; // “ginger nut”

If you want to get a digestive biscuit, you can access its index position: biscuits[1]. I can easily find it because I know where it’s stored.
如果你想获得消化饼干,你可以访问它的索引位置: biscuits[1] 。我可以很容易地找到它,因为我知道它存放在哪里。

Remember that the first item of the array is index 0. So when you refer to index 1, it’s actually the second item of the array.
请记住,数组的第一项是索引 0。因此,当您引用索引 1 时,它实际上是数组的第二项。

Therefore, data structures are a way to manage data. This includes storing and retrieving data. It’s more efficient to execute algorithms if data is organised in a data structure.
因此,数据结构是一种管理数据的方式。这包括存储和检索数据。如果数据以数据结构组织,则执行算法的效率会更高。

What is an algorithm? 什么是算法?

An algorithm is a specific set of instructions that solves a problem. It’s an abstract concept. Here’s a link to a short video from TED on "What is an Algorithm?".
算法是解决问题的一组特定指令。这是一个抽象的概念。这是 TED 关于“什么是算法?”的短视频的链接。

Remember when we were writing instructions on how to make a cup of tea earlier? That is essentially an algorithm: a set of sequential instructions.
还记得我们之前写过如何泡茶的说明吗?这本质上是一种算法:一组顺序指令。

When I wrote my first function in JavaScript, I actually created my first algorithm without knowing it was an algorithm! A function is an implementation of an algorithm.
当我用 JavaScript 编写我的第一个函数时,我实际上在不知道它是算法的情况下创建了我的第一个算法!函数是算法的实现。

Just like in real life, there are often multiple solutions for a coding problem. For example, say you’re planning on going to a cafe that you’ve never been to before. There are several ways of getting to your destination. Some routes take longer than others, but ultimately, they all get you to the same place. Ideally you want to pick the quickest, most efficient, and easiest route.
就像在现实生活中一样,一个编码问题通常有多种解决方案。例如,假设您打算去一家您以前从未去过的咖啡馆。有几种方法可以到达目的地。有些路线比其他路线花费的时间更长,但最终,它们都会让您到达同一个地方。理想情况下,您希望选择最快、最有效和最简单的路线。

The same principle can be applied to programming. There are usually a few ways to solve a coding problem, and programmers strive to find the most elegant and efficient solution.
同样的原则可以应用到编程中。通常有几种方法可以解决编码问题,程序员会努力寻找最优雅、最有效的解决方案。

Developers often don’t get it right on the first try! Just as I would write a first draft for an article, it’s the same for coding. I would redraft an article several times, where I may change the structure, edit, rewrite sections, and cut out unnecessary sentences. In programming we go through a similar process, and we call this refactoring our code.
开发人员通常不会在第一次尝试时就做对!就像我为文章写初稿一样,编码也是如此。我会多次重写一篇文章,我可能会更改结构、编辑、重写部分,并删除不必要的句子。在编程中,我们经历了类似的过程,我们称之为重构我们的代码。

What are the main programming languages used today? How many are there?
今天使用的主要编程语言是什么?那里有多少?

There seems to be some debate on the total number of programming languages on the internet. Some websites such as Wikipedia list approximately 700 of “all notable” current and historical programming languages. Other sites such as Tiobe track and monitor 250 of the “most popular” languages.
关于互联网上编程语言的总数似乎存在一些争论。维基百科等一些网站列出了大约 700 种“所有著名的”当前和历史编程语言。 Tiobe 等其他网站跟踪和监控 250 种“最流行”的语言。

On Github, the most popular programming language of 2019 was JavaScript:
在 Github 上,2019 年最流行的编程语言是 JavaScript:

Source: Octoverse 2022: The state of open source | The State of the Octoverse 来源: Octoverse 2022: The state of open source | The State of the Octoverse

Why are there so many programming languages? How have programming languages evolved?
为什么有这么多编程语言?编程语言是如何演变的?

Different programming languages are developed to satisfy different needs. This is demonstrated throughout the history of programming languages. Please refer to this diagram by O’Reilly which maps out the history of programming languages from the 1950s to 2004.
开发了不同的编程语言来满足不同的需求。这在整个编程语言的历史中得到了证明。请参考 O'Reilly 的这张图表,它描绘了从 1950 年代到 2004 年的编程语言的历史。

In the mid 1950s, FORTRAN (Formula Translation) was created to work out complex mathematical, statistical, and scientific problems. COBOL (“Common Business Oriented Language”) was created in 1959 to make it easier for businesses to use code. There are some languages which are more suited for doing statistical analysis such as R (1976).
在 20 世纪 50 年代中期,创建了 FORTRAN(公式翻译)来解决复杂的数学、统计和科学问题。 COBOL(“Common Business Oriented Language”)创建于 1959 年,旨在让企业更轻松地使用代码。有一些语言更适合做统计分析,例如 R (1976)。

There was the rise of general purpose programming languages from the 1970s onwards, such as C, C++, C# and Java. As you can see in the chart above, general purpose languages dominate the top 10 most popular languages.
从 1970 年代开始,通用编程语言兴起,例如 C、C++、C# 和 Java。正如您在上表中看到的,通用语言在前 10 种最流行的语言中占据主导地位。

JavaScript, created in 1995, is a popular language for the web. It gives websites their interactivity and life.
JavaScript 创建于 1995 年,是一种流行的网络语言。它赋予网站交互性和生命力。

More recently, we’ve seen the birth of new languages such as Go from Google, which was intended to maintain large software systems more efficiently. We'll probably see even more programming languages created in the future.
最近,我们看到了新语言的诞生,例如来自 Google 的 Go,它旨在更有效地维护大型软件系统。未来我们可能会看到更多的编程语言被创造出来。

Compiled vs. interpreted programming languages
编译型与解释型编程语言

As you start to become more familiar with programming languages, you will come across compiled and interpreted programming languages. What is the difference?
随着您开始更加熟悉编程语言,您将遇到编译型和解释型编程语言。有什么不同?

What is a compiled language? 什么是编译语言?

Programming languages such as C, C++, and Java have a “build” process where your code is compiled down to a more readable format (machine language) for the computer.
C、C++ 和 Java 等编程语言有一个“构建”过程,在该过程中,您的代码被编译为计算机更易读的格式(机器语言)。

It might be easier to think of two people who don’t speak the same language, but they have to work together. John speaks English and Chloe speaks French. Chloe writes a set of instructions on how to make a chocolate soufflé in French, but John can’t understand it. They need a translator that can speak both English and French. It’s easier if the translator can translate Chloe’s instructions in advance before they start cooking together.
两个不同语言的人可能更容易想到,但他们必须一起工作。约翰说英语,克洛伊说法语。克洛伊用法语写了一套关于如何制作巧克力蛋奶酥的说明,但约翰看不懂。他们需要一位会说英语和法语的翻译。如果翻译能在他们开始一起做饭之前提前翻译克洛伊的说明,那就更容易了。

Instead, developers “speak” a programming language like Java or Python. They need their code to be compiled (translated) to machine language before a program can run so the computer can understand it.
相反,开发人员“说”一种编程语言,如 Java 或 Python。在程序运行之前,他们需要将代码编译(翻译)为机器语言,以便计算机能够理解它。

Programs made from a compiled language are easier for a computer to understand, and therefore run very quickly.
由编译语言编写的程序更容易被计算机理解,因此运行速度非常快。

What is an interpreted language? 什么是解释型语言?

JavaScript, PHP, and Python are examples of interpreted programming languages. There’s no build process and the code doesn’t need to be compiled. Your code is being interpreted or read line by line as you run the program.
JavaScript、PHP 和 Python 是解释型编程语言的示例。没有构建过程,代码也不需要编译。当您运行程序时,您的代码正在逐行解释或阅读。

Back to my analogy of Chloe and John. John writes down a set of instructions on how to make a shepherds pie. The translator doesn’t translate John’s instructions in advance, but instead joins them for their cooking session. The translator translates each line of John’s instructions from English to French as Chloe cooks. Because of this, it takes longer for Chloe to prepare and cook the meal.
回到我对克洛伊和约翰的类比。约翰写下了一套关于如何制作牧羊人馅饼的说明。翻译人员没有提前翻译 John 的说明,而是加入了他们的烹饪环节。克洛伊 (Chloe) 做饭时,翻译人员将约翰的每一行说明从英语翻译成法语。因此,Chloe 需要更长的时间来准备和做饭。

Therefore, interpreted languages are slower than compiled languages. They have to be translated on the fly so the computer can understand.
因此,解释型语言比编译型语言慢。它们必须即时翻译,以便计算机能够理解。

But with just-in-time (JIT) compilers, interpreted languages are becoming faster and more efficient.
但是有了即时 (JIT) 编译器,解释型语言变得更快、更高效。

Which programming language(s) should I choose to learn?
我应该选择学习哪种编程语言?

Programming languages pretty much do the same thing, but they are just different ways of expressing the same instructions to a computer. Once you've grasped the concepts and fundamentals of one programming language, the learning curve for learning another language won't be as steep.
编程语言几乎做同样的事情,但它们只是向计算机表达相同指令的不同方式。一旦掌握了一种编程语言的概念和基础知识,学习另一种语言的学习曲线就不会那么陡峭。

The programming language you should choose to learn first depends on a number of factors. For example, I wanted to be a web developer, so I chose JavaScript as my primary programming language. Other languages for the web you can learn are PHP and Ruby on Rails.
您应该首先选择学习哪种编程语言取决于许多因素。例如,我想成为一名网络开发人员,所以我选择了 JavaScript 作为我的主要编程语言。您可以学习的其他网络语言是 PHP 和 Ruby on Rails。

If you want to become a data scientist, then Python might be an option. Python is considered one of the best data science tools to analyze big data. I mentioned R earlier, which is another language used widely amongst data scientists and statisticians.
如果你想成为一名数据科学家,那么 Python 可能是一个选择。 Python 被认为是分析大数据的最佳数据科学工具之一。我之前提到过 R,这是数据科学家和统计学家广泛使用的另一种语言。

Python is a general purpose programming language, and is also useful to learn if you want to get into the field of Machine Learning and Artificial Intelligence.
Python 是一种通用编程语言,如果您想进入机器学习和人工智能领域,学习它也很有用。

If you want to become a Software Engineer then Java could be an option. Java is one of the most popular and in demand languages in the world. It's a versatile language which can be used for developing small to large enterprise software.
如果您想成为一名软件工程师,那么 Java 可能是一个选择。 Java 是世界上最受欢迎和需求量最大的语言之一。它是一种通用语言,可用于开发小型到大型企业软件。

So think about what role in tech you would like and what kind of companies you want to work for.
因此,考虑一下您希望在技术领域扮演什么角色,以及您想为哪种公司工作。

Choosing a programming language also depends on what software you’re trying to build. This leads us nicely to our next section.
选择编程语言还取决于您要构建的软件。这很好地引导我们进入下一节。

What is software? 什么是软件?

How many times do you interact with software on a given day?
您一天与软件交互了多少次?

Software is everywhere. It’s integrated as embedded systems into everyday devices such as your microwave, washing machines, cars, TVs, children’s toys, and remote controls. Then there’s more obvious computer related devices which have application and/or system software such as tablets, smart phones, laptops, desktop computers, and home assistants like Alexa.
软件无处不在。它作为嵌入式系统集成到日常设备中,例如您的微波炉、洗衣机、汽车、电视、儿童玩具和遥控器。然后是更明显的具有应用程序和/或系统软件的计算机相关设备,例如平板电脑、智能手机、笔记本电脑、台式电脑和家庭助理,如 Alexa。

The average person probably interacts with software a few dozen times a day, if not more. It is part of our daily life.
一般人每天可能与软件交互几十次,甚至更多。这是我们日常生活的一部分。

All software is programmed by a developer. Software is agile by nature and can constantly iterate. Software and hardware are intertwined. Imagine your phone without its apps and operating system. The phone would essentially be an expensive brick! Therefore, software gives hardware life and hardware is how we interact with software.
所有软件均由开发人员编程。软件本质上是敏捷的,可以不断迭代。软件和硬件是交织在一起的。想象一下您的手机没有应用程序和操作系统。电话本质上是一块昂贵的砖头!因此,软件赋予硬件生命,硬件是我们与软件交互的方式。

The majority of software that’s created by programmers is written in a high level programming language.
程序员创建的大多数软件都是用高级编程语言编写的。

What is software development? 什么是软件开发?

Software development is everything from the conception of an idea to development and deployment. This process, from conceiving an idea to deploying software, is also known as the software life cycle.
软件开发是从一个想法的概念到开发和部署的一切。这个从构思一个想法到部署软件的过程也被称为软件生命周期。

There are several stages of the software life cycle: discovery, design, programming/creation, testing, and deployment/execution. It also includes everything else in the software development ecosystem such as maintenance, documentation, and bug fixes.
软件生命周期有几个阶段:发现、设计、编程/创建、测试和部署/执行。它还包括软件开发生态系统中的所有其他内容,例如维护、文档和错误修复。

I won't go into detail here, as the subject of software development warrants its own article.
我不会在这里详细介绍,因为软件开发的主题需要单独的文章。

Current trends in Software Development and Computer Programming
软件开发和计算机编程的当前趋势

Artificial Intelligence and Machine Learning
人工智能和机器学习

In recent years you’ve probably heard of terms like artificial intelligence and machine learning. Sometimes they’re used interchangeably, but are they the same?
近年来,您可能听说过人工智能和机器学习等术语。有时它们可​​以互换使用,但它们是一样的吗?

No, they’re not quite the same thing. Machine learning is where a machine learns through experience. Whereas artificial intelligence is a broader idea that machines can execute tasks intelligently. Machine learning is a subset of Artificial Intelligence.
不,它们不是一回事。机器学习是机器通过经验学习的地方。而人工智能是一个更广泛的概念,即机器可以智能地执行任务。机器学习是人工智能的一个子集。

What is Artificial intelligence? 什么是人工智能?

I’ve covered how programming languages work – the programmer writes a set of instructions for the computer to execute. Artificial Intelligence (AI) is a broader concept where computers can mimic the way a brain functions. It’s training a machine to “think” like a human.
我已经介绍了编程语言的工作原理——程序员编写一组指令供计算机执行。人工智能 (AI) 是一个更广泛的概念,计算机可以模仿大脑的运作方式。它正在训练机器像人一样“思考”。

The big question is: can you replicate human intelligence in a machine? Can you mimic the way a human learns, reasons, and perceives? Alan Turing asked this question in his article in 1950:
最大的问题是:你能在机器中复制人类智能吗?你能模仿人类学习、推理和感知的方式吗?艾伦图灵在他 1950 年的文章中提出了这个问题:

“Can machines think?” “机器会思考吗?”

(Computing Machinery and Intelligence, 1950 by Alan Turing)
(计算机器与智能,1950 年艾伦图灵)

In Turing’s article he proposed the “Turing test” in which a machine would be classed as “intelligent” if a person could not tell the difference between the responses of a human and the artificially intelligent machine.
在图灵的文章中,他提出了“图灵测试”,如果一个人无法分辨人类和人工智能机器的反应之间的差异,那么机器将被归类为“智能”机器。

After 70 years, AI developers, academics, scientists and researchers are still trying to answer this question and create an artificially intelligent machine. I don’t think we’re there yet. Have you tried having a conversation with Siri or Alexa? Conversations with these two devices are still basic. However, I’m sure it’s just a matter of time before the technology improves.
70 年后,AI 开发人员、学术界、科学家和研究人员仍在努力回答这个问题并创造人工智能机器。我认为我们还没有。您是否尝试过与 Siri 或 Alexa 对话?与这两种设备的对话仍然是基本的。但是,我确信技术改进只是时间问题。

Companies like DeepMind are researching this concept and whether machines are capable of intelligence. DeepMind’s AlphaGo program made the headlines when it beat a professional player at Go. This was a huge milestone for AI.
DeepMind 等公司正在研究这个概念以及机器是否具有智能能力。 DeepMind 的 AlphaGo 程序在击败职业围棋棋手后成为头条新闻。这对人工智能来说是一个巨大的里程碑。

What is Machine Learning? 什么是机器学习?

Machine learning (ML) is a subset of artificial intelligence. ML is a different way of programming. It is the idea that the computer has the ability to learn without being explicitly programmed. Arthur Samuel first came up with the idea of machine learning in his paper in 1959:
机器学习 (ML) 是人工智能的一个子集。 ML 是一种不同的编程方式。它的想法是计算机具有学习能力而无需明确编程。 Arthur Samuel 在 1959 年的论文中首次提出了机器学习的想法:

“Programming computers to learn from experience should eventually eliminate the need for much of this detailed programming effort.”
“对计算机进行编程以从经验中学习应该最终消除对这种详细编程工作的大部分需求。”

When I was teaching my son how to recognize a cat, I would show him pictures of cats. I did this repeatedly until he was able to recognize a cat without me prompting him.
我教儿子认猫的时候,会给他看猫的照片。我反复这样做,直到他能够在我不提示的情况下认出一只猫。

Machine learning is similar to this. You give your computer a hundred images (input) of cats. It then learns the patterns in the data and builds a classification system through repetition. If you give your computer more images of cats and other animals, it should be able to identify whether the animal in the picture is a cat or not a cat. It has essentially learned what a cat should look like.
机器学习与此类似。你给你的计算机一百张猫的图像(输入)。然后它学习数据中的模式并通过重复建立分类系统。如果你给你的计算机更多的猫和其他动物的图片,它应该能够识别图片中的动物是猫还是不是猫。它基本上已经学会了猫应该是什么样子。

ML is giving your computer data and examples, and in turn, it’s able to learn for itself like babies and young children do. Instead of developers giving the instructions to a computer, the computer creates its own set of instructions to follow – machine learning algorithms. Machine learning algorithms is a subset of ML, a concept known as “Deep learning”.
ML 为您的计算机提供数据和示例,反过来,它能够像婴儿和幼儿一样进行自我学习。不是开发人员向计算机发出指令,而是计算机创建自己的一组指令来遵循——机器学习算法。机器学习算法是 ML 的一个子集,ML 是一个被称为“深度学习”的概念。

“AI is one of the most profound things we’re working on as humanity. It’s more profound than fire or electricity...”
“人工智能是我们作为人类正在努力的最深刻的事物之一。它比火或电更深奥……”

(Sundar Pichai, World Economic Forum, January 2020)
(Sundar Pichai,世界经济论坛,2020 年 1 月)

The quote from Sundar Pichai, the CEO of Alphabet Inc, summaries the importance of AI and ML.
Alphabet Inc 首席执行官 Sundar Pichai 的话总结了人工智能和机器学习的重要性。

What is the future of computer programming?
计算机编程的未来是什么?

This final section will be my predictions on the future of computer programming.
最后一部分将是我对计算机编程未来的预测。

Developers will continue to create new programming languages. Programming languages will become more abstract and, therefore, accessible to individuals learning to code.
开发人员将继续创建新的编程语言。编程语言将变得更加抽象,因此学习编码的个人也可以使用。

I believe there will be greater importance placed on coding and programming education in primary and secondary school curricula. The demand for developers and programmers will only increase as technology and software becomes ever more integrated in our daily lives. Programming will become ubiquitous.
我相信在中小学课程中将更加重视编码和编程教育。随着技术和软件越来越融入我们的日常生活,对开发人员和程序员的需求只会增加。编程将变得无处不在。

We will see the continual rise and popularity of ML and AI to assist developers in the software development process. This includes automating testing, along with detecting and preventing vulnerabilities and bugs.
我们将看到 ML 和 AI 在软件开发过程中协助开发人员的持续兴起和普及。这包括自动化测试,以及检测和预防漏洞和错误。

AI will revolutionize all aspects of our society, not just in programming and software development. For example, we’ve seen great strides in the area of AI and self driving cars.
人工智能将彻底改变我们社会的方方面面,而不仅仅是编程和软件开发。例如,我们在人工智能和自动驾驶汽车领域看到了长足的进步。

One of the world’s leading companies developing self driving cars is Tesla, founded by Elon Musk. With the supervision of a human driver, a Tesla car can now automatically change lanes, navigate autonomously on limited access freeways, and the owner can summon the car to and from a garage or parking spot. Tesla's goal is to create a fully automated, self driving car without any human supervision.
埃隆·马斯克 (Elon Musk) 创立的特斯拉是世界领先的自动驾驶汽车开发公司之一。在人类司机的监督下,特斯拉汽车现在可以自动变道,在限制通行的高速公路上自主导航,车主可以召唤汽车进出车库或停车位。特斯拉的目标是打造一款完全自动化的自动驾驶汽车,无需任何人工监督。

As machines become more intelligent, we may come to a point where machines surpass the intelligence of human beings. This is referred to as singularity. It may seem like complete science fiction at the moment! But notable figures such as Ray Kurzweil predict that machines with human level intelligence will be available within the next 20 years. Kurzweil is known for his accurate predictions of how technologies will progress. He wrote a book on this: The Age of Spiritual Machines.
随着机器变得越来越智能,我们可能会达到机器超越人类智能的地步。这被称为奇点。此刻看起来就像是完全的科幻小说!但 Ray Kurzweil 等著名人物预测,具有人类智能水平的机器将在未来 20 年内问世。 Kurzweil 以其对技术将如何发展的准确预测而闻名。他为此写了一本书:《精神机器时代》。

How will our society change as a result of super intelligent machines?
超级智能机器将如何改变我们的社会?

Final words 最后的话

Technology influences and code touches almost every part of our lives. From our choice of entertainment (online games, streaming) and how we shop, to choosing what we eat and even how we date! Code is important and more jobs will shift and require people to have at least some basic understanding of programming.
技术影响和代码几乎触及我们生活的方方面面。从我们选择的娱乐方式(在线游戏、流媒体)和购物方式,到选择吃什么甚至约会方式!代码很重要,更多的工作将会转移,并且要求人们至少对编程有一些基本的了解。

Yet there are only approximately 23.9 million developers in the world according to the Global Developer Population and Demographic study 2019. To put this in perspective, only 0.3% of the world’s population knows how to program. As I discussed earlier, our dependency on software and technology is increasing. According to the US Bureau of Labor statistics, the demand for software engineers is expected to grow by 21% from 2018 to 2028. Therefore, we need to increase the number of developers.
然而,根据 2019 年全球开发者人口和人口统计研究,世界上只有大约 2390 万开发者。从正确的角度来看,世界上只有 0.3% 的人口知道如何编程。正如我之前所讨论的,我们对软件和技术的依赖正在增加。根据美国劳工局的统计,2018 年到 2028 年软件工程师的需求量预计增长 21%。因此,我们需要增加开发人员的数量。

If you’re thinking about becoming a developer, start today. It is an incredibly exciting time to do so! There are many learn-to-code resources online. There are self-paced platforms like freeCodeCamp. There's also a great post by Laurence Bradford which compiles all the best resources to learn to code for free. Do some research and find out which resource suits your learning style.
如果您正在考虑成为一名开发人员,请从今天开始。这是一个令人难以置信的激动人心的时刻!

  • 5
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
在现有省、市港口信息化系统进行有效整合基础上,借鉴新 一代的感知-传输-应用技术体系,实现对码头、船舶、货物、重 大危险源、危险货物装卸过程、航管航运等管理要素的全面感知、 有效传输和按需定制服务,为行政管理人员和相关单位及人员提 供高效的管理辅助,并为公众提供便捷、实时的水运信息服务。 建立信息整合、交换和共享机制,建立健全信息化管理支撑 体系,以及相关标准规范和安全保障体系;按照“绿色循环低碳” 交通的要求,搭建高效、弹性、高可扩展性的基于虚拟技术的信 息基础设施,支撑信息平台低成本运行,实现电子政务建设和服务模式的转变。 实现以感知港口、感知船舶、感知货物为手段,以港航智能 分析、科学决策、高效服务为目的和核心理念,构建“智慧港口”的发展体系。 结合“智慧港口”相关业务工作特点及信息化现状的实际情况,本项目具体建设目标为: 一张图(即GIS 地理信息服务平台) 在建设岸线、港口、港区、码头、泊位等港口主要基础资源图层上,建设GIS 地理信息服务平台,在此基础上依次接入和叠加规划建设、经营、安全、航管等相关业务应用专题数据,并叠 加动态数据,如 AIS/GPS/移动平台数据,逐步建成航运管理处 "一张图"。系统支持扩展框架,方便未来更多应用资源的逐步整合。 现场执法监管系统 基于港口(航管)执法基地建设规划,依托统一的执法区域 管理和数字化监控平台,通过加强对辖区内的监控,结合移动平 台,形成完整的多维路径和信息追踪,真正做到问题能发现、事态能控制、突发问题能解决。 运行监测和辅助决策系统 对区域港口与航运业务日常所需填报及监测的数据经过科 学归纳及分析,采用统一平台,消除重复的填报数据,进行企业 输入和自动录入,并进行系统智能判断,避免填入错误的数据, 输入的数据经过智能组合,自动生成各业务部门所需的数据报 表,包括字段、格式,都可以根据需要进行定制,同时满足扩展 性需要,当有新的业务监测数据表需要产生时,系统将分析新的 需求,将所需字段融合进入日常监测和决策辅助平台的统一平台中,并生成新的所需业务数据监测及决策表。 综合指挥调度系统 建设以港航应急指挥中心为枢纽,以各级管理部门和经营港 口企业为节点,快速调度、信息共享的通信网络,满足应急处置中所需要的信息采集、指挥调度和过程监控等通信保障任务。 设计思路 根据项目的建设目标和“智慧港口”信息化平台的总体框架、 设计思路、建设内容及保障措施,围绕业务协同、信息共享,充 分考虑各航运(港政)管理处内部管理的需求,平台采用“全面 整合、重点补充、突出共享、逐步完善”策略,加强重点区域或 运输通道交通基础设施、运载装备、运行环境的监测监控,完善 运行协调、应急处置通信手段,促进跨区域、跨部门信息共享和业务协同。 以“统筹协调、综合监管”为目标,以提供综合、动态、实 时、准确、实用的安全畅通和应急数据共享为核心,围绕“保畅通、抓安全、促应急"等实际需求来建设智慧港口信息化平台。 系统充分整合和利用航运管理处现有相关信息资源,以地理 信息技术、网络视频技术、互联网技术、移动通信技术、云计算 技术为支撑,结合航运管理处专网与行业数据交换平台,构建航 运管理处与各部门之间智慧、畅通、安全、高效、绿色低碳的智 慧港口信息化平台。 系统充分考虑航运管理处安全法规及安全职责今后的变化 与发展趋势,应用目前主流的、成熟的应用技术,内联外引,优势互补,使系统建设具备良好的开放性、扩展性、可维护性。
提供的源码资源涵盖了安卓应用、小程序、Python应用和Java应用等多个领域,每个领域都包含了丰富的实例和项目。这些源码都是基于各自平台的最新技术和标准编写,确保了在对应环境下能够无缝运行。同时,源码中配备了详细的注释和文档,帮助用户快速理解代码结构和实现逻辑。 适用人群: 这些源码资源特别适合大学生群体。无论你是计算机相关专业的学生,还是对其他领域编程感兴趣的学生,这些资源都能为你提供宝贵的学习和实践机会。通过学习和运行这些源码,你可以掌握各平台开发的基础知识,提升编程能力和项目实战经验。 使用场景及目标: 在学习阶段,你可以利用这些源码资源进行课程实践、课外项目或毕业设计。通过分析和运行源码,你将深入了解各平台开发的技术细节和最佳实践,逐步培养起自己的项目开发和问题解决能力。此外,在求职或创业过程中,具备跨平台开发能力的大学生将更具竞争力。 其他说明: 为了确保源码资源的可运行性和易用性,特别注意了以下几点:首先,每份源码都提供了详细的运行环境和依赖说明,确保用户能够轻松搭建起开发环境;其次,源码中的注释和文档都非常完善,方便用户快速上手和理解代码;最后,我会定期更新这些源码资源,以适应各平台技术的最新发展和市场需求。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值