Universitatea Babeş-Bolyai Cluj-Napoca
Facultatea de Matematică şi Informatică
Ciclul de studii: Licenţă
Domeniul: Informatică
Programul de studii: Informatică - în limba engleză
Limba de predare: Engleză

SYLLABUS

I. General data
Code	Subject	
MID0001	Fundamentals of Programming	

Semester	Hours: C+S+L+P	Category	Status	
1	2+2+2+0	fundamental	compulsory	

II. Full status faculty members
Name and	Scientific	Didactic	Chair	Type of activity	
surname	title	title		C	S	L	
CZIBULA Istvan	Ph.D.	Lect.	Computer Science	*	*	*	

Associated faculty members
Name and	Scientific	Institution	Type of	Type of activity	
surname	title		position	C	S	L	
BOCICOR Maria Iuliana	Phd student	Babes-Bolyai University				*	
MARIAN Zsuzsanna Edit	Phd student	Babes-Bolyai University				*	
SUCIU Mihai	Phd student	Babes-Bolyai University				*	
CRACIUN Florin	Lect	Babes-Bolyai University				*	

III. Course objectives
On completion of the class, the students have to be able:
1. To know the key concepts of programming
2. To know the basic concepts of software engineering (design, implementation and maintenance of software systems) 
3. To understand the basic software tools 
4. To learn Python programming language, and to get used to Python programming, running, testing, and debugging programs. 
5. To acquire and improve the programming style.	

IV. Course contents
1. Introduction to software development processes
·	What is programming: Type, Variable, Algorithm, Program, Basic elements of Python, Python Interpreter (IDLE)
·	How to write programs: Basic roles in software engineering, Problem Statement, Requirements, Feature Driven Development Process
·	Example: calculator, iteration modeling
2.	Procedural programming
·	Structured types: Lists, Tuples, Dictionaries
·  What is a function: Test cases, Definition, Variable scope, Calls
·	Passing parameters. Formal vs actual parameters
·	Anonymous functions
·	How to write functions: Apply test-driven development (TDD) steps

3. Modular programming
·	What is a module: Python module definition, variable scope in a module, packages, standard module libraries, deployment
·	How to organize the source code: responsibilities, single responsibility principle, separation of concerns, dependency, coupling, cohesion
·	Common layers in an information system logical architecture
·	Eclipse + PyDev development environment

4. Object based programming
·	User defined types
·	Objects and classes: classes, objects, fields, methods, special class methods (operator overloading), Python scope and name-space
·	How to define new data types: encapsulation, information hiding, data hiding in Python, guidelines, abstract data types
·	Class specification, Class invariants

5. Development principles
·	Problem statement: a program for managing students (CRUD operations)
·	Layered  architecture: UI layer, Application layer, Domain layer, Infrastructure layer
·	Example of application development: entity, validator, repository, controller
·	GRASP patterns: Information Expert, Low Coupling, High Cohesion, Protected Variation, Single responsibility, Dependency Injection
·	UML Diagrams: class diagrams, relationships, associations, invariants
·	Inheritance: UML generalization, code reuse, overriding, inheritance in Python
·	Exceptions
·	Working with files in Python, repository implementation using files
·	Top down and bottom up strategies: top down design, bottom up design, bottom up programming style, mixed approach
·	
6. Program testing, debugging and inspection
·	Testing methods: exhaustive testing, black box testing, white box testing
·	Testing levels: unit testing, integration testing
·	Automated testing, TDD
·	Program inspection: coding style
·	Refactoring

7. Recursion
·	notion of recursion
·	direct and indirect recursion
·	examples

8. Algorithms complexity
·	definition of complexity
·	complexity as running time
·	complexity as amount of required supplementary memory
·	empiric analysis and asymptotic analysis
·	asymptotic notation: big-o, little-o, big-omega, little-omega, theta; properties
·	examples of magnitude orders
·	comparison of algorithms from an efficiency point of view
·	structural complexity

9. Search algorithms and their complexity
·	specification of the search problem
·	search methods
·	sequential traversal
·	binary search
·	complexity of search algorithms

10. Sort algorithms and their complexity
·	specification of the sort problem
·	sort methods: BubbleSort, SelectionSort, InsertionSort, QuickSort, MergeSort
complexity of sort algorithms

11. Division method
·	general presentation
·	description of the subalgorithm

12. Backtracking method
·	general presentation of the Backtracking method
·	Backtracking algorithm (subalgorithm), Python implementations (recursive, iteratice)
·	extensions of the Backtracking method
13 Greedy Method, Dynamic programming
•	Greedy: general abstraction, sample problems, Greedy algorithm
•	Dynamic programming: Principle of optimality, problem solving using dynamic programming
•	Greedy vs. Dynamic programming, Python implementations

V. Bibliography
1.	Kent Beck.Test Driven Development: By Example. Addison-Wesley Longman, 2002. See also Test-driven development. http://en.wikipedia.org/wiki/Test-driven_development
2.	Martin Fowler. Refactoring. Improving the Design of Existing Code. Addison-Wesley, 1999. See also http://refactoring.com/catalog/index.html
3.	Frentiu, M., H.F. Pop, Serban G., Programming Fundamentals, Cluj University Press, 2006	

VI. Thematic of didactic activities per weeks
Schedule of courses 

Week 1: Introduction to software development processes [1]
Week 2: Procedural programming [1]
Week 3: Modular programming [1]
Week 4: Object based programming [1]
Week 5: Object based programming [1]
Week 6: Development principles [1]
Week 7: Development principles [1]
Week 8: Program testing and inspection [1, 2, 3]
Weeks 9: Recursion. Algorithms complexity [3 ch. 7]
Weeks 10: Search algorithms and their complexity  [3, ch. 6, ch. 7]
Week 11: Sort algorithms and their complexity [3, ch. 7]
Week 12: Division method. Backtracking. [3,ch. 6, ch. 7]
Week 13: Greedy method. Dynamic Programming
Week 14: Revision

Schedule of seminars 

Week 1: Python programs
Week 2: Procedural programming
Week 3: Modular programming
Week 4: Object based programming
Week 5: Layered architecture
Week 6: Layered architecture
Week 7: Program testing and inspection
Week 8: Working with files in Python
Weeks 9,10: Recursion. Algorithms complexity
Week 11: Division method. Search algorithms
Week 12: Backtracking
Week 13: Preparation for the practical test
Week 14: Preparation for the written exam

Schedule of labs 

The week number indicates when the lab theme has been given; the lab documents are due one week later and the lab programs are due two weeks later.

Week 1: Simple Python program
Weeks 2-4: Feature driven software development process
Weeks 5-8: Layered architecture
Week 9: Text files
Week 10: Testing
Week 11: Algorithms complexity
Week 12: Backtracking method
Week 13, 14: Lab delivery time (see note above)	

VII. Didactic methods used
Lectures, conversations, projects, exercises, individual study, homework assignments.

VIII. Assessment
Knowledge evaluation will take into account both the theoretical and the practical knowledge, and also, the abilities to use the computer for solving concrete problems. The laboratory activity consists of designing programs (as homework which is controlled by the assistants) and running them. Attention will be given to the way the students design, implement, and document their programs. At the end of term the activity is followed by an exam consisting of two parts: a written exam (W), and a practical one (P). The first one must verify the theoretical knowledge and the capacity to design and implement correct Python programs, and a first grade (W)is given for this. The practical examination consists in designing, testing and debugging a Python program, for which a second grade (P) is given.
 The laboratory activity of students will be graded by mark (L). The final mark is the average of these grades, but only if they are at least 5, otherwise the exam is not given.  Therefore, final grade = 30%L + 40%P + 30%W 
Further information regarding the evaluation process and the course requirements can be found following the URL:  http://www.cs.ubbcluj.ro/~istvanc/fp	

IX. Additional references
1.	The Python language reference. http://docs.python.org/py3k/reference/index.html
2.	The Python standard library. http://docs.python.org/py3k/library/index.html
The Python tutorial. http://docs.python.org/tutorial/index.html	

	Dean,							Chair head,
Prof. Dr. Leon Ţâmbulea				Prof. Dr. Florian Boian

	Date,							Course responsible,
	1.10.2011						Lect. CZIBULA Istvan, Ph.D.