4 ms·
Please, please, please do not teach programming in a 1960s-era style text editor with one font color. Syntax highlighting exists for a reason- it breaks down c
by Chromozon 13y ago
Please, please, please do not teach programming in a 1960s-era style text editor with one font color. Syntax highlighting exists for a reason- it breaks down code into units that we can easily see and understand. If your code is all one color, new programmers will see it as a bunch of foreign gobbledegook, and it will be harder to single out the differences between functions, variables, includes, etc.
- asveikau 13y agoWould you say the same about another field? Please, when you're teaching literature, don't make all of Shakespeare the same color. The students will think it's all a bunch of foreign gobbledegook. It will be harder to sort the nouns from the verbs and it will be total chaos. I think you underestimate people.
- rmc 13y agoOne difference is that many professional programmers use syntax highlighting when working, but I don't think many professional English literature scholars colour the words in Shakespeare.
- Crito 13y agoYou could publish a book without the use of bold, italics, underlining, indentation... hell, even spaces (http://en.wikipedia.org/wiki/Scriptio_continua http://en.wikipedia.org/wiki/Scriptio_continua)! But why would you? Emphasis is useful. Syntax coloring is emphasis. Or as HN user 'trevvvor sarcasticly put it: "Traffic lights should be monotone and drivers should just know what position means what." -- https://news.ycombinator.com/item?id=6750761 https://news.ycombinator.com/item?id=6750761
- asveikau 13y agoOK, so let's consider a spectrum: * Text being unreadable due to its color. * Text (in this sense, literature) being unreadable because there are no bold, italics, underlining, indentation. * Text being unreadable due to no spaces at all. Would you at least agree that two of these sound a bit like whining in comparison to the third? Perhaps I'm biased due to my own color blindness, but to me a piece of code without color is pretty much the same, or perhaps even better than the alternative, as I've found the colors and bold can actually make things harder to read. (In particular I've often glossed over comments because some "helpful" text editor made them colorful and less legible.) I thought it was also a clear-cut analogy, though apparently not universal around these parts, that most prose usually tends to read just fine without that emphasis you speak of. Most of all I was bothered by this careless disparagement of anyone who would dream of seeing text in one color as "1960s" -- as if that means anything.
- Crito 13y agoFew points here: > Text being unreadable due to no spaces at all." Text without spaces is readable. Text with spaces is more readable. Readability is a continuum. Literature is certainly readable without bold, italics, underlining, and indentation. Colored text, for people with normal vision, remains clear. Clarity is not lost, another channel for transmitting information to the user is added. We don't use color highlighting in books, but perhaps we should. I haven't tried it, so I cannot say it would not be better. I have heard it suggested that coloring lines of dialog would make literature easier to read. I think it is very plausible that Shakespeare in particular could be made more accessible with the use of color. With the rise of ebooks, this sort of experimentation is now feasible and I think that it is likely that we will see people experimenting with this sort of thing as the new capabilities that ebook devices provide give us an opportunity to revisit some traditions that were originally set in place by material constraint. And lastly, code is not read as literature typically is. Most literature is written with linearity in mind. Most code is written under the assumption that the reader will jump up and down it repetitively, frequently jumping to random locations in the file. Coloring code therefore becomes useful in much the same way that coloring road atlases are useful. You don't need to trace a road back to the nearest label to find out that it is an interstate; you can tell right away because it is blue. That big area inside of that squiggly line? It's a state park, you can tell because it is slightly green, so you don't need to look around on either side for the dotted line surrounding it. That green area in the middle? That's a comment, you can tell without scanning your eyes to either side looking for comment characters...
- stan_rogers 13y agoRubrication used to be a normal thing. It was just harder to do economically for a very long time; there's no reason why we shouldn't do it now for general publications (at least in hardcover and electronic editions).
- chilldream 13y agoTeaching Shakespeare should only happen with students who are already literate. This discussion is about people who are learning to read.
- userbinator 13y agoPerhaps programming should be taught with smaller programs, if it requires syntax highlighting to "[break]down code into units". (Personally, I hate syntax highlighting because it looks like "like a clown vomited all over the page"; I find it incredibly distracting, especially when different colours have different contrasts against the background. The only time I find it a little useful is to match opening parentheses with their closing ones, and even there I prefer shades of grey to colour.)
- pgbovine 13y ago(i should add that as a parenthetical in the article) this is exactly what a newbie would see if they opened up a built-in text editor on, say, their mac. something similar would happen for windows. (same goes for lack of fancy terminal customizations.) getting a syntax-highlighting editor is an extra installation step that can take hours to set up and explain in a class, due to people's different environmental setups. e.g., someone has some obscure virus checker installed that prevents gVim or Emacs or Sublime Text or whatever from installing, or crashes on startup. edit: also, it's putting lipstick on a porcine. the code examples i've shown will be equally cryptic to a beginner even with syntax highlighting.
- vezzy-fnord 13y agonano supports syntax highlighting, so that's not necessarily an issue.