Python in Applied Science
FSI-T0PAcad. year: 2017/2018
Students will solve model problems that demonstrate how best practices of software engineering can assist in solving them. Students will be introduced into test-driven development, code review and they will become familiar with best practices in structuring and documenting one's code in order to increase maintainability and accessibility. The Enthought Canopy Python distribution (available for MS Windows, Mac OSX and Linux) wil be available for students to use.
Learning outcomes of the course unit
Students will solve simplified representative cases of problems typical to the field of physical engineering that involve data processing. They will also polish their skills by working on a bigger-scale final project. As a result, students will become able to solve real-world challenges using the free software ecosystem around the Python language.
Basic concepts of procedural programming - variables, functions (parameters, return value, passing by value vs passing by reference), types, basic concepts of working with files (opening, writing to, encoding), familiarity of format strings.
Recommended optional programme components
Recommended or required reading
Summerfield, M.: Python 3 - Výukový kurz, COMPUTER PRESS, 2012 (CS)
Burris, E.: Programming in the Large with Design Patterns, Pretty Print Press, 2012 (CS)
Scipy lecture notes: http://www.scipy-lectures.org/ (CS)
Planned learning activities and teaching methods
The course is taught through lectures explaining the basic principles and theory of the discipline. Exercises are focused on practical topics presented in lectures.
Assesment methods and criteria linked to learning outcomes
To graduate, students have to work-out either an individual project, or a distinct part of a group project. The theme of the project is assigned during the term according to the mutual agreement. The form of the submission of the project is specified in the project assignment.
Language of instruction
The main goal of the course is to introduce students to the Python programming language and its thriving free-software ecosystem. Students will gain abilities allowing them to write software while employing up-to-date best practices, such as conscious use of design patterns, test-driven development and automated documentation generation. Students will become ready to solve wide scale of typical engineering problems that involve data processing and visualization.
Specification of controlled education, way of implementation and compensation for absences
A teacher checks the attendance on seminars stated in the timetable. The form and the date of the compensation of missed lessons are specified by the teacher.
Type of course unit
13 hours, optionally
Teacher / Lecturer
Getting familiar with basic Python concepts, Python ecosystem.
Python software project structure, structure of modules and packages.
Variables, basic types, functions, passing by value / reference.
Introduction to object-oriented programming (OOP)
Introduction to design patterns, the "strategy" pattern.
Introduction to testing and data visualization.
Going deeper to OOP, "factory" and "decorator" patterns.
Documentation generation, "facade" and "adapter" patterns.
How to deal with third-party modules.
Creating GUI applications, "observer" and MVC patterns.
More on GUI applications, the "state" pattern.
On Python pitfalls.
seminars in computer labs
13 hours, compulsory
Teacher / Lecturer
Hello world project
Crteating a standard-compliant Python project
Dice project and OOP
Dice project - creating loaded dice
Dice project - testing, revealing loaded dice
Dice project - further generalization, refactoring
Tabletop game simulation
Using Google Deep Dream
Practical pitfall demonstration