Agile Engineering

马上开始. 它是免费的哦
注册 使用您的电邮地址
Agile Engineering 作者: Mind Map: Agile Engineering

1. Sprints/Scrum

1.1. Mike Cohn - author on Scrum topics

1.2. Scrum Meeting

1.2.1. Questions What has happened relative to the backlog since the last meeting What obstacles got in the way of completing this work What specific things do you plan to accomplish, relative to the backlog, between now and the next scrum

1.2.2. Time Scrum should last 15 to 30 minutes

1.2.3. No extra work - anything extra should be arranged in another meeting

1.2.4. Scrum master - responsible for removing any obstacles to progress

1.2.5. Goals focus effort on backlog communicate priorities of backlog to team keep everyone informed of progress and obstacles remove obstacles quickly track progress delivering backlog functionality addressing and minimising project risk

1.2.6. Planning proceeds quickly because initial assumptions change as sprints deliver incremental functionality

1.3. Sprints

1.3.1. Advantages Product becomes a series of manageable chunks

1.3.2. Sprint planning Team meets with the client/client representative and decides what can be achieved in the current sprint Product owner gets a last chance to revise priorities Once decided, the backlog is locked down until the next sprint Decide acceptance tests Team has sprint planning meeting - decides tasks for the sprint backlog tasks can be no more than 16 hours in duration Maintain sprint backlog detailing responsibility duration hours remaining on tasks for each day of the sprint status of the task

2. Refactoring

2.1. Refactoring is a way of changing a software system so that the external behaviour is not affected but the internal structure is improved

2.2. Constant process

2.2.1. Improve quality of the code

2.2.2. Remove dead code

2.2.3. Make code self describing Code as it should have been written first time

2.2.4. Not about Fixing bugs Visible action - everything should stay the same

2.2.5. Aim to make changes that do not impact anyone else Programmer should only change the code they have created

2.2.6. Complicated and nested structures are a good indicator of the need to refactor

2.3. Refactorings

2.3.1. Extract Class

2.3.2. Extract method

2.3.3. Extract interface

2.3.4. Move class

2.3.5. Move method

2.3.6. Move field

2.3.7. Rename variable

2.4. Looking for

2.4.1. Code Smells Number of classes Message chain Duplicate code Remove whenever possible Large class Too many responsibilities? Long method Too many responsibilities, difficult to maintain... Long parameter list Lots of parameters means more complex Dead code

2.4.2. Programs that are hard to read

2.4.3. Programs that have a lot of duplicated logic

2.4.4. Programs with complex conditional code

2.4.5. Poor designs

2.5. Refactoring tasks

2.5.1. Generalising classes

2.5.2. Specialising classes

2.5.3. Improving encapsulation

2.5.4. Lowering impact of change

2.5.5. Merging subclasses into fields

2.5.6. Extracting fields into subclasses

2.5.7. Implementing interfaces

2.5.8. Adding abstract classes

2.6. Testing

2.6.1. Having a comprehensive set of tests ensures that refactored code behaves identically to previous code

2.7. Design

2.7.1. Aim for a reasonable design rather than the best design Ok to make changes

3. Agile Testing

3.1. Test Driven Development

3.1.1. Acceptance Test Driven Development

3.1.2. Behaviour Driven Development

3.2. Unit Testing

3.2.1. Test names should be descriptive

3.2.2. One test for each requirement

3.2.3. Write simplest code to make the test pass

3.2.4. If a test is too large, break it down

3.2.5. Test goal of code, not implementation

3.2.6. @setup and @teardown

3.3. Types of Testing

3.3.1. TDD (Test-Driven Development)

3.3.2. ATDD (Acceptance Test Driven Development) Ensure that the customer has an automated mechanism to decide if the software meets the acceptance test criteria Keeps development team focused on what is required to complete the user story

3.3.3. BDD (Behaviour Driven Development) Create automated tests to look for the behaviour of the system Framework such as JBehave Establishes the prerequisites Scenario Given (Certain facts) When (Something occurs) Then (Carry out some action) Allows client to see if the software works as identified Output shows in english statements that the system is working (or not)

3.4. Agile Testing: Past, Present and Future

3.4.1. Paper is a review of the literature on agile testing

3.4.2. Types of Paper Identified Solution novel solution, only proof of concept Validation further investigates a solution, no practice Philosophical new framework for understanding a field Opinion Author's personal opinions Experience Describes author's experience on a project Evaluation investigation of a problem in practice

4. Agile Metrics

4.1. How can code quality be defined?

4.1.1. Observation and Measurement

4.2. Code coverage

4.3. Measurement should be valid and reliable

4.4. Code Metrics

4.4.1. WMC - sum of all complexity measures of the methods Number of methods per class if all of the complexities are equal to one Predict time and effort needed to maintain the class Use cyclomatic complexity of the method correlation between cyclomatic complexity and error frequency Number of linearly independent paths through given code

4.4.2. DIT - Depth of inheritance tree maximum path from the node to the root of the inheritance tree Deep tree- complex design, less comprehensible greater potential re-use of methods

4.4.3. NOC - Number of children in inheritance tree More children more reuse but less maintainable More children class is influential, may need more testing

4.4.4. CBO - Coupling between objects The number of other classes to which a class is coupled Low coupling - more independence of classes, easier to reuse; less sensitivity to changes, greater maintainability

4.4.5. RFC - Response for class Number of local methods called by local methods plus the number of local methods High RFC = complex class, complex testing and debugging

4.4.6. LCOM - Lack of cohesion in methods Number of non-intersecting sets of local methods lack of cohesion

4.5. Agile metrics

4.5.1. Hartmann and Dymond Goal: Maximise business value delivered Questions: rate of return on investment Metric: Cash flow per iteration A good agile metric Affirms and reinforces Lean and Agile principles Measures outcome not output Follows trends, not numbers Belongs to a small set of metrics and diagnostics Is easy to collect Reveals rather than conceals its context and significant variables Provides fuel for meaningful conversation Provides feedback on a frequent and regular basis May measure Value or Process Encourages good-enough quality Useful Diagnostics Velocity Obstacles cleared per iteration Team member loading User stories carried over Unit tests per story Builds per iteration On time delivery Defects carried into next iteration Diagnostics are helpful to measure the success of the agile process Suggested Key Metrics (S McHugh) Business Value Delivered On time delivery

4.5.2. Watch effects Observer effect If an individual developer is being monitored (individual velocity) this may have an impact on the individual's output Street light effect Tendency to look for answers in the obvious place, need to look for answers in the not so obvious places.

5. Pair Programming

5.1. Advantages

5.1.1. Some well respected programmers prefer

5.1.2. Seasoned pair programmers describe it as working twice and fast

5.1.3. Resulting code is simpler and easier to extend

5.1.4. Even relative novices contribute to an expert's programming

5.2. Costs and benefits paper

5.2.1. Continual design and code review more efficient defect removal rates

5.2.2. Solve impossible problems faster

5.2.3. Pair programmers learn a lot from each other

5.2.4. Learn to discuss and work together, improves team cohesiveness.

5.2.5. Multiple people familiar with same code, reduces staff-loss risk.

5.2.6. Satisfaction Takes time for a solitary programmer to move out of comfort zone Comforting to know that know major mistakes are being made

5.2.7. Design Quality Superior quality from pair programmers Same functionality in fewer lines of code Better designs

5.2.8. Continuous reviews Code inspections not enjoyable or satisfying Not done unless mandated Advantages Mistakes are found as entered Peer pressure means code standards followed closely Team members learn to talk together and work together

5.2.9. Learning Expert in earshot Line of sight apprenticeship

5.3. Disadvantages

5.3.1. Programming is taught as a solitary activity

5.3.2. Programmers viewed as a scarce resource, duplication on same task is waste

5.3.3. Many experienced programmers are reluctant to program with other Code is 'personal' Another person will slow them down Trouble coordinating work times or code versions

5.3.4. May take 15% longer to develop code but made up for by fewer defects

5.3.5. Some programmers are 'loners' who prefer to work on their own Not one advocates for 'loners' Loners still interact with other team members

6. Sprint Review/Retrospective

6.1. Sprint Review

6.1.1. Scrum team shows what they have achieved during the current sprint

6.1.2. Must be kept informal

6.1.3. No PowerPoint

6.1.4. Natural result of the sprint

6.1.5. Participants Product Owner Scrum team Scrum master

6.1.6. Project assessed against the goals established at the sprint planning meeting Ideally the team has completed all items in the sprint backlog More important to achieve the overall aim of the sprint

6.2. Sprint Retrospective

6.2.1. Meeting held to reflect on the sprint just done

6.2.2. Should happen after the sprint review

6.2.3. Aims Discuss how to make things better Improve process quality Improve product quality

6.2.4. Helps to improve team's learning and work satisfaction

6.2.5. Procedure Decide what went well (what to do the same) Decide what did not go well (what not to do again) Create a list of actions to take forward into the next sprint KJ Method Write positive and negatives onto cards Group the cards onto a pin-board Collect suggestions for improvement Create a list of actions to take forward into the next sprint

7. Agile Planning

7.1. User Stories

7.1.1. User story structure

7.1.2. Acceptance tests

7.1.3. Lightweight, just-in-time requirements

7.1.4. Card, Conversation, Confirmation

7.2. The Agile Manifesto

7.2.1. Individuals and interactions over processes and tools

7.2.2. Working software over comprehensive documentation

7.2.3. Customer collaboration over contract negotiation

7.2.4. Responding to change over following a plan

7.2.5. Works in short iterations

7.2.6. Focus on the business priorities Priorities may change, but must be stable during each sprint so the team has a goal

7.2.7. Inspect and adapt

8. Ethical and Moral Responsibility

8.1. Software Engineers have a duty to

8.1.1. Public

8.1.2. Client and Employer

8.1.3. Product

8.1.4. Judgement

8.1.5. Management

8.1.6. Profession

8.1.7. Colleagues

8.1.8. Self

8.2. BSC Code of Conduct

8.2.1. Public Interest Have regard for privacy, wellbeing of others have due regard to legitimate rights of 3rd parties conduct professional activities without regard to personal differences promote equal access to the benefits of IT

8.2.2. Professional Competence and Integrity Don't claim competence you don't possess Develop professional knowledge and skills Knowledge and understanding of legislation Respect and value alternative viewpoints avoid injuring others reject bribery

8.2.3. Duty to Relevant Authority Avoid conflicts of interest Accept professional responsibility for your work and for colleagues under your supervision Do not disclose any confidential information without prior agreement Do not withhold information on the performance of products systems or services or take advantage of lack of knowledge or inexperience of others

8.2.4. Duty to the Profession

9. Continuous Integration

9.1. Advantages of CI

9.1.1. Build automation

9.1.2. Single source repository

9.1.3. Everyone commits to the master every day

9.1.4. Keep the build fast

9.1.5. Test in a clone of build environment

9.1.6. Automate deployment

9.1.7. Everyone can see what's happening

9.2. Traditional Approach

9.2.1. Team manually create a test build

9.2.2. Test build may be sent to testing team

9.2.3. Unit testing may speed up the process

9.2.4. Drawbacks Most recent reliable build may be quite old May be significant integration bugs Some libraries or components may have external dependencies Changes to external components may have to be factored in Unexpected problems may be encountered when code is run on a different machine for the first time

9.3. Requirements for CI

9.3.1. Unit Tested Code Configuration management Server Monitor for changes in project files Execute the build script for the project Log the results of the build on a web page and/or e-mail to developers Build log shows all details of build process All unit tests are run during build CI Software Build Server Build script

9.4. Configuration Management

9.4.1. Aims - to manage all project files with versioning

9.4.2. Identification control

9.4.3. Change control

9.4.4. Status and audit information

9.4.5. Record and report upon status Audit information Verify completeness and correctness Does item conform to technical documentation Is the standard process being followed in the way we said it was statistics request for change track problems

9.4.6. Change Control Current status of component Releases A release is a version intended for external people/customers Release record should be maintained Manage configurations for different Who can make changes Forms (very formal) Developers (via Github or some other) Storage control Development library Master library Static library