The Awesome Power of Well-Documented Code

<p>Back when I was researching&nbsp;<a href="https://www.penguinrandomhouse.com/books/539883/coders-by-clive-thompson/" rel="noopener ugc nofollow" target="_blank">my book&nbsp;<em>Coders</em></a>, I talked to a lot of folks who ran very successful open-source projects.</p> <p>&ldquo;What&rdquo;, I asked them all, &ldquo;made your project take off?&rdquo; Why did yours gain legs, when so many others &mdash; including quite good projects &mdash; languished, and never attracted much interest?</p> <p>Most of them all said something that warmed my little programmer-and-liberal-arts-nerd soul:</p> <blockquote> <p>&ldquo;We had really good documentation.&rdquo;</p> </blockquote> <p>&ldquo;Documentation&rdquo; &mdash; for those who aren&rsquo;t already hipdeep in the&nbsp;<em>swamps of software development &mdash;&nbsp;</em>means what it sounds like. It&rsquo;s when the coders sit down to write careful instructions on how, precisely, someone else can use their open-source code. Often they&rsquo;re writing these instructions for other coders. For example, a few months ago I tried using&nbsp;<a href="https://kaboomjs.com/" rel="noopener ugc nofollow" target="_blank">the Kaboom javascript software that helps you write little video games</a>, so I used&nbsp;<a href="https://kaboomjs.com/doc/intro" rel="noopener ugc nofollow" target="_blank">their documentation and tutorials</a>.</p> <p>Documentation is all about being an excellent&nbsp;<em>writer</em>. Specifically, it requires us to do something quite challenging: To imagine ourselves in the shoes of someone who&rsquo;s never used our code &hellip; so we can carefully guide them through. We have to develop a strong theory of mind for the newbie. We have to dispense with as much jargon as possible, and intuit the things about our code that might seem awkward or baffling at first.</p> <p>Many software developers are terrible at this. To be fair, most everyone<em>&nbsp;</em>is<em>&nbsp;</em>bad at it; hell, I know full-time journalists who fail at this task all the time.</p> <p>The writing of documentation is, in other words, a liberal art.</p> <p><a href="https://betterprogramming.pub/the-awesome-power-of-well-documented-code-cadf42e07be3">Read More</a></p>
Tags: Games Code