Make Your Comments Count!

IDEs tend to de-emphasize comments. Visually, code is more prominent than comments. For example, while most IDEs use black for "code", in NetBeans comments are light gray; in IntelliJ they are also light gray, in Eclipse they are light green and in Visual Studio they are also light green. In all cases, the comments have less visual weight than the surrounding code.

I have a new co-worker, and when I went over to his computer the other day I was shocked to see his modified syntax highlighting color scheme. He had basically turned everything to black - except comments. And the comments - bright red! His rationale is that comments are vital, and he wants them to jump out visually.

I decided I'd try out his scheme. Switching all comments over to red was too much - I like javadoc for methods to stay "quiet". So I settled on switching line comments over, and leave block comments alone (and these are always javadoc, because I use line comments in all other cases, even for comments that span multiple lines.)

I've tried it out for several days now and I think I might stick with it. Judge for yourself - if not by screenshot then in your own IDE.


(Click image for full size)

Comments:

How did you manage to set the line comment character differently from the multiline comment color? Netbeans Tools: Options: Fonts & Colors: Syntax only has a single category for "Comment". \^H\^H OK, nevermind: Actually, there you can set a different color for block vs. line comment if you choose Language: Java. I thought some other readers might want to know that. What would be useful, however, is to be able to set the javadoc colors separately from block comments, since they are used for different purposes. Anybody who would like that might want to vote for this enhancement: http://www.netbeans.org/issues/show_bug.cgi?id=25509

Posted by guest on February 12, 2006 at 12:07 AM PST #

[...]I was just going through a blog feed for Sun peeps and noticed an interesting post titled Make Your Comments Count! by Tor Norbye. His point was...[...]

Posted by Paul Healey on February 12, 2006 at 03:41 AM PST #

Post a Comment:
Comments are closed for this entry.
About

Tor Norbye

Search

Archives
« July 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
  
       
Today