Software Engineering and Architecture

Slides:



Advertisements
Similar presentations
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 4 Slide 1 Software Processes.
Advertisements

©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 4 Slide 1 Software Processes.
George Blank University Lecturer. CS 602 Java and the Web Object Oriented Software Development Using Java Chapter 4.
DAIMIHenrik Bærbak Christensen1 Mandatory Project Part II Software Reliability and Testing.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 4 Slide 1 Software Processes.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 4 Slide 1 Software Processes.
1 5.1 Software Engineering Practice  Provide value to the user  KIS—keep it simple!  Maintain the product and project “vision”  What you produce,
Dr. Tom WayCSC Testing and Test-Driven Development CSC 4700 Software Engineering Based on Sommerville slides.
Application of Artificial Intelligence to Chess Playing Jason Cook Capstone Project.
Chapter 2 – Software Processes Lecture 2 1Chapter 2 Software Processes.
Automated Acceptance Testing and Continuous Delivery Larry Apke Agile Expert
Chapter 7 The Practices: dX. 2 Outline Iterative Development Iterative Development Planning Planning Organizing the Iterations into Management Phases.
The HotCiv GUI Instantiating the MiniDraw Framework.
Henrik Bærbak Christensen1 Test Driven Development “TDD” Summary.
Henrik Bærbak Christensen1 Build Management Clean environment that works...
HotCiv Project Starting up!. Henrik Bærbak Christensen2 HotCiv = Agile development Iterations of –product development –learning increments.
AU CSHenrik Bærbak Christensen1 dSoftArk E2015 Software Architecture Programming in the Large.
All the dSoftArk Tools Getting started!. Tools dSoftArk is a semi-realistic, agile, development project –Industrial strength software (programming, TDD,
Phoenix Scrum User Group Simplifying Scrum Online May 21 st 2009.
Chapter 2 – Software Processes Lecture 2 1Chapter 2 Software Processes.
Mandatory 1 / AlphaCiv … Traps to be aware of …. Warn or not? I once asked Kent Beck the following –I have a lot of students in a course in design patterns.
Refactoring and Integration Testing or Strategy, introduced reliably by TDD The power of automated tests.
MiniDraw Introducing a Framework... and a few patterns.
Mandatory 1 / AlphaCiv … a few comments…. Overall: Generally – good work – good effort Seems you are generally doing TDD Minor hick-ups –”My own way is.
1 Chapter 2 SW Process Models. 2 Objectives  Understand various process models  Understand the pros and cons of each model  Evaluate the applicability.
Hints - Mandatory 5 Blackbox Testing Pattern Hunting.
CS 389 – Software Engineering Lecture 2 – Part 2 Chapter 2 – Software Processes Adapted from: Chap 1. Sommerville 9 th ed. Chap 1. Pressman 6 th ed.
Laurea Triennale in Informatica – Corso di Ingegneria del Software I – A.A. 2006/2007 Andrea Polini II. Software Life Cycle.
TDD Unit tests from a slightly different point of view Katie Dwyer.
Software Development.
Instantiating the MiniDraw Framework
Introducing a Framework ... and a few patterns
Game Design, Development, and Technology
Applying the Principles
Quality Assurance: Early Work Items
Exam A few notes and hints….
HotCiv Project Starting up!.
Mandatory 1 / AlphaCiv … Traps to be aware of ….
CPSC 315 – Programming Studio Spring 2012
Chapter 2 SW Process Models
Dilbert Scott Adams Manage It! Your Guide to Modern, Pragmatic Project Management. Johanna Rothman.
Teaching slides Chapter 9.
Johanna Rothman Create Technical Excellence Chapter 9
Johanna Rothman Agile Team Measurements Chapter 12
Teaching slides Chapter 1.
Test Driven Development
Portability CPSC 315 – Programming Studio
Chapter 2 – Software Processes
Test-driven development (TDD)
Testing and Test-Driven Development CSC 4700 Software Engineering
CSE 303 Concepts and Tools for Software Development
Software Processes.
Agile Development – a new way of software development?
Extreme Programming.
CMPE212 – Reminders Assignment 2 due next Friday.
Project Iterations.
Software Engineering and Architecture
Software Engineering and Architecture
Software Engineering and Architecture
Software Engineering and Architecture
Software Engineering and Architecture
Software Engineering and Architecture
Software Engineering and Architecture
Software Engineering and Architecture
Software Engineering and Architecture
Software Engineering and Architecture
Software Engineering and Architecture
Jamie Cool Program Manager Microsoft
Software Engineering and Architecture
Software Engineering and Architecture
Presentation transcript:

Software Engineering and Architecture HotCiv

Henrik Bærbak Christensen Source: Microsoft: Testing for Continuous Delivery with VS 2012 CS@AU Henrik Bærbak Christensen

HotCiv = Agile development Iterations of product development learning increments Context Civilization type games Pretty old-school GUI  Henrik Bærbak Christensen

Henrik Bærbak Christensen Getting Started Read Chapter 36.1 + 36.2 Download hotciv-tdd-start.zip and unzip it! Read the java file: Game.java Much of the specification is in there Source code your variant is already initially package’ified hotciv.framework etc. packages split into a production code (main) and test code (test) source tree your variant is already fully Gradlified’ified ‘gradle test’ – find details in build/tests folder Henrik Bærbak Christensen

Henrik Bærbak Christensen Demo [Demo] Henrik Bærbak Christensen

Iteration 1 Implement 50% – 70% of AlphaCiv using TDD! Iteration 2: Implement ~100% of AlphaCiv using TDD (and transfer to Git) Iteration 3..10: Keep using TDD!!! Henrik Bærbak Christensen

... And report on process (=skills) Using screen casts! And deliver your backlog and code Well structured but not polished screen-cast! See the advice on the exercise page… Henrik Bærbak Christensen

Well-structured, not Polished! Screen-casts introduced because TDD is process, better use video instead of reports To lower your workload! 10 minute screencast takes 10 minutes Plus the two rehearsals that failed after 5 minutes  Morale: Do not spend 4 hours doing story boards, 2 more hours retaking the screencast until it gets just right, and 1 more hour to make subtitles! CS@AU Henrik Bærbak Christensen

Henrik Bærbak Christensen ... Evaluation Refer to the Evaluation Criteria to see what Teaching Assistents are supposed to look for… Henrik Bærbak Christensen

Henrik Bærbak Christensen Feedback… For each learning goal Grade 0, 4, 7, 10 Argument Why a 4? Improvement focus Priority learning focus Score Accumulated over 10 iter. Part of final exam grade CS@AU Henrik Bærbak Christensen

Henrik Bærbak Christensen The Agile backlog... This is an architecture course! Clean code that works (65% functionality with clean code is much better than 100% functionality with unclean code!) You may fill in more behavior in following iterations... Henrik Bærbak Christensen

Henrik Bærbak Christensen ... In details... Henrik Bærbak Christensen

Henrik Bærbak Christensen … at the code level This boils down to implementing relevant methods for the Game interface: Henrik Bærbak Christensen

Structure (static view) Henrik Bærbak Christensen

Henrik Bærbak Christensen Dynamics Generally, consider that the GUI only mutate the game’s state by using the Game’s mutator methods endOfTurn, moveUnit, etc. And only inspect it using either Game accessor methods or the “read-only” interfaces getTileAt(p), getCityAt(p), getPlayerInTurn(), … Unit, Tile, City’s methods… Henrik Bærbak Christensen

Henrik Bærbak Christensen Some Design Decisions Keep interfaces intact! Otherwise the GUI will have trouble interfacing your HotCiv Read-only interfaces (Unit, City, …) You should Avoid to add mutator methods to the interfaces! Add mutator methods to StandardX Will require quite a bit of casting String base types Enumerations would give better reliability (compiler check) but would delimit future variants ability to add more e.g. more unit types. Preconditions Many game methods require e.g. valid positions. This means you should not make tests for invalid positions! Henrik Bærbak Christensen

Henrik Bærbak Christensen Some Design Decisions MoveCount? Distance is measured in ‘move count’ (no euclidian here!) If chariot has move count = 2; and you move one tile, its move count is 1, and so on! Treasury? ‘Production’ means two things in the spec  city.getTreasury() = count of ‘money’ that city owns right now Gets converted to unit once enough ‘money’ has been earned No World abstraction? See where your TDD moves you… Henrik Bærbak Christensen

Henrik Bærbak Christensen Doing TDD TDD is about being ’lazy’ Do not code in anticipation of need, only when need arise! Simplicity – maximize work not done! Morale: Make it as simple as possible!!! Code as little as possible!!! Translate the specs into minimal set of test cases. Make the test cases drive the minimal amount of code. Do not design the swiss army knife Make the code clean!!! Henrik Bærbak Christensen

Henrik Bærbak Christensen Doing TDD Experience from earlier years Test list is a test list ‘setup world’ = feature; not a test ‘red has city at (1,1)’ = test; not a feature morale: write test lists, not feature lists Thinking implementation is bad… think “how does my test case look”; not “how do I implement this” Thinking too much ahead do not foresee problems that never arise pick “one step tests” be prepared for ‘do over’ Henrik Bærbak Christensen

Henrik Bærbak Christensen Doing TDD You have to constantly refactor to make your code clean and abstract students tend to forget => junk pile of special cases  Fix your broken windows Or the building will become unattractive... The total cost of owning a mess Henrik Bærbak Christensen

Help to ‘score’ your tests... Code coverage How much of your production code is exercised by your tests? ‘gradle test jacocoTestReport’ (only if tests pass!) jacoco/report/index.html Henrik Bærbak Christensen

Henrik Bærbak Christensen Use The StudyCafe We will man the StudyCafe, so please use it. Henrik Bærbak Christensen