4 ms·
It would be good if you could categorise your source code comments somehow and have your IDE help manage them. By default you would browse code with important
by benjaminwootton 14y ago
It would be good if you could categorise your source code comments somehow and have your IDE help manage them.
By default you would browse code with important summary comments visible, but if you're interested in any one area, you could then drill down into much more detailed and text dense comments right within your editor to read about design decisions and the bigger picture in plain English.
Comments could be further categorised into, say, business logic related comments or those related to design patterns, or page flow or test cases or internationalization or whatever, giving you more options to learn about the code and drill into the specific area you care about.
This readily accessible living documentation would be a much better way of learning about code bases in plain English without consulting out-of-date technical specs.
- fexl 14y agoI like what you're hinting at here. In my case, the "IDE" is vim running in a terminal window, with another terminal window to the right where I run git, grep, and tests. Nevertheless, even in this austere environment I could imagine a vim plugin which would let me wrap some sort of bracketed enclosures around piece of text, possibly nested, with the ability to expand and contract with the press of single key. Without even searching, I'll estimate the probability of that already existing as 85%. Problem is, anyone viewing the code in a normal text display, e.g. on github or plain text editor, would see all the excruciating detail, all the time. But it's an interesting idea. Perhaps instead of the expand/collapse, I could just use links. Vim users should note that when you're sitting on a word, if you type "gf" it will Go to that File (i.e. open it up right there), and you can use "o" and "i" the way you use "Back" and "Forward" in a browser.
- fexl 14y agoSorry, I meant you can use "Ctrl-o" and "Ctrl-i" that way.
- ovi256 14y agoI think you are going towards Knuth's literate programming. Not a bad approach.
- emillon 14y agoYou can probably use folding for this use case. With explicit folding markers "{{{" and "}}}" or other syntax rules it's already possible in all major text editors.
- tsewlliw 14y agobefore you go to far into that rabbit hole, turn on whatever fancy blame view you like best. Its probably good enough.