3 ms·
> I have identified two important kinds of value judgment - important vs. unimportant, and success vs. failure. I have showed how these judgments are made by o
by martin_a 7y ago
> I have identified two important kinds of value judgment - important vs. unimportant, and success vs. failure. I have showed how these judgments are made by our existing code highlighting themes: comments are hidden as unimportant, and deletions are displayed as errors. These judgments intrude on and influence our own thoughts and judgments.
I find this whole article highly speculative. It's based on principles the author adapted from somebody who wrote a book about how to write code, but I doubt they really influence or apply to lots of people.
I don't value comments less or more because they are cursive or light grey. Code highlighting should help to easily distinguish between different parts of the code, but as unobtrusive as possible. This is not an easy task especially with the limited set of options you have for plain text.
I also don't perceive removals in diff view as "bad" because they are red but as "look here, could be important".
So this article is about the feelings of the author, not so much about facts.
- divanvisagie 7y agoAgreed. If I'm looking for comments, the washed out look is easy to pick up. Also. many people don't or can't follow clean code. Could you imagine the mess if you were writing an API that required JSdoc with the author's proposed highlighting scheme? Or Golang's enforcement of comments on public functions?
- azernik 7y agoAgreed about the red. I find it deeply satisfying.
- onion2k 7y agoI also don't perceive removals in diff view as "bad" because they are red but as "look here, could be important". That's really the problem with using red for deletes in a diff. Red implies that the deleted lines are more important than the added lines, and that's wrong. You shouldn't (and can't really) focus exclusively on the deleted code. Breaking the 'red = important' connection and using a color scheme that gives equal weight to the removed and added lines may well work better once you get past how weird it is.
- EForEndeavour 7y ago> Red implies that the deleted lines are more important than the added lines I've never gotten that impression. I and my coworkers & classmates usually highlight text using the standard yellow highlighter, occasionally using other snazzy highlighter colours - red sometimes included, but usually not. The associations that leak in from other domains are green=good/go, red=bad/stop. It's very easy to mentally remap the colours to the intuitive green=new, red=old.
- manifestsilence 7y agoAgreed. Comments aren't about important vs. unimportant, they're about words that are executed vs. words that are documentation. Even commented out code, in the rare cases when it's a good idea to leave around, is a form of documentation. It's not code any more if it's not running.