a students project in the field of “human machine interaction in realtime“ klaus bothe 8th...

49
A Students Project in the Field of “Human Machine Interaction in Realtime“ Klaus Bothe 8th Workshop “Software Engineering Education and Reverse Engineering” Durres, Albania, 8th – 13rd September 2008

Post on 19-Dec-2015

216 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: A Students Project in the Field of “Human Machine Interaction in Realtime“ Klaus Bothe 8th Workshop “Software Engineering Education and Reverse Engineering”

A Students Project in the Field of “Human Machine Interaction in

Realtime“

Klaus Bothe

8th Workshop “Software Engineering Education and Reverse Engineering” Durres, Albania, 8th – 13rd September 2008

Page 2: A Students Project in the Field of “Human Machine Interaction in Realtime“ Klaus Bothe 8th Workshop “Software Engineering Education and Reverse Engineering”

2

Organisation of educational project work with a real-life software system

Introduction to this case study of a software system

Presentation addresses two issues:

Page 3: A Students Project in the Field of “Human Machine Interaction in Realtime“ Klaus Bothe 8th Workshop “Software Engineering Education and Reverse Engineering”

3

Overview

Page 4: A Students Project in the Field of “Human Machine Interaction in Realtime“ Klaus Bothe 8th Workshop “Software Engineering Education and Reverse Engineering”

4

Background: Organisational issues

• Winter semester 2007/08: project seminar for students

• Students project: 24 students 8 teams

• Joint project seminar of Institute of Psychology

(Prof. H. Wandke, Engineering Psychologie)

and Institute of Informatics (K. Bothe)

• Participants from staff (presenters, organisation):

- Informatik: Klaus Bothe, Uli Sacklowski,

Nicolas Niestroj, Jochen Heyden (students)

- Psychology: Hartmut Wandke, Knut Polkehn,

Jens Nachtwei, Achim Warning (PhD students)

Page 5: A Students Project in the Field of “Human Machine Interaction in Realtime“ Klaus Bothe 8th Workshop “Software Engineering Education and Reverse Engineering”

5

Background: History and goals

• Pratice-oriented real-life projects: supported by our

curriculum at HU

• Students profit from that: real customer, new application

area ...

• Existing software system ATEO developed by staff from

psychology

and informatics students

• Used in experimental psychology for research

• ATEO with several drawbacks, e.g. missing documents like

requirements specification, too complicated software

architecture …

Page 6: A Students Project in the Field of “Human Machine Interaction in Realtime“ Klaus Bothe 8th Workshop “Software Engineering Education and Reverse Engineering”

6

HMI software ATEO in our DAAD project?

• Another case study for software projects

(after SemOrg, XCTL …)

• Example of introducing real-life projects in

education,

e.g. by giving working task for students

• Invitation for reuse, reimplementation, extension

HMI = Human Machine Interaction

Page 7: A Students Project in the Field of “Human Machine Interaction in Realtime“ Klaus Bothe 8th Workshop “Software Engineering Education and Reverse Engineering”

7

ATEO:

a nice comprehensible case study in the application area of psychology

Page 8: A Students Project in the Field of “Human Machine Interaction in Realtime“ Klaus Bothe 8th Workshop “Software Engineering Education and Reverse Engineering”

8

ATEO system:Software controls experiments (1)

Sequence of experiments

One subject Two subjects

Observer

Central experiment

Baseline experiment 1

Baseline experiment 2

Page 9: A Students Project in the Field of “Human Machine Interaction in Realtime“ Klaus Bothe 8th Workshop “Software Engineering Education and Reverse Engineering”

9

ATEO system:Software controls experiments (2)

Goal

Car

Page 10: A Students Project in the Field of “Human Machine Interaction in Realtime“ Klaus Bothe 8th Workshop “Software Engineering Education and Reverse Engineering”

10

Working place as a photograph: drivers – observer

Drivers: by joystick determine velocity and direction

Observer: view of drivers, street with car -> give commands (visual, acustical)

Wall

Camera

Page 11: A Students Project in the Field of “Human Machine Interaction in Realtime“ Klaus Bothe 8th Workshop “Software Engineering Education and Reverse Engineering”

11

Input buttons of the observer

Observer: select driver

Observer: give commands (visual, acustical) to the selcted driver

Activates a prepared mp3 file

E.g “faster”

Page 12: A Students Project in the Field of “Human Machine Interaction in Realtime“ Klaus Bothe 8th Workshop “Software Engineering Education and Reverse Engineering”

12

ATEO system:Background are automated assistence

systems

Sequence of experiments

Observer

Central experiment

Baseline experiment 1

Baseline experiment 2

E.g. driver in a car

E.g. pilot and co-pilot in a

plane

In perspective: automated assistance

system

One subject Two subjects

In this experiment:

human

Page 13: A Students Project in the Field of “Human Machine Interaction in Realtime“ Klaus Bothe 8th Workshop “Software Engineering Education and Reverse Engineering”

13

ATEO:

what to do with it in a students project

Page 14: A Students Project in the Field of “Human Machine Interaction in Realtime“ Klaus Bothe 8th Workshop “Software Engineering Education and Reverse Engineering”

14

Reverse engineering project: Existing software to be documented and assessed

ATEO:Smalltalk

Requirements specification

Software architecture: components …

Test cases

User handbook

SW quality criteria:Modifyability,Reusability of components(Structure of SW ok?)

Page 15: A Students Project in the Field of “Human Machine Interaction in Realtime“ Klaus Bothe 8th Workshop “Software Engineering Education and Reverse Engineering”

15

Additional students activities

ATEO:Smalltalk

Team-work

Interdisciplinary work

Understand a new application field

Learn a new object-oriented programming language: Smalltalk

Software in interdisciplinary projects of our group:- Institute of Physics at HU (XCTL): C++- Leipniz Institute: Fortran 70, 90, 95- Hahn-Meitner-Institute: Turbo Pascal LabView (visual programming language)- Siemens (Diploma theses): C#

Page 16: A Students Project in the Field of “Human Machine Interaction in Realtime“ Klaus Bothe 8th Workshop “Software Engineering Education and Reverse Engineering”

16

Tasks in the seminar

Page 17: A Students Project in the Field of “Human Machine Interaction in Realtime“ Klaus Bothe 8th Workshop “Software Engineering Education and Reverse Engineering”

17

Overview of tasks

Task 1: 7. November 2007: Develop a use case diagram and a requirements specification of the ATEO system (external behaviour)

Task 2: 29. November 2007: ATEO program: Understand and document the implementation (each team only one class)

Task 3: 19. December 2007: Find and assess the real software architecture of the ATEO-System; make a proposal for a better one

Task 4: 23./30. January 2008- Extend the requirements specification according to user wishes

Page 18: A Students Project in the Field of “Human Machine Interaction in Realtime“ Klaus Bothe 8th Workshop “Software Engineering Education and Reverse Engineering”

18

Waterfall model:documents considered in the project

Analysisand

Definition

Analysisand

Definition

DesignDesign

ImplementationImplementation

TestTest

MaintenanceMaintenance

External behaviour:Requirementsspecification...

Structure of softwareSoftware

Architecture

Program code:commented ...

Test cases …

Page 19: A Students Project in the Field of “Human Machine Interaction in Realtime“ Klaus Bothe 8th Workshop “Software Engineering Education and Reverse Engineering”

19

Task 1:

Develop a use case diagram and a requirements specification

Page 20: A Students Project in the Field of “Human Machine Interaction in Realtime“ Klaus Bothe 8th Workshop “Software Engineering Education and Reverse Engineering”

20

Use cases:

completely different solutions from different groups;not decidable: which is the best solution?

Use cases – main errors:

- not suitable use cases - too detailed use cases - actors with wrong rights

Task 1: Develop a use case diagram

and …

Page 21: A Students Project in the Field of “Human Machine Interaction in Realtime“ Klaus Bothe 8th Workshop “Software Engineering Education and Reverse Engineering”

21

Pair of object persons (drivers)

Operateur (observer)

Experiment leader

Drive the car

Give navigationshints

Prepare and supervise the

experiment

Write protocol file

<<include>>

<<include>>

Use case diagram of ATEO: final result of discussion

Switch on the camera

Built-upconvenientparcours

Evaluateprotocol file

Scientiest(Psychologist)

<<include>>

Page 22: A Students Project in the Field of “Human Machine Interaction in Realtime“ Klaus Bothe 8th Workshop “Software Engineering Education and Reverse Engineering”

22

Requirements specification:

sources were some verbal text in a students manuscript, the externally observable behaviour, questioning of psychologists

Requirements specification:results very promising, functional and non-functional requirements addressed, couples of open questions fixed

Summary: Students very motivated by that application area

Task 1: Develop … a requirements

specification

Page 23: A Students Project in the Field of “Human Machine Interaction in Realtime“ Klaus Bothe 8th Workshop “Software Engineering Education and Reverse Engineering”

23

Result: see File

Task 1: Develop … a requirements

specification

Page 24: A Students Project in the Field of “Human Machine Interaction in Realtime“ Klaus Bothe 8th Workshop “Software Engineering Education and Reverse Engineering”

24

Task 2:

Understand and document the ATEO implementation

Page 25: A Students Project in the Field of “Human Machine Interaction in Realtime“ Klaus Bothe 8th Workshop “Software Engineering Education and Reverse Engineering”

25

Task 2: Understand and document the ATEO implementation

Subtasks: Learn fundamentals of Smalltalk:

Motivation: Java well-known: on that basis, learn a new oo language

Smalltalk: one of the 7 most known OO languages (Java, C++, C#, Delphi, Eiffel, Simula 67)

Smalltalk: innovative concepts have been introduced (Extreme Programming, Refactoring, SUnit ...)

Work with Squeak as a programming environment for Smalltalk;Modern programming environment:

- Syntax-directed browser - integrated debugging- integrated versioning (like: cvs)- Interpretation (virtual code like Java JVM) combined with automated

incremental compilation (thus, compilation not visible)

Page 26: A Students Project in the Field of “Human Machine Interaction in Realtime“ Klaus Bothe 8th Workshop “Software Engineering Education and Reverse Engineering”

26

Differences between Smalltalk and Java

Smalltalk: New concepts compared with Java - type-less language (dynamic typing) - visibility: all methods visible, all variables hidden - global variables (contradiction to OO) - Strong object-oriented language: even elementary data types are classes - no difference between class and object (classes are objects, too) - different syntax: x:=1, parameter passing ...

Page 27: A Students Project in the Field of “Human Machine Interaction in Realtime“ Klaus Bothe 8th Workshop “Software Engineering Education and Reverse Engineering”

27

Task 3:

Find and assess the real software architecture of the ATEO-System;

make a proposal for a better one

Page 28: A Students Project in the Field of “Human Machine Interaction in Realtime“ Klaus Bothe 8th Workshop “Software Engineering Education and Reverse Engineering”

28

Task 3: Find and assess the real software architecture of the ATEO-System; make a proposal for a better one.

Documented as a UML class diagram

Developed by open source UML tools: ArgoUML, Dia

SW architecture not atomatically derived by the tool (Smalltalk) manual and semi-automatic derivation

Rather good solutions, including assessment of the architecture: see later

Initial motivation by the staff useful: see next two slides

Page 29: A Students Project in the Field of “Human Machine Interaction in Realtime“ Klaus Bothe 8th Workshop “Software Engineering Education and Reverse Engineering”

29

Software architecture: the project may fail

“The Importance of Software Architecture Software architecture forms the backbone for any

successful software-intensive system. An architecture is the primary carrier of a software system's quality attributes such as performance or reliability. The right architecture - correctly designed to meet its quality attribute requirements, clearly documented, and conscientiously evaluated - is the linchpin for software project success. The wrong one is a recipe for guaranteed disaster.”

(Website: Software Engineering Institute (SEI), Carnegie Mellon University)

Motivation

Page 30: A Students Project in the Field of “Human Machine Interaction in Realtime“ Klaus Bothe 8th Workshop “Software Engineering Education and Reverse Engineering”

30

Real architecture of XCTL (Inst. Physics)

SW Architecture:Influences quality features:- comprehensibility- Re-usability of components in

another environment- Maintainablity- Security- testability - ...

Motivation

Source: Kay Schützler, Dissertation

Page 31: A Students Project in the Field of “Human Machine Interaction in Realtime“ Klaus Bothe 8th Workshop “Software Engineering Education and Reverse Engineering”

31

Task 3:

a) Find … the real software architecture …

Page 32: A Students Project in the Field of “Human Machine Interaction in Realtime“ Klaus Bothe 8th Workshop “Software Engineering Education and Reverse Engineering”

32

Group 6Relations between ATEO classes,morphs, global variabls

Page 33: A Students Project in the Field of “Human Machine Interaction in Realtime“ Klaus Bothe 8th Workshop “Software Engineering Education and Reverse Engineering”

33

Group 1

Page 34: A Students Project in the Field of “Human Machine Interaction in Realtime“ Klaus Bothe 8th Workshop “Software Engineering Education and Reverse Engineering”

34

Gruppe 1Relations between the 8 core ATEO classes …

Page 35: A Students Project in the Field of “Human Machine Interaction in Realtime“ Klaus Bothe 8th Workshop “Software Engineering Education and Reverse Engineering”

35

Relations between the 8 core ATEO classes: without attributes and operations

Gruppe 8

Page 36: A Students Project in the Field of “Human Machine Interaction in Realtime“ Klaus Bothe 8th Workshop “Software Engineering Education and Reverse Engineering”

36

Task 3:

b) Assess … the real software architecture …

Page 37: A Students Project in the Field of “Human Machine Interaction in Realtime“ Klaus Bothe 8th Workshop “Software Engineering Education and Reverse Engineering”

37

Group 8

End node class

Direktcycle

Conclusion:5 classes are connected by cycles, i.e. they cannot be understood , re-used, modified, and separetly tested as independent components(ATEOTastaturabfragen,ATEOrealJoystickstepping, ATEOPar …) can be handled only as a set of classes

cycle in three steps

End node class*)

*) but not quite sure: global variables may cause additional relations between classes

Relations between the 8 core ATEO classes: architecture problems

Page 38: A Students Project in the Field of “Human Machine Interaction in Realtime“ Klaus Bothe 8th Workshop “Software Engineering Education and Reverse Engineering”

38

Global variables: cohesion and coupling

Smalltalk (global variables)CarID AnteilMB1 u.a.

.

Globals considered harmful:

(E. Klimas …: Smalltalk with Style)

Page 39: A Students Project in the Field of “Human Machine Interaction in Realtime“ Klaus Bothe 8th Workshop “Software Engineering Education and Reverse Engineering”

39

Task 3:

c) make a proposal for a better software architecture

Page 40: A Students Project in the Field of “Human Machine Interaction in Realtime“ Klaus Bothe 8th Workshop “Software Engineering Education and Reverse Engineering”

40

Steuerhard-warezugriff

Tastatur, Joystick

Dateizugriff

Versuchsablauf-

steuerung

Versuchs-konfiguration

Logdatei

MorphFahrzeug

MorphStreckeMorphConfig

Group 1Hierarchical layered architecture

Layer 2: user interface

Layer 1: functionality

Layer 0: data and hardware

Page 41: A Students Project in the Field of “Human Machine Interaction in Realtime“ Klaus Bothe 8th Workshop “Software Engineering Education and Reverse Engineering”

41

Group8Hierarchical layered architecture

Page 42: A Students Project in the Field of “Human Machine Interaction in Realtime“ Klaus Bothe 8th Workshop “Software Engineering Education and Reverse Engineering”

42

Task 4:

Extend the requirements specification according to user wishes

Page 43: A Students Project in the Field of “Human Machine Interaction in Realtime“ Klaus Bothe 8th Workshop “Software Engineering Education and Reverse Engineering”

43

Task 4: Extend the requirements specification according to user wishes

Measures: Teams connected to some of the use

cases Consultations between students and

psychologists

Page 44: A Students Project in the Field of “Human Machine Interaction in Realtime“ Klaus Bothe 8th Workshop “Software Engineering Education and Reverse Engineering”

44

Pair of experiment persons (drivers)

Operateur (observer)

Experiment leader

Drive the car

Give navigationshints

Prepare and supervise the

experiment

Write protocol file

<<include>>

<<include>>

Switch on the camera

Built-upconvenientparcours

Evaluateprotocol file

Scientiest(Psychologist)

<<include>>

Groups assigned to the use cases(2)

Kamera-übertragung einschalten

Group 4

Group 2

Group 3

Group 6

Group 8

Group 1

Group 5

Group 7

Page 45: A Students Project in the Field of “Human Machine Interaction in Realtime“ Klaus Bothe 8th Workshop “Software Engineering Education and Reverse Engineering”

45

Task 4: Extend the requirements specification according to user wishes

Results: Teams present their solutions in a

seminar followed by a discussion Extended requirements form the basis

for current diploma theses

Page 46: A Students Project in the Field of “Human Machine Interaction in Realtime“ Klaus Bothe 8th Workshop “Software Engineering Education and Reverse Engineering”

46

Conclusions

Page 47: A Students Project in the Field of “Human Machine Interaction in Realtime“ Klaus Bothe 8th Workshop “Software Engineering Education and Reverse Engineering”

47

Suitability of the ATEO system in education

• ATEO is a convenient case study in an application

area:

comprehensible also for informatics students

• ATEO: motivating application area for the students

• ATEO: like many systems in practice: most serious

problem is the bad software architecture; hard to repair;

certainly a reimplementation necessary; possibly also

refactoring is applicable (Fowler, 2000)

• Smalltalk is a mature OO language; Java would be

better for our students (1st language)

Page 48: A Students Project in the Field of “Human Machine Interaction in Realtime“ Klaus Bothe 8th Workshop “Software Engineering Education and Reverse Engineering”

48

ATEO: Main problems and what to do?

SW architecture: - some parts well-defined; however, many others chaotic- bad for maintenance and extension- the hardest challenge of the system: the bottleneck of the whole system

Smalltalk: A comparable Java solution would be valuable

Open: test case selection, automatization of regression testing

Some diploma thesis under work, e.g.- new working place for the operateur

- network version (three working places for three actors) - evaluation of protocol files

Page 49: A Students Project in the Field of “Human Machine Interaction in Realtime“ Klaus Bothe 8th Workshop “Software Engineering Education and Reverse Engineering”

49

ATEO: System demonstration on the basis of Smalltalk and Squeak