Computer programming is the discipline of creating instructions that tell a digital computer how to perform tasks. These instructions are packaged as a program and are written by a person often called a computer programmer. Programmers express solutions and logic using one or more languages, broadly known as programming languages, which provide syntax and rules for describing computation.

Core concepts and parts

At a basic level, a program transforms input into output by following sequences of instructions. Key concepts include variables (places to store data), control flow (decisions and loops), data structures (arrays, records, lists), procedures or functions (named blocks of code), and interfaces to hardware or other software. Programmers commonly rely on development tools such as text editors, build systems and integrated development environments (IDEs) to write, test and debug code; many of these are summarized under the umbrella term IDEs.

  • Source code: human-readable text a programmer writes.
  • Compilation and interpretation: ways source code becomes executable.
  • Machine code: the low-level numeric instructions executed by a processor, sometimes called instructions or machine code.

How code runs

Not all languages run the same way. Assembly languages are thin, mnemonic layers above raw processor instructions and are an example of assembly language. Higher-level languages are usually translated into machine code by a compiler, or executed by a runtime system via an interpreter. Compilers produce stand-alone executables or intermediate forms; interpreters execute code on the fly, which can simplify development and portability at the cost of different performance trade-offs.

History and development

Programming evolved from writing literal machine instructions in binary or hexadecimal to developing abstract languages that make complex tasks manageable. Early work in the mid-20th century produced the first compiled and assembly languages. Over decades, language designs, software engineering principles and tooling matured to support larger systems, modularity, portability, and collaboration among teams.

Uses, examples, and importance

Programming underpins modern computing: operating systems, mobile and web applications, databases, embedded systems, scientific simulations and machine learning systems are all produced through programming. Practical examples include writing a web server, scripting a data transformation, implementing a graphical user interface, or coding firmware for an appliance. Beyond creating products, programming teaches logical thinking and problem decomposition.

Distinctions and notable facts

Languages differ in many dimensions: level of abstraction (low-level vs high-level), typing discipline (static vs dynamic), execution model (compiled vs interpreted), and intended domain (systems programming, web, data science, embedded). No single language is best for every task; choices depend on performance needs, developer productivity, ecosystem libraries and long-term maintenance. Good practice emphasizes readability, testing, version control and documentation to keep software reliable as it evolves.

For further reading on basic terms and modern practices, consult introductory glossaries and tutorials that explain program structure, the role of a programmer, and comparisons among languages and programming languages. Tool-focused guides cover IDEs, while technical references contrast instructions, machine code, assembly language, compilers and interpreters.