Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Small stupid things that make up my dev environment (rachelbythebay.com)
29 points by compiler-guy on Nov 27, 2023 | hide | past | favorite | 5 comments


Amen on syntax highlighting. We collectively have wasted a staggering amount of tine on this finnicky anti-feature. Personally I used it for at least a decade until I finally realized it was 98% distraction. When you think about it, it becomes obvious that almost all code you are reading must be syntactically correct, unless you've recently edited it. If the language needs syntax highlighting to be legible, that is a language issue. My theory for why it is so popular is that it can be low hanging fruit for validating code that is faster than the full compiler. But even in that case, I only want syntax errors to be highlighted. To me, syntax highlighting of correct code is simply unnecessary noise.

That being said, if you genuinely believe syntax highlighting makes you more productive, I won't argue with you. I just think it's unfortunate it's been made the default in most cases.


It never occurred to me to not like syntax highlighting but with a moment’s reflection, I’ll say that it’s especially helpful for other people’s code, and data. And dumb things like HTML. And my shell prompt.

I even like color for my email indents.

I like colors.


I'm similar.

It allows me to skip over code and not thoroughly read it.

ie. a colour for variables, methods, objects, strings, numbers.

So I can see a bit of code and see it's {variable}.{MethodName}({string}, {number}) and can generalise what that code is doing without needing to read the entire line and parse it myself.


It's invaluable to me for pattern recognition. Colors add a layer of contrasting, immediately parse-able information to a block of code that can make it recognizable at a glance, more unique than a pure grapheme skimming heuristic. I don't find it distracting, as when I'm actually reading the code I just tune it out. I don't need it, but it's definitely nice to have in a codebase with larger files.


It's saved me loads of time when it comes to wayward strings and comments. I can take it or leave it for most of the other stuff.

(Being able to immediately see what's a macro in C/C++/etc. can also be useful.)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: