神刀安全网

Syntax Highlighting Off

A

week long

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! Syntax Highlighting Off

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!

Day 1

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 .

Day 2

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

Syntax Highlighting Off

Light version compared to Github

Syntax Highlighting Off

Day 3

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.

Day 4

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.

Day 5

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.

Syntax Highlighting Off

Syntax Highlighting Off

Day 6

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.

Day 7

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).

Day 8

No Frils is starting to feel «done» as a work through all the rough edges.

Dark and Light versions of the colorscheme.

Syntax Highlighting Off

转载本站任何文章请注明:转载至神刀安全网,谢谢神刀安全网 » Syntax Highlighting Off

分享到:更多 ()

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
分享按钮