I watched with great interest the Mojang "Mojam" for Humble Bundle (link might not be valid for a long time), and throughout the video, I saw some great things on how these guys use their code.
One of these things was that one of the developer use ascii art comments in his code to better navigate around.
This gives something like this:
/////////////////////////////////////////////
// ___ ___ ___ _ __ _ //
// / |/ | / | | | | \ | | //
// / /| /| | / /| | | | | \| | //
// / / |__/ | | / / | | | | | |\ | //
// / / | | / / | | | | | | \ | //
// /_/ |_| /_/ |_| |_| |_| \_| //
// //
/////////////////////////////////////////////
int main()
{
// do some stuff
return 0;
}
This may look bad right there, but associated with editors like Sublime, it becomes powerful, because the "zoomed out" view that Sublime exposes lets you read that text and navigate in your code like a breeze.
Now, there are plenty of cool ascii art text generators out there. But none of these (at least those I looked at) generate C++/C compliant text.
Meaning: I have to manually add the comment slashes (//
) all around to make it go along in the code.
Do you guys use this trick?
If yes, do you have a tool to generate these "comments" around the text?
Recently, when I was searching something in my .php file with list of routes for a site, I've decided to make such big ASCII comments. And now, I use them (not in all source files, but for example in long config files), and these comments really help to navigate.
Here is how it looks in my Sublime Minimap:
So far, I didn't automate the process of creating such comments. I use online ASCII creator from this site. I use font "basic"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With