Why Do Programmers Use Courier Typeface?

The best answer to any question.
Dec. 23 2013 1:29 PM

Why Do Programmers Use Courier Typeface?

1387822921
Coding in Courier 12-point font.

Screenshot courtesy of Code Project's Font Survey

This question originally appeared on Quora.

Answer by Leonid S. Knyshov, CEO of a customer referrals startup, consulting product manager:

Advertisement

We use monospace fonts to keep code aligned.

Courier is just one of many monospace fonts. They are also called fixed-width fonts. Consolas is the default font in Visual Studio, and there are even better fonts for programmers.

We like fonts where:

  • 0 cannot be confused with O
  • Punctuation characters like "," are bigger because they are far more important in programming than in daily use
  • Brackets are distinct
  • "1," "I," "l," and "|" cannot be confused (that is 1, i, L, and the pipe sign)

This leads to fewer bugs. Mistyping "," as "." will often break your code and at least lead to unexpected behavior. The same is true for ":" versus ";" and so on.

More questions on Computer Programmers:

TODAY IN SLATE

Medical Examiner

The Most Terrifying Thing About Ebola 

The disease threatens humanity by preying on humanity.

I Bought the Huge iPhone. I’m Already Thinking of Returning It.

Scotland Is Just the Beginning. Expect More Political Earthquakes in Europe.

Students Aren’t Going to College Football Games as Much Anymore

And schools are getting worried.

Two Damn Good, Very Different Movies About Soldiers Returning From War

The XX Factor

Lifetime Didn’t Think the Steubenville Rape Case Was Dramatic Enough

So they added a little self-immolation.

Politics

Blacks Don’t Have a Corporal Punishment Problem

Americans do. But when blacks exhibit the same behaviors as others, it becomes part of a greater black pathology. 

Why a Sketch of Chelsea Manning Is Stirring Up Controversy

How Worried Should Poland, the Baltic States, and Georgia Be About a Russian Invasion?

Trending News Channel
Sept. 19 2014 1:11 PM Watch Flashes of Lightning Created in a Lab  
  News & Politics
Weigel
Sept. 20 2014 11:13 AM -30-
  Business
Business Insider
Sept. 20 2014 6:30 AM The Man Making Bill Gates Richer
  Life
Quora
Sept. 20 2014 7:27 AM How Do Plants Grow Aboard the International Space Station?
  Double X
The XX Factor
Sept. 19 2014 4:58 PM Steubenville Gets the Lifetime Treatment (And a Cheerleader Erupts Into Flames)
  Slate Plus
Slate Picks
Sept. 19 2014 12:00 PM What Happened at Slate This Week? The Slatest editor tells us to read well-informed skepticism, media criticism, and more.
  Arts
Brow Beat
Sept. 20 2014 3:21 PM “The More You Know (About Black People)” Uses Very Funny PSAs to Condemn Black Stereotypes
  Technology
Future Tense
Sept. 19 2014 6:31 PM The One Big Problem With the Enormous New iPhone
  Health & Science
Bad Astronomy
Sept. 21 2014 8:00 AM An Astronaut’s Guided Video Tour of Earth
  Sports
Sports Nut
Sept. 18 2014 11:42 AM Grandmaster Clash One of the most amazing feats in chess history just happened, and no one noticed.