Advanced Programming Concepts

You are here

Credits
6
Types
Specialization complementary (Software Engineering)
Requirements
  • Prerequisite: IES
  • Prerequisite: PROP
Department
CS
This course aims to explain programming concepts that deepen the use of certain constructions and structures linked to programming paradigms that students should already know. This year functional programming is explained: functions as first-class objects, closures and the environment model, programming using higher-order functions (composition, pipelining, tail call optimization, continuation passing style, etc), immutability in data structures, lazy evaluation, and macros.

Teachers

Person in charge

  • Gerard Escudero Bakx ( )
  • Jordi Delgado Pin ( )

Weekly hours

Theory
2
Problems
0
Laboratory
2
Guided learning
0
Autonomous learning
6

Competences

Transversal Competences

Teamwork

  • G5 [Avaluable] - To be capable to work as a team member, being just one more member or performing management tasks, with the finality of contributing to develop projects in a pragmatic way and with responsibility sense; to assume compromises taking into account the available resources.
    • 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.

Technical Competences

Common technical competencies

  • CT1 - To demonstrate knowledge and comprehension of essential facts, concepts, principles and theories related to informatics and their disciplines of reference.
    • 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 - To demonstrate knowledge and capacity to apply the basic algorithmic procedures of the computer science technologies to design solutions for problems, analysing the suitability and complexity of the algorithms.
    • 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 - To analyse, design, build and maintain applications in a robust, secure and efficient way, choosing the most adequate paradigm and programming languages.
    • 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.

Technical Competences of each Specialization

Software engineering specialization

  • CES1 - To develop, maintain and evaluate software services and systems which satisfy all user requirements, which behave reliably and efficiently, with a reasonable development and maintenance and which satisfy the rules for quality applying the theories, principles, methods and practices of Software Engineering.
    • 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 - To develop effectively and efficiently the adequate algorithms and software to solve complex computation problems.
    • 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

  1. 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,
  2. 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,
  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,
  4. Learn a dynamic and functional programming language such as Clojure.
    Related competences: CES1.1, CES1.3, CES1.7, CT5.3,
  5. 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,
  6. 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,
  7. Being able to develop lab exercises that uses some of the taught material
    Related competences: CES1.1, G5.2, CES1.7,

Contents

  1. Clojure introduction
    Expressions, conditionals, local variables (let), definition of functions, sequences (lists, vectors, strings), recursion and iteration.
  2. 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
  3. 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.
  4. Programming with higher order functions: Techniques.
    Composition, Pipelining, CPS, TCO & Trampolining
  5. Immutable data structures
    Advantages and disadvantages. The case of Clojure: Separate state management and make it explicit (immutability by default)
  6. Lazy evaluation
    "Infinite" data structures
  7. 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

First-class Functions and Closures: The environment model

The student should pay attention to the lecture and he/she should work through the exercises suggested by the lecturer.
Objectives: 1 2 3
Contents:
Theory
8h
Problems
0h
Laboratory
8h
Guided learning
0h
Autonomous learning
18h

Programming with higher order functions: Techniques.

The student should pay attention to the lecture and he/she should work through the exercises suggested by the lecturer.
Objectives: 1 2 3
Contents:
Theory
8h
Problems
0h
Laboratory
8h
Guided learning
0h
Autonomous learning
18h

Theory test


Objectives: 4 1 2 3
Week: 8
Theory
0h
Problems
0h
Laboratory
2h
Guided learning
0h
Autonomous learning
12h

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 evaluation

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 course
Objectives: 7
Week: 15 (Outside class hours)
Theory
0h
Problems
0h
Laboratory
0h
Guided learning
0h
Autonomous learning
0h

Final test


Objectives: 4 5 6 1 2 3
Week: 15 (Outside class hours)
Theory
2h
Problems
0h
Laboratory
0h
Guided learning
0h
Autonomous learning
10h

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 would be:
= Theory*0.5 + L*0.5 if Theory is >= 3.5
= Theory if Theory is < 3.5
on:
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:

Complementary:

Previous capacities

Students should have enough knowledge of data structures and algorithms