a students project in the field of “human machine interaction in realtime“ klaus bothe 8th...
Post on 19-Dec-2015
216 views
TRANSCRIPT
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
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:
3
Overview
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)
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 …
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
7
ATEO:
a nice comprehensible case study in the application area of psychology
8
ATEO system:Software controls experiments (1)
Sequence of experiments
One subject Two subjects
Observer
Central experiment
Baseline experiment 1
Baseline experiment 2
9
ATEO system:Software controls experiments (2)
Goal
Car
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
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”
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
13
ATEO:
what to do with it in a students project
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?)
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#
16
Tasks in the seminar
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
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 …
19
Task 1:
Develop a use case diagram and a requirements specification
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 …
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>>
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
23
Result: see File
Task 1: Develop … a requirements
specification
24
Task 2:
Understand and document the ATEO implementation
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)
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 ...
27
Task 3:
Find and assess the real software architecture of the ATEO-System;
make a proposal for a better one
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
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
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
31
Task 3:
a) Find … the real software architecture …
32
Group 6Relations between ATEO classes,morphs, global variabls
33
Group 1
34
Gruppe 1Relations between the 8 core ATEO classes …
35
Relations between the 8 core ATEO classes: without attributes and operations
Gruppe 8
36
Task 3:
b) Assess … the real software architecture …
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
38
Global variables: cohesion and coupling
Smalltalk (global variables)CarID AnteilMB1 u.a.
.
Globals considered harmful:
(E. Klimas …: Smalltalk with Style)
39
Task 3:
c) make a proposal for a better software architecture
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
41
Group8Hierarchical layered architecture
42
Task 4:
Extend the requirements specification according to user wishes
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
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
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
46
Conclusions
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)
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
49
ATEO: System demonstration on the basis of Smalltalk and Squeak