内内是什么意思| 未免是什么意思| 神经官能症吃什么药| 左眼跳是什么意思| tg医学上是什么意思| 号召是什么意思| 铁观音属于什么茶| 1940年中国发生了什么| 丙五行属什么| 三月18号是什么星座的| tid什么意思| 鼠冲什么生肖| 白带是什么味道| 浙大校长什么级别| 雄激素过高是什么意思| 什么水什么山| 医院介入科是干什么的| 为什么经常拉肚子| 11月14号是什么星座| 如是我闻是什么意思| 肠胃炎拉肚子吃什么药| 做飞机需要注意什么| 包皮炎吃什么消炎药| 爽文是什么意思| 高丽参和红参有什么区别| 塔罗牌正位和逆位是什么意思| 章鱼吃什么食物| 埋线是什么意思| 好饭不怕晚什么意思| 血糖高能吃什么蔬菜| 30岁用什么眼霜比较好| 什么什么的阳光| 青枝骨折是什么意思| 洋葱吃了有什么好处| 29是什么生肖| 淘宝交易关闭是什么意思| 吃什么排湿气最好最快| 艾斯比什么意思| 什么鱼做酸菜鱼最好吃| gln是什么意思| 物流是什么| ca199偏高是什么意思| 什么族不吃猪肉| 螺蛳粉为什么叫螺蛳粉| 富士康是干什么的| 平均血小板体积偏高是什么原因| 人类的祖先是什么动物| 命中劫是什么意思| 自汗恶风是什么意思| 缺铁性贫血吃什么水果| 重症医学科是干什么的| 检查尿酸挂什么科| 负利率是什么意思| 败血症是什么症状| 周杰伦什么星座| 肝风内动吃什么中成药| 做包皮手术有什么好处| 小腿肌肉疼是什么原因| 棕榈油是什么油| 吃酸的有什么好处| 三乙醇胺是什么东西| 孕酮低会有什么影响| 母亲节送什么| 神母是什么病| 苹果6和苹果6S有什么区别| 水命中什么水命最好| 栓是什么意思| 达克宁栓治疗什么妇科病| 出来混迟早要还的什么意思| 升是什么意思| 心脏下边是什么器官| 甲状腺素高是什么原因| 牛建读什么| 圣女果是什么水果| 灵什么意思| 基因检测是什么| 属狗的本命佛是什么佛| plump什么意思| 狗生小狗前有什么征兆| 白菜发苦是什么原因| 绿豆和什么相克中毒| 牛肉炒什么| 维生素d什么时候吃| 葡萄糖粉适合什么人喝| 不能吃辣是什么原因| 白天尿少晚上尿多什么原因| 上火便秘吃什么最快排便| 缪斯女神什么意思| 什么是裸眼视力| dr是什么检查项目| 梦见头发白了是什么意思| 口牙是什么意思| 天枢是什么意思| 虚岁27岁属什么生肖| 翻墙是什么| 洋地黄是什么药| 蜗牛的天敌是什么| 水命中什么水命最好| 世界上最软的东西是什么| living是什么意思| 什么的树叶| 金钱龟吃什么食物| 内蒙古简称什么| mf是什么意思| 低血糖和贫血有什么区别| 治疗阴虱子用什么药最好| 教诲的意思是什么| 嗔恨心是什么意思| 七月十五日是什么节日| 香港特首是什么级别| 教义是什么意思| 脸上老长痘痘是什么原因| 刚愎自用代表什么生肖| 舌头痛什么原因| 红枣桂圆泡水喝有什么好处和坏处| 桃子有什么营养| 什么是潮热| 255是什么意思| o型血为什么叫贵族血| 妇科臭氧治疗的作用是什么| 朋友梦到我怀孕了是什么意思| 坐东朝西是什么意思| 脑血栓是什么原因引起的| 3.3是什么星座| 犀牛吃什么食物| 空调除湿是什么标志| gccg是什么牌子| 蓝颜是什么意思| 高血压属于什么科| 什么病误诊为帕金森| 1834是什么意思| 尿白细胞弱阳性是什么意思| 肾痛是什么原因| 葛根粉吃了有什么作用| 双肺纹理增多什么意思| 腹主动脉钙化是什么意思| 补肝血吃什么药| 吃一个海参相当于吃了什么| 牙龈肿痛发炎吃什么药| 手串19颗代表什么意思| 什么的手| 定性和定量是什么意思| 西米是什么做的| 性瘾是什么| 垂的第三笔是什么| 补钙吃什么食物最好最快中老年| 吃什么凉血效果最好| 杵状指常见于什么病| 1什么意思| 戴芬是什么药| 经常射精有什么伤害| 鬼剃头是因为什么原因引起的| 为国为民是什么生肖| 身体出现白斑有可能患什么病| da医学上是什么意思| 拔牙后吃什么食物最好| 心脏缺血吃什么药好| 两肺散在小结节是什么意思| 做造影什么时候做最好| 幽门螺旋杆菌有什么症状| 迪奥是什么品牌| 424是什么意思| 缺氯有什么症状怎么补| 梦到孩子丢了是什么征兆| 什么人容易得阿尔兹海默症| 做爱时间短吃什么药好| 帅是什么意思| 不能吃辣是什么原因| 焦虑症吃什么好| 手掌发热是什么原因| 左胸口疼是什么原因| 睡觉张嘴巴是什么原因| 继发性不孕是什么意思| 热水器什么牌子好| 姓林的女孩取什么名字好| 子宫囊肿严重吗有什么危害| 月经不调是什么症状| 嘛哩嘛哩哄是什么意思| 什么是佣金| 什么地什么| 月经几个月不来是什么原因| 粪便隐血试验弱阳性是什么意思| 低血压高吃什么药好| nars是什么牌子| 变蛋吃多了有什么好处和坏处| 五朵玫瑰花代表什么意思| 脑梗适合吃什么食物| 喝什么中药补肾| 父亲节送爸爸什么| 肝占位病变是什么意思| 马弁是什么意思| 小孩一到晚上就发烧是什么原因| ab什么意思| 内痔疮吃什么药最好| 近亲为什么不能结婚| jomalone是什么牌子| 什么的耳朵| 甲状腺炎有什么症状| alaska是什么意思| 也字少一竖念什么| 煊是什么意思| 易孕体质有什么特征| 心烦焦虑吃什么药| 什么竹笋不能吃| 倾字五行属什么| 癫痫病吃什么药| 男人吃什么补肾壮阳效果最好| 拉屎发黑是什么原因| 梅州有什么大学| 俄罗斯信奉什么教| hpv病毒是什么意思| 膝盖疼挂什么科| 云吞面是什么面| 一什么眉毛| 星星是什么的眼睛| 宫颈鳞状上皮增生是什么意思| 冷萃是什么意思| 咖色裤子配什么颜色上衣| 鸡头米是什么| 今天生猪什么价| 黄体破裂什么意思| 滇红是什么茶| 长疣是什么原因| 金字旁加全字念什么| ltp是什么意思| bug是什么意思网络用语| 三七粉吃了有什么好处| 70年产权是什么意思| 皮蛋和什么不能一起吃| 天台种什么植物好| 跳蚤什么样| 荔枝有什么作用与功效| 梦到和死人说话是什么意思| 妗子是什么意思| 潴留性囊肿是什么意思| 鼻干眼干口干属于什么症状| 枸杞和山楂泡水喝有什么功效| 肺不好有什么症状| 机化是什么意思| 白天咳嗽晚上不咳嗽是什么原因| 中焦湿热吃什么中成药| 哮喘是什么症状| 精索静脉曲张是什么| 急性子是什么意思| ber是什么意思| 6月8号什么星座| 牙龈肿痛发炎吃什么药| hpv是检查什么的| 梦见发大水是什么预兆| 解表药是什么意思| ng是什么意思| 胃间质瘤为什么不建议切除| 月子里能吃什么水果| 栎字五行属什么| 多发性硬化是什么病| 广义货币m2是什么意思| 红细胞偏高是什么原因| 心电图窦性心律不齐是什么意思| 碳化是什么意思| 蝙蝠粪便是什么中药| 大便粘便池是什么原因| 身体缺糖有什么症状| 两个土念什么字| 西瓜虫吃什么食物| 百度Jump to content

遼寧省阜新市 約8000年前の新石器時代早期の村落を発見

From Wikipedia, the free encyclopedia
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]
百度 第89分钟,阿根廷撤下布斯托斯,换上梅尔卡多。

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.

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]
手臂长痘痘是什么原因 眼睛疲劳干涩用什么眼药水 硅胶是什么材料 新西兰用什么货币 罗贯中和施耐庵是什么关系
mico是什么意思 舌头发麻是什么原因引起的 闭经吃什么药 癌变是什么意思 男生为什么会遗精
经血发黑是什么原因 梦见一条大蟒蛇是什么征兆 去减一笔变成什么字 身上出汗多是什么原因 sdeer是什么牌子
精子长什么样 血小板降低是什么病 cv是什么 感激不尽是什么意思 极有家是什么意思
世界上最贵的东西是什么hcv9jop2ns9r.cn 生物公司是做什么的hcv9jop5ns8r.cn 长期服用二甲双胍有什么副作用liaochangning.com 剁椒鱼头属于什么菜系xscnpatent.com 部队大校是什么级别cj623037.com
光明会是什么组织hcv9jop5ns0r.cn 涤棉是什么材质shenchushe.com 德高望重是什么生肖hcv9jop2ns7r.cn 为什么嘴唇会发紫hcv9jop0ns1r.cn 剪发虫是什么hcv9jop3ns8r.cn
监守自盗什么意思hcv7jop4ns6r.cn 天蝎座和什么星座不合hcv9jop4ns9r.cn 涤棉是什么材质hcv7jop9ns2r.cn 竹鼠吃什么jiuxinfghf.com 天秤座男生和什么星座最配wzqsfys.com
ipmn是什么意思96micro.com 善茬是什么意思hcv9jop4ns5r.cn 盆腔少量积液是什么意思hcv8jop7ns9r.cn 366红包代表什么意思hcv7jop4ns6r.cn 脑堵塞有什么症状hcv8jop6ns2r.cn
百度