Live data from Hacker News

Highlighting My Code Based on How Much I Care

hank.bond

71–73 of 73 posts

Re: Highlighting My Code Based on How Much I Care

#71

I will always yap to anyone who will listen that I think syntax highlighting was a mistake that has cost humanity untold millions of productivity hours. I only highlight comments to distinguish code from not-code, I think everything else is a pretty distraction. Note how nobody ever got the idea to apply syntax highlighting to English or any other natural language, whether in books or on forums. I could believe synta…

> Note how nobody ever got the idea to apply syntax highlighting to English or any other natural language Yes they have? It's a fairly common method of teaching children sentence structure. Pedagogy aside, take a look at what books looked like before the printing press. > for experienced readers syntax parsing happens as automatically as it does in natural language without any need of colors. If you're reading slowly…

> Yes they have? It's a fairly common method of teaching children sentence structure.

I literally mentioned it for learners. I meant for "improving reading speed". Syntax highlighting is like a crutch that helps you walk but is slower than being able to walk normally.

> Why do you feel the need to intentionally hobble yourself? The human eyes can take in a spectacular amount of visual information at a glance, using colour, texture, shape and so on to instantly classify and identify things. [...] Decades of visual design research have proven that colours and shapes [...]

Because the colors and shapes you're talking about are for differentiating things. Colors and symbols improve understanding when used sparingly, if your UI is just a page full of colorful shapes and symbols it becomes a nightmare to navigate. Likewise, differentiating every third word in a sentence is counterproductive. It's text. We spend our entire lives reading text. Our eyes are already trained to skim text as a unit. I seriously doubt there's any research suggesting that making every word colorful and breaking up their flow improves reading speed compared to letting the text be a cohesive string you can parse quickly.

Re: Highlighting My Code Based on How Much I Care

#72
In a shared source, I wonder if it would be useful to make a theme that used brighter colours for segments of code that were more ‘contentious’, I.e. had a lot of changes? I guess it doesn’t work because a lot of contentious code is re-written (deleted and re-created).

Or maybe newer code could be brighter, and older code (not touched for a long time) could fade?

Re: Highlighting My Code Based on How Much I Care

#73
Blue

Yes

I think much of the usefulness of syntax highlighting is a matter of having gotten used to a specific editor. Long time Visual Studio user, I tried VSCode and Jetbrains but for C# I switched back to good old VS. I know the pattern, the cadence, by now. Much like QWERTY keyboards, I'm not learning DVORAK now, my workflow is fine this way. Tried F#, but I'm sticking with C#. It's not that I believe the rational arguments don't hold up, I do see possibilities for productivity gain with each. But there's the retraining curve and that also factors in for me

Post reply on HN