Live data from Hacker News

Ask HN: How can code documentation be improved?

news.ycombinator.com

1–8 of 8 posts

Re: Ask HN: How can code documentation be improved?

#5
A lot of embedded systems documentation is in PDF format. e.g. each processor will have a datasheet that gives a quick summary of the part's features, and reference manual that describes the interfaces in more detail.

PDF is a nice format. It means you can have all the documentation saved locally. But most of the time it would make no difference if the documenation was on the web, and being able to see metrics about which pages are most visited would probably help both the writers and the users. There are probably additional features (like better search, or Q&A forums linked to the documentation) that could be provided on the web that aren't available in PDF readers. Users might also learn about changes in documentation more frequently. Some companies like Nordic already provide web-based documentation.

Another issue: Companies will buy verilog libraries to use in their SoC. And the documentation for those libraries comes along with them. But the support and Q&A for these libraries is handled separately.

e.g. Companies A and B both sell SoCs, and both purchased the verilog code/documentation for their I2C peripherals from Company C. A and B include C's documenation in their manuals as if they wrote it. Then they run separate support forums where users unknowingly ask the same questions about C's library. It would be more efficient if there was just one support forum.

Re: Ask HN: How can code documentation be improved?

#8
The hardest part about this question is that “code documentation” is a very vague concept. Are we talking about an API document for programmers who are using the code, calling its functions? Are we talking documentation for users of the application that this code implements? Are we talking about documentation for someone who will be maintaining the code? Some other type of documentation? What problem are you really trying to solve with this documentation?

Once you answer that question then you can start to figure out the best way to document it.