bertrand meyer jiwon shin andrey rusakov - eth...
TRANSCRIPT
![Page 1: Bertrand Meyer Jiwon Shin Andrey Rusakov - ETH Zse.inf.ethz.ch/courses/2015b_fall/rpl/lectures/03_Software... · Chair of Software Engineering Robotics Programming Laboratory Bertrand](https://reader031.vdocuments.mx/reader031/viewer/2022022420/5a7e6ac37f8b9a563b8e8913/html5/thumbnails/1.jpg)
Chair of Software Engineering
Robotics Programming Laboratory
Bertrand MeyerJiwon Shin
Andrey Rusakov
Software Engineering Tools
![Page 2: Bertrand Meyer Jiwon Shin Andrey Rusakov - ETH Zse.inf.ethz.ch/courses/2015b_fall/rpl/lectures/03_Software... · Chair of Software Engineering Robotics Programming Laboratory Bertrand](https://reader031.vdocuments.mx/reader031/viewer/2022022420/5a7e6ac37f8b9a563b8e8913/html5/thumbnails/2.jpg)
2
A Story of a Woodcutter
...
-“I must be losing my strength”, the woodcutter
thought.
- “When was the last time you sharpened your
axe?” the boss asked.
- “Sharpen? I had no time to sharpen my axe.
I have been very busy trying to cut trees…”
![Page 3: Bertrand Meyer Jiwon Shin Andrey Rusakov - ETH Zse.inf.ethz.ch/courses/2015b_fall/rpl/lectures/03_Software... · Chair of Software Engineering Robotics Programming Laboratory Bertrand](https://reader031.vdocuments.mx/reader031/viewer/2022022420/5a7e6ac37f8b9a563b8e8913/html5/thumbnails/3.jpg)
3
Engineering Tools
Why do we use tools?
Because things we usually create are complicated and with
tools we can create them easier.
![Page 4: Bertrand Meyer Jiwon Shin Andrey Rusakov - ETH Zse.inf.ethz.ch/courses/2015b_fall/rpl/lectures/03_Software... · Chair of Software Engineering Robotics Programming Laboratory Bertrand](https://reader031.vdocuments.mx/reader031/viewer/2022022420/5a7e6ac37f8b9a563b8e8913/html5/thumbnails/4.jpg)
4
Software Engineering definition
SE - the multi-person construction of multi-version software
(David Parnas, 1975)
![Page 5: Bertrand Meyer Jiwon Shin Andrey Rusakov - ETH Zse.inf.ethz.ch/courses/2015b_fall/rpl/lectures/03_Software... · Chair of Software Engineering Robotics Programming Laboratory Bertrand](https://reader031.vdocuments.mx/reader031/viewer/2022022420/5a7e6ac37f8b9a563b8e8913/html5/thumbnails/5.jpg)
5
Benefits of Using Tools
Tools
• Minimize time of routine operations
• Minimize human factor
• Provide more information about the system
• Provide more information about the process
![Page 6: Bertrand Meyer Jiwon Shin Andrey Rusakov - ETH Zse.inf.ethz.ch/courses/2015b_fall/rpl/lectures/03_Software... · Chair of Software Engineering Robotics Programming Laboratory Bertrand](https://reader031.vdocuments.mx/reader031/viewer/2022022420/5a7e6ac37f8b9a563b8e8913/html5/thumbnails/6.jpg)
6
Which SE tools do you use?
![Page 7: Bertrand Meyer Jiwon Shin Andrey Rusakov - ETH Zse.inf.ethz.ch/courses/2015b_fall/rpl/lectures/03_Software... · Chair of Software Engineering Robotics Programming Laboratory Bertrand](https://reader031.vdocuments.mx/reader031/viewer/2022022420/5a7e6ac37f8b9a563b8e8913/html5/thumbnails/7.jpg)
7
Text editors vs. IDEs
IDEs provide:
• Syntax highlighting/checking
• Auto completion
• Feature “navigation” (e.g. Go to the definition)
• Refactoring tools (see following slides)
General purpose text editors can also offer some of these features!
One of the main advantages of using general purpose text editor: you
don’t have to install any additional software to start writing your code.
![Page 8: Bertrand Meyer Jiwon Shin Andrey Rusakov - ETH Zse.inf.ethz.ch/courses/2015b_fall/rpl/lectures/03_Software... · Chair of Software Engineering Robotics Programming Laboratory Bertrand](https://reader031.vdocuments.mx/reader031/viewer/2022022420/5a7e6ac37f8b9a563b8e8913/html5/thumbnails/8.jpg)
8
Refactoring
Code refactoring is a "disciplined technique for
restructuring an existing body of code,
altering its internal structure
without changing its external behavior"
![Page 9: Bertrand Meyer Jiwon Shin Andrey Rusakov - ETH Zse.inf.ethz.ch/courses/2015b_fall/rpl/lectures/03_Software... · Chair of Software Engineering Robotics Programming Laboratory Bertrand](https://reader031.vdocuments.mx/reader031/viewer/2022022420/5a7e6ac37f8b9a563b8e8913/html5/thumbnails/9.jpg)
9
Refactoring techniques
Techniques that allow for more abstraction Encapsulate Field Generalize Type Replace type-checking code with State/Strategy Replace conditional with polymorphism
Techniques for breaking code apart into more logical pieces Componentization Extract Class Extract Method
Techniques for improving names and location of code Move Method or Move Field Rename Method or Rename Field Pull Up Push Down
![Page 10: Bertrand Meyer Jiwon Shin Andrey Rusakov - ETH Zse.inf.ethz.ch/courses/2015b_fall/rpl/lectures/03_Software... · Chair of Software Engineering Robotics Programming Laboratory Bertrand](https://reader031.vdocuments.mx/reader031/viewer/2022022420/5a7e6ac37f8b9a563b8e8913/html5/thumbnails/10.jpg)
10
Refactoring Tools: Examples
Integrated refactoring tools:
• Eclipse
• NetBeans
• MS VisualStudio
• EiffelStudio
ReSharper
![Page 11: Bertrand Meyer Jiwon Shin Andrey Rusakov - ETH Zse.inf.ethz.ch/courses/2015b_fall/rpl/lectures/03_Software... · Chair of Software Engineering Robotics Programming Laboratory Bertrand](https://reader031.vdocuments.mx/reader031/viewer/2022022420/5a7e6ac37f8b9a563b8e8913/html5/thumbnails/11.jpg)
11
Debuggers
Integrated debuggers:
• EiffelStudio
• MS VisualStudio
• Eclipse
GDB (GNU Debugger) – a command-line debugger for several languages,
including C and C++
DDD (Data Display Debugger) - is a graphical front-end for command-line
debuggers such as GDB
Valgrind (memory debugger)
![Page 12: Bertrand Meyer Jiwon Shin Andrey Rusakov - ETH Zse.inf.ethz.ch/courses/2015b_fall/rpl/lectures/03_Software... · Chair of Software Engineering Robotics Programming Laboratory Bertrand](https://reader031.vdocuments.mx/reader031/viewer/2022022420/5a7e6ac37f8b9a563b8e8913/html5/thumbnails/12.jpg)
12
Profilers & Performance analyzers
Integrated profilers
• Eclipse
• MS VisualStudio
• NetBeans
• EiffelStudio
Intel VTune
![Page 13: Bertrand Meyer Jiwon Shin Andrey Rusakov - ETH Zse.inf.ethz.ch/courses/2015b_fall/rpl/lectures/03_Software... · Chair of Software Engineering Robotics Programming Laboratory Bertrand](https://reader031.vdocuments.mx/reader031/viewer/2022022420/5a7e6ac37f8b9a563b8e8913/html5/thumbnails/13.jpg)
13
Testing
Unit testing
• JUnit
• NUnit
• CppUnit
• Autotest
GUI testing
• Selenium (web applications)
Testing multi-threaded applications
• ConTest
![Page 14: Bertrand Meyer Jiwon Shin Andrey Rusakov - ETH Zse.inf.ethz.ch/courses/2015b_fall/rpl/lectures/03_Software... · Chair of Software Engineering Robotics Programming Laboratory Bertrand](https://reader031.vdocuments.mx/reader031/viewer/2022022420/5a7e6ac37f8b9a563b8e8913/html5/thumbnails/14.jpg)
14
Test-Driven Development
TDD cycle:
• Add a test
• Run all tests and see if the new one fails
• Write some code
• Run tests
• Refactor code
• Repeat
![Page 15: Bertrand Meyer Jiwon Shin Andrey Rusakov - ETH Zse.inf.ethz.ch/courses/2015b_fall/rpl/lectures/03_Software... · Chair of Software Engineering Robotics Programming Laboratory Bertrand](https://reader031.vdocuments.mx/reader031/viewer/2022022420/5a7e6ac37f8b9a563b8e8913/html5/thumbnails/15.jpg)
15
EiffelStudio
DEMO
![Page 16: Bertrand Meyer Jiwon Shin Andrey Rusakov - ETH Zse.inf.ethz.ch/courses/2015b_fall/rpl/lectures/03_Software... · Chair of Software Engineering Robotics Programming Laboratory Bertrand](https://reader031.vdocuments.mx/reader031/viewer/2022022420/5a7e6ac37f8b9a563b8e8913/html5/thumbnails/16.jpg)
16
Version control
SVN
Git
Mercurial
![Page 17: Bertrand Meyer Jiwon Shin Andrey Rusakov - ETH Zse.inf.ethz.ch/courses/2015b_fall/rpl/lectures/03_Software... · Chair of Software Engineering Robotics Programming Laboratory Bertrand](https://reader031.vdocuments.mx/reader031/viewer/2022022420/5a7e6ac37f8b9a563b8e8913/html5/thumbnails/17.jpg)
17
Ivan’s machineDasha’s machine
SVN
SVN server
Repository
CommitCommitUpdate Update
Local working copy Local working copy
![Page 18: Bertrand Meyer Jiwon Shin Andrey Rusakov - ETH Zse.inf.ethz.ch/courses/2015b_fall/rpl/lectures/03_Software... · Chair of Software Engineering Robotics Programming Laboratory Bertrand](https://reader031.vdocuments.mx/reader031/viewer/2022022420/5a7e6ac37f8b9a563b8e8913/html5/thumbnails/18.jpg)
18
SVN basics
Common terms:
• Diff
• Revision
• Branch
• Merge
Commands:
• checkout
• add
• remove
• update
• revert
• diff
• commit
![Page 19: Bertrand Meyer Jiwon Shin Andrey Rusakov - ETH Zse.inf.ethz.ch/courses/2015b_fall/rpl/lectures/03_Software... · Chair of Software Engineering Robotics Programming Laboratory Bertrand](https://reader031.vdocuments.mx/reader031/viewer/2022022420/5a7e6ac37f8b9a563b8e8913/html5/thumbnails/19.jpg)
19
Dasha’s machine
Git
Local repository
Git server
Remote repository
PushPushPull Pull
Local working copy
Ivan’s machine
Local repository
Local working copy
Commit Reset Commit Reset
![Page 20: Bertrand Meyer Jiwon Shin Andrey Rusakov - ETH Zse.inf.ethz.ch/courses/2015b_fall/rpl/lectures/03_Software... · Chair of Software Engineering Robotics Programming Laboratory Bertrand](https://reader031.vdocuments.mx/reader031/viewer/2022022420/5a7e6ac37f8b9a563b8e8913/html5/thumbnails/20.jpg)
20
Git basics
Git workflows:
• Centralized
• Feature Branch
• Gitflow
• Forking
• ...
Commands:
• clone
• add
• rm
• status
• pull
• commit
• push
![Page 21: Bertrand Meyer Jiwon Shin Andrey Rusakov - ETH Zse.inf.ethz.ch/courses/2015b_fall/rpl/lectures/03_Software... · Chair of Software Engineering Robotics Programming Laboratory Bertrand](https://reader031.vdocuments.mx/reader031/viewer/2022022420/5a7e6ac37f8b9a563b8e8913/html5/thumbnails/21.jpg)
21
Bug trackers, Issue trackers
JIRA
Bugzilla
Redmine
Trac
Jazz
![Page 22: Bertrand Meyer Jiwon Shin Andrey Rusakov - ETH Zse.inf.ethz.ch/courses/2015b_fall/rpl/lectures/03_Software... · Chair of Software Engineering Robotics Programming Laboratory Bertrand](https://reader031.vdocuments.mx/reader031/viewer/2022022420/5a7e6ac37f8b9a563b8e8913/html5/thumbnails/22.jpg)
22
Build tools
Ant
Maven
Cmake
![Page 23: Bertrand Meyer Jiwon Shin Andrey Rusakov - ETH Zse.inf.ethz.ch/courses/2015b_fall/rpl/lectures/03_Software... · Chair of Software Engineering Robotics Programming Laboratory Bertrand](https://reader031.vdocuments.mx/reader031/viewer/2022022420/5a7e6ac37f8b9a563b8e8913/html5/thumbnails/23.jpg)
23
Continious Integration
Jenkins
Teamcity
![Page 24: Bertrand Meyer Jiwon Shin Andrey Rusakov - ETH Zse.inf.ethz.ch/courses/2015b_fall/rpl/lectures/03_Software... · Chair of Software Engineering Robotics Programming Laboratory Bertrand](https://reader031.vdocuments.mx/reader031/viewer/2022022420/5a7e6ac37f8b9a563b8e8913/html5/thumbnails/24.jpg)
24
Object-oriented analysis and design
BON
UML