Hacker News new | ask | show | jobs
by HaoZeke 1967 days ago
I've been programming and documenting large projects with sphinx and doxygen for years now and I really don't see the appeal or the problem this solves. Bad documentation is because of lazy programmers. Nothing more, nothing less. If someone is actually able to keep up with the myriad changing C++ standards, not to mention testing practices and frameworks, documentation is not hard in comparison at all. What is often missing is incentives to write documentation, again not something this solves. As for markdown, that's easy to implement with Sphinx anyway. I wrote a series of posts on documenting modern c++ a while ago [1]. There are some fantastic free tools out there, which also allow doctests.

[1] https://rgoswami.me/posts/doc-cpp-dox-sph-exhale/

1 comments

I agree that bad documentation is often due to lack of effort. Many developers don't like writing documentation, which is unfortunate because bad documentation can drag down otherwise great projects. If I'm evaluating two libraries and one has great docs and the other has awful docs, you know which one I'm picking.

Likewise, hdoc isn't instantly going to make an engineer spring up and say "I'm going to write documentation!". No tool is going to do that. hdoc is meant to simplify and streamline the process of writing documentation. Current tools disincentivize writing documentation. If you need to spend a day cobbling together 5 different tools and themes to set up a documentation page for your project you might not be as eager to do it as you would be if you could write a five line configuration file and run a single binary.

No doubt there are free tools that can produce decent output. However, all of them require considerable effort that could be spent writing code or documentation. Others don't support modern features, or completely fail to process basic C++ code. Clearly a market for a tool which solves these problems exists, there is no shortage of people asking about Doxygen alternatives or better ways to document their C++ code. Lastly, there are companies in other communities which provide a similar services, for instance ReadTheDocs.com which has documentation and managed hosting for Python projects.

ReadTheDocs.com is largely the de-facto standard for Python projects because it is free to use. Since a lot of developers have experience with it, in production too, it is often used as a host (even though it is sub-par as a web-host and CI service). For a product which seems to have been trademarked in 2019, not having a free-plan or more importantly, one for FOSS projects, means this is at best, a niche option. Additionally, being proprietary and closed source means it will be difficult to integrate into multi-language programs. Doxygen is a good standard, which works across multiple languages, and its reach is augmented by Sphinx with inter-sphinx. In the domain I work (scientific software), very few tools are written in pure C++.

By the way, I hope my comments are not taken as anything other than constructive criticism.