december 5, 2005 documentation and project organization software engineering workshop, december 5-6,...

47
December 5, 2005 Documentation and Project Organization Software Engineering Workshop, December 5-6, 2005 Jan Beutel ETH Zürich, Institut TIK

Upload: ross-craig

Post on 29-Jan-2016

219 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: December 5, 2005 Documentation and Project Organization Software Engineering Workshop, December 5-6, 2005 Jan Beutel ETH Zürich, Institut TIK

December 5, 2005

Documentation and Project Organization

Software Engineering Workshop,

December 5-6, 2005Jan Beutel

ETH Zürich, Institut TIK

Page 2: December 5, 2005 Documentation and Project Organization Software Engineering Workshop, December 5-6, 2005 Jan Beutel ETH Zürich, Institut TIK

2

Overview

Project Organization Specification Bug tracking/Milestones Access to information – mail, web, files, version control

Documentation User Guides, Specifications Inline doc’s – commented code, automated doc’s README vs. ChangeLog Mailing lists Structure – overview documents

Examples Do’s and don’ts in a university environment/sada

Page 3: December 5, 2005 Documentation and Project Organization Software Engineering Workshop, December 5-6, 2005 Jan Beutel ETH Zürich, Institut TIK

3

Project Organization – Different Means

Plain text documents MS Project File server Mailing lists Web pages

Authored/Static Wikis

Repositories sourceforge.net savannah.nongnu.org BSCW

Page 4: December 5, 2005 Documentation and Project Organization Software Engineering Workshop, December 5-6, 2005 Jan Beutel ETH Zürich, Institut TIK

4

Single Documents

Plain Text The ultimate LT-interface Easy to generate and read Universal Easy to automate with shell scripts, Perl, Java, etc. Require lot’s of discipline (formatting, location, versions,

debugging)

File Server Storage Easy to use, fast Offline sync works with Windows, CVS, SVN or gnu sync Not universally accessible Not maintenance free (human intervention necessary) Permission Problems

Page 5: December 5, 2005 Documentation and Project Organization Software Engineering Workshop, December 5-6, 2005 Jan Beutel ETH Zürich, Institut TIK

5

MS Project et. al.

Industry standard for large projects Integrate resource/personnel planning Based on tool availability Revision control?

Good means for planning/tracking Milestones Subprojects Resources/personnel

Extensive reporting capabilities Automated checks Exporting to html

Bit of an overkill for most of us…

Page 6: December 5, 2005 Documentation and Project Organization Software Engineering Workshop, December 5-6, 2005 Jan Beutel ETH Zürich, Institut TIK

6

Email – Mailing Lists

Fast, universal, accessible

Mailing lists Different audiences use different lists (devel, user, core) Usually too much information to stay current Mailing lists usually come with archival function Operation not maintenance free (access, spam, etc…)

Mailing lists – Searching the archives Local mail dir starts at subscription date and bloats No straightforward search through everything in archives Not all lists are search(-ed/-able) by Google

Page 7: December 5, 2005 Documentation and Project Organization Software Engineering Workshop, December 5-6, 2005 Jan Beutel ETH Zürich, Institut TIK

7

Web Pages

Authored/Static pages Fast Who is the webmaster?

Wiki Pages Everyone is the webmaster! Hierarchical permissions Continuous improvement of content Transparent ChangeLog Control/accuracy of content?

Page 8: December 5, 2005 Documentation and Project Organization Software Engineering Workshop, December 5-6, 2005 Jan Beutel ETH Zürich, Institut TIK

8

Wiki Pages – www.btnode.ethz.ch

Page 9: December 5, 2005 Documentation and Project Organization Software Engineering Workshop, December 5-6, 2005 Jan Beutel ETH Zürich, Institut TIK

9

Wiki Pages – Simple Markup for Everyone

Page 10: December 5, 2005 Documentation and Project Organization Software Engineering Workshop, December 5-6, 2005 Jan Beutel ETH Zürich, Institut TIK

10

Wiki Pages – Integrated ChangeLog

Page 11: December 5, 2005 Documentation and Project Organization Software Engineering Workshop, December 5-6, 2005 Jan Beutel ETH Zürich, Institut TIK

11

Wiki Pages – History Compare

Page 12: December 5, 2005 Documentation and Project Organization Software Engineering Workshop, December 5-6, 2005 Jan Beutel ETH Zürich, Institut TIK

12

Wiki Pages – Access Control, Internal Page

Page 13: December 5, 2005 Documentation and Project Organization Software Engineering Workshop, December 5-6, 2005 Jan Beutel ETH Zürich, Institut TIK

13

Wiki Pages – iGEM Collaboration Success

Page 14: December 5, 2005 Documentation and Project Organization Software Engineering Workshop, December 5-6, 2005 Jan Beutel ETH Zürich, Institut TIK

14

Wiki Pages Revisited

Projects must have certain size/impact DB based Wikis require maintenance Easy porting of static pages using script interfaces

Some doc’s still need static pages Auto-generated content: weblogs, doxygen, … Downloads “Long-term” static links

Page 15: December 5, 2005 Documentation and Project Organization Software Engineering Workshop, December 5-6, 2005 Jan Beutel ETH Zürich, Institut TIK

15

Weblogs – Interesting Project Statistics

Page 16: December 5, 2005 Documentation and Project Organization Software Engineering Workshop, December 5-6, 2005 Jan Beutel ETH Zürich, Institut TIK

16

Project Specific Weblog in 5 minutes

Grep through the access_log for “your” files Run webalizer over this data#/bin/shcd /foo_bar_dir/btnode_weblogrm -rf btnode_access.log

grep -h -i btnode /install_dir/apache/logs/access_log > /foo_bar_dir/btnode_weblog/btnode_access.log

webalizer -c ./webalizer.conf -Q

Page 17: December 5, 2005 Documentation and Project Organization Software Engineering Workshop, December 5-6, 2005 Jan Beutel ETH Zürich, Institut TIK

17

sourceforge.net

SourceForge.net is the world's largest open source software development web site, hosting more than 100,000 projects and over 1,000,000 registered users with a centralized resource for managing projects, issues, communications, and code.

Free of cost

Hosting of many services: Web pages, release management, CVS, news, support,

tracking facilities, stats, mailing lists, user management

Access/availability: Very good for developers, stable enough for public

Page 18: December 5, 2005 Documentation and Project Organization Software Engineering Workshop, December 5-6, 2005 Jan Beutel ETH Zürich, Institut TIK

18

SourceForge.net

Page 19: December 5, 2005 Documentation and Project Organization Software Engineering Workshop, December 5-6, 2005 Jan Beutel ETH Zürich, Institut TIK

19

SourceForge.net – Feature Requests

Page 20: December 5, 2005 Documentation and Project Organization Software Engineering Workshop, December 5-6, 2005 Jan Beutel ETH Zürich, Institut TIK

20

SourceForge.net - Tracker

Page 21: December 5, 2005 Documentation and Project Organization Software Engineering Workshop, December 5-6, 2005 Jan Beutel ETH Zürich, Institut TIK

21

BSCW Repositories

Basic Support for Cooperative Work Originates in very large, multinational projects Many features, lots of maintenance, complicated usage

Page 22: December 5, 2005 Documentation and Project Organization Software Engineering Workshop, December 5-6, 2005 Jan Beutel ETH Zürich, Institut TIK

22

Software Documentation

Software Documentation or Source Code Documentation is written text that accompanies computer software. It either explains how it operates or how to use it. [wikipedia.org]

Types of documentation: Architecture - Architectural overview of software; including relations

to an environment, construction principles to be used in design and technical documentation, etc.

Design - The design of software components. Technical - Documentation of code, algorithms, interfaces, APIs. End User - Manuals for the end-user. Operator - Manuals for the systems administrator. Application operator - Manuals for the "superuser" of the software. Help desk - Manuals for first and second line support.

Page 23: December 5, 2005 Documentation and Project Organization Software Engineering Workshop, December 5-6, 2005 Jan Beutel ETH Zürich, Institut TIK

23

Software Documentation cont. Often, tools such as Doxygen, javadoc, ROBODoc, POD or TwinText can be

used to auto-generate the code documents; that is they extract the comments from the source code and create reference manuals in such forms as text or HTML files. Code documents are often organized into a reference guide style, allowing a programmer to quickly look up an arbitrary function or class.

Many programmers really like the idea of auto-generating documentation for various reasons. For example, because it is extracted from the source code itself (for example, through comments), the programmer can write it while referring to his code, and can use the same tools he used to create the source code, to make the documentation. This makes it much easier to keep the documentation up-to-date.

Of course, a downside is that only programmers can edit this kind of documentation, and it depends on them to refresh the output (for example, by running a cron job to update the documents nightly). Some would characterize this as a pro rather than a con.

Donald Knuth has insisted on the fact that software documentation can be a very difficult afterthought process and has been advocating Literate programming where documentation is written in the same time as the source code and extracted by automatic means.

Page 24: December 5, 2005 Documentation and Project Organization Software Engineering Workshop, December 5-6, 2005 Jan Beutel ETH Zürich, Institut TIK

24

Industry Documentation Flows

Page 25: December 5, 2005 Documentation and Project Organization Software Engineering Workshop, December 5-6, 2005 Jan Beutel ETH Zürich, Institut TIK

25

Useful Documentation Types

User Guides Specification Documents Inline doc’s – comments, automated doc’s README vs. ChangeLog Mailing lists Structure – overview documents

Examples

Page 26: December 5, 2005 Documentation and Project Organization Software Engineering Workshop, December 5-6, 2005 Jan Beutel ETH Zürich, Institut TIK

26

User Guides

Engineers tend to ignore these We usually unpack, plug-in, start up and have troubles…

Usually contain interesting details Basic overview Release Notes Configuration information

Large effort to create and maintain

Page 27: December 5, 2005 Documentation and Project Organization Software Engineering Workshop, December 5-6, 2005 Jan Beutel ETH Zürich, Institut TIK

27

Specifications

Page 28: December 5, 2005 Documentation and Project Organization Software Engineering Workshop, December 5-6, 2005 Jan Beutel ETH Zürich, Institut TIK

28

TinyOS TEP ConventionsGeneral Conventions============================================================

- Avoid the use of acronyms and abbreviations that are not well known. Try not to abbreviate "just because".

- Acronyms should be capitalized (as in Java), i.e., Adc, not ADC. Exception: 2-letter acronyms should be all caps (e.g., AM for active messages, not Am)

- If you need to abbreviate a word, do so consistently. Try to be consistent with code outside your own.

- All code should be documented using `nesdoc` [nesdoc]_, `Doxygen` [Doxygen]_ or `Javadoc` [Javadoc]_. Ideally each command, event and function has documentation. At a bare minimum the interface, component, class or file needs a paragraph of description. - If you write code for a file, add an `@author` tag to the toplevel documentation block.

Page 29: December 5, 2005 Documentation and Project Organization Software Engineering Workshop, December 5-6, 2005 Jan Beutel ETH Zürich, Institut TIK

29

TinyOS – TEP Structure

Page 30: December 5, 2005 Documentation and Project Organization Software Engineering Workshop, December 5-6, 2005 Jan Beutel ETH Zürich, Institut TIK

30

Doxygen

Doxygen is a documentation system for C++, C, Java, Objective-C, Python, IDL (Corba and Microsoft flavors) and to some extent PHP, C#, ...

HTML, Latex, RTF and XML output Simple configuration files and wizards Simple, versatile markup:

Page 31: December 5, 2005 Documentation and Project Organization Software Engineering Workshop, December 5-6, 2005 Jan Beutel ETH Zürich, Institut TIK

31

Doxygen Overview Output

Page 32: December 5, 2005 Documentation and Project Organization Software Engineering Workshop, December 5-6, 2005 Jan Beutel ETH Zürich, Institut TIK

32

Doxygen – Simple Document Markup

Describe every function

Add additional information Parameters Usage Context Data types

Separate overview doc’s

Single configuration file

Page 33: December 5, 2005 Documentation and Project Organization Software Engineering Workshop, December 5-6, 2005 Jan Beutel ETH Zürich, Institut TIK

33

Doxygen - File References

Page 34: December 5, 2005 Documentation and Project Organization Software Engineering Workshop, December 5-6, 2005 Jan Beutel ETH Zürich, Institut TIK

34

Doxygen – File Reference and Examples

Page 35: December 5, 2005 Documentation and Project Organization Software Engineering Workshop, December 5-6, 2005 Jan Beutel ETH Zürich, Institut TIK

35

Doxygen – Simple Centralized Descriptions

Page 36: December 5, 2005 Documentation and Project Organization Software Engineering Workshop, December 5-6, 2005 Jan Beutel ETH Zürich, Institut TIK

36

Project ChangeLog

THE document to stayup-to-date

Easy to implement

Easy to maintain

Usage and disciplinemust be strictly enforced

Page 37: December 5, 2005 Documentation and Project Organization Software Engineering Workshop, December 5-6, 2005 Jan Beutel ETH Zürich, Institut TIK

37

Maintained ChangeLogs in Source Files

Page 38: December 5, 2005 Documentation and Project Organization Software Engineering Workshop, December 5-6, 2005 Jan Beutel ETH Zürich, Institut TIK

38

Handcrafted Comments and Version Info

Page 39: December 5, 2005 Documentation and Project Organization Software Engineering Workshop, December 5-6, 2005 Jan Beutel ETH Zürich, Institut TIK

39

Handcrafted Comments

Often necessary to understand application context

Must be used with care Quality control is hard

Who wrote it? When? Why? Is it still current? What was the exact case…

Often not cleaned up, lacking maintenance

Can be pretty ‘private”

Page 40: December 5, 2005 Documentation and Project Organization Software Engineering Workshop, December 5-6, 2005 Jan Beutel ETH Zürich, Institut TIK

40

Handcrafted Comments – The Good & Bad

Page 41: December 5, 2005 Documentation and Project Organization Software Engineering Workshop, December 5-6, 2005 Jan Beutel ETH Zürich, Institut TIK

41

Structure and Overview Doc’s

Page 42: December 5, 2005 Documentation and Project Organization Software Engineering Workshop, December 5-6, 2005 Jan Beutel ETH Zürich, Institut TIK

42

Worthwhile – Tutorials

Don’t really work unless moderated or someone is exceptionally motivated…

Page 43: December 5, 2005 Documentation and Project Organization Software Engineering Workshop, December 5-6, 2005 Jan Beutel ETH Zürich, Institut TIK

43

Maintenance Intensive - FAQs

Page 44: December 5, 2005 Documentation and Project Organization Software Engineering Workshop, December 5-6, 2005 Jan Beutel ETH Zürich, Institut TIK

44

Documentation and Organization – Typical Problems

People from different groups – departments – schools – companies – countries – … No common infrastructure available Access hierarchies (internal, external)

Most projects follow an “explorative” path You organize as you go Not much long term planning

Different people join at different times… All information must be archived and accessible

Public visibility Must be organized, structured and clean Will lead to questions (and workload)

Page 45: December 5, 2005 Documentation and Project Organization Software Engineering Workshop, December 5-6, 2005 Jan Beutel ETH Zürich, Institut TIK

45

Do’s and Don’ts

University: environments, responsibilities, project membership and working styles change frequently People come and go fast New/young people start from scratch every 3-4 years No corporate policies on resources/doc’s

Do not Set up complicated/maintenance intensive systems Do not rely on information to be pushed at you

Page 46: December 5, 2005 Documentation and Project Organization Software Engineering Workshop, December 5-6, 2005 Jan Beutel ETH Zürich, Institut TIK

46

Undergrad Student Projects

Enforce discipline Weekly meetings or status updates (email)

This is exceptional!

Page 47: December 5, 2005 Documentation and Project Organization Software Engineering Workshop, December 5-6, 2005 Jan Beutel ETH Zürich, Institut TIK

47

Undergrad Student Projects

Enforce discipline Weekly meetings or status updates (email) Interactive preparation of milestones Use of version control Reading and posting to mailing lists (very hard)

Do not rely on quality/results of student projects to meet project/paper deadlines SA projects are dry runs, time is short SAs usually provide a good proof of concept. Technical documentation usually good Context, scrutinizing questions, numerical analysis often

lacking in precision/depth