Issue 13 · Nov 2–8, 2026Editions · Glossary · Archive · Method · RSS · HU / ENG

News of the AI era, curated weekly

Glossary › Developer basics

variable

basicwidespread

A variable is a named storage location in a program where data is placed so it can be retrieved or modified later by referring to its name.

In plain terms

Imagine a labeled jar in the pantry. The label says 'jam', but the jar contains whatever you just put in. A variable is the same in the world of programming: a name (the label) and a corresponding value (the content).

It is useful so the program does not have to keep everything in mind. If an online store remembers your name, the total of your cart, or whether you are logged in, these all reside in individual variables. The program references the name and always gets the value currently in it.

The name comes from the fact that its content can change: the total in the basket will be different if you add another product, but the label remains the same. This distinguishes it from a constant, whose value is set once and cannot be overwritten afterward.

It appears constantly with AI tools. The coding agent creates and names variables, and in prompt templates the curly-brace placeholders (for example {customer_name}) work the same way: the name remains, the content changes occasionally.

How it works

  1. Creation: the programmer (or coding agent) gives the variable a name, such as "age" or "total_amount". The machine assigns the memory area where the value is stored to this name.
  2. Value assignment: a value is placed into a variable, for example the age value becomes 34. In many languages, you must also specify what type of data fits: number, text, or yes/no value.
  3. Usage: the program reads the value by referencing the name, calculates with it, compares it to something else, or outputs it to the screen.
  4. Modification: the value can be overwritten. If it is your birthday, the age becomes 35, and the old value is lost.
  5. End of life: a variable's name is accessible only within a specific part of the program (this is called scope), and its value persists only as long as it is needed. Afterwards, the machine eventually frees up its space.

An everyday example

When a newsletter starts with "Dear Kata!", the template actually says: "Dear {first_name}!". The first name is a variable into which the system inserts a different value for each recipient. If the letter arrives literally with the greeting "Dear {first_name}!", then the substitution did not occur, for example, the placeholder name was misspelled. If it says "Dear !", then the variable remained empty.

Who is affected

developerEvery program is built from variables, and whether the code is understood later by its author, colleagues, or a coding agent depends on good naming. → Code
marketerPlaceholders in personalized letters, advertisements, and prompt templates are variables that they must fill in and check correctly. → Marketing
parent, student, teacherThe variable is one of the first concepts in learning programming, building on the x learned in math class, but it does not behave the same way. → Education & Family
employeeAnyone writing an Excel formula, setting up automation, or having a small program made with an AI tool works with variables or similar named values, even if they do not call them that. → Work & HR

A common misconception

MythThe program variable is the same as the x in a mathematical equation: an unknown that must be calculated.
In realityIn a program, a variable is a container. At any moment, it holds the value last put in (or nothing), and this value can be overwritten. The equation "x = x + 1" cannot hold as a mathematical equation, but in a program, it is a simple instruction: take the content of x, add one, and put it back into x.

Limits and risks

Similar, but not the same

Related concepts

Broader

programming, source code, memory

Narrower

environment variable, global variable, local variable

On the edge

konstans, data type, function, parameter, scope, prompt-sablon

A brief history

The concept moved from mathematics into programming, where quantities denoted by letters have been used for centuries. In the 1950s, assembly languages already allowed programmers to refer to memory addresses by symbolic names. The Fortran language, released in 1957, made it common to use variables with mathematics-like names in formulas.

Where things stand

The variable is an essential basic concept in programming, present in practically every language. In late 2026, code is increasingly written by coding agents, but the role of variables has not changed, and meaningful naming matters for both machine and human readers.

Status: 2026 November

In the news

Appears in 13 Agent Age stories; the curve shows weekly occurrence in the news magazine.

Also known as

variable · variable · var · program variable

Sources

This entry was machine-edited and has undergone machine expert review; the “In the news” section updates automatically from Agent Age stories.