four month experiment to see if it is easier to program without syntax highlighting.
Update: Day 110
So, at this point, I don’t think I will ever go back to syntax highlighting. The benefits of having it off for me are non-trivial and unexpected. I use my own No Frils theme, which I tweak slightly from time to time. Context switching between languages is significantly less jarring. This was an unexpected benefit. Reading code is simply more straightforward, smoother and less jumpy. I get the overarching context faster and with less hassle. This helps a ton when reading other peoples code and helps a little when writing fresh code.
What do I miss? Syntax highlighting hinting that I made a dumb typo (importance is directly proportional to compile time or speed of running syntastic).
This may well be awful – lets see!
I have ALWAYS used syntax highlighting editors. Yet, I never put too much critical thought into if the syntax highlighting was helping or hurting me. After a discussion with a friend in the cognitive sciences, I decided to embark on a 7 day experiment into low (not quiet no) syntax highlighting!
This is what my vim looks like currently. So far, it is annoying but far from crippling. I read up on some other people who have opted out of syntax highlighting and actually got the eink theme from :SYNTAX OFF .
- A case against syntax highlighting
- :SYNTAX OFF
- Snark from Rob Pike «Syntax highlighting is juvenile. When I was a child, I was taught arithmetic using colored rods (http://en.wikipedia.org/wiki/Cuisenaire_rods). I grew up and today I use monochromatic numerals. «
- Linus (of Linux) uses Micro-Emacs which doesn’t offer syntax highlighting
- Damian Conway Interview
It hurts less, which is nice. Actually starting to build my own minimalist colorscheme for vim: No Frils . Starting to feel some comprehension benefits while reading unfamiliar code.
Dark version compared to Molokia
Light version compared to Github
Mixed bag today, but starting to research the «why» this might help a bit more. Seems that this experiment has very little impact on writing big blocks of new code. Interesting, the visual attention we pay to specific regions of a scene depend on bottom-up (stimulus, rather than task-driven) attention, which means we instinctively jump to luminous or high contrast colors with our eyes, interrupting reading a program in a more standard way. Additionally, we process words much faster than we process colors – this feels counter-intuitive to me.
Was emailed a link to https://www.cl.cam.ac.uk/~as2006/files/sarkar_2015_syntax_colouring.pdf which is a study that implies that syntax highlighting is correlated with better performance. Unfortunately it is a very small study size on very basic tasks, so I will keep up the experiment to see how it works out for me.
More updates to No Frils . Another interesting thought regarding syntax highlighting was that it might trigger a minor version of the stroop effect , which could cause additional cognitive load, specifically some of the things you see under the «Theories» section are very applicable to reading source code.
Below compares are against very busy looking emacs setups.
Starting to feel legitimately happy with my decision to try out minimal syntax highlighting. When syntax highlighting is on you also are spending cognitive energy (which is finite) on item-specific processing rather than organizational processing. Item specific processing is trying to understand what a single item does, and storing that information. Organizational processing is about relating items, concepts and document flow. For reading more than a few lines of code, this seems to be yielding benefits for me.
I think I will continue this experiment! Up until this week I had NEVER written code without syntax highlighting on. All the way back to 1993 and Borland C++ – syntax highlighting has been a constant… so much so that I never questioned its value and if it was actually helping me, plus, I thought it looked fantastic. This is all personal anecdote and lots of nonsense reasons could be in impacting my perspective: from honeymoon period, to placebo effect, to Ikea effect (since I built my own colorscheme).
No Frils is starting to feel «done» as a work through all the rough edges.
Dark and Light versions of the colorscheme.