HotCiv Project Starting up!. Henrik Bærbak Christensen2 HotCiv = Agile development Iterations of –product development –learning increments.

Slides:



Advertisements
Similar presentations
1 Chapter 6: Extending classes and Inheritance. 2 Basics of Inheritance One of the basic objectives of Inheritance is code reuse If you want to extend.
Advertisements

Alternate Software Development Methodologies
Designing classes How to write classes in a way that they are easily understandable, maintainable and reusable 4.0.
Software Testing and Quality Assurance
JUnit. What is unit testing? A unit is the smallest testable part of an application. A unit test automatically verifies the correctness of the unit. There.
Designing Classes How to write classes in a way that they are easily understandable, maintainable and reusable.
JUnit. Why is testing good? Due to psychological factors, programmers are bad testers. A computer can test much faster than a human Philosophy: “If it.
Scite Scintilla integrated text editor. Click here.
Design: Coupling and Cohesion How to write classes in a way that they are easily understandable, maintainable and reusable.
Russell Taylor Lecturer in Computing & Business Studies.
Big Projects  Part of this class is about picking a cool software project and building it 1.
TDD,BDD and Unit Testing in Ruby
Unit Testing & Defensive Programming. F-22 Raptor Fighter.
Starting Chapter 4 Starting. 1 Course Outline* Covered in first half until Dr. Li takes over. JAVA and OO: Review what is Object Oriented Programming.
CSC 213 – Large Scale Programming. Why Do We Test?
Designing classes How to write classes in a way that they are easily understandable, maintainable and reusable 3.0.
October, 2006 © Copyright 2006, Larry A. Beaty. Copying and distribution of this document is permitted in any medium, provided this notice is preserved.
Question of the Day  On a game show you’re given the choice of three doors: Behind one door is a car; behind the others, goats. After you pick a door,
Designing classes How to write classes in a way that they are easily understandable, maintainable and reusable 5.0.
Automated Acceptance Testing and Continuous Delivery Larry Apke Agile Expert
The HotCiv GUI Instantiating the MiniDraw Framework.
Test Stubs... getting the world under control. TDD of State Pattern To implement GammaTown requirements I CS, AUHenrik Bærbak Christensen2.
Henrik Bærbak Christensen1 Test Driven Development “TDD” Summary.
Henrik Bærbak Christensen1 Build Management Clean environment that works...
AU CSHenrik Bærbak Christensen1 dSoftArk E2015 Software Architecture Programming in the Large.
Deriving State…...and an example of combining behaviour.
All the dSoftArk Tools Getting started!. Tools dSoftArk is a semi-realistic, agile, development project –Industrial strength software (programming, TDD,
PROGRAMMING TESTING B MODULE 2: SOFTWARE SYSTEMS 22 NOVEMBER 2013.
Unit Testing. F-22 Raptor Fighter Manufactured by Lockheed Martin & Boeing How many parts does the F-22 have?
1 COS 260 DAY 12 Tony Gauvin. 2 Agenda Questions? 5 th Mini quiz –Chapter 5 40 min Assignment 3 Due Assignment 4 will be posted later (next week) –If.
Hints - Mandatory 2 / Strategies. Learning... life-a-curve.html B Christensen2 Jeg fatter ikke.
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.
Applying the Principles Two Examples. Example 1 New Requirement It would be nice with a simple GUI “to see something” instead of just xUnit tests...
Refactoring and Integration Testing or Strategy, introduced reliably by TDD The power of automated tests.
AU CSHenrik Bærbak Christensen1 dSoftArk Software Architecture Programming in the Large.
MiniDraw Introducing a Framework... and a few patterns.
Test Driven Development Introduction Issued date: 8/29/2007 Author: Nguyen Phuc Hai.
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.
: Information Retrieval อาจารย์ ธีภากรณ์ นฤมาณนลิณี
Mandatory 3 Test Stubs State Abstract Factory. Do not panic! dSoftArk is about Good analyzable design not about HotCiv! Henrik Bærbak Christensen2.
Designing classes How to write classes in a way that they are easily understandable, maintainable and reusable 6.0.
Hints - Mandatory 5 Blackbox Testing Pattern Hunting.
TDD Unit tests from a slightly different point of view Katie Dwyer.
Instantiating the MiniDraw Framework
Introducing a Framework ... and a few patterns
SE-1021 Software Engineering II
Applying the Principles
Development and Testing Ch4.1. Algorithm Analysis
ENEE150 Discussion 02 Section 0101 Adam Wang.
Exam A few notes and hints….
HotCiv Project Starting up!.
Lecture 7 Designing Classes
Mandatory 1 / AlphaCiv … Traps to be aware of ….
CS1101 : Using Course Marker
slides borrowed and adapted from Alex Mariakis and CSE 390a
Test-driven development (TDD)
Sharing the good, the bad, the ugly & What can we do about it?
Test Driven Development
Testing Acknowledgement: Original slides by Jory Denny.
Test Driven Development
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
Presentation transcript:

HotCiv Project Starting up!

Henrik Bærbak Christensen2 HotCiv = Agile development Iterations of –product development –learning increments

Henrik Bærbak Christensen3 Getting Started Read Chapter Download hotciv-tdd-start.zip and unzip it! Read the java file: Game.java Source code –your variant is already initially package’ified hotciv.framework etc. packages split into a production code and test code source tree –your variant is already fully Ant’ified ‘ant test’ and ‘ant test.batch’ runs out-of-the-box Output is in files in folder TEST-RESULT

Henrik Bærbak Christensen4 [Demo]

Henrik Bærbak Christensen5 Iteration 1 Implement AlphaCiv using TDD!

... And report on process (=skills) Using screen casts Henrik Bærbak Christensen6

Agile Delivery I have rewritten exercises for each week into smaller deliverables Use it to get feedback faster Use the feedback to improve and learn ! Henrik Bærbak Christensen7

... The checklist Refer to the ”rubrics” to see what I deem important... Henrik Bærbak Christensen8

The Agile backlog... This is an architecture course! –Clean code that works (75% clean > 100% unclean!) –You may fill in more behaviour in following iterations... Henrik Bærbak Christensen9

... And hand it in Using course admin and/or video services –Vimeo / you tube/ use private links Some files –Reports in pdf format –Links to video files or upload it –Code in zip with ALL code TA should ”unzip; ant coverage;” and it should work... If not – the delivery is failed... Henrik Bærbak Christensen10

... In details... Henrik Bærbak Christensen11

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

Structure (static view) Henrik Bærbak Christensen13

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 Christensen14

Henrik Bærbak Christensen15 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!

Some Design Decisions No World abstraction? –My TDD did not need it so far! Simplicity-the art of maximizing the work not done! –Introduce it if you find your code maintainability improves. Henrik Bærbak Christensen16

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 Christensen17

Henrik Bærbak Christensen18 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’

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 Christensen19

Help to ‘score’ your tests... Code coverage –How much of your production code is exercised by your tests? ‘ant coverage’(only if tests pass!) –Jacoco/report/index.html Henrik Bærbak Christensen20