Why is it that most developers use a monospaced font for their code?

The first monospaced typefaces were developed for early typewriters, where mechanical limitations required the paper carriage to move by a constant increment for each character typed. Much later, the first electronic descendants of those manual devices continued to use the same simple mechanisms.

Early developers worked with punched cards, committing character to separate column - monospaced printouts made it easier to review the results of execution and to make changes, especially when certain operations had to appear in particular columns.

Backward compatibility lead to the first computer displays retaining the same fixed width display style, leading to an entire generation of online terminals with monospaced displays.

But, in around 1450 when Johannes Gutenberg developed his movable type printing press and revolutionized the publishing industry, his machine used proportional type.

Digital typesetting started in the mid 1970’s and blossomed into a digital publishing revolution when PostScript Type 1 fonts were introduced in 1984. TrueType fonts arrived a couple of years later.

So why are we developers still using monospaced fonts almost 30 years later?

I’m a heretic who uses proportional fonts for programming and has done so for much of the past ten years.

Why?

Proportional fonts are easier to read.

Research into font readability has found that people typically read proportional fonts 10-15% faster than monospaced fonts. It’s conjectured that this is because text printed proportionally is perceived word by word instead of letter by letter. Regardless of the reason, a simple change that makes it easier to read frees up neurons to get things done.

Proportional fonts are horizontally more compact.

Wide screen monitors are fantastic for developers, but even with all those pixesl horizontal space is at a premium - not least when working through three way git merge conflicts. Proportional fonts are typically more compact, keeping more code in view at a time. They also make it possible to work on a portrait screen - 1200x1920 is spectacular when working with legacy code.

Proportional fonts make it easier to spot typos.

Fixed width fonts deprive the human visual system of an important clue - the width of the letter - when transforming a group of shapes on the page into a recognized word. This makes it more difficult to spot any misspelled words.

Have you tried working with a proportional font? Why not give it a go? Good choices to try include Verdana, Tahoma and Segoe UI.

Comments

blog comments powered by Disqus
Next Post
An Introduction  07 Feb 2016
Prior Post
Exception Logging  19 Jan 2016
Related Posts
Browsers and WSL  31 Mar 2024
Factory methods and functions  05 Mar 2023
Using Constructors  27 Feb 2023
An Inconvenient API  18 Feb 2023
Method Archetypes  11 Sep 2022
A bash puzzle, solved  02 Jul 2022
A bash puzzle  25 Jun 2022
Improve your troubleshooting by aggregating errors  11 Jun 2022
Improve your troubleshooting by wrapping errors  28 May 2022
Keep your promises  14 May 2022
Archives
January 2016
2016