口苦是什么原因造成的| 尿常规检查什么| 504是什么意思| 避孕套有什么危害| 有什么办法让男人死精| 八点是什么时辰| 巨蟹座是什么性格| 年岁是什么意思| 狗狗冠状是什么症状| 捌是什么数字| 防晒隔离什么牌子好| 生花生吃了有什么好处| 过午不食是什么意思| ab和a型血生的孩子是什么血型| 我方了是什么意思| 胃不舒服喝什么| 正三角形是什么| 老实是什么意思| 下体瘙痒用什么药| 文科女生学什么专业就业前景好| 1月20号是什么星座| 10月20是什么星座| 有口臭是什么原因引起的| 左眼皮跳是什么原因| 辟支佛是什么意思| 儿童头晕挂什么科| 低压低什么原因| 秋葵对痛风有什么好处| 10月5日什么星座| 上海玉佛寺求什么最灵验| 今天什么节日| 吃什么利尿最快去腹水的| 猪头三是什么意思| 骨科是什么梗| 颈椎病挂什么科| 这是什么颜色| 受控是什么意思| outdoor是什么意思| 缺铁性贫血吃什么好| 加持什么意思| 1997年的牛是什么命| 打水光针有什么副作用| 痔疮长什么样| 喝酒手掌发红是什么原因| 汗味重是什么原因| 什么叫辅酶q10| 中老年补钙吃什么钙片好| 骨蒸是什么意思| 吃什么水果对心脏有好处| 什么鱼最迟钝| 枸杞有什么功效| 屈膝是什么意思| 干眼症是什么| 手发抖是什么原因| 梦见和妈妈吵架是什么意思| 慢性肠炎吃什么药最好| 后脑勺胀痛什么原因| 梦见鬼是什么预兆| 心心相印是什么生肖| 胸部疼挂什么科| 广西有什么市| 唇炎抹什么药膏最有效| 听之任之是什么意思| 心烦焦虑吃什么药| 腋臭去医院挂什么科| 你害怕什么| c5是什么意思| 吞咽困难挂什么科| 50年是什么婚姻| 消化不良吃什么| 非球面镜片是什么意思| 憨笑是什么意思| 经济危机是什么意思| hpv81低危型阳性是什么意思| dfi是什么意思| 卡帝乐鳄鱼什么档次| 桂枝茯苓丸治什么病| 9月16日是什么星座| zara是什么意思| 嗓子疼吃什么药好得快| 泥鳅什么人不能吃| 绿茶是什么| 早上空腹喝淡盐水有什么好处| 干可以加什么偏旁| 血型o型rh阳性是什么意思| 心理咨询挂什么科| 梦见鳝鱼是什么预兆| 鲁迅是什么家| 糖尿病什么水果不能吃| 杜甫被称为什么| 朱红色是什么颜色| 王是什么生肖| 泄身是什么意思| 一垒二垒三垒全垒打是什么意思| 梦见煮饺子是什么意思| 夏天脚底冰凉是什么原因| 经常头疼挂什么科| 什么是食品添加剂| 栀子花什么季节开花| 婴儿补钙什么牌子的好| 常打嗝是什么原因| 梦见死人复活什么预兆| 安全期一般是什么时候| 百草霜是什么| 七月4号是什么星座| 专升本有什么专业| 腺肌症是什么原因引起的| 公积金基数是什么意思| 孕妇查凝血是检查什么| 炉火什么什么| 1962年属虎的是什么命| 党的执政理念是什么| 肛门松弛吃什么药| 治疗宫颈炎用什么药好得快| nylon是什么面料成分| 遇上方知有什么意思| 梦魇是什么| 腰果不能和什么一起吃| 国安是什么单位| 什么肉是碱性的| 双马尾是什么意思| 黑脚鸡是什么品种| 怀孕了吃什么| 龟头是什么| 艺人是什么意思| 为什么海螺里有大海的声音| 皂苷是什么| pbo是什么| 肝硬化早期吃什么药| 太阳穴痛是什么原因| 为什么作什么的成语| 现在买什么股票好| ;是什么号| 嘴苦嘴臭什么原因| 转奶是什么意思| 淋病吃什么药| 李子吃了有什么好处| 什么原因导致有幽门杆菌| 身体缺钾是什么原因造成的| 仲什么意思| 卵巢检查做什么项目| 卡粉是什么原因引起的| 什么的脸| 全身皮肤痒是什么原因| metoo是什么意思| 肌电图挂什么科| 阳痿是什么原因引起的| 什么叫平仓| us是什么意思| 天癸是什么意思| 孤军奋战是什么意思| 体细胞是什么意思| 席梦思床垫什么牌子好| 甲状腺结节有什么症状表现| 藕断丝连是什么意思| 萘是什么| 什么叫基因检测| 肾炎的症状是什么| 三伏贴什么时候贴最好| th什么意思| 头发五行属什么| 钮祜禄氏是什么旗| 睾丸炎吃什么药好得快| 为什么一同房就有炎症| 非淋菌性尿道炎吃什么药最好| mdt是什么意思| 乙肝表面抗体高是什么意思| 油漆用什么能洗掉| 贵州的特产是什么| 交叉感染是什么意思| 女生问你喜欢她什么怎么回答| 三个吉念什么| 坐月子哭了会有什么后遗症| 大冒险问什么| 离子水是什么水| 胆水是什么| 老虎下山下一句是什么| 今天生肖冲什么| 早晨起床手麻是什么原因| 什么动物眼睛是红色的| 麦饭石是什么| 玉米须泡水喝有什么功效| 黑脸代表什么| 正常人尿液是什么颜色| 去威海玩需要准备什么| 肚子疼去医院挂什么科| 烧高香是什么意思| 端庄的意思是什么| 高净值什么意思| offer是什么意思| 小腹坠胀是什么原因| 喉咙发炎吃什么食物| 什么大什么小| 肛门松弛是什么原因| copd是什么病的简称| 血常规异常是什么意思| 老被蚊子咬是什么原因| 世侄是什么意思| 伤口不容易愈合是什么原因| 酸菜鱼是什么地方的菜| 为什么会流鼻血什么原因引起的| 20属什么生肖| 什么什么泪下| 什么样的鼻子| 蚂蚱吃什么食物| 脑部ct挂什么科| 疖肿是什么| 烂尾是什么意思| 月亮星座是什么| 布朗是什么水果| 肠胃炎可以吃什么水果| 派出所长是什么级别| 人为什么会抽筋| 什么是冷战| 孝顺的真正含义是什么| 藜麦是什么| 莲雾什么味道| 包茎挂什么科| 一什么亮光| 措施是什么意思| 第一次见面送女生什么花| 性冷淡什么意思| 情未了什么意思| 吃什么容易结石| 什么的花纹| 50年是什么婚| 陈惠敏和陈慧琳什么关系| 甲亢做什么检查| 一什么青蛙| 义子是什么意思| 11月12号是什么星座| 酚氨咖敏片的别名叫什么| 绽开什么| 氨甲环酸又叫什么名| 白细胞数目偏高是什么意思| 处女座男生喜欢什么样的女生| 济公属什么生肖的| 什么是自我| 老人走之前有什么预兆| 胆囊壁欠光滑是什么意思| 为什么姨妈迟迟不来| 因公殉职是什么意思| 腹茧症是什么病| 筋膜刀是什么| 郭敬明为什么叫小四| 什么嫩芽| 旗舰店什么意思| 农字五行属什么| 梦见怀孕流产是什么意思| 吃b族维生素有什么好处| 铁剂不能和什么一起吃| 孩子脚后跟疼是什么原因| 美食家是什么意思| 餐饮sop是什么意思| 12月是什么星座的| 梦到鬼是什么意思| 司空见惯是说司空见惯了什么| 什么是次数| 皮牙子是什么意思| 憔悴是什么意思| pbo是什么| 孕激素六项检查什么时候做| 下雨天适合吃什么| 困惑是什么意思| 百度

缺维生素c会得什么病

百度 感谢致力于为世界各地的摩登女性打造优雅时装的时尚服饰品牌VEROMODA以及在全世界范围内掀起欧式时髦型男风格的品牌JACKJONES的大力支持,为参赛选手提供服装赞助。

In computing, source code, or simply code or source, is a plain text computer program written in a programming language. A programmer writes the human readable source code to control the behavior of a computer.

Simple C-language source code example, a procedural programming language. The resulting program prints "hello, world" on the computer screen. This first known "Hello world" snippet from the seminal book The C Programming Language originates from Brian Kernighan in the Bell Laboratories in 1974.[1]

Since a computer, at base, only understands machine code, source code must be translated before a computer can execute it. The translation process can be implemented three ways. Source code can be converted into machine code by a compiler or an assembler. The resulting executable is machine code ready for the computer. Alternatively, source code can be executed without conversion via an interpreter. An interpreter loads the source code into memory. It simultaneously translates and executes each statement. A method that combines compiling and interpreting is to first produce bytecode, which is an intermediate representation of source code that is quickly interpreted.

Background

edit

The first programmable computers, which appeared at the end of the 1940s,[2] were programmed in machine language (simple instructions that could be directly executed by the processor). Machine language was difficult to debug and was not portable between different computer systems.[3] Initially, hardware resources were scarce and expensive, while human resources were cheaper.[4] As programs grew more complex, programmer productivity became a bottleneck. This led to the introduction of high-level programming languages such as Fortran in the mid-1950s. These languages abstracted away the details of the hardware, instead being designed to express algorithms that could be understood more easily by humans.[5][6] As instructions distinct from the underlying computer hardware, software is therefore relatively recent, dating to these early high-level programming languages such as Fortran, Lisp, and Cobol.[6] The invention of high-level programming languages was simultaneous with the compilers needed to translate the source code automatically into machine code that can be directly executed on the computer hardware.[7]

Source code is the form of code that is modified directly by humans, typically in a high-level programming language. Object code can be directly executed by the machine and is generated automatically from the source code, often via an intermediate step, assembly language. While object code will only work on a specific platform, source code can be ported to a different machine and recompiled there. For the same source code, object code can vary significantly—not only based on the machine for which it is compiled, but also based on performance optimization from the compiler.[8][9]

Organization

edit

Most programs do not contain all the resources needed to run them and rely on external libraries. Part of the compiler's function is to link these files in such a way that the program can be executed by the hardware.[10]

 
A more complex Java source code example. Written in object-oriented programming style, it demonstrates boilerplate code. With prologue comments indicated in red, inline comments indicated in green, and program statements indicated in blue.

Software developers often use configuration management to track changes to source code files (version control). The configuration management system also keeps track of which object code file corresponds to which version of the source code file.[11]

Purposes

edit

Estimation

edit

The number of source lines of code (SLOC) is often used as a metric when evaluating the productivity of computer programmers, the economic value of a code base, effort estimation for projects in development, and the ongoing cost of software maintenance after release.[12]

Communication

edit

Source code is also used to communicate algorithms between parties, e.g., code snippets online or in books.[13]

Computer programmers can find it helpful to review extant source code to learn about programming techniques.[13] The sharing of source code between developers is often cited as a contributing factor to the maturing of their programming skills.[13] Some consider source code an expressive artistic medium.[14]

Source code often contains comments—blocks of text marked for the compiler to ignore. This content is not part of the program logic, but is instead intended to help readers understand the program.[15]

Companies often keep the source code confidential in order to hide algorithms considered a trade secret. Proprietary, secret source code and algorithms are widely used for sensitive government applications such as criminal justice, which results in black box behavior with a lack of transparency into the algorithm's methodology. The result is avoidance of public scrutiny of issues such as bias.[16]

Modification

edit

Access to the source code (not just the object code) is essential to modifying it.[17] Understanding extant code is necessary to understand how it works[17] and before modifying it.[18] The rate of understanding depends both on the code base as well as the skill of the programmer.[19] Experienced programmers have an easier time understanding what the code does at a high level.[20] Software visualization is sometimes used to speed up this process.[21]

Many software programmers use an integrated development environment (IDE) to improve their productivity. IDEs typically have several features built in, including a source-code editor that can alert the programmer to common errors.[22] Modification often includes code refactoring (improving structure without changing function) and restructuring (improving structure and function simultaneously).[23] Nearly every change to code introduces new bugs or unexpected ripple effects, which require another round of fixes.[18]

Code reviews by other developers are often used to scrutinize new code added to a project.[24] The purpose of this phase is often to verify that the code meets style and maintainability standards and that it is a correct implementation of the software design.[25] According to some estimates, code review dramatically reduce the number of bugs persisting after software testing is complete.[24] Along with software testing that works by executing the code, static program analysis uses automated tools to detect problems with the source code. Many IDEs support code analysis tools, which might provide metrics on the clarity and maintainability of the code.[26] Debuggers are tools that often enable programmers to step through execution while keeping track of which source code corresponds to each change of state.[27]

Compilation and execution

edit

Source code files in a high-level programming language must go through a stage of preprocessing into machine code before the instructions can be carried out.[7] After being compiled, the program can be saved as an object file and the loader (part of the operating system) can take this saved file and execute it as a process on the computer hardware.[10] Some programming languages use an interpreter instead of a compiler. An interpreter converts the program into machine code at run time, which makes them 10 to 100 times slower than compiled programming languages.[22][28]

Portability

edit

Another reason many programs are distributed in source code form, instead of as executable binary files, is that (often) a single source code file can be written once and will run on a variety of different end-user machines (each with their own localized compiler or interpreter), unlike an executable code file which generally only works on nearly-identical machines. Source code was used this way to distribute the Unix operating system early in the history of Unix, and later to allow programs written in scripting languages (in particular the JavaScript client-side scripting language) to run on a wide variety of machines.

For this goal, minified, obfuscated, or decompiled source code files (all of which eliminate the comments in the original code) are generally just as portable as the original source code files (which nearly always include commments), even though they are far less useful for modification, and therefore don't meet the definition of source code in the GNU General Public License, version 2 (GPL2).

Quality

edit

Software quality is an overarching term that can refer to a code's correct and efficient behavior, its reusability and portability, or the ease of modification.[29] It is usually more cost-effective to build quality into a product from the start rather than try to add it later in a development process.[30] Higher quality code reduces lifetime cost to both suppliers and customers as via higher reliability and maintainability.[31][32]

Maintainability is the quality of software enabling it to be easily modified without breaking extant functions.[33] Following coding conventions such as using clear function and variable names that correspond to their purpose makes maintenance easier.[34] Use of conditional loop statements only if the code could execute more than once, and eliminating code that will never execute can also increase understandability.[35] Many software development organizations neglect maintainability during the development phase, even though it will increase long-term costs.[32] Technical debt is incurred when programmers, often out of laziness or urgency to meet a deadline, choose quick and dirty solutions rather than build maintainability into their code.[36] A common cause is underestimates in software development effort estimation, leading to insufficient resources allocated to development.[37] A challenge with maintainability is that many software engineering courses do not emphasize it.[38] Development engineers who know that they will not be responsible for maintaining the software do not have an incentive to build in maintainability.[18]

edit

The situation varies worldwide, but in the United States before 1974, software and its source code was not copyrightable and therefore always public domain software.[39] In 1974, the US Commission on New Technological Uses of Copyrighted Works (CONTU) decided that "computer programs, to the extent that they embody an author's original creation, are proper subject matter of copyright".[40][41]

Proprietary software is rarely distributed as source code.[42] Although the term open-source software literally refers to public access to the source code,[43] open-source software has additional requirements: free redistribution, permission to modify the source code and release derivative works under the same license, and nondiscrimination between different uses—including commercial use.[44][45] The free reusability of open-source software can speed up development.[46]

See also

edit

References

edit
  1. ^ Kernighan, Brian W. "Programming in C: A Tutorial" (PDF). Bell Laboratories, Murray Hill, N. J. Archived from the original (PDF) on 23 February 2015.
  2. ^ Gabbrielli & Martini 2023, p. 519.
  3. ^ Gabbrielli & Martini 2023, pp. 520–521.
  4. ^ Gabbrielli & Martini 2023, p. 522.
  5. ^ Gabbrielli & Martini 2023, p. 521.
  6. ^ a b Tracy 2021, p. 1.
  7. ^ a b Tracy 2021, p. 121.
  8. ^ Lin et al. 2001, pp. 238–239.
  9. ^ Katyal 2019, p. 1194.
  10. ^ a b Tracy 2021, pp. 122–123.
  11. ^ O'Regan 2022, pp. 230–231, 233, 377.
  12. ^ Foster 2014, pp. 249, 274, 280, 305.
  13. ^ a b c Spinellis, D: Code Reading: The Open Source Perspective. Addison-Wesley Professional, 2003. ISBN 0-201-79940-5
  14. ^ "Art and Computer Programming" ONLamp.com Archived 20 February 2018 at the Wayback Machine, (2005)
  15. ^ Kaczmarek et al. 2018, p. 68.
  16. ^ Katyal 2019, pp. 1186–1187.
  17. ^ a b Katyal 2019, p. 1195.
  18. ^ a b c Offutt, Jeff (January 2018). "Overview of Software Maintenance and Evolution". George Mason University Department of Computer Science. Retrieved 5 May 2024.
  19. ^ Tripathy & Naik 2014, p. 296.
  20. ^ Tripathy & Naik 2014, p. 297.
  21. ^ Tripathy & Naik 2014, pp. 318–319.
  22. ^ a b O'Regan 2022, p. 375.
  23. ^ Tripathy & Naik 2014, p. 94.
  24. ^ a b Dooley 2017, p. 272.
  25. ^ O'Regan 2022, pp. 18, 21.
  26. ^ O'Regan 2022, p. 133.
  27. ^ Kaczmarek et al. 2018, pp. 348–349.
  28. ^ Sebesta 2012, p. 28.
  29. ^ Galin 2018, p. 26.
  30. ^ O'Regan 2022, pp. 68, 117.
  31. ^ O'Regan 2022, pp. 3, 268.
  32. ^ a b Varga 2018, p. 12.
  33. ^ Varga 2018, p. 5.
  34. ^ Tripathy & Naik 2014, pp. 296–297.
  35. ^ Tripathy & Naik 2014, p. 309.
  36. ^ Varga 2018, pp. 6–7.
  37. ^ Varga 2018, p. 7.
  38. ^ Varga 2018, pp. 7–8.
  39. ^ Liu, Joseph P.; Dogan, Stacey L. (2005). "Copyright Law and Subject Matter Specificity: The Case of Computer Software". New York University Annual Survey of American Law. 61 (2). Archived from the original on 25 June 2021.
  40. ^ Apple Computer, Inc. v. Franklin Computer Corporation Puts the Byte Back into Copyright Protection for Computer Programs Archived 7 May 2017 at the Wayback Machine in Golden Gate University Law Review Volume 14, Issue 2, Article 3 by Jan L. Nussbaum (January 1984)
  41. ^ Lemley, Menell, Merges and Samuelson. Software and Internet Law, p. 34.
  42. ^ Boyle 2003, p. 45.
  43. ^ Morin et al. 2012, Open Source versus Closed Source.
  44. ^ Sen et al. 2008, p. 209.
  45. ^ Morin et al. 2012, Free and Open Source Software (FOSS) Licensing.
  46. ^ O'Regan 2022, p. 106.

Sources

edit
edit
pr在医学上是什么意思 为什么近视不可逆 中古包是什么意思 碘伏有什么作用 鬼迷心窍什么意思
buy是什么意思 胆囊挂什么科 神经病是什么意思 年检是什么意思 al是什么意思
无回声结节是什么意思 豆浆喝多了有什么副作用 青少年梦遗有什么危害 豆泡是什么 大学生村官是什么编制
突然肚子疼是什么原因 护士资格证什么时候考 脉搏强劲有力代表什么 胃热口干口苦口臭吃什么药好 梦到吃肉是什么意思周公解梦
咽炎用什么药好kuyehao.com ffa是什么意思hcv9jop2ns8r.cn 冰岛为什么不让随便去hcv9jop0ns0r.cn 蒟蒻是什么东西hcv9jop4ns1r.cn 糖类抗原153偏高是什么原因hcv8jop9ns7r.cn
狰狞什么意思yanzhenzixun.com ast是什么意思hcv9jop7ns9r.cn 高氨血症是什么病hcv7jop7ns1r.cn 波字五行属什么hcv9jop5ns6r.cn 什么饼不能吃脑筋急转弯hcv8jop8ns2r.cn
呼吸音粗是什么原因hcv8jop5ns4r.cn 书签是什么wuhaiwuya.com 身无什么hcv9jop5ns4r.cn 肾气亏虚吃什么中成药hcv9jop4ns5r.cn 大枕大池是什么意思hcv7jop9ns0r.cn
鸡蛋粘壳是什么原因hcv8jop1ns4r.cn 蜈蚣最怕什么hcv7jop6ns1r.cn 五官立体是什么意思hcv7jop9ns6r.cn 收放自如是什么意思hcv8jop7ns6r.cn 只吐不拉是什么原因hcv9jop5ns3r.cn
百度