documentation

Is 100% code coverage a really good thing when doing unit tests? [closed]

与世无争的帅哥 提交于 2019-11-28 21:01:22
问题 I always learned that doing maximum code coverage with unit tests is good . I also hear developers from big companies such as Microsoft saying that they write more lines of testing code than the executable code itself. Now, is it really great? Doesn't it seem sometimes like a complete loss of time which has an only effect to making maintenance more difficult ? For example, let's say I have a method DisplayBooks() which populates a list of books from a database. The product requirements tell

Where can I browse the sourcecode for libc online (like doxygen) [closed]

一曲冷凌霜 提交于 2019-11-28 21:00:21
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last year . Sometimes I want to look up the implementations of functions in the stdlib, I've downloaded the sourcecode, but it's quite messy. Just greping is not really suitable because of the many hits. Does anyone know a webpage doxygen style that has the documentation. The same goes for the linux kernel. Thanks 回答1: How

Substitutions inside links in reST / Sphinx

我的梦境 提交于 2019-11-28 19:29:38
I am using Sphinx to document a webservice that will be deployed in different servers. The documentation is full of URL examples for the user to click and they should just work. My problem is that the host, port and deployment root will vary and the documentation will have to be re-generated for every deployment. I tried defining substitutions like this: |base_url|/path .. |base_url| replace:: http://localhost:8080 But the generated HTML is not what I want (doesn't include "/path" in the generated link): <a href="http://localhost:8080">http://localhost:8080</a>/path Does anybody know how to

How do you document your PHP functions and classes inline? [closed]

只愿长相守 提交于 2019-11-28 18:50:23
问题 I know there are many different standards for PHP code inline documentation. Here's what I mean by inline documentation, and please correct me if there is a better term: /** * This is the description for the class below. * * @package my-package * @subpackage my-subpackage * @author my-name * @version my-version * ... */ class orderActions { ... What is the best and most widely-accepted form of inline documentation? In other words, what are those forms of inline documentation that everyone

What's the best way to document Perl code? [closed]

时光总嘲笑我的痴心妄想 提交于 2019-11-28 18:41:20
Any suggestion how I can document my Perl code? What do you use and what tools are available to help me? Which module do you use to convert pod to html? Look inside almost any Perl module and you'll see the Plain Old Documentation (POD) format. On CPAN Search , when looking at a module you have the option of viewing the raw source, so that's one way you can look at the raw pod, but you can also use perldoc from the command line. The -m switch shows you the file perldoc -m Foo::Bar Or, if you want to find the file so you can look at it in your favorite editor, use the -l switch to find it:

Documenting C++/CLI library code for use from c# - best tools and practices? [closed]

ε祈祈猫儿з 提交于 2019-11-28 18:26:59
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed last year . I'm working on a project where a c++/cli library is being used primarily from a c# application. Is there any way to make the code comments in c++/cli visible to c# intellisence within visual studio? Assuming there isn't, what would be the best way to document the c++/cli code

javadoc: @version and @since

核能气质少年 提交于 2019-11-28 18:09:37
Is there a reason to include both @version and @since as part of a class? They seem to be mutually exclusive. Also, what does %I% and %G% mean, and how to set/use them? @version %I%, %G% Thanks dhable The @version tag should be the current version of the release or file in question. The %I% , %G% syntax are macros that the source control software would replace with the current version of the file and the date when the file is checked out. The @since tag should be used to define which version you added the method, class, etc. This is your hint to other developers that they should only expect

How to properly write cross-references to external documentation with intersphinx?

只愿长相守 提交于 2019-11-28 17:55:40
I'm trying to add cross-references to external API into my documentation but I'm facing three different behaviors. I am using sphinx(1.3.1) with Python(2.7.3) and my intersphinx mapping is configured as: { 'python': ('https://docs.python.org/2.7', None), 'numpy': ('http://docs.scipy.org/doc/numpy/', None), 'cv2' : ('http://docs.opencv.org/2.4/', None), 'h5py' : ('http://docs.h5py.org/en/latest/', None) } I have no trouble writing a cross-reference to numpy API with :class:`numpy.ndarray` or :func:`numpy.array` which gives me, as expected, something like numpy.ndarray . However, with h5py, the

.NET xml docs - inheriting documentation

核能气质少年 提交于 2019-11-28 17:48:37
NDoc has an XML element inheritdoc which allows you to inherit documentation of a member from the parent class (or an implemented interface). However, Visual Studio (i.e. the C# compiler) does not understand this tag and complains about the documentation not being present or complete. So does StyleCop and some other tools. Is there an alternative approach? How do you go about keeping the docs complete, yet without duplicating the XML descriptions? One alternative is to use GhostDoc - an add-in for Visual Studio that automatically generates comments for you. This duplicates the XML description

How best to write documentation targeting both HTML and PDF? [closed]

你说的曾经没有我的故事 提交于 2019-11-28 17:35:34
Latex-to-html converters I've seen in the past have been pretty awful. Editing raw html is no fun and doesn't seem to translate well to the printed page. How do others solve this problem? Links to examples (both pdf and html) would be great. Added: Another similar question was just asked: What formatting language should I use for project documentation For documenting code, I also recommend Sphinx. ReStructured Text is nice because it is readable and somewhat marked up in plaintext, and can do a nice job converting to html and to pdf. I still like LaTeX for certain things. My wife and I use