3 ms·
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
by applfanboysbgon 2mo ago
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 syntax highlighting helps learn to distinguish things when you're new to programming, but for experienced readers syntax parsing happens as automatically as it does in natural language without any need of colors.
- atiedebee 2mo agoThe article touches upon this: > Unlike prose, where you usually read it linearly, with code you bounce around based on what connected elements you are exploring. The moment you are jumping around a lot while reading, being able to understand the structure quickly becomes a major help. For example, dictionaries will have the words in a bold font while italicizing things like the plural etc.
- applfanboysbgon 2mo agoThe punctuation/indentation already give you structure, all the highlighting does is break up the flow of actually reading. It essentially forces a micro-reset every second or third word rather than allowing you to seamlessly scan to find what you're looking for. It looks unreadable on the blog post because they have an unreadable font that is way too spacey (nothing against pixel fonts, just their particular choice of one...), but it really is way easier to read code if you try no highlighting with a real font. I will caveat this on the fact that I use Allman brackets, and have even stronger opinions about that. K&R brackets are cancer and completely destroy the structure of code, so maybe that's why some people feel highlighting is necessary for "structure". With allman brackets, the punctuation guides your eyes to the indentation forming a clean box around each level of code, while if you draw a line from the opening bracket to the closing bracket with K&R style, half the code will be inside it and half outside it, bisecting the natural structure.
- jaapz 2mo agoIt's pretty interesting that you are trying to find a reason for highlighting not working, while it's pretty obvious that many people are using highlighting and it is in fact helping them. Just that it doesn't work for you, doesn't mean everyone is like you.
- lexicality 2mo ago> 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. The colours help you skim-read. 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 improve understanding and you're using a device capable of complex and rich information display, but you want it to look like a book because ..?
- applfanboysbgon 2mo ago> 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.