software management
play

Software Management Roland Kammerer Institute of Computer - PowerPoint PPT Presentation

Software Management Kammerer Software Management Roland Kammerer Institute of Computer Engineering Vienna University of Technology 27. October 2010 Software Overview Management Kammerer 1. Source Code Documentation 2. Source Code


  1. Software Management Kammerer Software Management Roland Kammerer Institute of Computer Engineering Vienna University of Technology 27. October 2010

  2. Software Overview Management Kammerer 1. Source Code Documentation 2. Source Code Management 3. FLOSS Development

  3. Software Management Kammerer Docu Why? What? How? Part I Doxygen Source Code Documentation

  4. Software Why is documentation important? Management Kammerer Docu Why? What? How? Doxygen ◮ Documentation is helpful and not cumbersome ◮ Helps developer(s) (yourself and others) ◮ Increases readability ◮ API documentation for other developers

  5. Software What should be documented Management Kammerer Docu Why? What? ◮ Variable/Functionnames should be self-explanatory How? Doxygen ◮ Comments in Source Code (e.g., tricky sections, tricky algorithms) ◮ Functions (e.g., input parameters, return values → API documentation) ◮ No “last modified by/date”. That is the job of SCMs. ◮ No redundant documentation (e.g. .h and .c files). Document .h files

  6. Software How to document source code Management Kammerer Docu Why? What? How? Doxygen ◮ Simple comments in source code ◮ Tools (e.g., javadoc, doxygen, pydoc,...)

  7. Software Why doxygen? Management Kammerer Docu Why? What? How? Doxygen ◮ Free Software ◮ Easy to use ◮ Multilanguage support (e.g., C, C++, Java, Python, Fortran,...) ◮ Multiple output formats (e.g., html, latex)

  8. Software Doxygen example Management Kammerer Docu /** Why? * \brief Adds two parameters What? * How? This function takes two integers as parameters * Doxygen and returns the sum of them. * * * \param a Fist summand * \param b Second summand * \return Sum of a and b */ int sum( int a, int b) { printf("Parameter a %d and b %d\n", a, b); return a +b; }

  9. Software How to use doxygen Management Kammerer Docu Why? What? How? 1. Install doxygen Doxygen 2. $ doxygen -g <config-file> 3. Edit the config-file (e.g., output directory, output format) 4. Document your code 5. Generate documentation: $ doxygen <config-file> 6. Add a rule to your Makefile

  10. Software Management Kammerer SCM Motivation Central Distributed Part II git History Details Source Code Management (SCM) Basics Remotes Branching Examples LU

  11. Software Motivation for Source Code Management Management Kammerer SCM Motivation Central $ cp main.c main.c.bak Distributed $ vim main.c git $ make History $ cp main.c main.c.bak.tmp Details $ cp main.c.bak main.c Basics $ vim main.c Remotes $ make Branching $ cp main.c main.c_tmp_segfault Examples LU $ ... $ tar -czvf proj-20101027.tar.gz proj/ $ #and mail it

  12. Software Motivation for Source Code Management (2) Management Kammerer SCM Motivation Central ◮ No manual cp -ing of files Distributed ◮ Revisions: Simple to get to a known/working state git History ◮ Sharing: No more sending tar-balls Details Basics ◮ Branches: Work on a specific feature, then merge it back, Remotes or discard it Branching Examples ◮ Tracking down bugs: Automatic bi-secting between LU revisions (modern SCMS) ◮ Integrity: checksums, signed-off-by (again, modern SCMs)

  13. Software Central Server Solutions Management Kammerer SCM Motivation Central Distributed git History Details Basics Remotes Branching ◮ One central server. Clients checkout/commit code from/to Examples LU server ◮ Server is single point of failure ◮ Commit-access problem ◮ Old style: CVS cannot rename files, SVN branching is a mess ◮ “Advantage”: Considered simpler by beginners (e.g. no separate commit/push stage)

  14. Software Central Server Solutions (2) Management Kammerer SCM Motivation ◮ Current Versions System (CVS) Central ◮ Developed since 1989 Distributed ◮ Not maintained any more git ◮ Subversion (SVN) History Details ◮ “Modern version of CVS” Basics ◮ Developed since 2000 Remotes ◮ Adopted by Apache Foundation → Apache Subversion Branching Examples LU The slogan of Subversion for a while was “CVS done right”, or something like that, and if you start with that kind of slogan, there’s nowhere you can go. There is no way to do CVS right. – Linus Torvalds

  15. Software Distributed SCMs Management Kammerer SCM Motivation Central Distributed git History Details Basics Remotes Branching Examples LU ◮ No central server ◮ Every local repository is a full copy ◮ Allows distributed workflow ◮ Allows central server workflow

  16. Software Distributed SCMs (2) Management Kammerer SCM ◮ Mercurial (hg) Motivation ◮ Developed since 2005 Central ◮ Very popular (Google, Microsoft, Mozilla, Python,...) Distributed ◮ git git History ◮ Developed since 2005 Details ◮ Used by Linux (yes, the kernel not the OS), Perl, Qt, Basics Gnome, Ruby on Rails, Android,...) Remotes ◮ Bazaar (bzr) Branching Examples ◮ Developed since 2005-2006 LU ◮ Used by Launchpad, Ubuntu, wget,...) ◮ darcs ◮ Developed since 2002-2003 ◮ Very interesting from an academic standpoint (e.g., patch-theory)

  17. Software History of git Management Kammerer SCM Motivation Central ◮ Linux (the kernel) used proprietary DVCS: Bitkeeper Distributed git ◮ Bitkeeper crisis in 2005 (Hint: this does not happen with History FLOSS software) Details ◮ Requirements for new SCM: Basics Remotes ◮ Speed Branching ◮ Simple desing Examples ◮ Non-linear development (thousands of parallel branches) LU ◮ Fully distributed ◮ Support for large projects (speed and data size)

  18. Software Cheap Local Branching Management Kammerer SCM ◮ Branching/Merging is easy Motivation Central ◮ In-repo branches Distributed ◮ Use branches for every feature (feature-branch) git ◮ Easy to share branches with other developers History Details Basics Remotes Branching Examples LU

  19. Software Everything is Local Management Kammerer SCM Motivation Central Distributed ◮ In general true for every distributed SCM git ◮ Only fetch/pull/push need communication to outside, History Details therefore actions are fast Basics Remotes ◮ Offline commits (e.g., in trains, airplanes,...) Branching ◮ No single point of failure because no central server Examples LU ◮ Makes git very fast (init, add, status, diff, branching,...)

  20. Software Everything is Local (2) Management Kammerer SCM Motivation Central Distributed git History Details Basics Remotes Branching Examples LU

  21. Software Git is Small Management Kammerer SCM Motivation Central Distributed git From “Django” project: History git hg bzr svn Details repo alone 24M 34M 45M Basics Remotes entire dir 43M 53M 64M 61M Branching ◮ Nice effect: no annoying .svn dirs Examples LU

  22. Software The Staging Area a.k.a The Index Management Kammerer SCM Motivation Central Distributed ◮ Area to draft commits git ◮ Seams to be overkill, but is a really nice feature History Details Basics Remotes Branching Examples LU or

  23. Software Any Workflow Management Kammerer SCM Motivation Central Distributed git History ◮ Central server workflow Details ◮ Integration Manager workflow Basics Remotes ◮ Dictator and Lieutenants workflow Branching Examples LU

  24. Software Integration Manager Workflow Management Kammerer SCM Motivation Central Distributed developer developer developer blessed public public public git repository History Details Basics Remotes Branching Examples integration developer developer developer LU manager private private private

  25. Software Dictator and Lieutenants Workflow Management Kammerer SCM Motivation Central blessed dictator Distributed repository git History Details Basics lieutenant lieutenant Remotes Branching Examples LU developer developer developer public public public

  26. Software Snapshots, Not Differences Management Kammerer SCM ◮ Traditional SCMS (deltas): Motivation Central Distributed git History Details Basics Remotes Branching ◮ git (snapshots, “mini file system”): Examples LU

  27. Software Installing git Management Kammerer SCM Motivation Central Distributed ◮ GNU/Linux: git History $ apt-get install git-core #debian/ubuntu Details $ pacman -S git #arch linux Basics $ yum install git-core #fedora Remotes Branching ◮ Mac: Examples LU http://code.google.com/p/git-osx-installer ◮ Windows: http://code.google.com/p/msysgit

  28. Software Basic Setup Management Kammerer ◮ Identity: SCM Motivation Central $ git config --global user.name "John Doe" Distributed $ git config --global user.email johndoe@example.net git ◮ Editor: History Details Basics $ git config --global core.editor vim Remotes Branching ◮ Diff Tool: Examples LU $ git config --global merge.tool vimdiff ◮ Checking the Settings: $ git config --list $ git config user.name

  29. Software Getting Help Management Kammerer SCM Motivation Central Distributed git History $ git help <verb> Details $ git <verb> --help Basics $ man git-<verb> Remotes Branching Examples LU

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend