class: center, middle, inverse, remark-frontslide-content # General Introduction --- class: center # Everything we teach today will slow you down! --- class: center # Everything we teach today will slow you down **at first**.
--- class: center, middle $$ \texttt{code_quality} = \frac{1}{\texttt{wtf_per_minute}}$$
--- # About software engineering https://en.wikipedia.org/wiki/Software_engineering > Software engineering is the systematic application of engineering approaches to the development of software. --- # About software engineering https://en.wikipedia.org/wiki/Software_engineering > Software engineering is the systematic application of engineering approaches to the development of software. > "... the systematic application of scientific and technological knowledge, > methods, and experience to the **design**, **implementation**, **testing**, and > **documentation** of software." --- # About software engineering https://en.wikipedia.org/wiki/Software_engineering > Software engineering is the systematic application of engineering approaches to the development of software. > "... the systematic application of scientific and technological knowledge, > methods, and experience to the **design**, **implementation**, **testing**, and > **documentation** of software." Titus Winter: > (Software) engineering is programming over time. --- # About software engineering, continued - Think about the programming process. --- # About software engineering, continued - Think about the programming process. - Use tools and techniques to control and automate parts of the process. --- # About software engineering, continued - Think about the programming process. - Use tools and techniques to control and automate parts of the process. - Regularly rethink your personal programming process. --- class: center, middle, inverse # Topics / Presentations --- # Presentation: Clean and maintainable code - After this introduction. --- # Presentation: Version control systems - Manage changes in your code. --- # Presentation: Version control systems - Manage changes in your code. - `git`, `subversion`, ... --- # Presentation: Version control systems - Manage changes in your code. - `git`, `subversion`, ... - Time machine for your source code. --- # Presentation: Version control systems - Manage changes in your code. - `git`, `subversion`, ... - Time machine for your source code. - No need to keep commented out code or version information in file names. --- # Presentation: Version control systems - Manage changes in your code. - `git`, `subversion`, ... - Time machine for your source code. - No need to keep commented out code or version information in file names. - Retrospective understanding of changes. --- # Presentation: Version control systems - Manage changes in your code. - `git`, `subversion`, ... - Time machine for your source code. - No need to keep commented out code or version information in file names. - Retrospective understanding of changes. - Undo changes. --- # Presentation: Version control systems - Manage changes in your code. - `git`, `subversion`, ... - Time machine for your source code. - No need to keep commented out code or version information in file names. - Retrospective understanding of changes. - Undo changes. - Also supports sharing code and distributed development in a team. --- # Presentation: Version control systems - Manage changes in your code. - `git`, `subversion`, ... - Time machine for your source code. - No need to keep commented out code or version information in file names. - Retrospective understanding of changes. - Undo changes. - Also supports sharing code and distributed development in a team. - Also "Hands on" during the code clinics session. --- # Presentation: Automated code testing - Automates manual tests. - **NO MAGIC BUTTON**: extra work required. --- # Presentation: Automated code testing - Automates manual tests. - **NO MAGIC BUTTON**: extra work required. ### Example: - So called *productive code*: ```python def add(a, b): return a + b ``` --- # Presentation: Automated code testing - Automates manual tests. - **NO MAGIC BUTTON**: extra work required. ### Example: - So called *productive code*: ```python def add(a, b): return a + b ``` - Add extra code which tests your productive code: ```python def test_add(): assert add(0, 0) == 0 assert add(0, 1) == 1 assert add(3, 1) == 4 assert add(-1, 1) == 0 ``` --- # Presentation: Automated code testing - ### unit testing - compare small units against expected results --- # Presentation: Automated code testing - ### unit testing - compare small units against expected results - ### regression testing - run system or parts and compare against a previously recorded correct result - important to get started with testing for an existing code base --- # Presentation: Automated code testing - ### unit testing - compare small units against expected results - ### regression testing - run system or parts and compare against a previously recorded correct result - important to get started with testing for an existing code base - ### integration testing - tests full system and how parts play together --- # Presentation: Automated code testing - ### unit testing - compare small units against expected results - ### regression testing - run system or parts and compare against a previously recorded correct result - important to get started with testing for an existing code base - ### integration testing - tests full system and how parts play together - ### continous integration (CI) testing - used with version control systems (more later) - tests run after updating code on remote repository (e.g. github.com) - thus tests run on a **different machine** --- # Presentation: Refactoring - Techniques to improve your code without changing functionality. --- class: center, middle, inverse # After the workshop --- class: center ## This is so much to learn
source: https://i.imgflip.com/3dl1ks.jpg
--- class: center ## This is so much to learn
source: https://i.imgflip.com/3dl1ks.jpg
Learn best practices incrementally.
--- class: center ## This is so much to learn
source: https://i.imgflip.com/3dl1ks.jpg
Learn best practices incrementally.
Automate techniques and habits step by step.
--- class: center ## This is so much to learn
source: https://i.imgflip.com/3dl1ks.jpg
Learn best practices incrementally.
Automate techniques and habits step by step.
Start NOW!
--- class: center ## My professor won't give me time for the stuff you teach! --- class: center ## My professor won't give me time for the stuff you teach!
source: https://i.imgflip.com/3dl0ja.jpg, Credit: Dave Roth.
--- class: center ## My professor won't give me time for the stuff you teach!
source: https://i.imgflip.com/3dl0ja.jpg, Credit: Dave Roth.
## Talk about **risks** and **future costs**, not about technicalities. --- class: center, middle, inverse # Questions?