Coding as Language

Working paper · Coding as Language · 2026

How many symbols does it take to read production code?

Abstract

We parsed source files sampled from 49 real applications in Python and TypeScript, 6.65M tokens in total, and ranked every symbol that is not an author-invented name by how often it appears. In Python, 13 symbols cover 80% of those tokens and 4 cover half. In TypeScript, 18 symbols reach roughly 80%; 7 reach half. TypeScript’s nine most frequent symbols are all punctuation; Python’s first six are.

Table 1.

Most frequent symbols, Python

Most frequent symbols in Python, ranked by share of non-name tokens. 13 symbols reach 80% coverage; 4 reach half.
1,Punctuation18.0%
2(Punctuation30.9%
3)Punctuation43.8%
4half.Punctuation54.4%
5=Punctuation61.7%
6:Punctuation68.7%
7selfKeyword71.0%
8[Punctuation73.1%
9]Punctuation75.3%
10ifKeyword76.8%
11NoneKeyword78.2%
12importKeyword79.5%
1380%fromKeyword80.7%
14returnKeyword81.8%
15defKeyword82.9%

Blue: the symbols needed to reach 80% coverage. The heavier rule marks the 80% line when sorted by rank.

13 symbols cover 80% of production Python

13

symbols cover 80% of production Python

4

symbols cover half of production Python

18

symbols cover roughly 80% of production TypeScript

1. Limits of this study

The 49 applications were chosen for being real, actively maintained products rather than libraries or teaching material: Excalidraw, Cal.com, Plane, Outline, Immich, n8n and nineteen others in TypeScript; Netflix Dispatch, Langflow, Open WebUI, Prefect, Wagtail, Saleor and eighteen others in Python. Library source was measured first and discarded as unrepresentative — libraries do type work that applications never touch, and extends ranked fifteenth in a library corpus and outside the top twenty-five in application code.

Frequency is not comprehension. Knowing the thirteen most common symbols in Python does not mean you can read Python, any more than knowing the thirteen most common English words means you can read English. What the ranking establishes is the size and shape of the vocabulary, not the time it takes to acquire it.

Author-invented names are excluded, which is a judgement rather than a measurement. They are 27–30% of all tokens and carry no meaning outside the file they appear in.

Quote marks are excluded along with the string contents they wrap. The text inside a literal is the author’s own content, and a quote mark is a mark whose reading function a reader already has — neither is vocabulary to be learned.

Python’s name share is slightly inflated: the tokeniser strips triple-quoted docstrings but not all inline prose, so some English words are counted as names. This does not affect the coverage figures, which count only non-name tokens.

The 99% figure rises with corpus size — more repositories mean a longer tail. The 80–90% band is stable across corpora and is the meaningful number.

2. Results

Table 1 ranks the most frequent symbols. Select a column heading to sort.

3. Method

The corpus is source files sampled from 49 real applications, 6.65M tokens in total. Each token was assigned a class: punctuation, keyword, library symbol, or author-invented name. The classification covers 100% of non-name tokens in both languages.

Author-invented names (the variables, functions and types a programmer chooses) are about 27–30% of all tokens. They are excluded from the vocabulary: shares in Table 1 are each symbol’s count divided by the count of all non-name tokens, and cumulative coverage is the running total in rank order, computed from raw counts.

Comments were stripped before tokenising: # lines in Python, // and /* */ in TypeScript. String and template literals were removed whole, quote marks included, so nothing inside or around a literal appears in the counts. Test files, migrations and build output were excluded.

The counts were made with a regular-expression tokenizer, one per language. The reader is a different thing and parses with tree-sitter — tree-sitter-python and tree-sitter-typescript — and it is there that positional disambiguation was verified against the grammar: . resolves differently before a name and before a call, : has eight distinct roles in Python, and = has three. All resolve from the parse tree without heuristics.

How to cite

Sullivan, B. (2026). Symbol frequency in production code. Coding as Language working paper, version 1.0. https://codingaslanguage.com/data

This is the vocabulary. Coding as Language is a reader built from it: short real programs, every symbol highlighted by whether you know it, and its meaning one tap away. The first five Mini Stories are free.