代码、口头交流与文档都很重要!

  《领域驱动设计》书中在书面的设计文档小节中讲到:每个敏捷过程对于文档编写都有自己的原则,极限编程提倡不适用额外的设计文档,让代码自己来表达含义,但将代码作为设计文档有他的局限性。会使读者负担过多的细节问题。尽管代码的行为是明确的,但并不意味着是明显的。一个行为背后的含义会很难表达出来。团队内部大量的口头交流能够给代码阅读提供一些上下文环境的分析和指导,但也是暂时和局限的,并不只是开发人员需要理解模型。口头交流在语义上弥补了代码的太过细节的问题,但任何规模的团队还是需要能够提供稳定性和共享能力的书面文档,然而编写能够真正帮助团队生产优秀软件的书面文档是一个挑战。

  我认为代码、口头交流和文档都很重要,我们不能绝对的站在任何一边。在敏捷过程中不能要求非常详细的文档,也不能误解敏捷开发而不要任何文档。《敏捷文档》描述了面对面沟通和文档的一些主要特点:

Face-to-face communication Documentation
Direct interaction
Face-to-face communication allows
for quick question-and-answer
cycles. You ask something, someone
answers, you ask back on a specific
detail, you get a more precise
answer, someone else offers their
ideas and so on. Face-to-face
communication involves people in a
very direct way.
Self-determined pace
Different people grasp information
at different speeds. Many people
find they still have questions when a
discussion is over – questions they
didn’t think of in the heat of the
debate. Documents, however, allow
people to read at their own pace,
going back and forth through the
material as they need to.
Non-verbal communication
People don’t communicate through
words exclusively. A large part of
communication takes place in a
non-verbal way – through sound,
gestures and subconscious body
language. These things are possible
only through face-to-face
communication.
Introvert communication
While some people love to engage
in debate, others don’t. Introverted
people are sometimes painfully
silent during discussions, though
they may have a lot to say. They
have their say more easily when
they are given the chance to write
things down, as this allows them to
have second thoughts and take time
to reflect.
Personal involvement
Talking to each other means getting
to know each other. Building trust
happens much faster among people
who are in the same room than
among people who communicate
through writing only.
Scalability
Documents can be made widely
available. You can address an almost
unlimited number of people at a
time. Moreover, documents can
reach the members of a distributed
team – people working in different
places.
Fast availability
In a well-organised project, there
are Experts In Earshot (Cockburn
1998) readily available for
answering questions you may have.
Discussions can come up on the
spur of the moment. Documents
may be available as well, but time
goes by until documents are written
and made available.
Long-term availability
Once a project reaches its end the
team disperses – experts may no
longer be available. The software,
however, will still need maintenance
or even refactoring. Only written
documents are available beyond the
limits of the actual project.


  通过以上对比可以发现,面对面沟通和文档并不是对立的,而是互为补充的,就像我们读书学习一样,我们需要从书本和老师的授课中学习。

你可能感兴趣的:(代码)