宏定义编程软件_什么是计算机编程? 定义软件开发。

宏定义编程软件

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.

只需注意一件事:您可以使用“ Developer”和“ Programmer”一词来表示编写代码的人。

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

On Wikipedia, the definition of “Computer Programming” is:

在Wikipedia上,“计算机编程”的定义是:

“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视为计算机的大脑。 机器代码由一和零组成。 这称为二进制。

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

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

法语:卓悦

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”);

JavaScript: alert(“Hello”);

Python: print(“Hello”)

Python: print(“Hello”)

Perl: print "Hello";

Perl: 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 (超文本标记语言)是一种编程语言。 实际上,它是一种“ 声明性 ”语言,根据Wikipedia的说法,它是:

“...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.

有一些通常具有特色的基本元素。 这包括变量,循环,条件语句,数据结构和算法。 这些是大多数编程语言的基础。

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

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.

互联网上的编程语言总数似乎存在一些争议。 诸如Wikipedia之类的某些网站列出了大约700种“所有著名的”当前和历史编程语言。 诸如Tiobe之类的其他站点则跟踪和监视“最受欢迎”语言的250种。

On Github, the most popular programming language of 2019 was JavaScript:

在Github上 ,2019年最流行的编程语言是JavaScript:

为什么会有那么多编程语言? 编程语言如何演变? (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).

1950年代中期,创建FORTRAN(公式翻译)以解决复杂的数学,统计和科学问题。 COBOL(“面向公共业务的语言”)于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)的兴起。 如您在上表中所见,通用语言在前十大最受欢迎的语言中占主导地位。

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.

想到两个不会说相同语言的人可能会更容易,但是他们必须一起工作。 约翰说英语,克洛伊说法语。 克洛伊(Chloe)撰写了一系列有关如何用法语制作巧克力蛋奶酥的说明,但约翰听不懂。 他们需要一个会说英语和法语的翻译。 如果翻译人员可以在一起开始烹饪之前提前翻译Chloe的说明,就会更容易。

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.

回到我对克洛伊和约翰的类比。 约翰写下了关于如何制作牧羊人派的一系列说明。 译者不会预先翻译约翰的指示,而是会加入他们的烹饪课程。 当克洛伊(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.

您应该选择首先学习的编程语言取决于许多因素。 例如,我想成为一名Web开发人员,所以我选择JavaScript作为主要编程语言。 您可以学习的其他Web语言是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:

最大的问题是:您可以在机器中复制人类的智能吗? 您能模仿人类学习,推理和感知的方式吗? 艾伦·图灵(Alan Turing)在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程序在围棋比赛中击败职业选手时成为头条新闻。 对于AI来说,这是一个巨大的里程碑。

什么是机器学习? (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提供您的计算机数据和示例,从而可以像婴儿和幼儿一样自行学习。 代替开发人员向计算机提供指令,计算机将创建自己的一组指令以供遵循-机器学习算法。 机器学习算法是机器学习的一个子集,即“深度学习”的概念。

“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公司首席执行官Sundar Pichai的话总结了AI和ML的重要性。

计算机编程的未来是什么? (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.

人工智能将彻底改变我们社会的方方面面,而不仅仅是编程和软件开发。 例如,我们已经在AI和自动驾驶汽车领域取得了长足的进步。

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.

特斯拉 (Telon)是全球开发自动驾驶汽车的领先公司之一,该公司由马斯克(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.

如果您打算成为一名开发人员,请立即开始。 这是一个令人兴奋的时刻! 在线上有许多学习编码的资源。 有一些自定进度的平台,如freeCodeCamp 。 劳伦斯·布拉德福德(Laurence Bradford)也有一篇很棒的文章 ,汇集了所有最好的资源来免费学习编码。 做一些研究,找出哪种资源适合您的学习风格。

If you have any questions or just want to say hello, find me on Twitter @PhoebeVF.

如果您有任何疑问或想打个招呼,请在Twitter @PhoebeVF上找到我。

A special thanks to Katerina Limpitsouni from Undraw for creating the illustrations for this article.

特别感谢卡捷琳娜Limpitsouni从拉开了本文创建插图。

翻译自: https://www.freecodecamp.org/news/what-is-computer-programming-defining-software-development/

宏定义编程软件

你可能感兴趣的:(编程语言,算法,人工智能,大数据,python)