軟體由指導電腦執行的電腦程式組成。軟體可以廣泛定義,包括設計文件、規格和測試套件。
軟體的歷史與 20 世紀中葉數位計算機的發展密切相關。早期的程式是用特定於硬體的機器語言編寫的。 1958 年高階程式語言的引入允許更多人類可讀的指令,使軟體開發變得更容易,並且在不同的電腦體系結構之間更可移植。程式語言中的軟體透過編譯器或解釋器運行以在架構的硬體上執行。隨著時間的推移,由於網路、作業系統和資料庫的發展,軟體變得越來越複雜。
軟體通常可分為兩大類:
雲端運算的興起引入了新的軟體交付模式軟體即服務(SaaS)。在 SaaS 中,應用程式由提供者託管並透過 Internet 存取。
開發軟體的過程涉及幾個階段。這些階段包括軟體設計、程式設計、測試、發布和維護。軟體品質保證和安全是軟體開發的關鍵方面,因為錯誤和安全漏洞可能導致系統故障和安全漏洞。此外,軟體授權和智慧財產權等法律問題在軟體產品的分發中也發揮著重要作用。
Software consists of computer programs that instruct the execution of a computer. Software can be defined broadly to include design documents, specifications, and testing suites.
The history of software is closely tied to the development of digital computers in the mid-20th century. Early programs were written in the machine language specific to the hardware. The introduction of high-level programming languages in 1958 allowed for more human-readable instructions, making software development easier and more portable across different computer architectures. Software in a programming language is run through a compiler or interpreter to execute on the architecture's hardware. Over time, software has become complex, owing to developments in networking, operating systems, and databases.
Software can generally be categorized into two main types:
The rise of cloud computing has introduced the new software delivery model Software as a Service (SaaS). In SaaS, applications are hosted by a provider and accessed over the Internet.
The process of developing software involves several stages. The stages include software design, programming, testing, release, and maintenance. Software quality assurance and security are critical aspects of software development, as bugs and security vulnerabilities can lead to system failures and security breaches. Additionally, legal issues such as software licenses and intellectual property rights play a significant role in the distribution of software products.
主詞條:軟體史
積體電路是生產現代軟體系統的重要發明。
軟體一詞的首次使用應歸功於數學家 John Wilder Tukey 在 1958 年的貢獻。第一台可程式計算機出現在 20 世紀 40 年代末期,是用機器語言程式設計的。機器語言很難調試並且不能在不同計算機之間移植。最初,硬體資源比人力資源更昂貴。隨著程式變得複雜,程式設計師的生產力成為瓶頸。 1958 年高階程式語言的引入隱藏了硬體的細節,並將底層演算法表達為程式碼。
Main article: History of software
The first use of the word software is credited to mathematician John Wilder Tukey in 1958. The first programmable computers, which appeared at the end of the 1940s, were programmed in machine language. Machine language is difficult to debug and not portable across different computers. Initially, hardware resources were more expensive than human resources. As programs became complex, programmer productivity became the bottleneck. The introduction of high-level programming languages in 1958 hid the details of the hardware and expressed the underlying algorithms into the code . Early languages include Fortran, Lisp, and COBOL.

The integrated circuit is an essential invention to produce modern software systems
積體電路是生產現代軟體系統的重要發明。
另請參閱:軟體類別
這個圖表顯示使用者如何與典型桌上型電腦上的應用程式軟體互動。應用軟體層與作業系統互動,作業系統再與硬體進行通訊。箭頭表示訊息流。

軟體主要有兩種:
作業系統是「為其使用者及其應用程式管理電腦資源的軟體層」。作業系統要實現三個主要目的: 在不同應用程式之間分配資源,決定它們何時接收中央處理單元(CPU)時間或記憶體空間。 提供一個介面來抽象化存取硬體細節(如實體記憶體)的細節,以使程式設計師的工作變得更容易。 提供通用服務,例如用於存取網路和磁碟設備的介面。這使得應用程式可以在不同的硬體上運行,而無需重寫。
應用程式軟體在作業系統之上運行,並使用電腦的資源來執行任務。由於現代電腦可以執行的任務範圍如此之大,因此有許多不同類型的應用軟體。應用程式佔軟體的大多數,需要作業系統(通常還包括其他應用程式)提供的環境才能運作。
軟體也可以根據其部署方式進行分類。傳統應用程式是透過特定版本軟體的永久許可證購買的,在屬於購買者的硬體上下載並運行。互聯網和雲端運算的興起催生了一種新的模式,即軟體即服務 (SaaS), 其中供應商託管軟體(通常在租用的基礎設施或平台之上) 並提供將軟體提供給客戶,通常會收取訂閱費用。到 2023 年,SaaS 產品(通常透過 Web 應用程式交付)已成為公司交付應用程式的主要方法。
See also: Software categories
A diagram showing how the user interacts with application software on a typical desktop computer. The application software layer interfaces with the operating system, which in turn communicates with the hardware. The arrows indicate information flow.
There are two main types of software:
Operating systems are "the layer of software that manages a computer's resources for its users and their applications". There are three main purposes that an operating system fulfills: Allocating resources between different applications, deciding when they will receive central processing unit (CPU) time or space in memory. Providing an interface that abstracts the details of accessing hardware details (like physical memory) to make things easier for programmers. Offering common services, such as an interface for accessing network and disk devices. This enables an application to be run on different hardware without needing to be rewritten.
Application software runs on top of the operating system and uses the computer's resources to perform a task. There are many different types of application software because the range of tasks that can be performed with modern computers is so large. Applications account for most software and require the environment provided by an operating system, and often other applications, in order to function.
Comparison of on-premise hardware and software, infrastructure as a service (IaaS), platform as a service (PaaS), and software as a service (SaaS)
Software can also be categorized by how it is deployed. Traditional applications are purchased with a perpetual license for a specific version of the software, downloaded, and run on hardware belonging to the purchaser. The rise of the Internet and cloud computing enabled a new model, software as a service (SaaS), in which the provider hosts the software (usually built on top of rented infrastructure or platforms) and provides the use of the software to customers, often in exchange for a subscription fee. By 2023, SaaS products—which are usually delivered via a web application—had become the primary method that companies deliver applications.
Comparison of on-premise hardware and software, infrastructure as a service (IaaS), platform as a service (PaaS), and software as a service (SaaS)
本地硬體和軟體、基礎設施即服務 (IaaS)、平台即服務 (PaaS) 和軟體即服務 (SaaS) 的比較。
軟體公司的目標是在預算範圍內按時交付高品質的產品。一個挑戰是軟體開發工作量估計通常不準確。軟體開發首先是構思專案、評估其可行性、分析業務需求並進行軟體設計。大多數軟體專案透過重複使用或合併現有軟體(無論是商業現成的(COTS)還是開源軟體的形式)來加速開發。軟體品質保證通常是其他工程師的手動程式碼審查和自動化軟體測試的結合。由於時間限制,測試無法涵蓋軟體預期功能的所有方面,因此開發人員通常專注於最關鍵的功能。在一些安全關鍵系統中使用形式化方法來證明程式碼的正確性,而使用者驗收測試有助於確保產品符合客戶期望。軟體開發方法有很多種,從依序完成所有步驟到並發和迭代模型。軟體開發是由潛在用戶的需求驅動的;與維護相反,維護是由請求變更等事件驅動。
當開發團隊耗盡時間或資金時,軟體通常會以不完整的狀態發布。儘管進行了測試和品質保證,但實際上所有軟體都包含系統無法如預期運作的錯誤。發布後軟體維護對於發現這些錯誤時進行修復是必要的,並在環境隨時間變化時保持軟體正常運作。發布後通常會新增功能。隨著時間的推移,維護水準變得越來越受到限制,直到產品從市場上撤出時才被完全切斷。隨著軟體老化,它被稱為遺留軟體,並且可能繼續使用數十年,即使沒有人理會。在產品的整個生命週期中,軟體維護預計佔總開發成本的 75% 或更多。
完成軟體專案涉及各種形式的專業知識,不僅涉及軟體程式設計師,還涉及測試、文件編寫、專案管理、圖形設計、使用者體驗、使用者支援、行銷和籌款。
Software companies aim to deliver a high-quality product on time and under budget. A challenge is that software development effort estimation is often inaccurate. Software development begins by conceiving the project, evaluating its feasibility, analyzing the business requirements, and making a software design. Most software projects speed up their development by reusing or incorporating existing software, either in the form of commercial off-the-shelf (COTS) or open-source software. Software quality assurance is typically a combination of manual code review by other engineers and automated software testing. Due to time constraints, testing cannot cover all aspects of the software's intended functionality, so developers often focus on the most critical functionality. Formal methods are used in some safety-critical systems to prove the correctness of code, while user acceptance testing helps to ensure that the product meets customer expectations. There are a variety of software development methodologies, which vary from completing all steps in order to concurrent and iterative models. Software development is driven by requirements taken from prospective users, as opposed to maintenance, which is driven by events such as a change request.
Frequently, software is released in an incomplete state when the development team runs out of time or funding. Despite testing and quality assurance, virtually all software contains bugs where the system does not work as intended. Post-release software maintenance is necessary to remediate these bugs when they are found and keep the software working as the environment changes over time. New features are often added after the release. Over time, the level of maintenance becomes increasingly restricted before being cut off entirely when the product is withdrawn from the market. As software ages, it becomes known as legacy software and can remain in use for decades, even if there is no one left who knows how to fix it. Over the lifetime of the product, software maintenance is estimated to comprise 75 percent or more of the total development cost.
Completing a software project involves various forms of expertise, not just in software programmers but also testing, documentation writing, project management, graphic design, user experience, user support, marketing, and fundraising.
Diagram for a traditional software development life cycle from 1988. The numbers represent the typical cost of each phase.
自1988年以來的傳統軟體開發生命週期圖。數字代表每個階段的典型成本。
主詞條:軟體品質與電腦安全
軟體品質被定義為滿足規定的要求以及客戶的期望。品質是一個總體術語,可以指代碼的正確和高效的行為、其可重複使用性和可移植性或修改的難易程度。從一開始就將品質融入產品中通常比嘗試在開發過程後期添加品質更具成本效益。更高品質的程式碼將降低供應商和客戶的生命週期成本,因為它更可靠且更易於維護。安全關鍵系統中的軟體故障可能非常嚴重,包括死亡。據估計,劣質軟體的成本可能高達銷售額的 20% 到 40%。儘管開發人員的目標是提供完全按預期工作的產品,但實際上所有軟體都包含錯誤。
網路的興起也大大增加了對電腦安全的需求,因為它使惡意行為者能夠遠端進行網路攻擊。如果錯誤造成安全風險,稱為漏洞。通常會發佈軟體修補程式來修復已識別的漏洞,但那些仍然未知(零時差)以及尚未修補的漏洞仍然有可能被利用。漏洞被惡意行為者利用的能力各不相同,並且實際風險取決於漏洞的性質以及周圍系統的價值。儘管某些漏洞只能用於損害系統可用性的拒絕服務攻擊,但其他漏洞允許攻擊者在使用者不知情的情況下注入並運行自己的程式碼(稱為惡意軟體)。為了阻止網路攻擊,系統中的所有軟體都必須設計為能夠承受外部攻擊並從中恢復。儘管努力確保安全,但仍有很大一部分電腦感染了惡意軟體。
Main articles: Software quality and Computer security
Software quality is defined as meeting the stated requirements as well as customer expectations. 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. It is usually more cost-effective to build quality into the product from the beginning rather than try to add it later in the development process. Higher quality code will reduce lifetime cost to both suppliers and customers as it is more reliable and easier to maintain. Software failures in safety-critical systems can be very serious including death. By some estimates, the cost of poor quality software can be as high as 20 to 40 percent of sales. Despite developers' goal of delivering a product that works entirely as intended, virtually all software contains bugs.
The rise of the Internet also greatly increased the need for computer security as it enabled malicious actors to conduct cyberattacks remotely. If a bug creates a security risk, it is called a vulnerability. Software patches are often released to fix identified vulnerabilities, but those that remain unknown (zero days) as well as those that have not been patched are still liable for exploitation. Vulnerabilities vary in their ability to be exploited by malicious actors, and the actual risk is dependent on the nature of the vulnerability as well as the value of the surrounding system. Although some vulnerabilities can only be used for denial of service attacks that compromise a system's availability, others allow the attacker to inject and run their own code (called malware), without the user being aware of it. To thwart cyberattacks, all software in the system must be designed to withstand and recover from external attack. Despite efforts to ensure security, a significant fraction of computers are infected with malware.
主條目:程式語言
C 語言電腦程式的原始碼。編譯並運行時,它將輸出“Hello, world!”。
程式語言是編寫軟體的格式。自 1950 年代以來,已經發明了數千種不同的程式語言;有些已經使用了幾十年,而有些則已經廢棄。一些定義將機器碼(由硬體直接實現的確切指令)和組合語言(彙編語言)(一種更易於人類閱讀的機器碼替代方案,其語句可以一對一翻譯為機器碼)分類為程式語言。用高階程式語言編寫的用於創建軟體的程式有幾個主要特徵:編寫它們不需要機器程式碼知識,它們可以移植到其他電腦系統,並且比機器更簡潔和人類可讀。它們必須既是人類可讀的,又能夠被翻譯成電腦硬體的明確指令。
高階程式語言的發明與將它們自動翻譯成機器碼所需的編譯器同時出現。大多數程式不包含運行它們所需的所有資源,並且依賴外部程式庫。編譯器的部分功能是以硬體可以執行程式的方式連結這些檔案。編譯後,程式可以儲存為目標文件,載入器(作業系統的一部分)可以取得此儲存的檔案並將其作為電腦硬體上的進程執行。一些程式語言使用解釋器而不是編譯器。解釋器在運行時將程式轉換為機器碼,這使得它們比編譯的程式語言慢 10 到 100 倍。
Main article: Programming language
The source code for a computer program in C. The gray lines are comments that explain the program to humans. When compiled and run, it will give the output "Hello, world!".
Programming languages are the format in which software is written. Since the 1950s, thousands of different programming languages have been invented; some have been in use for decades, while others have fallen into disuse. Some definitions classify machine code—the exact instructions directly implemented by the hardware—and assembly language—a more human-readable alternative to machine code whose statements can be translated one-to-one into machine code—as programming languages. Programs written in the high-level programming languages used to create software share a few main characteristics: knowledge of machine code is not necessary to write them, they can be ported to other computer systems, and they are more concise and human-readable than machine code. They must be both human-readable and capable of being translated into unambiguous instructions for computer hardware.
The invention of high-level programming languages was simultaneous with the compilers needed to translate them automatically into machine code. 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. Once 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. 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.
主詞條:軟體產品責任
軟體通常在發佈時就知道它不完整或可能包含錯誤。購買者在知情狀態下購買這種軟體,這導致了一種法律管轄方式,與其他產品相比,軟體產品的瑕疵保證責任大為減少。
主詞條:軟體授權和軟體版權
原始碼受版權法保護,所有者擁有複製程式碼的專有權。其底層思想或演算法不受版權法保護,但往往被視為商業機密並透過保密協議等方式隱藏。軟體版權自 1970 年代中期以來就得到了認可,並歸屬於製作軟體的公司,而不是編寫軟體的員工或承包商。大多數軟體的使用均受版權所有者和使用者之間的協議(軟體許可證)管轄。專有軟體通常在限制複製和重複使用的限制性許可下出售(通常透過數位版權管理 (DRM) 等工具強制執行)。相較之下,開源許可證允許在很少的條件下免費使用和重新分發軟體。大多數用於軟體的開源許可證要求在同一許可證下發布修改,這在專有專案中重複使用開源軟體時可能會造成複雜性。
主條目:軟體專利和軟體專利之爭
專利給予發明人新產品或製程的排他性、有時限的許可。關於軟體可以實現什麼功能的想法不受法律保護,具體實現則受版權法保護。在一些國家,所要求保護的發明對物理世界產生影響的要求也可能是軟體專利有效的要求的一部分。軟體專利在歷史上一直存在爭議。在 1998 年道富銀行信託公司訴 Signature Financial Group, Inc. 一案之前,軟體專利在美國普遍不被承認。在此案中,最高法院裁定業務流程可以申請專利。專利申請複雜且成本高昂,涉及專利的訴訟會推高產品成本。與版權不同,專利通常僅在其頒發的司法管轄區適用。
Main article: Software product liability
Software is often released with the knowledge that it is incomplete or contains bugs. Purchasers knowingly buy it in this state, which has led to a legal regime where liability for software products is significantly curtailed compared to other products.
Main articles: Software license and Software copyright
Source code is protected by copyright law that vests the owner with the exclusive right to copy the code. The underlying ideas or algorithms are not protected by copyright law, but are often treated as a trade secret and concealed by such methods as non-disclosure agreements. Software copyright has been recognized since the mid-1970s and is vested in the company that makes the software, not the employees or contractors who wrote it. The use of most software is governed by an agreement (software license) between the copyright holder and the user. Proprietary software is usually sold under a restrictive license that limits copying and reuse (often enforced with tools such as digital rights management (DRM)). Open-source licenses, in contrast, allow free use and redistribution of software with few conditions. Most open-source licenses used for software require that modifications be released under the same license, which can create complications when open-source software is reused in proprietary projects.
Main articles: Software patent and Software patent debate*
Patents give an inventor an exclusive, time-limited license for a novel product or process. Ideas about what software could accomplish are not protected by law and concrete implementations are instead covered by copyright law. In some countries, a requirement for the claimed invention to have an effect on the physical world may also be part of the requirements for a software patent to be held valid. Software patents have been historically controversial. Before the 1998 case State Street Bank & Trust Co. v. Signature Financial Group, Inc., software patents were generally not recognized in the United States. In that case, the Supreme Court decided that business processes could be patented. Patent applications are complex and costly, and lawsuits involving patents can drive up the cost of products. Unlike copyrights, patents generally only apply in the jurisdiction where they were issued.
Blender,一個免費軟體程式
Blender is a free and open-source 3D computer graphics software tool set that runs on Windows, MacOS, BSD, Haiku, and Linux. It is used for creating animated films, visual effects, art, 3D-printed models, motion graphics, interactive 3D applications, virtual reality, and, formerly, video games. Blender's features include 3D modelling, UV mapping, texturing, digital drawing, raster graphics editing, rigging and skinning, fluid and smoke simulation, particle simulation, soft body simulation, sculpting, animation, match moving, rendering, motion graphics, video editing, Python scripting, and compositing.
Blender 是一款免費開源 3D 電腦圖形軟體工具集,可在 Windows、MacOS、BSD、Haiku 和 Linux 上運作。它用於創建動畫電影、視覺效果、藝術、3D 列印模型、動態圖形、互動式 3D 應用程式、虛擬實境以及先前的視訊遊戲。 Blender 的功能包括3D 建模、UV 映射、紋理、數位繪圖、光柵圖形編輯、綁定和蒙皮、流體和煙霧模擬、粒子模擬、軟體模擬、雕刻、動畫、匹配移動、渲染、運動圖形、視頻編輯、Python腳本編寫和合成。
更多資訊:資訊時代
電腦產生的模擬是軟體實現的進步之一。

工程師卡珀斯瓊斯寫道,「電腦和軟體正在為人類生活的各個方面帶來深刻的變化:教育、工作、戰爭、娛樂、醫學、法律和其他一切」。它在已開發國家的日常生活中已經無所不在。在許多情況下,軟體增強了家用電器和電梯等現有技術的功能。軟體也催生了網路、電玩、行動電話和 GPS 等全新技術。網路催生了新的溝通方式,包括電子郵件、論壇、部落格、微博、維基百科和社群媒體。現在,透過快速網路搜尋即可獲得超過任何紙本圖書館的大量知識。大多數創意專業人士已轉向基於軟體的工具,例如電腦輔助設計、3D 建模、數位影像編輯和電腦動畫。幾乎每個複雜的設備都是由軟體控制的。
Further information: Information Age
Computer-generated simulations are one of the advances enabled by software.
Engineer Capers Jones writes that "computers and software are making profound changes to every aspect of human life: education, work, warfare, entertainment, medicine, law, and everything else". It has become ubiquitous in everyday life in developed countries. In many cases, software augments the functionality of existing technologies such as household appliances and elevators. Software also spawned entirely new technologies such as the Internet, video games, mobile phones, and GPS. New methods of communication, including email, forums, blogs, microblogging, wikis, and social media, were enabled by the Internet. Massive amounts of knowledge exceeding any paper-based library are now available with a quick web search. Most creative professionals have switched to software-based tools such as computer-aided design, 3D modeling, digital image editing, and computer animation. Almost every complex device is controlled by software.