News for hackers. Stuff that matters.
Re:Portrait of a N00b by mhb on Monday February 11, 2008 @09:15AM (#113341)
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?
Re:Portrait of a N00b by mechanical_fish on Monday February 11, 2008 @12:36PM (#113469)
The 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.

Re:Portrait of a N00b by mhb on Monday February 11, 2008 @02:30PM (#113534)
If 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.
Re:Portrait of a N00b by mojuba on Monday February 11, 2008 @12:08PM (#113449)
You 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.

Re:Portrait of a N00b by mhb on Monday February 11, 2008 @12:28PM (#113464)
The 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.
Re:Portrait of a N00b by mojuba on Monday February 11, 2008 @12:31PM (#113465)
How about my old-school comments that I might need when editing my source on Mars Rover?
Re:Portrait of a N00b by mhb on Monday February 11, 2008 @01:59PM (#113511)
They can remain in the source file. The additional meta-commentary would augment, not replace them.
Re:Portrait of a N00b by pmjordan on Monday February 11, 2008 @11:16AM (#113409)
As 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.
Re:Portrait of a N00b by dhimes on Monday February 11, 2008 @11:51AM (#113436)
Funny. That's exactly where I thought he was going, too.