计算机编程是什么_什么是计算机编程?

计算机编程是什么

Programming is a creative process that instructs a computer on how to do a task. Hollywood has helped instill an image of programmers as uber techies who can sit down at a computer and break any password in seconds. The reality is far less interesting.

编程是一个创造性的过程,可以指导计算机如何执行任务。 好莱坞已经帮助灌输了程序员的形象,使他们成为超级技术人员,他们可以坐在电脑前,在几秒钟内破解任何密码。 现实远没有那么有趣。

那么编程无聊吗? ( So Programming Is Boring?  )

Computers do what they are told, and their instructions come in the form of programs written by humans. Many knowledgeable computer programmers write source code that can be read by humans but not by computers. In many cases, that source code is compiled to translate the source code into machine code, which can be read by computers but not by humans. These compiled computer programming languages include:

计算机按照它们的指示进行操作,它们的指令以人类编写的程序的形式出现。 许多有知识的计算机程序员编写的源代码可以被人类读取,但不能被计算机读取。 在许多情况下,该源代码会被编译为将源代码转换为机器代码,计算机可以读取,但人类无法读取。 这些编译的计算机编程语言包括:

Some programming does not need to be compiled separately. Rather, it is composed of a just-in-time process on the computer for which it is running. These programs are called interpreted programs. Popular interpreted computer programming languages include:

某些程序不需要单独编译。 而是由运行它的计算机上的即时进程组成。 这些程序称为解释程序。 流行的解释型计算机编程语言包括:

  • Javascript

    Java脚本
  • Perl

    Perl
  • PHP

    PHP
  • Postscript

    后记
  • Python

    Python
  • Ruby

    Ruby

Programming languages each require knowledge of their rules and vocabulary. Learning a new programming language is similar to learning a new spoken language.

每种编程语言都需要了解其规则和词汇。 学习新的编程语言类似于学习新的口头语言。

程序做什么? ( What Do Programs Do? )

Fundamentally programs manipulate numbers and text. These are the building blocks of all programs. Programming languages let you use them in different ways by using numbers and text and storing data on disk for later retrieval.

程序从根本上操纵数字和文本。 这些是所有程序的组成部分。 编程语言允许您通过使用数字和文本并将数据存储在磁盘上以供以后检索,从而以不同的方式使用它们。

These numbers and text are called variables, and they can be handled singly or in structured collections. In C++, a variable can be used to count numbers. A struct variable in code can hold payroll details for an employee such as:

这些数字和文本称为变量 ,它们可以单独处理,也可以在结构化集合中处理。 在C ++中,变量可用于对数字进行计数。 代码中的struct变量可以保存员工的工资明细,例如:

  • Name

    名称
  • Salary

    薪水
  • Company Id Number

    公司编号
  • Total Tax Paid

    已付税款总额
  • SSN

    社交网络

A database can hold millions of these records and fetch them rapidly.

数据库可以保存数百万条这样的记录并快速获取它们。

为操作系统编写程序 ( Programs Are Written for Operating Systems )

Each computer has an operating system, which is itself a program. The programs that run on that computer must be compatible with its operating system. Popular operating systems include: 

每台计算机都有一个操作系统,它本身就是一个程序。 该计算机上运行的程序必须与其操作系统兼容。 流行的操作系统包括:

  • Windows

    视窗
  • Linux

    的Linux
  • MacOS

    苹果系统
  • Unix

    Unix系统
  • Android

    安卓系统

Before Java, programs had to be customized for each operating system. A program that ran on a Linux computer could not run on a Windows computer or a Mac. With Java, it is possible to write a program once and then run it everywhere as it is compiled to a common code called bytecode, which is then interpreted. Each operating system has a Java interpreter written for it and knows how to interpret bytecode. 

在Java之前,必须为每个操作系统自定义程序。 在Linux计算机上运行的程序无法在Windows计算机或Mac上运行。 使用Java,可以编写一次程序,然后在任何地方运行该程序,因为该程序被编译为称为bytecode的通用代码,然后对其进行解释 。 每个操作系统都有为其编写的Java解释器,并且知道如何解释字节码。

Much computer programming occurs to update existing applications and operating systems. Programs use features provided by the operating system and when those change, the programs must change.

发生了许多计算机编程来更新现有的应用程序和操作系统。 程序使用操作系统提供的功能,当这些功能更改时,程序必须更改。

共享编程代码 ( Sharing Programming Code )

Many programmers write software as a creative outlet. The web is full of websites with source code developed by amateur programmers who do it for fun and are happy to share their code. Linux started this way when Linus Torvalds shared code he had written.

许多程序员将软件编写为创造性的工具。 Web上到处都是由业余程序员开发的源代码网站,这些源代码是出于业余娱乐目的并且很乐意分享其代码。 当Linus Torvalds共享他编写的代码时,Linux以这种方式启动。

The intellectual effort in writing a medium-sized program is comparable to writing a book, except you never need to debug a book. Computer programmers find joy in discovering new ways to make something happen or in solving a particularly thorny problem. 

编写中等大小的程序所需的智力与编写一本书相当,只不过您无需调试一本书。 计算机程序员在发现使事情发生的新方法或解决特别棘手的问题时感到高兴。

翻译自: https://www.thoughtco.com/what-is-programming-958331

计算机编程是什么

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值