A friend of mine once said: βI look at the code eight hours a day, and I want it to be pleasant to watch.β He meant the quality of the code, and here everything is clear (or, on the contrary, nothing is clear). But what about the image itself? Is everything all right with him? Can you do better? These are questions that only recently came to my mind, and I decided to attend to them seriously. It turned out that this field is not plowed for improvements.
What does a programmer's screen look like when writing code? Usually this is an IDE or text editor window:
(pictures, if you want to understand what it is about, it is better to look at 100% - they are clickable).
Let's make the work in this window as quick, simple and pleasant as possible within the framework of the available means (that is, we will not rebuild or rewrite anything). There are three main areas: visual interface noise, font and syntax highlighting.
')
Visual noise is removed by turning off all unnecessary and minimizing the rarely needed panels. We disable the operating system panels (the taskbar in Windows, the dock in Mac - itβs not necessary to constantly stare at them, but they take their places). Turning off all notifications in messengers, indicators of unread emails, and so on - it is better to check the email / read the message at the time of the break, than to be distracted while working and stop the flow. The IDE itself is also full of noise - for example, I always turn off Outline in Eclipse; Project drawer and Console do the jumping, and in the editor window I remove the Folding, Quick diff and Line numbers. It turns out ba-a-and-alshoe a window only with the text.
My preference for Eclipse over Idea is connected with noise - bright, lurid icons of the latter make a noise much more than Eclipseβs uniform gray.
If I had my way, I would have done most of the icons in black and white in the IDE.
Well, to bring the idea to a logical end, it remains to enable full-screen mode. I'm
still waiting for it to become an integral function of the IDE as an editor, designed for long-term and focused work. Writers, for example, understood everything a long time ago, and there are plenty of full-screen text editors - and programmers are still trailing behind the lines of progress. Therefore, we will manage third-party plugins.
(in the picture is a full-screen text editor WriteRoom)
The next item on our program is the font. Here everyone is his own master, but there are some common points. First, we, the Russian programmers, need the Cyrillic alphabet. This narrows down the range of options almost only to sets that come with popular operating systems. Secondly, italics are desirable (I will explain this later). Thirdly, opinions diverge here, but for me pixel fonts and fonts without anti-aliasing are not at all an option, eyes stumble at every step. Fourth - almost optional - crossed zero.
In any case, if you are still using Couirer New for some kind of misunderstanding, immediately replace it with a much more readable Consolas (it comes in delivery starting with Vista).
Linuksoidy cost something like DejaVu Sans Mono, probably - I do not know. On the Mac, both Monaco and Menlo are nice (from 10.6), and if you have Windows, you can try Consolas. In general, the request "programming fonts" in a well-known search engine produces enough both discussions and interesting options.
I want to share a recent discovery:
Nitty Light . I learned about it from the Writer for iPad program (lyrical digression: this is such a text editor with a very cool interface and typography. The creators paid attention to the most important thing in it - the text, attracted serious font designers. It turned out the editor in which typing is
nice - believe me, this has not happened yet (and this is largely due to Nitty Light). So, even after a very, very good Consolas this font is simply amazing. You look at the screen and it seems that finally brought sharpness. The words read themselves. The picture is very beautiful, harmonious. I never thought that such a pleasure could be experienced simply from a font. And - the greatest miracle - recently added the Cyrillic alphabet - something you do not expect in your wildest dreams! There is a special zero and ligatures in the set, so I had to edit the font a bit - the ligatures look strange in a monospaced font; but overall I managed. Worth β¬ 54 one style. The only size you need to put is not less than 15 points, otherwise the β=β sign sticks together.
The last obstacle to our good goal, one of the biggest ones, is syntax highlighting. Of course, most programmers either do not configure it at all, or choose from the set supplied with the IDE. This is absolutely normal behavior - to rely on a professionally tuned thing, the problem, unfortunately, is that the vast majority of color sets are made incorrectly. Look here:
The author of the topic decided to single out the maximum possible number of language constructs, but did not take into account that with an increase in the number of colors it all turns into a color porridge, which is both incomprehensible and difficult to read at the same time.
There are fewer flowers on this picture, you can even read something, but look at how the brackets are highlighted. As if this is the most important thing in the program.
As a result, I formulated for myself a few rules, and, rolling up my sleeves, I went to customize the color theme manually (especially since there is no other possibility in Eclipse):
- Highlight the important and ignore the unimportant. It is not necessary to highlight every syntax nuance.
- There should be little colors - two or three plus black, otherwise their meaning will be impossible to remember, and the reading will be constantly interrupted due to the change of color.
- Colors should not shout or be bright, otherwise they will again interfere with reading. They must be combined; be quite distinguishable.
- β , , (. . 1). ( ); (//
true/false/null
β ) // (). , , β . β , . , , β , . - . - β ; . , .
for/if/else/return
β , , . , . .
. :
:
