4 ms·
Before he branched off to the static type discussion, I thought he was going to propose a code editor which facilitated meta-data comments. That way the program
by mhb 19y ago
Before he branched off to the static type discussion, I thought he was going to propose a code editor which facilitated meta-data comments. That way the programmer could provide comments as verbose as he liked and the reader could decide whether to view them. They could include links, additional documentation, etc. The code and comments could be viewed in a split-screen, separate windows, etc. Maybe this exists?
- pmjordan 19y agoAs far as I've been able to find, there isn't. And yes, I think there would be value in something like this. I'm actually working on a weird doxygen/wiki/interaction-graph hybrid thing to ease code comprehension at the moment. Not far along though, so I'm not sure it'll be as useful as I'm hoping it will be.
- dhimes 19y agoFunny. That's exactly where I thought he was going, too.
- mojuba 19y agoYou can collapse/expand comment blocks in Visual Studio, although I'm not sure if VS can hide all of them at once. If not, it's a matter of writing a very simple plug-in. But anyway, that's not my point. I think the idea of turning your plain-text source code into a 3D monster that requires a special rendering engine - is a wrong idea if you are in the webapp business. My server was under a massive attack recently and what saved my arse was terse and beautiful server-side code that I changed with vi on the fly. But of course we all know it's not only about attacks. Thus, unless we have magical IDEs that can edit and compile projects remotely on a Mars Rover, the conservative mantra Source code must be plain text wins. So there's no hope for noobs. Either you jump onto the veterans' boat straight away or you don't even start programming. Ok, just kidding. Damn Steve Yegge, my comments become longer than usual after reading his posts.
- mhb 19y agoThe source code could remain plain text. For those who want to view the meta-comments, their meta-comment-enabled IDE would open the plain text with its accompanying meta-comment file.
- mechanical_fish 19y agoThe problem with the now-you-see-it-now-you-don't approach is that, when you separate the code and the comments, they quickly diverge. The veteran will tinker with the code but never touch the comments, because she doesn't see them and doesn't care to see them. Then the comments become worse than useless, because they will actively mislead or confuse the newb who reads and writes them. This is a special case of the general problem with metadata: you can't keep it in sync with the real data. This is what leads, e.g., Ruby programmers to become religious fanatics about DRY. The other problem is that not all comments are equal: some are fluff, some are fluffy-looking but destined to become HTML documentation and are therefore important to keep around, some are terse and vital, some are hints for future refactorings and bug fixes. A system which hides all comments isn't really what I would want; I'd want to hide the fluffy ones and keep the important ones visible. And suddenly you need meta-metadata, and your editor becomes baroque, and your head explodes.
- mhb 19y agoIf the meta-comment system was useful enough, it might not be neglected. The meta-metadata is what could add a lot of value. You could tag your comments and make them selectively visible when they are relevant to the task at hand.