Erinevus lehekülje "Advanced programming" redaktsioonide vahel
(Juhan teisaldas lehekülje Advanced programming pealkirja Advanced programming 2017 alla) |
|||
1. rida: | 1. rida: | ||
− | + | Course code: [https://ois.ttu.ee/portal/page?_pageid=35,428610&_dad=portal&_schema=PORTAL&p_msg=&p_public=1&p_what=1&p_lang=EN&p_open_node2=&p_session_id=34142972&p_id=107825&p_mode=1&p_pageid=OKM_AINE_WEB_OTSING&n_disp_result=1&n_export=0&_init=1&_nextsearch=1&_nextorder=1&_orfn_1=AINER_KOOD&_ordi_1=ASC&_disp_ainer_kood=1&_where_ainer_kood=&_ainer_kood=ITT8060&_disp_ainer_nimetus=1&_where_ainer_nimetus=&_ainer_nimetus=&_disp_ainer_nimetus_en=1&_where_ainer_nimetus_en=&_ainer_nimetus_en=&_disp_ainer_oppejoud=1&_where_ainer_oppejoud=&_ainer_oppejoud=&_where_ainer_opj_keel=&_ainer_opj_keel=&_disp_ainer_eap=1&_disp_ainer_opetsem=1&_vformaat=VFORMAAT_HTML&n_lov_offset=1&n_row_count=&n_row_pos= ITT8060] | |
+ | |||
+ | Lecturers: Juhan Ernits | ||
+ | |||
+ | Lab staff: Hendrik Maarand | ||
+ | |||
+ | Contact: juhan.ernits@ttu.ee NB! Mention ITT8060 in the subject line! | ||
+ | |||
+ | Time and place: | ||
+ | |||
+ | '''Lectures: Wednesdays 12:00, U06A-201'''. | ||
+ | |||
+ | '''Labs: Wednesdays 14:15, ICT-121/122''', (priority for software engineering students as they travel from Tartu); or Thursdays 14:00, ICT-401; or Fridays 14:00, ICT-501. | ||
+ | |||
+ | Past editions: [[Advanced programming 2017]], [[Advanced programming 2016]], [[Advanced programming - 2015]], [[Advanced programming 2014]] | ||
+ | |||
+ | |||
+ | You can download Visual Studio via the Microsoft Imagine (formerly known as MS Academic Alliance, Dreamspark) program. Unless you explicitly opt out, your @ttu.ee e-mail will be used to activate a MS Imagine account. Students will have access to a wide range of Microsoft products for study purposes at no cost. | ||
+ | |||
+ | If you want to set up your development environment in a virtual machine, you are welcome to use the free VirtualBox or get a license of VMware Workstation via the VMware Academic Program. You will need to contact us at vmware at cs.ttu.ee to gain access. | ||
+ | |||
+ | Installing F# tools on Windows is described [http://fsharp.org/use/windows/ here]. | ||
+ | |||
+ | Installing F# tools on Linux is described [http://fsharp.org/use/linux/ here]. | ||
+ | |||
+ | Installing F# tools on a Mac is described [http://fsharp.org/use/mac/ here]. | ||
+ | |||
+ | == Discussion group == | ||
+ | |||
+ | The discussions should happen at the ITT8060 course page in https://ained.ttu.ee | ||
+ | You will need to use your TTU university account to get into that environment. | ||
+ | |||
+ | == Important dates == | ||
+ | |||
+ | The midterm test will take place on November 1 during the lecture. It will contribute up to 5% of your | ||
+ | final exam mark. In case you have some serious reason why you cannot be present on November 1, you should let us know in writing by Monday, October 30th to juhan.ernits@ttu.ee. | ||
+ | |||
+ | == Textbooks == | ||
+ | |||
+ | * Tomas Petricek with Jon Skeet: Real-world functional programming with examples in F# and C# | ||
+ | |||
+ | - 10 copies at TUT: [http://tallinn.ester.ee/record=b2780259~S1*eng] | ||
+ | - Several copies available in Tartu | ||
+ | |||
+ | * Michael R. Hansen, Hans Rischel: [http://www.cambridge.org/us/academic/subjects/computer-science/programming-languages-and-applied-logic/functional-programming-using-f Functional programming using F#] | ||
+ | |||
+ | - Electronic edition available at TUT library (TUT Uni-ID required for login) [http://www.ester.ee/record=b4486823*eng] | ||
+ | |||
+ | - several paper copies available in the ATI library in Tartu. | ||
+ | |||
+ | |||
+ | * Additional textbook | ||
+ | Don Syme: Expert F# | ||
+ | |||
+ | - 5 copies at TUT: [http://tallinn.ester.ee/record=b2994544~S1*eng] | ||
+ | |||
+ | |||
+ | ==Lecture recordings== | ||
+ | |||
+ | Lecture recordings are available in [https://ained.ttu.ee/course/view.php?id=137]. | ||
+ | |||
+ | ==Lecture notes and courseworks== | ||
+ | |||
+ | All lecture notes and courseworks are available at [https://gitlab.cs.ttu.ee/itt8060/course-materials ITT8060 course materials on our Gitlab instance]. | ||
+ | |||
+ | Task for the first lab: | ||
+ | |||
+ | You need your ID card or residence permit with a chip to sort out your access to the systems at TUT. | ||
+ | * To access the computers in the labs and electronic books at the library you will need and Uni-ID. You will be able to find it out at [https://pass.ttu.ee pass.ttu.ee] by logging in with your ID card/residence permit. | ||
+ | * To access [https://ois.ttu.ee The study information system aka ÕIS of Tallinn University of Technology] you will need your ID card/residence permit. | ||
+ | |||
+ | If you '''do not have an ID card or residence permit with a chip''' proceed as follows: | ||
+ | * Learn your Uni-ID and set a password at the kind admins at room ICT-410. Write the Uni-ID down, because you will need it to submit your homeworks! | ||
+ | * To get access to the study information system without a chip card, go to room SOC-132. (The [http://www.ttu.ee/public/e/en/TUT_Campus_map.pdf Campus Map] will help you find your way). | ||
+ | |||
+ | The rest of the tasks and lecture notes be available at https://ained.ttu.ee under the course ITT8060. | ||
+ | |||
+ | The marks to courseworks are available at [https://ained.ttu.ee]. To log in use your uni-id@ttu.ee as an e-mail address (it actually is an e-mail address as well!). Once logged in, please enroll to ITT8060. | ||
+ | |||
+ | |||
+ | '''Warning: you are required to solve the courseworks yourself. It is OK to ask questions in class and in the course forum, and discuss the problems with fellow students, but it is not OK to share solutions. If you get caught submitting somebody else's work, you and the person copied from will be penalised by receiving 0 marks and your act will be reported to the program manager. Repeated offence will result in losing your student status.''' | ||
+ | |||
+ | ===Lecture 1: Introduction. Basic concepts of F# === | ||
+ | |||
+ | * [http://dijkstra.cs.ttu.ee/~juhan/itt8060/adprog01.pdf Introduction slides] (including grading criteria for the course) | ||
+ | * [http://dijkstra.cs.ttu.ee/~juhan/itt8060/lecture1.fsx lecture1.fsx] | ||
+ | * [http://dijkstra.cs.ttu.ee/~juhan/itt8060/coursework0.fsx coursework0.fsx] | ||
+ | |||
+ | Recommended reading: Chapters 1-2 in RWFP, Chapter 1 in FPuF#. | ||
+ | |||
+ | |||
+ | === Lecture 2: Tuples, lists, recursion. Functions as values=== | ||
+ | |||
+ | * [http://dijkstra.cs.ttu.ee/~juhan/itt8060/adprog02.pdf PDF slides for lecture 2] | ||
+ | * [http://dijkstra.cs.ttu.ee/~juhan/itt8060/lecture2.fsx lecture2.fsx] | ||
+ | * [http://dijkstra.cs.ttu.ee/~juhan/itt8060/coursework1.fsx coursework1.fsx] | ||
+ | |||
+ | == Tentative lecture titles (there will be some modifications) == | ||
+ | |||
+ | |||
+ | === Lecture 3: Lists and recursion === | ||
+ | |||
+ | === Lecture 4: Discriminated unions and higher order functions === | ||
+ | |||
+ | === Lecture 5: Discriminated unions and higher order functions continued=== | ||
+ | |||
+ | === Lecture 6: Behaviour centric programs=== | ||
+ | |||
+ | === Lecture 7: Units of measure. Charting. Accessing CSV files with CsvFile and CSV type provider=== | ||
+ | |||
+ | === Lecture 8: Property based testing: FsCheck === | ||
+ | |||
+ | === Lecture 9: Accessing .Net libraries, implementing interfaces, Unit testing in F#=== | ||
+ | |||
+ | === Lecture 10: Efficiency of data structures. Tail recursion=== | ||
+ | |||
+ | === Lecture 11: Sequences and computation expressions=== | ||
+ | |||
+ | === Lecture 12: F# for the web: compiling F# to JavaScript with Fable=== | ||
+ | |||
+ | |||
+ | === Lecture 13: Asynchronous computations and reactive programming=== | ||
+ | |||
+ | |||
+ | === Lecture 14: Data analysis with FsLab === | ||
+ | |||
+ | |||
+ | === Lecture 15: Parallel computations in F# === | ||
+ | |||
+ | ==Submission of courseworks == | ||
+ | |||
+ | (From week 2) | ||
+ | |||
+ | You are required to upload courseworks to a GIT repository provided by the university. | ||
+ | |||
+ | You are required to set the repository up yourself. To do that you are required to go to | ||
+ | |||
+ | https://gitlab.cs.ttu.ee | ||
+ | |||
+ | log in using your Uni-ID, and create a project itt8060. NB! It is very important that you use all small caps, because renaming it later will cause problems) | ||
+ | |||
+ | Your repository GIT URL will then become: | ||
+ | |||
+ | https://your-tut-username@gitlab.cs.ttu.ee/your-tut-username/itt8060.git | ||
+ | |||
+ | You should be able to clone the empty repository by running the following command | ||
+ | |||
+ | git clone https://your-tut-username@gitlab.cs.ttu.ee/your-tut-username/itt8060.git | ||
+ | |||
+ | ===First time submission=== | ||
+ | |||
+ | To submit the courseworks the first time you should create appropriate subdirectories into the freshly cloned directory. For example, if your name is John Doe and your TUT Uni-ID user name is jodo, then you would run the following commands from Git Bash: | ||
+ | |||
+ | To set your user details: | ||
+ | |||
+ | git config --global user.name "John Doe" | ||
+ | git config --global user.email john.doe@example.com | ||
+ | |||
+ | To clone the repository and copy courseworks into it: | ||
+ | |||
+ | git clone https://jodo@gitlab.cs.ttu.ee/jodo/itt8060.git | ||
+ | cd itt8060 | ||
+ | mkdir coursework1 | ||
+ | |||
+ | NB! The permissions have been pre-configured for you when you create the correct URL. Some courseworks will run automated tests and you will not get any points if you have not set up the repository according the the instructions. | ||
+ | |||
+ | Now copy coursework1.fsx into the newly created directory "coursework1" and run | ||
+ | |||
+ | git add coursework1/coursework1.fsx | ||
+ | |||
+ | To commit a logical set of changes you run commit: | ||
+ | |||
+ | git commit -a | ||
+ | |||
+ | Your default text editor will be [http://www.digilife.be/quickreferences/QRC/Vi%20Reference%20Card.pdf Vi] unless your settings say otherwise. To make it easier, Esc + : + x saves and exits, Esc + : + q! quits without saving (note that + is a separator, i.e. you should not type +) | ||
+ | |||
+ | To upload the contents to the server run | ||
+ | |||
+ | git push origin master | ||
+ | |||
+ | NB! Remember to replace jodo with your own TUT UNI-ID username which you can find out from [https://pass.ttu.ee] if you have an ID card or residence permit, or from the kind admins in room ICT-410! | ||
+ | |||
+ | |||
+ | |||
+ | ===Submission of additional files to a non-empty repository=== | ||
+ | |||
+ | Once you have successfully submitted your first homework, you will be asked to submit further homeworks to the same repository. | ||
+ | |||
+ | We assume that you have a local copy of the repositori in directory called "myrepo". You can always clone a fresh copy by running the following command | ||
+ | from Git Bash: | ||
+ | |||
+ | git clone https://your-tut-username@gitlab.cs.ttu.ee/your-tut-username/itt8060.git mylocalrepodir | ||
+ | |||
+ | This command is also useful to check if your submission of homeworks has been useful. Just replace "mylocalrepodir" with some temporary directory to check what got uploaded to the GIT server. | ||
+ | |||
+ | When you modify a file that is already registered with git, e.g. you modify the coursework that you already committed and pushed, the only thing you need to do is commit the modifications and push them again. | ||
+ | |||
+ | The following assumes that you have a local copy of the repo and you have changed directory into that repository by running e.g. | ||
+ | |||
+ | cd mylocalrepodir | ||
+ | |||
+ | For example, you modified coursework1/coursework1.fsx and want to upload the modifications. What you need to do is to commit the changes: | ||
+ | |||
+ | git commit coursework1/coursework1.fsx -m "Description of the modifications" | ||
+ | |||
+ | And then, to upload the changes to the server by running | ||
+ | |||
+ | git push | ||
+ | |||
+ | To add new files, e.g. coursework2.fsx, you will need to run the "git add" command after copying the new file to the appropriate location in the myrepo directory: | ||
+ | |||
+ | git add coursework2/coursework2.fsx | ||
+ | git commit coursework2/coursework2.fsx -m "Some message describing the commit" | ||
+ | git push | ||
+ | |||
+ | |||
+ | NB! Never attempt to add directories, i.e. only add files! Git figures directories out automatically, you can only add files that have been already placed in appropriate directories. | ||
+ | |||
+ | If you run "git commit" without the "-m" switch, you will be prompted with the default text editor in your system. If you are using Git Bash, the editor tends to be Vim. Look at the [http://www.digilife.be/quickreferences/QRC/Vi%20Reference%20Card.pdf Vi reference card] for survival tips. | ||
+ | |||
+ | Issues regarding the repository access should be reported to itt8060-git@cs.ttu.ee. | ||
+ | |||
+ | If git seems to be doing something different from what you expect it to do, check what state it is in by running in myrepo | ||
+ | |||
+ | git status | ||
+ | |||
+ | The output will show which files are tracked and which are not. To track untracked files add them by "git add". If you accidentally added some files you | ||
+ | do not want to be tracked, run "git rm file-not-to-be-tracked". | ||
+ | |||
+ | To see the history of commits in the repository, run | ||
+ | |||
+ | git log | ||
+ | |||
+ | You can also visualise the history by running | ||
+ | |||
+ | gitk | ||
+ | |||
+ | Further info available in the [http://git-scm.com/book Git book]. |
Redaktsioon: 5. september 2018, kell 05:31
Course code: ITT8060
Lecturers: Juhan Ernits
Lab staff: Hendrik Maarand
Contact: juhan.ernits@ttu.ee NB! Mention ITT8060 in the subject line!
Time and place:
Lectures: Wednesdays 12:00, U06A-201.
Labs: Wednesdays 14:15, ICT-121/122, (priority for software engineering students as they travel from Tartu); or Thursdays 14:00, ICT-401; or Fridays 14:00, ICT-501.
Past editions: Advanced programming 2017, Advanced programming 2016, Advanced programming - 2015, Advanced programming 2014
You can download Visual Studio via the Microsoft Imagine (formerly known as MS Academic Alliance, Dreamspark) program. Unless you explicitly opt out, your @ttu.ee e-mail will be used to activate a MS Imagine account. Students will have access to a wide range of Microsoft products for study purposes at no cost.
If you want to set up your development environment in a virtual machine, you are welcome to use the free VirtualBox or get a license of VMware Workstation via the VMware Academic Program. You will need to contact us at vmware at cs.ttu.ee to gain access.
Installing F# tools on Windows is described here.
Installing F# tools on Linux is described here.
Installing F# tools on a Mac is described here.
Discussion group
The discussions should happen at the ITT8060 course page in https://ained.ttu.ee You will need to use your TTU university account to get into that environment.
Important dates
The midterm test will take place on November 1 during the lecture. It will contribute up to 5% of your final exam mark. In case you have some serious reason why you cannot be present on November 1, you should let us know in writing by Monday, October 30th to juhan.ernits@ttu.ee.
Textbooks
- Tomas Petricek with Jon Skeet: Real-world functional programming with examples in F# and C#
- 10 copies at TUT: [1] - Several copies available in Tartu
- Michael R. Hansen, Hans Rischel: Functional programming using F#
- Electronic edition available at TUT library (TUT Uni-ID required for login) [2]
- several paper copies available in the ATI library in Tartu.
- Additional textbook
Don Syme: Expert F#
- 5 copies at TUT: [3]
Lecture recordings
Lecture recordings are available in [4].
Lecture notes and courseworks
All lecture notes and courseworks are available at ITT8060 course materials on our Gitlab instance.
Task for the first lab:
You need your ID card or residence permit with a chip to sort out your access to the systems at TUT.
- To access the computers in the labs and electronic books at the library you will need and Uni-ID. You will be able to find it out at pass.ttu.ee by logging in with your ID card/residence permit.
- To access The study information system aka ÕIS of Tallinn University of Technology you will need your ID card/residence permit.
If you do not have an ID card or residence permit with a chip proceed as follows:
- Learn your Uni-ID and set a password at the kind admins at room ICT-410. Write the Uni-ID down, because you will need it to submit your homeworks!
- To get access to the study information system without a chip card, go to room SOC-132. (The Campus Map will help you find your way).
The rest of the tasks and lecture notes be available at https://ained.ttu.ee under the course ITT8060.
The marks to courseworks are available at [5]. To log in use your uni-id@ttu.ee as an e-mail address (it actually is an e-mail address as well!). Once logged in, please enroll to ITT8060.
Warning: you are required to solve the courseworks yourself. It is OK to ask questions in class and in the course forum, and discuss the problems with fellow students, but it is not OK to share solutions. If you get caught submitting somebody else's work, you and the person copied from will be penalised by receiving 0 marks and your act will be reported to the program manager. Repeated offence will result in losing your student status.
Lecture 1: Introduction. Basic concepts of F#
- Introduction slides (including grading criteria for the course)
- lecture1.fsx
- coursework0.fsx
Recommended reading: Chapters 1-2 in RWFP, Chapter 1 in FPuF#.
Lecture 2: Tuples, lists, recursion. Functions as values
Tentative lecture titles (there will be some modifications)
Lecture 3: Lists and recursion
Lecture 4: Discriminated unions and higher order functions
Lecture 5: Discriminated unions and higher order functions continued
Lecture 6: Behaviour centric programs
Lecture 7: Units of measure. Charting. Accessing CSV files with CsvFile and CSV type provider
Lecture 8: Property based testing: FsCheck
Lecture 9: Accessing .Net libraries, implementing interfaces, Unit testing in F#
Lecture 10: Efficiency of data structures. Tail recursion
Lecture 11: Sequences and computation expressions
Lecture 12: F# for the web: compiling F# to JavaScript with Fable
Lecture 13: Asynchronous computations and reactive programming
Lecture 14: Data analysis with FsLab
Lecture 15: Parallel computations in F#
Submission of courseworks
(From week 2)
You are required to upload courseworks to a GIT repository provided by the university.
You are required to set the repository up yourself. To do that you are required to go to
log in using your Uni-ID, and create a project itt8060. NB! It is very important that you use all small caps, because renaming it later will cause problems)
Your repository GIT URL will then become:
https://your-tut-username@gitlab.cs.ttu.ee/your-tut-username/itt8060.git
You should be able to clone the empty repository by running the following command
git clone https://your-tut-username@gitlab.cs.ttu.ee/your-tut-username/itt8060.git
First time submission
To submit the courseworks the first time you should create appropriate subdirectories into the freshly cloned directory. For example, if your name is John Doe and your TUT Uni-ID user name is jodo, then you would run the following commands from Git Bash:
To set your user details:
git config --global user.name "John Doe" git config --global user.email john.doe@example.com
To clone the repository and copy courseworks into it:
git clone https://jodo@gitlab.cs.ttu.ee/jodo/itt8060.git cd itt8060 mkdir coursework1
NB! The permissions have been pre-configured for you when you create the correct URL. Some courseworks will run automated tests and you will not get any points if you have not set up the repository according the the instructions.
Now copy coursework1.fsx into the newly created directory "coursework1" and run
git add coursework1/coursework1.fsx
To commit a logical set of changes you run commit:
git commit -a
Your default text editor will be Vi unless your settings say otherwise. To make it easier, Esc + : + x saves and exits, Esc + : + q! quits without saving (note that + is a separator, i.e. you should not type +)
To upload the contents to the server run
git push origin master
NB! Remember to replace jodo with your own TUT UNI-ID username which you can find out from [6] if you have an ID card or residence permit, or from the kind admins in room ICT-410!
Submission of additional files to a non-empty repository
Once you have successfully submitted your first homework, you will be asked to submit further homeworks to the same repository.
We assume that you have a local copy of the repositori in directory called "myrepo". You can always clone a fresh copy by running the following command from Git Bash:
git clone https://your-tut-username@gitlab.cs.ttu.ee/your-tut-username/itt8060.git mylocalrepodir
This command is also useful to check if your submission of homeworks has been useful. Just replace "mylocalrepodir" with some temporary directory to check what got uploaded to the GIT server.
When you modify a file that is already registered with git, e.g. you modify the coursework that you already committed and pushed, the only thing you need to do is commit the modifications and push them again.
The following assumes that you have a local copy of the repo and you have changed directory into that repository by running e.g.
cd mylocalrepodir
For example, you modified coursework1/coursework1.fsx and want to upload the modifications. What you need to do is to commit the changes:
git commit coursework1/coursework1.fsx -m "Description of the modifications"
And then, to upload the changes to the server by running
git push
To add new files, e.g. coursework2.fsx, you will need to run the "git add" command after copying the new file to the appropriate location in the myrepo directory:
git add coursework2/coursework2.fsx git commit coursework2/coursework2.fsx -m "Some message describing the commit" git push
NB! Never attempt to add directories, i.e. only add files! Git figures directories out automatically, you can only add files that have been already placed in appropriate directories.
If you run "git commit" without the "-m" switch, you will be prompted with the default text editor in your system. If you are using Git Bash, the editor tends to be Vim. Look at the Vi reference card for survival tips.
Issues regarding the repository access should be reported to itt8060-git@cs.ttu.ee.
If git seems to be doing something different from what you expect it to do, check what state it is in by running in myrepo
git status
The output will show which files are tracked and which are not. To track untracked files add them by "git add". If you accidentally added some files you do not want to be tracked, run "git rm file-not-to-be-tracked".
To see the history of commits in the repository, run
git log
You can also visualise the history by running
gitk
Further info available in the Git book.