What sort of documentation is most useful for a java application?

  • Thread starter frustratedprogrammer
  • Start date
F

frustratedprogrammer

I'm interested in other's experiences as to what types of
documentation for java are most useful. Obviously Java docs are very
common and very widely used. Apart from java docs however what do
people find useful?

I know a lot of managers feel that a system should have a certain
amount of documentation supporting it, but in my experience often
documentation that is produced for this purpose never gets used after
it is written. I would suspect some sort of high level design of the
system which describes it's interfaces, major architectural components
and design patterns is useful. Perhaps also a support/operations
manual for those that need to support the system in production can be
useful. However when it gets down to detailed design documents such
as class diagrams and sequence diagrams I rarely find them useful.
Usually they don't get maintained and they just don't help you
understand the system that much.

Although I'm not totally convinced I'm starting to lean towards the
idea that good software is self documenting and software quality is
more important than documentation. Also having been involved in some
agile projects lately, I'm starting to see how the automated tests for
a system can be the best documentation of what the system does.

What do others think?
 
?

=?ISO-8859-1?Q?Arne_Vajh=F8j?=

I'm interested in other's experiences as to what types of
documentation for java are most useful. Obviously Java docs are very
common and very widely used. Apart from java docs however what do
people find useful?

I know a lot of managers feel that a system should have a certain
amount of documentation supporting it, but in my experience often
documentation that is produced for this purpose never gets used after
it is written. I would suspect some sort of high level design of the
system which describes it's interfaces, major architectural components
and design patterns is useful. Perhaps also a support/operations
manual for those that need to support the system in production can be
useful. However when it gets down to detailed design documents such
as class diagrams and sequence diagrams I rarely find them useful.
Usually they don't get maintained and they just don't help you
understand the system that much.

Although I'm not totally convinced I'm starting to lean towards the
idea that good software is self documenting and software quality is
more important than documentation. Also having been involved in some
agile projects lately, I'm starting to see how the automated tests for
a system can be the best documentation of what the system does.

The most common error with class diagram and sequence diagrams is
to try and make them complete. They are much more useful if they
only show the most important information.

Keeping documentation up to date is just another rule that needs
to be enforced like unit tests, code style etc.etc..

Arne
 
F

frustratedprogrammer

The most common error with class diagram and sequence diagrams is
to try and make them complete. They are much more useful if they
only show the most important information.

Keeping documentation up to date is just another rule that needs
to be enforced like unit tests, code style etc.etc..

Arne

I find using a continous build tool like cruise control and having
unit tests and checkstyle run everytime code gets checked in can force
people to maintain unit test and code style. Unfortunately there is no
such way to force documents to stay updated. That is another reason
why I question whether there is really any value in having some forms
of documentation.
 
T

Tarkin

I find using a continous build tool like cruise control and having
unit tests and checkstyle run everytime code gets checked in can force
people to maintain unit test and code style. Unfortunately there is no
such way to force documents to stay updated. That is another reason
why I question whether there is really any value in having some forms
of documentation.
what types of documentation for java are most useful.

Based on the context the rest of the paragraph,
I'm going to assume you mean java _applications_,
although the documentation for java makes perfect
case example for everything below..

Even with that kind of subdivision, there are still
huge ranges of documentation and application types
(applet, CLI, GUI, webapp, servlet container,
workflow engine, retro computer emulator....).

Firstly, we have *internal* documentation, in
the form of comments, which help explain the
code to someone else.

Then there is usually some sort of (basic)
manual- be it man pages, info pages, CHM,
javadoc, README.txt, html, etc.

Real-time context-sensitive documentation:
tooltips (for GUIs).

Depending on the scope/size of the app, there
may be additional manuals which describe the
software from different points of view- an
architectural view, an administrator's view,
a user's view, etc.

Finally, we have the 'business' documentation-
whitepapers, release announcements, presentations,
etc.
Unfortunately there is no such way to
force documents to stay updated.

I thought the enforcement of maintaining
documentation would be a project
manager/coordinator 's job?
...is really any value in having some forms
of documentation.

SOME documentation is better than NO documentation.

The question of the value of (some forms of) doc
is pertinent- i.e. does a customer purchasing
a spreadsheet or financial app need use-case
diagrams and flow charts? No. Does an enterprise
purchasing an Enterprise Service Architecture System
with Message queuing mind if there's some
documentation missing? I would. If I spend a significant
sum of money on an Enterprise level application suite,
I had better receive Enterprise level documentation-
at the least I'll hound your help center; at worst,
I'll buy your competitor's software, and tell everyone
I know that your product sucks.

But imagine also an open-source project like Tomcat-
what if they're documentation was lacking? Well,
it would begin to lose appeal. People would grumble,
and eventually use some other software. Your 'baby'
might become discontinued.

TTFN,
Tarkin
 
L

Lew

I thought the enforcement of maintaining
documentation would be a project
manager/coordinator 's job?

Have penalties for non-compliance ranging from uncomfortable chats with the
project manager to denial of bonuses or raises to termination of employment.

Have incentives like a one-thousand dollar quarterly bonus and award ceremony
for the developer with the "best" documentation according to house standards.

-- Lew
 
?

=?ISO-8859-1?Q?Arne_Vajh=F8j?=

I find using a continous build tool like cruise control and having
unit tests and checkstyle run everytime code gets checked in can force
people to maintain unit test and code style. Unfortunately there is no
such way to force documents to stay updated. That is another reason
why I question whether there is really any value in having some forms
of documentation.

That unit tests are run by build tool does not ensure quality of
the unit tests. The mechanical part of coding convention can
be checked by software, but use of meaningful names and
correct comments require a human reader.

You can also do some rudimentary checking of docs like
checking how many revisions in source control, size etc.
programmatic.

But in the end you need people to check that things are
done correctly.

Arne
 
E

Ed

(e-mail address removed) skrev:
I'm interested in other's experiences as to what types of
documentation for java are most useful. Obviously Java docs are very
common and very widely used. Apart from java docs however what do
people find useful?

To mirror what someone else said, there are levels of documentations;
the best documentation is the documentation that gives you the level
of detail that you require. A tester might want to know the overall
flow of a feature and the ultimate change that triggering this feature
has on the overall system; he probably doesn't care about method
signatures. On the other hand, the designer that's to maintain the
feature needs to know precisely these method signatures. A user of the
feature only needs to know the interface that the feature exposes,
etc. Many documents that one person sees as good, another will see as
bad.

Architecture has long known about these different, "Views," for
different, "Stakeholders," for example: logical view, deployment view,
process view, etc. I'm unaware of as rigorous a distinction on source-
code level.
I know a lot of managers feel that a system should have a certain
amount of documentation supporting it, but in my experience often
documentation that is produced for this purpose never gets used after
it is written. I would suspect some sort of high level design of the
system which describes it's interfaces, major architectural components
and design patterns is useful.

Again, there is no, "Useful," documentation without considering for
whom the documentation is written. I doubt a manager would see much
use in class and sequence diagrams.
Perhaps also a support/operations
manual for those that need to support the system in production can be
useful. However when it gets down to detailed design documents such
as class diagrams and sequence diagrams I rarely find them useful.

Do you rarely find them useful because they are inherently bad or
because they don't answer the questions you're asking? If the latter,
it could be because you are asking inappropraite questions of the
documentation. You don't get a good overall view of a system from
class-diagrams (if the system is of any reasonable size); you don't a
good idea of how a system is deployed over various computing devices
by looking at the JavaDoc, etc.

Class diagrams fail to provide a good overall view of a system because
they are not, "Comprehension-scalable," in other words, their
complexity is usually proportional to their number.

Package diagrams offer a much better granule for overall comprehension
(but fail to provide much information on dynamic behaviour).
Hierarchical package diagrams are better still.
Usually they don't get maintained and they just don't help you
understand the system that much.

Documentation is only as good as the process that maintains it, that's
true.
Although I'm not totally convinced I'm starting to lean towards the
idea that good software is self documenting and software quality is
more important than documentation.

"Self-documenting software;" I'm not sure what you mean by that, but
I'll presume here you mean that you can gain an understanding of the
code by reading the code itself. If so, and if this is your only
source of documentation, then you've already alienated everyone who
isn't used to looking at source code, which usually means the managers
that have to budget for the software's maintenance (yes, some managers
do read source code, but not all).

Note also that encapsulation has implications for source-code-level
documentation, too. An object should know precisely what it does, and
very little else; particularly, it should know very little about the
objects that use its services. The documentation for an object, thus,
usually won't describe the objects that use it; in other words, its
documentation is as encapsulated away from the rest of the system as
its behaviour.

"Software quality is more important than documentation." An
interesting observation.
Also having been involved in some
agile projects lately, I'm starting to see how the automated tests for
a system can be the best documentation of what the system does.

Depends on the user of the documentation because ... well, you get my
point.
What do others think?

For what it's worth, I think there will always be a place for
documentation describing an application in an introductory manner (as
there will always be new people who want to know, "What the
application does," if that application is successful). I find it
useful when this introductory documentation also points to the source
code where needed, but without filling the documentation itself.
Traditional, static documentation (Word and Framemaker documents, for
example) seem more clumsy at handling such references than HTML.

Here's an example of a small application's documentation; the
documentation is targetted at two types of programmer: the programmer
who wants an overall view of how the application works, and the
programmer who must maintain the application. Admittedly, these are
quite close roles, certainly closer than a programmer to a manager,
but I think it would be relatively easy to add a third, manager level
of documentation that would refer to the text here (which in turn
refers to the source code).

The beauty of this example is: you can make up your own mind, and
whatever decision you arrive at is unarguably correct. For you.

If you read it (or just enough to get a flavour; it's not trivially
short) and at the end have no idea what this application does or how
it does it, then the documentation has failed. If, furthermore, you
want to know not only the overall application, but also a very
specific implementation of some contained solution, then, too, the
documentation has failed:
http://www.edmundkirwan.com/servlet/fractal/cs1/frac-cs10.html

..ed
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top