Tools for SW Projects

Similar documents
Tools for SW Projects

Software Architecture, Process and Management Tools for Software Projects

Version control CSE 403

Ingegneria del Software Corso di Laurea in Informatica per il Management (D)VCS. Davide Rossi Dipartimento di Informatica Università di Bologna

CSC 2700: Scientific Computing

Construction: version control and system building

Version control CSE 403

Section 2: Developer tools and you. Alex Mariakakis (staff-wide)

Revision Control. Software Engineering SS 2007

Version control CSE 403

2/8/18. Overview. Project Management. The First Law. What is Project Management? What Are These Changes? Software Configuration Management (SCM)

Project Management. Overview

Revision Control. An Introduction Using Git 1/15

Construction: version control and system building

CPSC 491. Lecture 19 & 20: Source Code Version Control. VCS = Version Control Software SCM = Source Code Management

Laboratorio di Programmazione. Prof. Marco Bertini

Version Control Systems

Software configuration management

SECTION 1: CODE REASONING + VERSION CONTROL + ECLIPSE

Version Control. Second level Third level Fourth level Fifth level. - Software Development Project. January 17, 2018

M E R C U R I A L (The Source Control Management)

2/9/2013 LAB OUTLINE INTRODUCTION TO VCS WHY VERSION CONTROL SYSTEM(VCS)? II SENG 371 SOFTWARE EVOLUTION VERSION CONTROL SYSTEMS

Chapter 3. Revision Control

CSE 374 Programming Concepts & Tools. Hal Perkins Winter 2012 Lecture 16 Version control and svn

TDDC88 Lab 4 Software Configuration Management

Software Systems Design. Version control systems and documentation

CSE 390 Lecture 9. Version control and Subversion (svn)

Source Control. Comp-206 : Introduction to Software Systems Lecture 21. Alexandre Denault Computer Science McGill University Fall 2006

Software Evolution. Dr. James A. Bednar. With material from

Programming with Haiku

Programming in the large. Lecture 22: Configuration Management. Agenda for today. Bertrand Meyer. Bernd Schoeller

Task-Oriented Solutions to Over 175 Common Problems. Covers. Eclipse 3.0. Eclipse CookbookTM. Steve Holzner

Open Source Development

What is version control? (discuss) Who has used version control? Favorite VCS? Uses of version control (read)

Software Tools Subversion

Version Control. Second level Third level Fourth level Fifth level. - Software Development Project. January 11, 2017

Warmup. A programmer s wife tells him, Would you mind going to the store and picking up a loaf of bread? Also, if they have eggs, get a dozen.

Revision control systems (RCS) and. Subversion

A Practical Introduction to Version Control Systems

Configuration Management

Source Code Control & Bug Tracking

CSCI 2132: Software Development. Norbert Zeh. Faculty of Computer Science Dalhousie University. Subversion (and Git) Winter 2019

Using git To Manage Your System's Configuration

Versioning. Terms. Configuration item (CI) Version Configuration Management aggregate Configuration Baseline

Project Build Process. Abhijit Bhosale M.Tech (IT) School of Information Technology, IIT Kharagpur

Portions adapted from A Visual Guide to Version Control. Introduction to CVS

Introduction to version control. David Rey DREAM

Reviewing gcc, make, gdb, and Linux Editors 1

The Cost of Going it Alone Dave Neary

Effective Team Collaboration with Simulink

GIT TUTORIAL. Creative Software Architectures for Collaborative Projects CS 130 Donald J. Patterson

Technology Background Development environment, Skeleton and Libraries

Version Control Systems

Software Architecture

[Software Development] Development Tools. Davide Balzarotti. Eurecom Sophia Antipolis, France

Working in Teams CS 520 Theory and Practice of Software Engineering Fall 2018

Categorizing Migrations

Introduction to Version Control

Part I Part 1 Version Control Systems (VCSs)

Part I Part 1 Version Control Systems (VCSs)

EGit in Eclipse. Distributed Verzion Control Systems

Introduction to CTIP. Lee, Dong-Ah

Version Control Systems

Outline. Configuration management. Main Phases MOTIVATION

SECTION 2: HW3 Setup.

Platforms (Operating Systems)

Version Control Systems

CS108, Stanford Handout #37. Source Control CVS

Review Version Control Concepts

Implement an ADT while using Subversion

Large Scale Webapps Devteam Infrastructure

Version control system (VCS)

Revision control. INF5750/ Lecture 2 (Part I)

Version Control System GIT

02161: Software Engineering I

Source Code Control. Quiz with Explainations. Hans-Petter Halvorsen, M.Sc.

Common Configuration Management Tasks: How to Do Them with Subversion

Decentralized Version Control Systems

Version Control for the 2- Pizza Team: Merge Conflicts (ELLS 9.5) Armando Fox

Distributed Version Control

Introduction To Python

CSE 331 Software Design & Implementation

Storing and Managing Code with CVS

Part I Part 1 Version Control Systems (VCSs)

Git better. Collaborative project management using Git and GitHub. Matteo Sostero March 13, Sant Anna School of Advanced Studies

Home Page. Title Page. Contents. Page 1 of 17. Version Control. Go Back. Ken Bloom. Full Screen. Linux User Group of Davis March 1, Close.

Technology Background Development environment, Skeleton and Libraries

Part I Part 1 Version Control Systems (VCSs)

Part I Part 1 Version Control Systems (VCSs)

INET

SECTION 2: Loop Reasoning & HW3 Setup

Welcome! Virtual tutorial starts at 15:00 GMT. Please leave feedback afterwards at:

CVS. Computer Science and Engineering College of Engineering The Ohio State University. Lecture 21

A free continuous code review plug in for Eclipse

Pieter van den Hombergh. September 9, 2015

CSE 15L Winter Midterm :) Review

SOFTWARE CONFIGURATION MANAGEMENT

Version Control. Kyungbaek Kim. Chonnam National University School of Electronics and Computer Engineering. Original slides from James Brucker

Project Automation. If it hurts, automate it! Jan Pool NioCAD University of Stellenbosch 19 March 2008

Version Control with Git ME 461 Fall 2018

Transcription:

Tools for SW Projects Dr. James A. Bednar jbednar@inf.ed.ac.uk http://homepages.inf.ed.ac.uk/jbednar SAPM Spring 2012: Tools 1

Automating Drudgery Most of the techniques we ll talk about can benefit from automated tools, and some would be totally impractical without them (e.g. the continual code changes in XP). Discussing all relevant tools is outside of the scope of this course. We will look at a few extremely useful categories, focusing on baseline open-source packages that everyone should be using unless their organization has something better. We primarily consider useful individual tools, not integrated project management suites, because they are more widely applicable. SAPM Spring 2012: Tools 2

Tool Types Version control (e.g. Git) Build control (e.g. make) Debuggers (e.g. gdb) Unit/regression testing (e.g. JUnit) Bug/issue tracking (e.g. Trac) Documentation generation (e.g. JavaDoc) Project management (e.g. MS Project) Integrated suites (e.g. RUP) Others SAPM Spring 2012: Tools 3

1st Step: Version Control (VC) Before starting any project (programming or otherwise!) with edits occuring over more than a couple of weeks, you should set up a version control system. If you do not, you deserve every one of the many troubles that will be coming your way. Version control or configuration management systems like Git, Mercurial, or Subversion track and manage changes during development and maintenance of any long-lived set of files. They tell you who changed what, when. SAPM Spring 2012: Tools 4

Subversion Example UNIX> svn update UNIX> svn diff -x -u -r 295 tools.tex - is teh best + is the best UNIX> svn commit -m "Fixed typo" tools.tex UNIX> svn log tools.tex r296 jbednar 2008-01-08 1 line Fixed typo r295 jbednar 2007-12-23 30 lines Added section on Subversion Here I had edited the file tools.tex, so I updated my copies to make sure they were current, checked the diffs, then committed my change. The new version of tools.tex is now 296, with the current date stamp. SAPM Spring 2012: Tools 5

Basic VC Features Have separate repository holding all versions of all files Changes in local copies don t affect the repository until a commit (a.k.a. checkin) Commits merge your changes with the repository files Locking or merge mechanisms prevent or resolve collisions between users Can provide complete history of all changes, reproducing state at any time and tracking who changed what when SAPM Spring 2012: Tools 6

Managing software releases Any decent company will have version control already Release to the public: modified snapshot of repository Typical sequence for a release: 1. Feature freeze (only bugfixes allowed now) 2. Release candidate (could ship if bug-free) 3. Candidate sent to testing team 4. Bugs are found, patched new release candidate Typically there are different code branches maintained (at least production and development) SAPM Spring 2012: Tools 7

3 Generations of VC Systems 1972 Single file system; locking ensures only one person at a time edits any file. Nearly unusable for multiple developers. Examples: RCS, SCCS, VSS ($$) 1985 Realization: file merging works! No need for locking; just merge later. Allows multiple distributed developers, or just separate copies. Examples: CVS, Subversion 2002 Realization: repository merging works! DVCS: no need for one central repository; repositories and not just files can be merged as needed. Useful even for single developers, to handle independent sets of changes separately. Examples: Git, Mercurial, bzr, Bitkeeper ($$) SAPM Spring 2012: Tools 8

Which VC tool to use? Surely everyone is already using VC for your own projects, even when not required? If not, set one up today and try using it for a few weeks. Over the course of my career the de facto standard has changed from RCS to CVS to Subversion. Post-Subversion there was market fragmentation with many 3rd-generation DVCS tools, but git and Mercurial seem to be coming out on top. Others like bzr, Codeville, SVK, darcs, arch/tla, ArX, and monotone seem to have less market share, but perhaps it s too early to tell. SAPM Spring 2012: Tools 9

Integrated VC Businesses often use commercial VC tools, such as IBM Rational ClearCase, Microsoft VSS, and Borland StarTeam. Except for possibly Bitkeeper, the revision control portions of these systems tend to be quite outdated and much harder to use than necessary. What large commercial tools do often offer is a workflow that is tightly integrated into a larger process model, of which version control is only a part. Various programs also help put a pretty face on VC, such as TortoiseCVS and TortoiseSVN (integrating VC into Windows), and Emacs and Eclipse (integrating VC into editing and development). SAPM Spring 2012: Tools 10

VC in SAPM We will use Git or Mercurial to coordinate work between members of each team. It is not optional. If you have trouble getting it to work, we need to sort that out. There is no way to do well on either assignment without the whole team using Git or Mercurial. At each step where work is coordinated, you will need to use the VC to do the coordination if you want full credit for the assignment. SAPM Spring 2012: Tools 11

Build Control Build control tools like make automate the process of generating an executable or compiled version of a program or other file or document from source files: UNIX> make cc -c file1.c cc -c file2.c cc -o a.out file1.o file2.o UNIX> Does everyone know how to use make/gmake or ant, and does everyone actually use them or tools like them for your own projects even when not required to do so? SAPM Spring 2012: Tools 12

Build Control is not Scripting Proper build control programs like make are not the same as scripting tools like Apple s Automator. They don t simply replay a series of actions, but instead encode a complex web of dependencies so that only the next appropriate actions are taken (based on datestamps). That is, if your build process has 4,356 steps, and it is failing on step 3,963, make will start the build process at step 3,963 each time it runs, rather than doing the first 3,962 tasks over again from the beginning. This is the main advantage of something like make over simpler scripting or build control tools. SAPM Spring 2012: Tools 13

Other Build Control Tools Java s ant is more portable in some sense, though it is not as widely used apart from Java projects. Python has a variety of builld tools, all bad. For more complicated projects needing to compile across many UNIX-like systems, consider autoconf/automake. Integrated development environments (IDEs) like Visual C++ usually replace makefiles with project files, but those are not as easily shareable to other systems. Note that build control is not just for compiling it s for making releases, or for automating any other complex task! Goal: don t do anything by hand more than 3 times. SAPM Spring 2012: Tools 14

Debuggers Debuggers allow you to: Step through code line by line Set break points Allow state to be examined or changed They are essential for C/C++, but extremely useful even for interpreted languages. Many IDEs include integrated debuggers, but there are separate command-line debuggers: gdb, jdb, pdb, etc. and many graphical ones: ddd, Insight, etc. SAPM Spring 2012: Tools 15

Unit/Regression Testing Unit regression testing frameworks make testing easy to do habitually, which makes everyone s life easier (and is required by XP, as we ll see). JUnit was developed for XP on Java, based on a Smalltalk original. It has been ported to many other languages: pyunit (Python), CppUnit (C++), NUnit (.NET), etc. There are also addons like Coverlipse to check Java code coverage, QuickCheck to generate test cases in Haskell, and doctest to run tests embedded in doc strings. SAPM Spring 2012: Tools 16

Bug/Issue Tracking Any software package with a decent-sized userbase will generate a lot of bug reports, complaints, and feature requests. Bug/issue tracking software keeps track of all of those for you; without it many fall through the cracks or end up dominating all your time and concentration. There is no standard, but Trac, GNATS, and BugZilla/ IssueZilla are widely used free tools; also: Mantis ( less confusing than Bugzilla ), TestTrack Pro (Seapine $$). If your code is hosted at a site with an integrated configuration management package like SourceForge (discussed later), it will come with bug/issue tracking. SAPM Spring 2012: Tools 17

Documentation Generation No one actually writes documentation consistently, so it always gets out of sync with code. Same goes for comments. Documentation generation software like JavaDoc (Java), NDoc (.NET), PHPDoc (PHP), and Doxygen (C++, C, Java, etc.) automatically generates documentation from your source code and comments. Most of it is guaranteed to be up to date, and if developers know their comments are going to be used as-is for the reference manual then they won t consider it wasted effort to update their comments when the code changes. SAPM Spring 2012: Tools 18

Generated Documentation Traps Even though generated documentation is often quite impressive looking, it is crucial for a human to go over it eventually to make sure it is also readable. Often the result is nearly unusable because it is repetitive, lacks context, and is missing crucial transitions between sections. (E.g. see some parts of the Informatics web site.) It takes several passes between the source code comments and the generated output to make it all work ok. Note that only reference manuals can be generated; user manuals must be written from scratch with the user in mind, and should never simply mirror the structure of the code. SAPM Spring 2012: Tools 19

Project Management Keeping track of all the sub-tasks in a large project, such as who they are assigned to, what order they have to be done, and how long each will take, is a pain. Project management software like Microsoft Project ($$) helps with this. Main feature: automatic Gannt charts and PERT charts. Basecamp ($$) is a bit more ambitious, e.g. adding distributed time tracking. Also many free programs, such as: Planner, GanttProject, KPlato, etc. SAPM Spring 2012: Tools 20

Integrated Suites For open-source projects, integrated suites like SourceForge and Google Code Hosting are freely available that do all the above and add e.g.: Document release management Binary file release management Web hosting Proprietary workflow/process management tools like the IBM Rational Unified Process suite and Cruise Control (builds, runs tests, publishes results) are even more ambitious. Integrated packages are great if you need most of their features; separate tools can be used at any time. SAPM Spring 2012: Tools 21

Summary Every sane person should be using version control and build control tools Unit/regression testing is good and much easier with the right framework Bug/issue tracking can stop you from going mad Documentation generation is great, but does not eliminate hand cleanup At least use these tools until you find something better For a big list of project management tools for Linux, see http://linas.org/linux/pm.html Required reading: Eric S. Raymond, Understanding Version-Control Systems. SAPM Spring 2012: Tools 22