Learn how to document your code

In our latest resource, we show you how to create a website and use it to document your coding projects.

documenting your code Raspberry Pi resources

Why document your code?

Search the web with the right key words for your programming conundrum, and you’re bound to find someone who has written software to address a question that’s at least similar to yours. And not only that, they’re also making their software freely available under an open source license, and writing documentation to help you use their code. How awesome it that?!

Many people who write code are eager to share their programs and allow others to use and remix them according to their own needs. This is why the open source community is so inviting for makers, especially those who want to make projects that are yet beyond their ability to build from scratch.

So unless you plan on turning your code into a money-making commodity, you’re writing scripts that you can share with others. By adding clear, supporting online documentation to your code, you’ll help people all over the world to not only use your software but to also understand what everything does and become better programmers themselves.

Our resource

In our latest resource, we show you how to use docstrings to automatically create documentation for your Python code. Then, we walk you through using Sphinx to build a website showcasing this documentation and any example scripts you want to share with the world.

You’ll learn how to create supporting documentation to guide users through elements of your code, add multiple pages to your website, and use themes to costumise the site’s layout and make it stand out.

You can find the resource here, and our full list of free resources here on our projects site.

More free resources


We’ve also recently released a new Sense HAT music player project, along with a resource teaching basic Raspberry Pi terminal navigation skills with a fun game to find all the Pac-Man ghosts.

The post Learn how to document your code appeared first on Raspberry Pi.

from Raspberry Pi https://ift.tt/2zMW3tD
via IFTTT

Leave a Reply

Your email address will not be published. Required fields are marked *

3 + 13 =

This site uses Akismet to reduce spam. Learn how your comment data is processed.