Monospace

1:30 p.m. Tuesday, August 11th 2009.

Software engineers normally find monospace fonts (e.g. Courier) to be superior to other fonts for development. We do this for a number of reasons, but I'll give a few:

  • Spacing other than simple nesting is consistent (e.g. in a continuation line)
  • All characters in mono-space fonts are clear, and easy to distinguish
  • Equal-length strings look the same length
  • Comments can contain ASCII art

For these and other reasons, almost every software developer uses a monospace font with which to write their code.

Occasionally we leave our isolated world of monospace characters, and find ourselves in the land of variable-width fonts. No, I am not referring to the outside world - I am referring to our chat clients, and to a lesser extent other forms of online communication. Most of these applications (Pidgin, AIM, Yahoo IM, MSN Messenger, web chat clients, etc.) seem to completely neglect the need for software engineers to show our creations to the rest of the world. Whenever we paste our block of code into one of these applications, it comes out looking like vomit. To add insult to injury, they often turn our syntax into animated faces. It is even difficult to communicate about single code objects like foo and bar, so we end up using ambiguous workarounds like wrapping them in quotes. Is "foo" a string now that it is wrapped in quotes?

Ironically, all of these chat applications were built by software engineers. Somehow, at least in this sense, they never conceived that any of their users could be software engineers like themselves. Or perhaps they could not convince upper management.

The solution: Monospace formatting.

Why is monospace a property of a font, instead of being a font style? We have bold, italic, and underscore. And sometimes even strikethrough. Why do we have strikethrough? Lawyers need it for all the legal documents they send to each other? Why did lawyers trump software engineers on the stuff that software engineers made? I say it's pretty unfair. Let us have monospace! Right next to the b, i, u in our editors, there should be a little m. Let ctrl-m switch it on and off. It should be in every chat program, and let it disable smileys when it's being used. I promise to switch to the first chat program that does this.

Comments
By majikman, 1:49 p.m. Tuesday, August 11th 2009:
Not to mention that we can't even paste HTML code into a bunch of those. Seriously... there needs to be a way to allow us to paste code and other funky characters in there.
By yourmom, 2:03 p.m. Tuesday, August 11th 2009:
Change your font then duh
By brektyme, 3:11 p.m. Tuesday, August 11th 2009:
Pastebin? I'm rather fond if it myself.
By Andrew Ingram, 5:48 p.m. Tuesday, August 11th 2009:
A font is a specific variant and size of a typeface. The bold and italic variants of say 12pt Helvetica are completely seperate fonts, some typefaces don't even have bold and italic variants available. Software tends to provide faux bold and italic options when real choices aren't available, but the b/i buttons in interfaces are effectively an ugly hack. I disagree that typefaces should have monospaced variants as standard, since the design considerations are completely different. However, I don't disagree that there is a need for the ability to easy switch to a monospaced font in instant messaging.
By Matchu, 6:14 p.m. Tuesday, August 11th 2009:
So are you suggesting that we make monospace variants for all fonts, or teach computers how to make fonts that were never designed to be monospace into monospace? Both are impractical and unhelpful solutions =/
By Serif, 1:12 a.m. Wednesday, August 12th 2009:
Eclipse uses proportionally spaced font, so many people do program in non-monospaced fonts. And fonts that aren't monospace will look really bad if you monospace them, you are better off just switching to courier.
By Sergey Shelukhin, 12:42 a.m. Saturday, August 15th 2009:
Font design is a complicated and delicate matter. If you take a proportional font and resize its characters into "monospace", or even just drop them into grid the size of the widest x highest character, it is going to be really ugly.
By bopper, 1:28 p.m. Sunday, August 16th 2009:
I think mono-spacing is more of an application issue. It would be convenient in many applications to have a button that toggles to/from a variable width font, just like we can toggle between italics/bold etc. Whether or not a font can internally support a mono-spaced type set is not really the issue. A mono-spaced default font could be used instead.
    Posting comments is currently disabled.