Computer Programming

A.Y. 2018/2019
12
Max ECTS
120
Overall hours
SSD
INF/01
Language
Italian
Learning objectives
Obiettivo del corso è introdurre gli studenti alla programmazione mediante l'approccio imperativo. Come linguaggio di riferimento verrà utilizzato Go. Il laboratorio è parte integrante del corso destinata a fornire la necessaria e naturale controparte "pragmatica".
Expected learning outcomes
Undefined
Single course

This course cannot be attended as a single course. Please check our list of single courses to find the ones available for enrolment.

Course syllabus and organization

Single session

Responsible
Lesson period
First semester
ATTENDING STUDENTS
Unita' didattica
Course syllabus
[TWG = The Way to Go: A Thorough Introduction to the Go Programming Language by Ivo Balbaert]
1. Course introduction; Computer architecture; Computer science; Programming languages ​​(machine language, assembly, high level); Computer as a programmable machine
2. The von Neumann machine. Information (bits, bytes, ...). Loader, fetch-decode-execute. CPU architecture: ALU and CU. An example of a CPU; assembly languages
3. Software lifecycle. Programming tools. History of go. The first program in go [TWG4]. The go tool. Compilation. Execution. Formatting. Documentation [TWG3]
4. Discussion of lexical and syntactic aspects. Comments [TWG4]. Types. Classification of types (basic types, compound types, interfaces). Variables: name, type, value, scope. Multiple declaration, assignments, short-assignment [TWG4]
5. Basic I / O. Basic numeric types (int, float64). Numerical expressions. Conversions. Introduction to the complex type. Unused variables and blank variable [TWG4]
6. Binary selection (if). Local variables. The bool type and the Boolean operators. Exercises [TWG5]
7. The iteration (for): unary, ternary, zeroary versions. Exercises [TWG5]
8. Digital representation of data. Positional notation. Representation of negative integers. Representation range, overflow. Overview of the representation of the reals: fixed and mobile point (IEEE 754 standard). Characters (ASCII, Unicode, UTF-8) [Handouts]
9. Fixed-length numeric basic types. Rune type. String type: differences between raw and utf-8. Len function. Fourth form of the for (range) cycle [TWG4, TWG5]
10. Exercises: nested cycles. Break and continue instructions [TWG5]
11. Multi-way selection (switch) [TWG5]
12. Arrays and slices. Initializers. Application of the for ranges. Append function [TWG7]
13. Exercises. Command-line arguments. Strconv package
14. Functions: parameters, signature. Passage by value. Returned values. Values ​​returned with a name. [TWG6]
15. Exercises
16. Sorting and binary research
17. Generation of pseudo-random numbers. Math package. Exercises
18. Maps. Application of the for ranges. Exercises [TWG8]
19. Recursion. Execution stack [TWG6]
20. Exercises using recursion
21. Pointers: operators * and &. [TWG4]
22. Exercises with pointers
23. Structures [TWG10]. Methods [TWG10] (outline)
24. Exercises on structures and methods
25. Closures. Example: sort, binary search
26. Advanced I / O. File [TWG12]
27. Exercises; defer [TWG6]
28. Packages and structure. Visibility of the variables
29. Testing [TWG13]
30. Interfaces [TWG11]
31. Implementation of a search engine (reverse indices)
32. Go routines and channels [TWG14]
33. Exercises on concurrency
34. The C language. Using gcc. Syntactic differences: point-and-comma, brackets in control structures, declarations of variables, types and functions. Differences in flow-control structures (switch, while, do-while). Use of simple instructions in control structures. Inclusion vs. import.
35. Absence of strings, slices, maps; use of char[] for strings. Elementary types and compiler dependency; use of specific types (stdint.h, bool.h). Implicit cast. Definition of macros. Library functions. Command line parameters
36. Pointers, pointer arithmetic. Memory management: malloc, free
Unita' didattica
Course syllabus
[TWG = The Way to Go: A Thorough Introduction to the Go Programming Language by Ivo Balbaert]
1. Course introduction; Computer architecture; Computer science; Programming languages ​​(machine language, assembly, high level); Computer as a programmable machine
2. The von Neumann machine. Information (bits, bytes, ...). Loader, fetch-decode-execute. CPU architecture: ALU and CU. An example of a CPU; assembly languages
3. Software lifecycle. Programming tools. History of go. The first program in go [TWG4]. The go tool. Compilation. Execution. Formatting. Documentation [TWG3]
4. Discussion of lexical and syntactic aspects. Comments [TWG4]. Types. Classification of types (basic types, compound types, interfaces). Variables: name, type, value, scope. Multiple declaration, assignments, short-assignment [TWG4]
5. Basic I / O. Basic numeric types (int, float64). Numerical expressions. Conversions. Introduction to the complex type. Unused variables and blank variable [TWG4]
6. Binary selection (if). Local variables. The bool type and the Boolean operators. Exercises [TWG5]
7. The iteration (for): unary, ternary, zeroary versions. Exercises [TWG5]
8. Digital representation of data. Positional notation. Representation of negative integers. Representation range, overflow. Overview of the representation of the reals: fixed and mobile point (IEEE 754 standard). Characters (ASCII, Unicode, UTF-8) [Handouts]
9. Fixed-length numeric basic types. Rune type. String type: differences between raw and utf-8. Len function. Fourth form of the for (range) cycle [TWG4, TWG5]
10. Exercises: nested cycles. Break and continue instructions [TWG5]
11. Multi-way selection (switch) [TWG5]
12. Arrays and slices. Initializers. Application of the for ranges. Append function [TWG7]
13. Exercises. Command-line arguments. Strconv package
14. Functions: parameters, signature. Passage by value. Returned values. Values ​​returned with a name. [TWG6]
15. Exercises
16. Sorting and binary research
17. Generation of pseudo-random numbers. Math package. Exercises
18. Maps. Application of the for ranges. Exercises [TWG8]
19. Recursion. Execution stack [TWG6]
20. Exercises using recursion
21. Pointers: operators * and &. [TWG4]
22. Exercises with pointers
23. Structures [TWG10]. Methods [TWG10] (outline)
24. Exercises on structures and methods
25. Closures. Example: sort, binary search
26. Advanced I / O. File [TWG12]
27. Exercises; defer [TWG6]
28. Packages and structure. Visibility of the variables
29. Testing [TWG13]
30. Interfaces [TWG11]
31. Implementation of a search engine (reverse indices)
32. Go routines and channels [TWG14]
33. Exercises on concurrency
34. The C language. Using gcc. Syntactic differences: point-and-comma, brackets in control structures, declarations of variables, types and functions. Differences in flow-control structures (switch, while, do-while). Use of simple instructions in control structures. Inclusion vs. import.
35. Absence of strings, slices, maps; use of char[] for strings. Elementary types and compiler dependency; use of specific types (stdint.h, bool.h). Implicit cast. Definition of macros. Library functions. Command line parameters
36. Pointers, pointer arithmetic. Memory management: malloc, free
NON-ATTENDING STUDENTS
Unita' didattica
Course syllabus
-
Unita' didattica
Course syllabus
-
Unita' didattica
INF/01 - INFORMATICS - University credits: 9
Lessons: 72 hours
Professor: Vigna Sebastiano
Unita' didattica
INF/01 - INFORMATICS - University credits: 3
Laboratories: 48 hours
Professors: Bianchessi Nicola, Casazza Marco
Shifts:
Turno A
Professor: Casazza Marco
Turno B
Professor: Bianchessi Nicola
Professor(s)
Reception:
Thursday, 11:00-13:00 and 14:00-15:00 - By appointment (to be arranged by email)
Room 3021 - Via Celoria, 18