3 ms·
Good rule. If I may add a derivative rule about coding articles and tutorials. Please please put filenames to each and every code snippet. Example working wit
by rawoke083600 5y ago
Good rule. If I may add a derivative rule about coding articles and tutorials.
Please please put filenames to each and every code snippet.
Example working with any modern js-stack there are a gazillion (ok not really) files to keep track of: package.json,main
js, index.js, app.js etc etc.
Another example: Any language that uses some sort of modules.
Knowing what the filename is of code-module-snippet makes it much easier for an outsider or newcomer to understand the context and actual article.
ok rant over :)
- coldpie 5y agoYeah my brain immediately went to how/if this should be applied to code listings, too. A while back I wrote an article[1] that used somewhat lengthy chunks of C code, which I felt could not be abbreviated. I ended up highlighting the lines which I discussed later in bold, a different color, and with a reference number in brackets, to which the prose referred. I could maybe have done line numbers, which I think is the closest match to what this article proposes, but it's a bit tricky because I wanted to refer to multiple lines when discussing some subjects. I'm satisfied with how I did it, but I still wonder if there's a better option. [1] https://www.smokingonabike.com/2021/02/28/hacking-super-monkey-ball-part-2-decompilation-with-ghidra/ https://www.smokingonabike.com/2021/02/28/hacking-super-monk...