I do something very similar (grey strings/comments, some bold/underline identifiers): http://i.imgur.com/i5j0QKT.png
Syntax Highlighting Off
101–110 of 110 posts
Re: Syntax Highlighting Off
#102Former neuroscientist here. Please take this article's pop science proclamations with a grain of salt. 1) "Additionally, we process words much faster than we process colors". Wrong, I'm pretty sure areas V2/V4 received information much faster than the visual word form area, especially given that it may require a saccade to take in a long word. Not sure where this claim comes from. 2) "...we instinctively jump to lumi…
For example, if there's a comment in the code, without highlight you would need to follow the comment and look for closing quotes. If the comment contains escaped quotes it becomes even more difficult. With highlight you immediately see where it ends.
Another example are keywords - when they are highlighted, you don't even need to read it. You glance at them and know the meaning by their shape. While without highlighting you would have to read every single one of them to understand that they are in fact keywords and not something else.
Re: Syntax Highlighting Off
#103"Reading code is simply more straightforward, smoother and less jumpy. I get the overarching context faster and with less hassle." This makes me think the author might be one of those people who can not superficially scan text very efficiently and resort to.. well, just reading it, word by word. (Is there a term for this phenomenon?)
Re: Syntax Highlighting Off
#104Earlier quoted context omitted.
Perhaps you should use a less ambiguous term than "clean". They're giving you a correct answer, so perhaps you should ask the correct question? "Is your code readable", perhaps? "Are you proud of your code?". Something like that. No-one's going to admit their code isn't clean, regardless of how they interpret that term.
>They're giving you a correct answer Is spaghetti code clean if it lints successfully?
Re: Syntax Highlighting Off
#105"One of the basic rules of thumb in typography is that, when writing a piece of text, you should choose one typeface and stick to it." How about an analogy from cooking, too? "It's easy to spot all the verbs, but why on Earth would you want to do that? " Well, exactly! Makes it obvious how stupid your argument is, huh?! I'm pretty sure the people who choose syntax colouring know what they're doing, just like the ones…
Re: Syntax Highlighting Off
#106I do something very similar (grey strings/comments, some bold/underline identifiers): http://i.imgur.com/i5j0QKT.png
I really like that colorscheme, care to share it?
'(font-lock-builtin-face ((t (:weight bold))))
'(font-lock-comment-face ((t (:foreground "#707470"))))
'(font-lock-constant-face ((t (:underline t))))
'(font-lock-doc-face ((t (:inherit font-lock-comment-face))))
'(font-lock-function-name-face ((t (:inherit font-lock-constant-face))))
'(font-lock-keyword-face ((t (:weight bold))))
'(font-lock-preprocessor-face ((t (:underline (:color foreground-color :style wave)))))
'(font-lock-string-face ((t (:foreground "#707470"))))
'(font-lock-type-face ((t (:inherit font-lock-constant-face))))
'(font-lock-variable-name-face ((t (:inherit font-lock-constant-face))))
'(font-lock-warning-face ((t nil)))
'(fringe ((t (:background "#ffffff"))))
'(glyphless-char ((t (:slant italic))))
'(highlight ((t (:weight bold))))
'(isearch ((t (:box (:line-width 1 :color "#000000")))))
'(isearch-fail ((t (:weight bold))))
'(italic ((t (:slant italic))))
'(lazy-highlight ((t (:box (:line-width 1 :color "#d0d4d0")))))
'(link ((t (:inherit button))))
'(link-visited ((t (:inherit link :box (:line-width 1 :color "#707470" :style pressed-button)))))
'(minibuffer-prompt ((t (:weight bold))))
'(mode-line ((t (:inherit mode-line :background "gray93" :foreground "#000000" :height 110 :family "Source Sans Pro"))))
'(mode-line-emphasis ((t (:underline t))))
'(mode-line-inactive ((t (:inherit mode-line))))
'(mouse ((t (:background "#000000" :foreground "#ffffff"))))
'(region ((t (:background "#d0d4d0"))))
'(secondary-selection ((t (:background "#e9eee9"))))
'(show-paren-match ((t (:weight bold))))
'(show-paren-mismatch ((t (:underline t))))
Other than that I use the Inconsolata font.Re: Syntax Highlighting Off
#107Earlier quoted context omitted.
>They're giving you a correct answer Is spaghetti code clean if it lints successfully?
Yes. And no. Depends on the context. Microsoft and malware coders both think windows is great for the same reason; it's very popular.
I can't think of any context where I'd consider spaghetti code clean. It's exact opposite of clean.
Re: Syntax Highlighting Off
#108Earlier quoted context omitted.
Yes. And no. Depends on the context. Microsoft and malware coders both think windows is great for the same reason; it's very popular.
>Yes. Depends on the context. I can't think of any context where I'd consider spaghetti code clean. It's exact opposite of clean.
Re: Syntax Highlighting Off
#109I'd freely speculate that 90% of the benefit of syntax highlighting comes from mere lexical highlighting - specifically, making comments, strings and keywords visually distinct from everything else. And even keyword highlighting is very secondary to the first two. Making comments distinct from normal code is nice because you can easily alternate your focus on one or the other while reading through; and you're not lik…
Re: Syntax Highlighting Off
#110Earlier quoted context omitted.
>Even basic principles of clean code are often neglected or never taught, in large part due to the lack of professional experience in academic circles. There's a lack of experience in professional circles too. One of the questions I always ask during programming interviews (on either side) is "is your code clean? if so, why?". Invariably the answer is a variant along the lines of "if it passes the linter it's clean",…
Perhaps you should use a less ambiguous term than "clean". They're giving you a correct answer, so perhaps you should ask the correct question? "Is your code readable", perhaps? "Are you proud of your code?". Something like that. No-one's going to admit their code isn't clean, regardless of how they interpret that term.