| Tags: programming

Very often I see discussions about which font type or colour scheme are better for coding. But nobody seems to care about the font size, which is, in my opinion, something that can affect your eyes as much (or more) as the colours you choose for syntax highlighting.

Here's a crop of my vim in fullscreen (click to see the full screenshot).


The font is Source Code Pro 28pt. And not, I don't have a huge screen. Most of the time I'm working in my 13" laptop. It turns out that 28pt is the maximum font size I can use if I want to fit 80 characters per line, plus line numbers.

In other words, if I had a larger screen, my font size would be even bigger!


It makes such a huge difference in eye strain. You can make a quick test: code with a huge font size (26pt or bigger) for 10 minutes and then go back to your old (and probably tiny) font size. Can you notice the effort that you need to make to be able to read the smaller text? I surely can.

I've been using huge font sizes for 3 years and now my myopia has stopped getting worse. Before that I used to have a small diopter increase every year.

And yes, you can program with 80 characters.

Most of my colleagues are shocked when they see my screen. Some of them want to give it a try (specially after a pair-programming session in my computer).

However, I get these lines very often: "I need 120 characters!" and "I can only see 20 lines in my screen, I need more!". The truth is that a lot of coding standards force you to stick with 80 characters per line. And only having 20-25 lines in your screen can be an advantage: you will tend to avoid long methods and start to refactor more often :)

Do a favor to your eyes and give it a try!