4 ms·
Reading through this article, I thought of an idea. What if comments were made using an annotation-like/type input, so you select the lines of code that it pert
by iambot 14y ago
Reading through this article, I thought of an idea. What if comments were made using an annotation-like/type input, so you select the lines of code that it pertains to, then enter your message. So whenever the cursor/pointer is within a block of code, the relevant comment/annotation is highlighted/made obvious - ie: like a post-it
- olalonde 14y agoYes but this would go against the long tradition of coding with flat text files. See http://stackoverflow.com/questions/160633/why-do-we-still-program-with-flat-files http://stackoverflow.com/questions/160633/why-do-we-still-pr...
- phpnode 14y agonot necessarily, you could do what docco does and assume that comments pertain to the lines of code immediately below them, up until the next comment or the end of the function
- SquareWheel 14y agoWell, we could use a commented syntax and build editor support for it. If HTML, <!-- COMMENT: lorem ipsum -->. If C/Java/etc. then the same but with /* */.
- LaRakel 14y agoTags in comments already exist, most common are probably TODO, FIXME and NOTE.
- ajuc 14y agoSome of us already use metadata in our daily coding - for example commit messages. Recently I've noticed, that I comment less, and instead write more information in commit messages, and do svn blame more often. It's better, because it has more context (you see to which changes this comment is relevant), and is always up-to-date, because you always write fresh commit messages. We have a rule in company, that you have to add task number from JIRA to each commit message, and this alone is a huge improvement - you can always check WHY some change was made).
- nene 14y agoNow that would take the gray comments a step further by making them completely invisible :) I can't really see the benefit of hunting the comments from your code with cursor. It definitely would make it even more unlikely that comments aren't updated when code is changed.