4 ms·
More coders ought to try weaning themselves off of syntax highlighting and inverting their terminal colors to dark on light, document-writing style. If you don
by jccc 10y ago
More coders ought to try weaning themselves off of syntax highlighting and inverting their terminal colors to dark on light, document-writing style.
If you don't need the training wheels and you're not a hacker in a movie, I think you'll discover over time that it is a sweet sweet liberation to be free from the ball and chain of syntax.
- burkaman 10y agoI could not disagree more. I often have to write without syntax highlighting at work, and there are zero positives and many significant negatives. It's not there as "training wheels" or to look pretty, it's there to help you avoid trivial mistakes and easily navigate through the code. There was discussion here recently about why we still edit code as text rather than as a tree, and syntax highlighting helps bridge that gap slightly, so you can think of the code as a tree rather than a long series of meaningful letters. Seriously, have you tried this for more than a few minutes? I've been doing it for a year and a half and I've never seen any benefit. You're only "free from the ball and chain of syntax" until you try to run the code, when you realize the syntax is still there, and you're only "free" from being able to clearly see it.
- jccc 10y agoYes, I've been doing this for at least a couple years. I've been writing various kinds of code for money since 1995, and no change has ever been as helpful to me as this one. It's just a suggestion. Not everyone will like it or agree to seriously try it. I don't think it would necessarily work well for someone who's forced to use a certain editor or configuration at work, for example (and probably continues to rely on highlighting elsewhere outside of that job, preventing the mode shift from settling in). But I think a good many developers who haven't considered this might discover as I have that it helps them to be calm and focused on higher problem-solving at the levels that matter to them. It really is liberating to read and write code more broadly as a meaningful language rather than just fitting and stacking bits and pieces together. You might reasonably claim you can just ignore the highlighting at will, but I and others have discovered after making the move (and really giving it time to set in) that we didn't realize how much the highlighting anchored our thinking to syntax. I've had no more trouble at all preventing or finding bugs without highlighting than I did before. Also, while I've never used one I know that there are syntax-aware editors (or probably plugins for all the usual editors) that will show you broken syntax without drowning your code in syntax color.
- maxander 10y agoOut of curiosity, what languages are you using when you do this? As a primarily Python and Haskell writer, I have no idea what you're talking about with this "unchain your mind from syntax" stuff- though I guess that in Python the syntax may be so expressive as to be no cognitive restraint, and in Haskell binding your thoughts with syntactical structure is the point.
- jccc 10y agoJust Web really -- JavaScript, SQL, some bash, a little less awk, extremely rarely Perl, and a lot of the dreaded PHP. In principle I could imagine some languages might exist in which the concerns of developers are so confined to the smallest language bits and pieces -- at the expense of bigger-picture concerns -- that the drag of ever-present syntax cues is less of a drag. But even from what I've seen of Haskell I can't imagine wanting to have those cues in my face all the time, unless I'm either learning the language or at my wits end trying to locate a (maybe) syntax bug ... in other words, when I'm not really writing or reading code. If anything, its proximity to math might make me more eager to be free of those cues. I think in just about any significant code-making effort, we'll need to be able to think clearly about the meaning and intent of chapters, pages and paragraphs (and maybe sentences) without hundreds of little tethers constantly reminding us about commas and parentheses and subject-verb agreement. All I can say really is that I had no idea how much of a drag those syntax cues were until I got used to being without them. Nobody has to do it just because it worked for me (and others). It's just a suggestion.