60
Software Architecture, Process and Management Tools for Software Projects Allan Clark School of Informatics University of Edinburgh http://www.inf.ed.ac.uk/teaching/courses/sapm Semester Two 2012-13

Software Architecture, Process and Management Tools for ...€¦ · SAPM Previous Lecture’s Estimation Exercise I Recall from the previous lecture I asked you all to estimate how

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Software Architecture, Process and Management Tools for ...€¦ · SAPM Previous Lecture’s Estimation Exercise I Recall from the previous lecture I asked you all to estimate how

Software Architecture, Process and ManagementTools for Software Projects

Allan Clark

School of InformaticsUniversity of Edinburgh

http://www.inf.ed.ac.uk/teaching/courses/sapmSemester Two 2012-13

Page 2: Software Architecture, Process and Management Tools for ...€¦ · SAPM Previous Lecture’s Estimation Exercise I Recall from the previous lecture I asked you all to estimate how

SAPM

Previous Lecture’s Estimation Exercise

I Recall from the previous lecture I asked you all to estimatehow long it would take to complete a given task

I I asked how long you estimate a developer would take, statingthat the developer needn’t be yourself

I I meant a suitable developer, in other words if you didn’t thinkyou personally could complete the task because you lackcertain skills you could think of a more appropriate developer

I But I didn’t say this

Page 3: Software Architecture, Process and Management Tools for ...€¦ · SAPM Previous Lecture’s Estimation Exercise I Recall from the previous lecture I asked you all to estimate how

SAPM

Previous Lecture’s Estimation ExerciseI To remind you all of the task in question:

I Write a Java to HTML translatorI It needn’t do any error detection/correctionI But nor need it translate invalid JAVAI You cannot use an existing one, but you can use libraries for

parsing text or even parsing Java itself.

Page 4: Software Architecture, Process and Management Tools for ...€¦ · SAPM Previous Lecture’s Estimation Exercise I Recall from the previous lecture I asked you all to estimate how

SAPM

Turan

I If you have very low estimate, one way of testing/showingyour estimate is to have a go at some code

I Linus Torvalds: “Talk is cheap, show me the code”

I However, Turan obviously thought this was a bit easy so hedecided to do this using only his right hand

I He didn’t say whether he was right-handed or not

I He also chose to do this in a single-fileI Obviously that gave him a huge advantage and surely more

than made up for using a single handI Although I do not yet have the data to back up this claim

Page 5: Software Architecture, Process and Management Tools for ...€¦ · SAPM Previous Lecture’s Estimation Exercise I Recall from the previous lecture I asked you all to estimate how

SAPM

Turan

I If you have very low estimate, one way of testing/showingyour estimate is to have a go at some code

I Linus Torvalds: “Talk is cheap, show me the code”I However, Turan obviously thought this was a bit easy so he

decided to do this using only his right handI He didn’t say whether he was right-handed or not

I He also chose to do this in a single-fileI Obviously that gave him a huge advantage and surely more

than made up for using a single handI Although I do not yet have the data to back up this claim

Page 6: Software Architecture, Process and Management Tools for ...€¦ · SAPM Previous Lecture’s Estimation Exercise I Recall from the previous lecture I asked you all to estimate how

SAPM

Turan

6:15 pm Started working on the project. I decided toimplement it in JavaScript so that it would be easyto see HTML results.

6:18 pm I already have a simple UI, textarea for Java sourceinput, button “To HTML” and output area. Time toget these components working! I thought it will makesense to start with getting Java keywords (public,final, catch, while) highlighted.I googled “java keywords”, got their list from Oracleweb site. First idea was to tokenize everything usingspace character as a separator. Then go through thetokens and if any of them match just surround themwith .

6:31 pm After few fails, keywords are being successfullyprocessed now.

Page 7: Software Architecture, Process and Management Tools for ...€¦ · SAPM Previous Lecture’s Estimation Exercise I Recall from the previous lecture I asked you all to estimate how

SAPM

Turan

6:45 pm Next step: Strings. As we know that Java code willalways be valid, it could be easily implemented withregex.

6:50 pm Done! got keywords and strings highlighted. Next:detect annotations, classes, constants (mostly usingJava code style convention).

7:20 pm Great! Everything seems working! Testing Time!

7:31 pm Comments.. are really tricky.. /* foo / int i; / bar */

7:31 - 8:20 pm Some RegEx magic and comments are alsoworking!

8:20 - 8:45 pm More testing minor fixes

Page 8: Software Architecture, Process and Management Tools for ...€¦ · SAPM Previous Lecture’s Estimation Exercise I Recall from the previous lecture I asked you all to estimate how

SAPM

Turan

I These time comments available at:https://gist.github.com/14b18a74c4ee83f34c58

I You can try out his code here:http://rustam.li/java2html.html

I A single HTML file with Javascript and CSS injectedI NTS (not too shabby)

I As an aside, both those urls (and most others) are valid Java

1 public static void main(String[] args)

2 {

3 System.out.println ("An inserted url");

4 https://gist.github.com/14b18a74c4ee83f34c58

5 System.out.println ("compiles Ok!");

6 }

Line comments on a line of their own were failing for me

Page 9: Software Architecture, Process and Management Tools for ...€¦ · SAPM Previous Lecture’s Estimation Exercise I Recall from the previous lecture I asked you all to estimate how

SAPM

Some Java Code

1 public boolean[] sieveOfEratosthenes(int max){

2

3 boolean[] primeCandidates = new boolean[max]; //defaults to false

4 for(int i=2; i<max; i++ ){primeCandidates[i]=true;}

5

6 for(int i=2; i<Math.sqrt(max);i++){

7 if(primeCandidates[i] == true){

8 //all multiples of i*i, except i, are not primeCandidates

9 for(int j = i + i; j<max; j=j+i){

10 primeCandidates[j]=false;

11 }

12 }

13

14 }

15 return primeCandidates;

16 }

Page 10: Software Architecture, Process and Management Tools for ...€¦ · SAPM Previous Lecture’s Estimation Exercise I Recall from the previous lecture I asked you all to estimate how

SAPM

Some Java Code

1 public boolean[] sieveOfEratosthenes(int max){

2

3 boolean[] primeCandidates = new boolean[max]; //defaults to false

4 for(int i=2; i<max; i++ ){primeCandidates[i]=true;}

5

6 for(int i=2; i<Math.sqrt(max);i++){

7 if(primeCandidates[i] == true){

8 //all multiples of i*i, except i, are not primeCandidates

9 for(int j = i + i; j<max; j=j+i){

10 primeCandidates[j]=false;

11 }

12 }

13

14 }

15 return primeCandidates;

16 }

Page 11: Software Architecture, Process and Management Tools for ...€¦ · SAPM Previous Lecture’s Estimation Exercise I Recall from the previous lecture I asked you all to estimate how

SAPM

Some “Similar” Java Code

1

2 public boolean[]sieveOfEratosthenes(int max){boolean[] primeCandidates

3 = new boolean[max]; /*defaults to false*/ for(int i=2; i<max; i++

4 ){primeCandidates[i]=true;} for(int i=2; i<Math.sqrt(max);i++){

5 if(primeCandidates[i] == true){ /*all multiples of i*i, except i,

6 are not primeCandidates*/ for(int j = i + i; j<max; j=j+i){

7 primeCandidates[j]=false;}}} return primeCandidates;}

Page 12: Software Architecture, Process and Management Tools for ...€¦ · SAPM Previous Lecture’s Estimation Exercise I Recall from the previous lecture I asked you all to estimate how

SAPM

Perfectly Valid Formatted Output

1

2 public boolean[]sieveOfEratosthenes(int max){boolean[] primeCandidates

3 = new boolean[max]; /*defaults to false*/ for(int i=2; i<max; i++

4 ){primeCandidates[i]=true;} for(int i=2; i<Math.sqrt(max);i++){

5 if(primeCandidates[i] == true){ /*all multiples of i*i, except i,

6 are not primeCandidates*/ for(int j = i + i; j<max; j=j+i){

7 primeCandidates[j]=false;}}} return primeCandidates;}

Page 13: Software Architecture, Process and Management Tools for ...€¦ · SAPM Previous Lecture’s Estimation Exercise I Recall from the previous lecture I asked you all to estimate how

SAPM

Alternative Perfectly Valid Formatted Output

1 public boolean[] sieveOfEratosthenes(int max){

2

3 boolean[] primeCandidates = new boolean[max]; //defaults to false

4 for(int i=2; i<max; i++ ){primeCandidates[i]=true;}

5

6 for(int i=2; i<Math.sqrt(max);i++){

7 if(primeCandidates[i] == true){

8 //all multiples of i*i, except i, are not primeCandidates

9 for(int j = i + i; j<max; j=j+i){

10 primeCandidates[j]=false;

11 }

12 }

13

14 }

15 return primeCandidates;

16 }

Page 14: Software Architecture, Process and Management Tools for ...€¦ · SAPM Previous Lecture’s Estimation Exercise I Recall from the previous lecture I asked you all to estimate how

SAPM

Did the experiment work?

I Mostly yes:

I I had feared that the lowest estimate would be 3 days and thehighest 5 days

I This would not have made my point at allI In the end, I didn’t have much to fear the highest and lowest

estimates were:I 8 hoursI 1 year

I Even if we take “1 year” to mean 48× 5× 8 it is still anestimate that is 48× 5 = 240 times the lowest estimate

I Neither of these are bad estimates

Page 15: Software Architecture, Process and Management Tools for ...€¦ · SAPM Previous Lecture’s Estimation Exercise I Recall from the previous lecture I asked you all to estimate how

SAPM

Did the experiment work?

I Estimates vary wildly

I These are not necessarily caused by either estimator beingpoor at estimating how long a given task will take (thoughmost of us are indeed poor at that)

I It is not necessarily caused by a difference in thecompetence/suitability/required knowledge of the twoestimators (though this can be a large factor)

I Often it is caused by the two estimators simply thinking oftwo different sets of requirements

I One may be thinking of production quality code

I One may be thinking of a rough first attempt that allowsother parts of the project dependent upon it to start

I Almost any estimate could be made correct bydecreasing/increasing the scope/quality/function/performance

Page 16: Software Architecture, Process and Management Tools for ...€¦ · SAPM Previous Lecture’s Estimation Exercise I Recall from the previous lecture I asked you all to estimate how

SAPM

Today’s TopicI Let’s get back on talk about tools for software projectsI Recall the rabbit hutchI Remind me again how many of you think you could build this

or something similar?

Page 17: Software Architecture, Process and Management Tools for ...€¦ · SAPM Previous Lecture’s Estimation Exercise I Recall from the previous lecture I asked you all to estimate how

SAPM

Do you own one of these?

and one of these?

Page 18: Software Architecture, Process and Management Tools for ...€¦ · SAPM Previous Lecture’s Estimation Exercise I Recall from the previous lecture I asked you all to estimate how

SAPM

Do you own one of these? and one of these?

Page 19: Software Architecture, Process and Management Tools for ...€¦ · SAPM Previous Lecture’s Estimation Exercise I Recall from the previous lecture I asked you all to estimate how

SAPM

Automating DrudgeryI Most of the techniques we’ll talk about can benefit from

automated tools, and some would be totally impracticalwithout them

I e.g. the continual code changes involved in ExtremeProgramming

I Discussing all relevant tools is outside of the scope of thiscourse. We will look at a few extremely useful categories,focusing on baseline open-source packages that everyoneshould be using unless their organisation has something better.

I We primarily consider useful individual tools, not integratedproject management suites, because they are more widelyapplicable.

I That isn’t to say project management suites aren’t useful.Here though we wish to highlight the individual componentsthat are useful on their own merit (outside of any integratedproject management suite)

Page 20: Software Architecture, Process and Management Tools for ...€¦ · SAPM Previous Lecture’s Estimation Exercise I Recall from the previous lecture I asked you all to estimate how

SAPM

Tool Types

I Version control (e.g. Git)

I Build control (e.g. make)

I Debuggers (e.g. gdb)

I Unit/regression testing (e.g. JUnit)

I Bug/issue tracking (e.g. Trac)

I Documentation generation (e.g. JavaDoc)

I Project management (e.g. MS Project)

I Integrated suites (e.g. RUP)

I Others

Page 21: Software Architecture, Process and Management Tools for ...€¦ · SAPM Previous Lecture’s Estimation Exercise I Recall from the previous lecture I asked you all to estimate how

SAPM

1st Step: Version Control

I Before starting any project (programming or otherwise!) withedits occuring over more than a couple of weeks, you shouldset up a version control system

I If you do not, you deserve every one of the many troubles thatwill be coming your way

I Version control or conguration management systems like Git,Mercurial, or Subversion track and manage changes duringdevelopment and maintenance of any long-lived set of files.They tell you who changed what, when.

Page 22: Software Architecture, Process and Management Tools for ...€¦ · SAPM Previous Lecture’s Estimation Exercise I Recall from the previous lecture I asked you all to estimate how

SAPM

Basic Version Control Features

I Have separate repository holding all versions of all files

I Changes in local copies do not affect the repository until acommit (a.k.a. checkin)

I Commits merge your changes with the repository files

I Locking or merge mechanisms prevent or resolve collisionsbetween users

I Can provide complete history of all changes, reproducing stateat any time and tracking who changed what when

Page 23: Software Architecture, Process and Management Tools for ...€¦ · SAPM Previous Lecture’s Estimation Exercise I Recall from the previous lecture I asked you all to estimate how

SAPM

/*

* 12/26/93 (seiwald) - allow NOTIME targets to be expanded via $(<), $(>)

* 01/04/94 (seiwald) - print all targets , bounded , when tracing commands

* 12/20/94 (seiwald) - NOTIME renamed NOTFILE.

* 12/17/02 (seiwald) - new copysettings () to protect target -specific vars

* 01/03/03 (seiwald) - T_FATE_NEWER once again gets set with missing parent

* 01/14/03 (seiwald) - fix includes fix with new internal includes TARGET

* 04/04/03 (seiwald) - fix INTERNAL node binding to avoid T_BIND_PARENTS

*/

Page 24: Software Architecture, Process and Management Tools for ...€¦ · SAPM Previous Lecture’s Estimation Exercise I Recall from the previous lecture I asked you all to estimate how

SAPM

Managing Software Releases

I Any decent company will have version control already

I Release to the public: modified snapshot of repositoryI 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 team4. Bugs are found, patched ; new release candidate

I Typically there are different code branches maintainedI at least production and developmentI but often feature branches as well

Page 25: Software Architecture, Process and Management Tools for ...€¦ · SAPM Previous Lecture’s Estimation Exercise I Recall from the previous lecture I asked you all to estimate how

SAPM

3 Generations of Version ControlI 1972 Single file system

I Locking ensures only one person at a time edits any fileI Nearly unusable for multiple developersI Examples: RCS, SCCS, VSS ($$)

I 1985 Realisation: file merging works!I No need for lockingI Just merge laterI Allows multiple distributed developers or just separate copiesI Examples: CVS, Subversion

I 2002 Realisation: repository merging works!I Distributed Version Constrol SystemI no need for one central repositoryI repositories and not just files can be merged as neededI Useful even for single developers

I to handle independent sets of changes separately

I Examples: Git, Mercurial, bzr, Bitkeeper ($$)

Page 26: Software Architecture, Process and Management Tools for ...€¦ · SAPM Previous Lecture’s Estimation Exercise I Recall from the previous lecture I asked you all to estimate how

SAPM

Which Version Control Tool To Use?I Surely everyone is already using VC for your own projects,

even when not required?I If not, set one up today and try using it for a few weeks

I The de-facto standard has changed from RCS to CVS toSubversion and now to ...

I Post-Subversion there was market fragmentation with many3rd-generation DVCS tools, but Git and Mercurial seem to becoming out on top.

I github is, in some quarters, becoming a substitute for a CVI Mercurial has an excellent tutorial: http://hginit.com/

I Others like bzr, Codeville, SVK, darcs, arch/tla, ArX, fossiland monotone seem to have less market share, but perhaps itstoo early to tell.

Page 27: Software Architecture, Process and Management Tools for ...€¦ · SAPM Previous Lecture’s Estimation Exercise I Recall from the previous lecture I asked you all to estimate how

SAPM

Integrated Version ControlI Businesses often use commercial version control tools such as:

I IBM Rational ClearCaseI Microsoft VSSI Borland StarTeam

I Except for possibly Bitkeeper, the revision control portions ofthese systems tend to be quite outdated and much harder touse than necessary

I What large commercial tools do often offer is a workow that istightly integrated into a larger process model, of which versioncontrol is only a part.

I Various programs also help put a pretty face on versioncontrol, such as

I TortoiseCVS and TortoiseSVN (integrating version control intoWindows)

I Emacs and Eclipse (integrating version control into editing anddevelopment)

Page 28: Software Architecture, Process and Management Tools for ...€¦ · SAPM Previous Lecture’s Estimation Exercise I Recall from the previous lecture I asked you all to estimate how

SAPM

Git Blame

$ git blame sbsi_numeric_devel/Template/main_Model.c

352 c44 (ntsorman 2010 -07 -08 14:03:43 +0000 5) #ifndef NO_UCF

352 c44 (ntsorman 2010 -07 -08 14:03:43 +0000 6) #include

352 c44 (ntsorman 2010 -07 -08 14:03:43 +0000 7) #endif

352 c44 (ntsorman 2010 -07 -08 14:03:43 +0000 8)

815381 (allanderek 2011 -08 -30 13:24:45 +0000 9) #include <MainOptimiseTemplate

352 c44 (ntsorman 2010 -07 -08 14:03:43 +0000 10)

Page 29: Software Architecture, Process and Management Tools for ...€¦ · SAPM Previous Lecture’s Estimation Exercise I Recall from the previous lecture I asked you all to estimate how

SAPM

Build Control

I Build control tools like make automate the process ofgenerating an executable or compiled version of a program orother file or document from source files:

I UNIX> makecc -c file1.ccc -c file2.ccc -o a.out file1.o file2.oUNIX>

I Does everyone know how to use make/gmake or ant?

I Does everyone actually use them or tools like them for yourown projects even when not required to do so?

Page 30: Software Architecture, Process and Management Tools for ...€¦ · SAPM Previous Lecture’s Estimation Exercise I Recall from the previous lecture I asked you all to estimate how

SAPM

Build Control is not Scripting

I Proper build control programs like make are not the same asscripting tools like Apple’s Automator

I They don’t simply replay a series of actionsI but instead encode a complex web of dependencies so that only

the next appropriate actions are taken (based on datestamps).

I That is, if your build process has 4,356 steps, and it is failingon step 3,963, make will start the build process at step 3,963each time it runs, rather than doing the first 3,962 tasks overagain from the beginning.

I This is the main advantage of something like make oversimpler scripting or build control tools.

Page 31: Software Architecture, Process and Management Tools for ...€¦ · SAPM Previous Lecture’s Estimation Exercise I Recall from the previous lecture I asked you all to estimate how

SAPM

Other Build Control ToolsI Java’s ant is more portable in some sense, though it is not as

widely used apart from Java projectsI Python/Ruby/etc have a variety of build toolsI For more complicated projects needing to compile across

many UNIX-like systems, consider autoconf/automakeI These are becoming outdatedI I have a bit of a problem with infrequently used DSLs

I Integrated development environments (IDEs) like VisualStudio and Eclipse usually replace makefiles with project filesbut those are not as easily shareable to other systems

I Note that build control is not just for compiling, it’s for atleast:

I making releasesI generating documentationI running testsI automating any other complex task!

I Goal: don’t do anything by hand more than 3 times

Page 32: Software Architecture, Process and Management Tools for ...€¦ · SAPM Previous Lecture’s Estimation Exercise I Recall from the previous lecture I asked you all to estimate how

SAPM

Debuggers/ProfilersI Debuggers allow you to:

I Step through code line by lineI Set break pointsI Allow state to be examined or changed

I They are essential for C/C++, but extremely useful even forinterpreted languages

I Many IDEs include integrated debuggers, but there areseparate command-line debuggers:

I gdb, jdb, pdb, etc.

and many graphical ones:I ddd, Insight, etc

I Profilers tell you where the time and memory are spent inyour application

I If you optimise without a profiler there is a 99.9% chance youare wasting your time

Page 33: Software Architecture, Process and Management Tools for ...€¦ · SAPM Previous Lecture’s Estimation Exercise I Recall from the previous lecture I asked you all to estimate how

SAPM

Unit/Regression TestingI Unit/regression testing frameworks make testing easy to do

habitually, which makes everyones life easierI and is required by Extreme Programming, as well see

I JUnit was developed for Extreme Programming on Java,based on a Smalltalk original

I It has been ported to many other languages:I pyunit (Python), CppUnit (C++), NUnit (.NET), etc.

I There are also addons such as:I Coverlipse to check Java code coverageI QuickCheck to generate test cases in HaskellI doctest to run tests embedded in doc strings

Page 34: Software Architecture, Process and Management Tools for ...€¦ · SAPM Previous Lecture’s Estimation Exercise I Recall from the previous lecture I asked you all to estimate how

SAPM

Unit Tests

1 ... deep amoungst complex matrix operations ...

2 for (int i = 0; i < something.height; i++){

3 for (int j = 0; j < something.width; i++){

4 ... complex code ...

5 x = blah[j] + bleg[i];

6 j = some_function(i);

7 z = blerger[i] + blerger[j];

8 ... more complex code;

9 }

10 }

Page 35: Software Architecture, Process and Management Tools for ...€¦ · SAPM Previous Lecture’s Estimation Exercise I Recall from the previous lecture I asked you all to estimate how

SAPM

Bug/Issue Tracking

I Any software package with a decent-sized userbase willgenerate a lot of bug reports, complaints, and feature requests

I Bug/issue tracking software keeps track of all of those for youI without it many fall through the cracks or end up dominating

all your time and concentration.

I There is no standard, but Trac, GNATS, and BugZilla/IssueTracker are widely used free tools

I also: Mantis, TestTrack Pro (Seapine $$)

I If your code is hosted at a site with an integratedconfiguration management package like SourceForge, githubor google code it will come with bug/issue tracking.

Page 36: Software Architecture, Process and Management Tools for ...€¦ · SAPM Previous Lecture’s Estimation Exercise I Recall from the previous lecture I asked you all to estimate how

SAPM

Bugs vs Features

I Question: How do I distinguish between a bug report and afeature request?

I Answer: Don’tI In either case, the software isn’t doing what your user(s)

want(s) it to do:I Either you think it is worthwhile and feasible to fix that state

of affairs or you don’tI Everything is an issue, important factors are:

I SeverityI UrgencyI PriorityI Effort to fixI Consequences of fixing (e.g. using more memory)

Page 37: Software Architecture, Process and Management Tools for ...€¦ · SAPM Previous Lecture’s Estimation Exercise I Recall from the previous lecture I asked you all to estimate how

SAPM

Bugs vs Features

I Question: How do I distinguish between a bug report and afeature request?

I Answer: Don’tI In either case, the software isn’t doing what your user(s)

want(s) it to do:I Either you think it is worthwhile and feasible to fix that state

of affairs or you don’tI Everything is an issue, important factors are:

I SeverityI UrgencyI PriorityI Effort to fixI Consequences of fixing (e.g. using more memory)

Page 38: Software Architecture, Process and Management Tools for ...€¦ · SAPM Previous Lecture’s Estimation Exercise I Recall from the previous lecture I asked you all to estimate how

SAPM

Document GenerationI No one actually writes documentation consistently, so it

always gets out of sync with codeI similarly for comments

I Documentation generation software like JavaDoc (Java),NDoc (.NET), PHPDoc (PHP), and Doxygen (C++, C, Java,etc.) automatically generates documentation from your sourcecode and comments

I Most of it is guaranteed to be up to date, and if developersknow their comments are going to be used as-is for thereference manual then they won’t consider it wasted effort toupdate their comments when the code changes

Page 39: Software Architecture, Process and Management Tools for ...€¦ · SAPM Previous Lecture’s Estimation Exercise I Recall from the previous lecture I asked you all to estimate how

SAPM

Generated Documentation Traps

I Even though generated documentation is often quiteimpressive looking, it is crucial for a human to go over iteventually to make sure it is also readable

I Often the result is nearly unusable because it is repetitive,lacks context, and is missing crucial transitions betweensections

I It takes several passes between the source code comments andthe generated output to make it all work ok

I Note that only reference manuals can be generated:I user manuals must be written from scratch with the user in

mind, and should never simply mirror the structure of the code.

Page 40: Software Architecture, Process and Management Tools for ...€¦ · SAPM Previous Lecture’s Estimation Exercise I Recall from the previous lecture I asked you all to estimate how

SAPM

Project ManagementI Keeping track of all the sub-tasks in a large project, such as:

I who they are assigned toI in what order they have to be doneI how long each will take

is a pain (at best)I Project management software like Microsoft Project ($$)

helps with thisI Main feature: automatic Gannt charts and PERT charts

I Basecamp ($$) is a bit more ambitious:I adding distributed time tracking

I Also many free programs, such as: Planner, GanttProject,KPlato, etc

Page 41: Software Architecture, Process and Management Tools for ...€¦ · SAPM Previous Lecture’s Estimation Exercise I Recall from the previous lecture I asked you all to estimate how

SAPM

Integrated SuitesI For open-source projects, integrated suites like GitHub and

Google Code Hosting are freely available that do all the aboveand add (at least):

I Document release managementI Binary le release managementI Web hostingI Discussion forums/email lists

I Proprietary workflow/process management tools like the IBMRational Unied Process suite and Cruise Control (builds, runstests, publishes results) are even more ambitious

I Integrated packages are great if you need most of theirfeatures; separate tools can be used at any time.

I Fogcreek http://www.fogcreek.com/ offers severalproducts such as kiln which are something of a half-way housebetween fully integrated and separate tools (in this casesource code control and code review)

Page 42: Software Architecture, Process and Management Tools for ...€¦ · SAPM Previous Lecture’s Estimation Exercise I Recall from the previous lecture I asked you all to estimate how

SAPM

The Joel Test

I Is a substitute for a 6 month long approach for determininghow good your software team is

I 12 yes/no questions

I No, difficult measurements: lines of code, average lines perbug etc

Page 43: Software Architecture, Process and Management Tools for ...€¦ · SAPM Previous Lecture’s Estimation Exercise I Recall from the previous lecture I asked you all to estimate how

SAPM

The Joel Test

1. Do you use source code control?

2. Can you make a build in one step?

3. Do you make daily builds?

4. Do you have a bug database?

5. Do you fix bugs before writing new code?

6. Do you have an up-to-date schedule?

7. Do you have a spec?

8. Do programmers have quiet working conditions?

9. Do you use the best tools money can buy?

10. Do you have testers?

11. Do new candidates write code during their interview?

12. Do you do hallway usability testing?

www.joelonsoftware.com/articles/fog0000000043.html

Page 44: Software Architecture, Process and Management Tools for ...€¦ · SAPM Previous Lecture’s Estimation Exercise I Recall from the previous lecture I asked you all to estimate how

SAPM: The Joel Test

Do you use source code control?

I If not, stop what you are doing, because whatever it is, you’redoing it wrong

I Without source code control, multiple developers will not beable to work together

I Even if you could, SCC is so simple to set up

I Even for single developers being able to see previous versionsis wonderful for bug-finding (amongst other things)

Page 45: Software Architecture, Process and Management Tools for ...€¦ · SAPM Previous Lecture’s Estimation Exercise I Recall from the previous lecture I asked you all to estimate how

SAPM: The Joel Test

Can you make a build in one step?

I Is there one step, that can build every kind of executable, allthe documentation, all the various versions andplatform-dependent releases

I Anything that takes more than one step can be messed up

Page 46: Software Architecture, Process and Management Tools for ...€¦ · SAPM Previous Lecture’s Estimation Exercise I Recall from the previous lecture I asked you all to estimate how

SAPM: The Joel Test

Do you make daily builds?

I Sometimes someone breaks the build

I A common mistake is to add a new source file and forget toadd it to the source code control

I Everything works/compiles on the single person’s machine butthat file is missing from the repository and hence anyreferences break the build for others

I A daily/hourly build catches these mistakes sooner ratherthan later

I Some teams have punishments for breaking the build, such asthat the offender must babysit the buildbot or becomes thecoffee-mule

Page 47: Software Architecture, Process and Management Tools for ...€¦ · SAPM Previous Lecture’s Estimation Exercise I Recall from the previous lecture I asked you all to estimate how

SAPM: The Joel Test

Do you have a bug database?

I If not, you will ship low quality code

I Even if you are single developer

I You are also likely to work on low-priority items

Page 48: Software Architecture, Process and Management Tools for ...€¦ · SAPM Previous Lecture’s Estimation Exercise I Recall from the previous lecture I asked you all to estimate how

SAPM: The Joel Test

Do you fix bugs before writing new code?

I Remember the feature matrix?

I The longer you wait before fixing a bug, the costlier it is to fixin both time and money

Page 49: Software Architecture, Process and Management Tools for ...€¦ · SAPM Previous Lecture’s Estimation Exercise I Recall from the previous lecture I asked you all to estimate how

SAPM: The Joel Test

Do you have an up-to-date schedule?

I I know writing a schedule is hard but sometimes other thingsdepend on your code

I It keeps a tab on “featuritis” and helps decide what does andwhat does not go in

Page 50: Software Architecture, Process and Management Tools for ...€¦ · SAPM Previous Lecture’s Estimation Exercise I Recall from the previous lecture I asked you all to estimate how

SAPM: The Joel Test

Do you have a spec?

I Nobody disagrees with the statement: “It’s a good idea tohave a spec”

I I warned you about coding requiring good communication,writing a spec is good communication

Page 51: Software Architecture, Process and Management Tools for ...€¦ · SAPM Previous Lecture’s Estimation Exercise I Recall from the previous lecture I asked you all to estimate how

SAPM: The Joel Test

Do programmers have quiet working conditions?

I Speaks for itself

I Interesting read on the worst time to interrupt a programmer:http://blog.ninlabs.com/2013/01/programmer-interrupted/

I A programmer takes between 10-15 minutes to start editingcode after resuming work from an interruption.

I When interrupted during an edit of a method, only 10% oftimes did a programmer resume work in less than a minute

Page 52: Software Architecture, Process and Management Tools for ...€¦ · SAPM Previous Lecture’s Estimation Exercise I Recall from the previous lecture I asked you all to estimate how

SAPM: The Joel Test

Do you use the best tools money can buy?

I Programmers are expensive, software isn’t that expensive

I This doesn’t mean to say that the best is necessarily expensive

Page 53: Software Architecture, Process and Management Tools for ...€¦ · SAPM Previous Lecture’s Estimation Exercise I Recall from the previous lecture I asked you all to estimate how

SAPM: The Joel Test

Do you have testers?

I A tester is cheaper than a programmer, don’t pay aprogrammer to test

I Similar to asking a surgeon to take over a nurse’s shift for aweek but still pay the them the surgeon’s salary

Page 54: Software Architecture, Process and Management Tools for ...€¦ · SAPM Previous Lecture’s Estimation Exercise I Recall from the previous lecture I asked you all to estimate how

SAPM: The Joel Test

Do new candidates write code during their interview?

I A couple of blog-posts about this went viral around 6 yearsago

I “ Write a program that prints the numbers from 1to 100. But for multiples of three print ‘Fizz’ insteadof the number and for the multiples of five print‘Buzz’. For numbers which are multiples of boththree and five print ‘FizzBuzz’.”

I Numbers vary, but essentially a majority of those applying forprogramming jobs cannot do this

Page 55: Software Architecture, Process and Management Tools for ...€¦ · SAPM Previous Lecture’s Estimation Exercise I Recall from the previous lecture I asked you all to estimate how

SAPM: The Joel Test

Do you do hallway usability testing?

I Not overly relevant for us, but:I Hallway usability testing:

I Grab the next person that walks past your office/deskI Ask them to use the code you just wroteI 5-6 people will tell you 95% of what there is to learn about

usability problems in your code

Page 56: Software Architecture, Process and Management Tools for ...€¦ · SAPM Previous Lecture’s Estimation Exercise I Recall from the previous lecture I asked you all to estimate how

SAPM

The Joel Test — Related to Tool Usage?

1. Do you use source code control?

2. Can you make a build in one step?

3. Do you make daily builds?

4. Do you have a bug database?

5. Do you fix bugs before writing new code?

6. Do you have an up-to-date schedule?

7. Do you have a spec?

8. Do programmers have quiet working conditions?

9. Do you use the best tools money can buy?

10. Do you have testers?

11. Do new candidates write code during their interview?

12. Do you do hallway usability testing?

www.joelonsoftware.com/articles/fog0000000043.html

Page 57: Software Architecture, Process and Management Tools for ...€¦ · SAPM Previous Lecture’s Estimation Exercise I Recall from the previous lecture I asked you all to estimate how

SAPM

The Joel Test

I As an aside, any of these questions are good questions to askof any company you are interviewing

I Note, the interview can be as much you examining them asthey examining you

Page 58: Software Architecture, Process and Management Tools for ...€¦ · SAPM Previous Lecture’s Estimation Exercise I Recall from the previous lecture I asked you all to estimate how

SAPM

Summary

I Every sane person should be using version control and buildcontrol tools

I Unit/regression testing is good and much easier with the rightframework

I Bug/issue tracking can stop you from going mad

I Documentation generation is great, but does not eliminatehand cleanup

I At least use these tools until you find something better

I For a big list of project management tools for Linux, seehttp://linas.org/linux/pm.html

I The individual tools are not that important, but it isimportant that you use something for each of these tasks andthat you know they exist

Page 59: Software Architecture, Process and Management Tools for ...€¦ · SAPM Previous Lecture’s Estimation Exercise I Recall from the previous lecture I asked you all to estimate how

SAPM — Related Reading

I Required ReadingI Eric S. Raymond. Understanding Version-Control Systems,

2007 updateI Of course, dates and details of specific tools are not

examinable

I Martin Fowler. Continuous Integration, 2006 update

I Suggested ReadingI Sebastien Auvray. Distributed Version Control Systems: A

Not-So-Quick Guide Through, 2008I Linas Vepstas. Call Center, Bug Tracking and Project

Management Tools for Linux, 2002 updateI Ben Collins-Sussman et al. Version Control with Subversion,

2008. Chapter 1, Fundamental Concepts.

Page 60: Software Architecture, Process and Management Tools for ...€¦ · SAPM Previous Lecture’s Estimation Exercise I Recall from the previous lecture I asked you all to estimate how

Any Questions

Any Questions?Next time there might be a slightly longer quiz so please bring

something to write on, even if that is just your phone, but it willprobably be easier with a pen and paper.