High-Level Abstraction Programming
Data is displayed for academic year: 2023./2024.
Course Description
Methods as first class objects. Lazy evaluation.
Iterables and iterators.
Composition of iterators.
Creating iterables and collections with comprehensions.
Manipulating iterators.
Side-effects and pure functions.
Argument packing and unpacking.
Decorating functions. Lambda expressions. Closures.
Decorators and memoization. Generators and generator functions.
Classes as first-class objects.
Properties and descriptors. Metaclasses.
Study Programmes
University graduate
[FER3-HR] Audio Technologies and Electroacoustics - profile
Elective Courses
(1. semester)
(3. semester)
[FER3-HR] Communication and Space Technologies - profile
Elective Courses
(1. semester)
(3. semester)
[FER3-HR] Computational Modelling in Engineering - profile
Elective Courses
(1. semester)
(3. semester)
[FER3-HR] Computer Engineering - profile
Elective Courses
(1. semester)
(3. semester)
[FER3-HR] Computer Science - profile
Elective Courses
(1. semester)
(3. semester)
[FER3-HR] Control Systems and Robotics - profile
Elective Courses
(1. semester)
(3. semester)
[FER3-HR] Data Science - profile
Elective Courses
(1. semester)
(3. semester)
[FER3-HR] Electrical Power Engineering - profile
Elective Courses
(1. semester)
(3. semester)
[FER3-HR] Electric Machines, Drives and Automation - profile
Elective Courses
(1. semester)
(3. semester)
[FER3-HR] Electronic and Computer Engineering - profile
Elective Courses
(1. semester)
(3. semester)
[FER3-HR] Electronics - profile
Elective Courses
(1. semester)
(3. semester)
[FER3-HR] Information and Communication Engineering - profile
Elective Courses
(1. semester)
(3. semester)
[FER3-HR] Network Science - profile
Elective Courses
(1. semester)
(3. semester)
[FER3-HR] Software Engineering and Information Systems - profile
Elective Courses
(1. semester)
(3. semester)
Learning Outcomes
- discuss advantages of implicit polymorphism in dynamic languages
- apply methods as first-class objects
- explain advantages of lazy evaluation
- explain elements of the iterator protocol
- apply function decorators for lazy evaluation
- evaluate advantages of generators in comparison with classic programming techniques
Forms of Teaching
Lectures
Lectures will be held two hours per week.
Independent assignmentsIndividual assignments will be solved as a preparation and within the laboratory exercises.
LaboratoryLaboratory exercises will be held in four blocks of 2 hours.
Grading Method
Continuous Assessment | Exam | |||||
---|---|---|---|---|---|---|
Type | Threshold | Percent of Grade | Threshold | Percent of Grade | ||
Laboratory Exercises | 50 % | 20 % | 50 % | 20 % | ||
Mid Term Exam: Written | 0 % | 35 % | 0 % | |||
Final Exam: Written | 30 % | 45 % | ||||
Exam: Written | 50 % | 80 % |
Week by Week Schedule
- Definition of classes: fields, methods, and constructors, Subclasses, inheritance, and method overriding, Module systems
- Dynamic dispatch: definition of method-call, Subtyping
- Classes, methods and functions as first-class objects
- Using collection classes, iterators, and other common library components
- Nested and inner classes and functions; Closures
- Side effects and state-less computation. Lazy evaluation and infinite streams
- Higher-order functions (taking and returning functions)
- Midterm exam
- Nested and inner classes and functions; Closures, Function closures (functions using variables in the enclosing lexical environment, canonical idioms, currying, partial application)
- Functional idioms (map, reduce/fold, filter)
- Lazy evaluation and infinite streams
- Lazy evaluation, infinite structures, strictness, Control abstractions (exception handling, continuations, monads)
- Defensive programming (e.g. secure coding, exception handling)
- Metaprogramming (macros, generative programming, model-based development)
- Final exam
Literature
Zoran Kalafatić, Antonio Pošćić, Siniša Šegvić, Julijan Šribar (2016.), Python za znatiželjne, Element
Luciano Ramalho (2021.), Fluent Python, O'Reilly Media
For students
General
ID 222725
Winter semester
5 ECTS
L1 English Level
L1 e-Learning
30 Lectures
0 Seminar
0 Exercises
8 Laboratory exercises
0 Project laboratory
0 Physical education excercises
Grading System
88 Excellent
75 Very Good
62 Good
50 Sufficient