Source line length before coding agents An analysis of C/C++ source code published by Shape of Code found that the 80-character line-length break-point remains visible in 2026 data, though less dramatic than in 2000, with a new break-point emerging at 120 characters. The analysis attributes the persistence of 80-character lines to historical display and punched-card conventions and predicts coding agents trained on human-written code are unlikely to generate lines longer than 80 characters. The post also reports that if-statement nesting levels in 2026 Vim and SQLite data follow exponential regression fits, while Linux data was better fitted by a power law. Home https://shape-of-code.com/ Uncategorized https://shape-of-code.com/category/uncategorized/ Source line length before coding agents Source line length before coding agents Will coding agent generated source code contain the same consistent patterns of behaviors that appear in human written source? A brief analysis would suggest that the answer is: Yes. LLM training data is human written code, and coding agents are generating code to implement the functionality that developers would have otherwise implemented themselves. Some coding patterns are driven by historical accidents, or at least appear to be. A line of code has to be visible on the display seen by the person writing it. Consequently, a line of source containing more characters that can be displayed on a line are likely to be rare. The plot below shows the number of C/C++ source lines containing a given number of characters in early 2000 http://www.knosof.co.uk/cbook/cbook.html red and 2026 https://shape-of-code.com/2025/11/02/best-tool-for-measuring-lots-of-source-code/ green , and the number of lines containing a given number of tokens in 2000 blue , lines are fitted exponentials, and vertical grey lines at 80 and 120 characters common default value used for tab characters; code+data http://www.shape-of-code.com/code-data/C-line-length.tgz : The dramatic drop in the number of lines of a given length, just below 80 characters, is consistent with the majority of character-based displays https://en.wikipedia.org/wiki/Computer terminal having lines containing 80 characters the same as punched cards https://shape-of-code.com/2025/12/21/programming-punched-card-machines/ . A revolution in display technology happened between 2000 and 2026, namely CRTs were replaced by LCDs, significantly increasing possible display width. The decline in number of lines containing a given number of characters has decreased since 2000. In 2026, the 80 character line length break-point is less dramatic than in 2000, and the decline a lot less steep. Also, there appears to be a new break-point emerging at 120 characters; perhaps without LLMs the 80 character break-point would have gradually disappeared. While bit-mapped displays don’t have lines, existing practices live on and evolve. The number of lines containing a given number of tokens, for the early 2000 measurements, decreases exponentially, with . Whitespace indentation adds characters, not tokens. Most long lines are caused by indentation of the source code, e.g., indenting the body of an if-statement. Indentation is used to reduce the developer effort needed to understand statement clustering and sequencing. The plot below shows the number of if-statements occurring at a given nesting level, along with regression fits, of the form , to the 2026 Vim and SQLite data; the Linux data was better fitted by a power law code+data https://www.shape-of-code.com/code-data/clause-nesting.tgz : Some of the reasons developers write deeply nested code include: the nested code accesses local variables that would be a hassle to pass as function arguments, creating a function would interrupt their train of thought. Deep nesting is often cited as bad practice, along with the usual unsubstantiated claims about it being error-prone, or hard to understand, or whatever. Coding agents indent code because the training data contains indented code, and because the generated source is likely to be looked at and modified by developers. Attention based LLMs