Teachers
Person in charge
- Gerard Escudero Bakx ( gerard.escudero@upc.edu )
- Jordi Delgado Pin ( jdelgado@cs.upc.edu )
Weekly hours
Theory
2
Problems
0
Laboratory
2
Guided learning
0
Autonomous learning
6
Competences
Teamwork
- G5.2 - To plan the objectives, operation rules, responsibilities, agenda and review procedure of the work. To identify conflicts, negotiate and solve them in a effective way. To adapt oneself to different kinds of groups (big/small, technical/mixed, same space/at distance). To interact efficiently and promote the participation with other group members.
Common technical competencies
- CT1.2C - To use properly theories, procedures and tools in the professional development of the informatics engineering in all its fields (specification, design, implementation, deployment and products evaluation) demonstrating the comprehension of the adopted compromises in the design decisions.
- CT4.1 - To identify the most adequate algorithmic solutions to solve medium difficulty problems.
- CT4.2 - To reason about the correction and efficiency of an algorithmic solution.
- CT5.1 - To choose, combine and exploit different programming paradigms, at the moment of building software, taking into account criteria like ease of development, efficiency, portability and maintainability.
- CT5.2 - To know, design and use efficiently the most adequate data types and data structures to solve a problem.
- CT5.3 - To design, write, test, refine, document and maintain code in an high level programming language to solve programming problems applying algorithmic schemas and using data structures.
Software engineering specialization
- CES1.1 - To develop, maintain and evaluate complex and/or critical software systems and services.
- CES1.3 - To identify, evaluate and manage potential risks related to software building which could arise.
- CES1.7 - To control the quality and design tests in the software production
Computer science specialization
- CCO2.2 - Capacity to acquire, obtain, formalize and represent human knowledge in a computable way to solve problems through a computer system in any applicable field, in particular in the fields related to computation, perception and operation in intelligent environments.
Objectives
-
Learn the capabilities provided to a programming language by having higher-order functions
Related competences: CT1.2C, CES1.1, CT4.2, CCO2.2, CES1.3, CES1.7, CT5.1, -
Learn the techniques associated with higher-order functions in the Clojure programming language
Related competences: CES1.1, CT4.1, CT4.2, CT5.2, CES1.3, CT5.3, -
Knowing what a closure is and some techniques associated with their use.
Related competences: CT1.2C, CES1.1, CT4.2, CT5.2, CES1.3, CT5.1, -
Learn a dynamic and functional programming language such as Clojure.
Related competences: CES1.1, CES1.3, CES1.7, CT5.3, -
Learn immutable data structures and the consequences of having them in a programming language.
Related competences: CES1.1, CT4.1, CT5.2, CCO2.2, CES1.3, CES1.7, CT5.1, CT5.3, -
Learn the concept of lazy evaluation and the consequences of being able to choose between different types of evaluation
Related competences: CES1.1, CT4.2, CES1.3, CES1.7, CT5.1, CT5.3, -
Being able to develop lab exercises that uses some of the taught material
Related competences: CES1.1, G5.2, CES1.7,
Contents
-
Clojure introduction
Expressions, conditionals, local variables (let), definition of functions, sequences (lists, vectors, strings), recursion and iteration. -
First-class Functions
Functions as parameters, storing functions in data structures. Ways to iterate over collections: reduce, map, filter, foldr, etc. Functions that return functions -
Closures: The environment model
Lexical scope, The functions are not such: They capture the lexical context, If we have closures, no objects are needed: Examples. Explain how closures work using the environment model. -
Programming with higher order functions: Techniques.
Composition, Pipelining, CPS, TCO & Trampolining -
Immutable data structures
Advantages and disadvantages. The case of Clojure: Separate state management and make it explicit (immutability by default) -
Lazy sequences
"Infinite" data structures -
Macros
The concept of 'Macro' in the world of Lisp languages. Reflection
Activities
Activity Evaluation act
Clojure introduction
The student should pay attention to the lecture and he/she should work through the exercises suggested by the lecturer.Objectives: 4
Contents:
Theory
4h
Problems
0h
Laboratory
4h
Guided learning
0h
Autonomous learning
10h
Immutable data structures
The student should pay attention to the lecture and he/she should work through the exercises suggested by the lecturer.Objectives: 5
Contents:
Theory
2h
Problems
0h
Laboratory
2h
Guided learning
0h
Autonomous learning
6h
Lazy sequences
The student should pay attention to the lecture and he/she should work through the exercises suggested by the lecturer.Objectives: 6
Contents:
Theory
2h
Problems
0h
Laboratory
2h
Guided learning
0h
Autonomous learning
6h
Macros
The student should pay attention to the lecture and he/she should work through the exercises suggested by the lecturer.Objectives: 4
Contents:
Theory
4h
Problems
0h
Laboratory
4h
Guided learning
0h
Autonomous learning
10h
Practical exercise
Delivery date: Throughout the courseObjectives: 7
Week: 15 (Outside class hours)
Theory
0h
Problems
0h
Laboratory
0h
Guided learning
0h
Autonomous learning
0h
Teaching methodology
Teaching the course is structured in lectures and laboratory sessions.Teachers will use lectures to introduce the essential contents of the course. In the laboratory sessions the contents of the course will be brought to the computer by carrying out practical problems. The laboratory classes will be a continuation of the lectures, where new concepts will be implemented as they appear in lectures.
Evaluation methodology
Grading the course will consist of two theoretical tests (P and F), one in the middle of the course and the other at the end, and laboratory exercises that will be delivered in groups of two people (L). The laboratory grade will be computed as follows: Students will deliver between 5 and 7 exercises throughout the course in groups of two, and the laboratory grade will be the average of these grades.Then, the evaluation method is = Theory*0.8 + L*0.2
where:
Theory: MAX(F,(P+F)/2)
Teamwork:
Evaluated using a simple rubric that each group tutor group uses
to rank different aspects of teamwork of every member of the group.
Bibliography
Basic
-
The Joy of Clojure
- Fogus, Michael; Houser, Chris,
Manning,
2014.
ISBN: 9781638351283
https://ebookcentral-proquest-com.recursos.biblioteca.upc.edu/lib/upcatalunya-ebooks/detail.action?pq-origsite=primo&docID=6642578 -
Clojure Programming: Practical Lisp for the Java World
- Emerick, Chas; Carper, Brian; Grand, Christophe,
O'Reilly Media,
2012.
ISBN: 9781449394707
https://discovery.upc.edu/discovery/fulldisplay?docid=alma991058640967306706&context=L&vid=34CSUC_UPC:VU1&lang=ca -
Mastering Clojure Macros: Write Cleaner, Faster, Smarter Code
- Jones, Colin,
The Pragmatic Programmers,
2014.
ISBN: 1941222226
https://ebookcentral-proquest-com.recursos.biblioteca.upc.edu/lib/upcatalunya-ebooks/detail.action?pq-origsite=primo&docID=5307312
Complementary
-
Elements of functional programming
- Reade, Chris,
Addison-Wesley,
1989.
ISBN: 0201129159
https://discovery.upc.edu/discovery/fulldisplay?docid=alma991000232459706711&context=L&vid=34CSUC_UPC:VU1&lang=ca -
Thinking Functionally with Haskell
- Bird, Richard,
Cambridge University Press,
2014.
ISBN: 9781107452640
https://discovery.upc.edu/discovery/fulldisplay?docid=alma991005151878906711&context=L&vid=34CSUC_UPC:VU1&lang=ca