Teaching / [FEB22012(X)] Programming (2014)
This is the course page for Programming (EN) / Programmeren (NL) [Econometrics], academic year 2014-15, block 1.
Lecture notes and slides
The lecture notes are available for download /here/. The econometrics and operations research study association (FAECTOR) has agreed to print them for you for a small fee less than what you would pay for printing them yourself.Lecture slides in pdf:
- #1 / 2014-09-01
- #2 / 2014-09-08
- #3 / 2014-09-15
- #4 / 2014-09-22
- #5 / 2014-09-29
- #6 / 2014-10-06
- #7 / 2014-10-13
Exercises
Exercises will be posted here and in blackboard. The answers _must_ be submitted via blackboard. When submitting your answer, include all the matlab source files (the script- and function files with the .m extension) in a zip, and upload that through blackboard's exercise completion functionality. Note that although the Matlab environment is handy in testing individual lines of code by writing them directly in the command prompt, the solution you submit must consist solely of the source files (the ones of .m extension) that are executable independently.
I recommend getting used to the command prompt of matlab as it includes functionalities commonly available in text-based user environments (for example, browsing command history with up- and down arrows). Note that you can use the command prompt also for showing function documentation with command help (e.g. 'help fprintf'), and for finding function names with lookfor (e.g. 'lookfor print').
Exercises in pdf:
- #1: deadline 2014-09-14 23:59 CET
- #2: deadline 2014-09-21 23:59 CET
- #3: deadline 2014-09-28 23:59 CET
- #4: deadline 2014-10-05 23:59 CET
- #5: deadline 2014-10-12 23:59 CET
- #6: deadline 2014-10-17 13:29 CET
There are 6 exercises (one / week for the first 6 weeks), of which you should submit 3. Each of the submitted exercises awards a maximum 16.66% of the final grade, so the maximum possible to be achieved from the exercises is 50%. The other 50% comes from the written exam. The exercises are graded according to the following scheme:
- Up to 12% from completing the exercise succesfully. Code that does not run awards _always_ 0% from the whole exercise - do not submit crap. If you manage to complete only part of the exercise, submit it and state clearly in comments which part you did and which not
- 4.66% for code clarity (methods, indenting, comments, variable names)
Exam
The exam will be a standard one with three open questions. Note that you are _not_ allowed to bring with you any extra material to the exam: only a pen(cil), a sharpener, and an eraser are allowed. A (new) example exam including sample answers can be found /here/.Other material
Data files used in the exercises:
Additional learning material:
- Book used in inleiding and voortgezet programmeren is C. Horstmann: Java Concepts, 6th ed., Wiley. Sections 1-6 and 12 compose the material required as pre-knowledge for this course.
- Internet is full of tutorials to programming in all possible languages. For example, see Wikiversity.
- Fun (at least IMHO) mathematical programming assignments can be found in the Project Euler. These are good learning material also for others than the pre-master students.
- The official Matlab learning resources page has a lot of learning material available.
Errata
- LN-TT-22013-3, p.25: insertAfterNode parameter 'node' should be called something different (e.g. 'n', and renamed within the function as well)
- LN-TT-22013-3, p.23, Figure 5.2: The addition operations should be 'enqueues' and not 'queues'. The same mistake is also present in the slides of Lecture 5.
- LN-TT-22013-3, p. 15: P2 should be ah + bh (and not ab + ah), P3 should be ce + de (not ce + cd), and u should be: P5 + P1 - P3 + P7 (not with - P7).
- Exercise 6, Algorithm 1: the second ret.left should be ret.right.
- Exercise 6, Algorithm 2: d^2 should be |d| (absolute value of d).
- Exercise 6: you might need to pass also the current best point (bp) as input parameter, depending on how you implement the kd-tree.