|
3 | 3 | Introduction: abstraction in mathematics and programming
|
4 | 4 | ========================================================
|
5 | 5 |
|
6 |
| -.. details:: Video introduction. |
| 6 | +.. .. details:: Video introduction. |
7 | 7 |
|
8 |
| - .. vimeo:: 486106801 |
| 8 | +.. .. vimeo:: 486106801 |
9 | 9 |
|
10 |
| - .. only:: html |
| 10 | +.. .. only:: html |
11 | 11 |
|
12 |
| - Imperial students can also `watch this video on Panopto <https://imperial.cloud.panopto.eu/Panopto/Pages/Viewer.aspx?id=ee8cae7f-1b42-4db3-adc0-ac840144de53>`_ |
| 12 | +.. Imperial students can also `watch this video on Panopto <https://imperial.cloud.panopto.eu/Panopto/Pages/Viewer.aspx?id=ee8cae7f-1b42-4db3-adc0-ac840144de53>`_ |
13 | 13 |
|
14 | 14 | A core tool of mathematics is to define abstract objects and the
|
15 | 15 | operations which apply to them. This approach defines all the basic
|
@@ -63,145 +63,6 @@ abstraction in mathematics, abstraction in coding is a form of
|
63 | 63 | constructive laziness: it simultaneously allows the mathematician to
|
64 | 64 | achieve more and do less work.
|
65 | 65 |
|
66 |
| -This is a second course in programming, building a previously |
67 |
| -acquired basic understanding of programming in Python. In covering |
68 |
| -more advanced programming, we will pay particular attention to objects |
69 |
| -and abstraction as they occur in Python. Furthermore, we will do so |
70 |
| -from a mathematician's perspective, understanding programming as a |
71 |
| -process of defining and manipulating mathematical objects, and |
72 |
| -scientifically testing and debugging the results. |
73 |
| - |
74 |
| -How to do this course |
75 |
| ---------------------- |
76 |
| - |
77 |
| -Programming, like mathematics, is a practical, problem solving discipline. It's |
78 |
| -not possible to learn to program just by reading notes and watching lectures. To |
79 |
| -learn to program you need to put the content of the course into practice by |
80 |
| -writing code. The structure of this course is designed to help you to really |
81 |
| -understand new concepts in programming by putting them into practice. Each week, |
82 |
| -we run through the same cycle: |
83 |
| - |
84 |
| -1. Read the notes |
85 |
| -2. Watch the videos |
86 |
| -3. Do the quiz |
87 |
| -4. Write the code |
88 |
| - |
89 |
| -The notes |
90 |
| -......... |
91 |
| - |
92 |
| -All of the new material we cover in this course is presented in these notes. |
93 |
| -Each chapter contains the material for one week of term, so in week :math:`n`, |
94 |
| -you work through chapter :math:`n`. The notes always the starting point for your work. |
95 |
| -Each chapter will introduce new concepts in programming, often tied back to |
96 |
| -related mathematical concepts, and always illustrated by practical code |
97 |
| -examples. Python has excellent `official online documentation |
98 |
| -<https://docs.python.org/3/>`_, and we link to that throughout the text. |
99 |
| -External links show up in orange while :ref:`internal links to other parts of |
100 |
| -the notes <introduction>` are red. Sometimes we introduce counterexamples: |
101 |
| -illustrations of code errors or bad implementation ideas. These will be flagged |
102 |
| -with a big red cross: |
103 |
| - |
104 |
| -.. container:: badcode |
105 |
| - |
106 |
| - .. code-block:: python3 |
107 |
| -
|
108 |
| - print "Hello World" |
109 |
| -
|
110 |
| -Conversely, if it's necessary in context to highlight which approach is the |
111 |
| -correct one, the code will come with a big green tick: |
112 |
| - |
113 |
| -.. container:: goodcode |
114 |
| - |
115 |
| - .. code-block:: python3 |
116 |
| -
|
117 |
| - print("Hello World") |
118 |
| -
|
119 |
| -At the end of each chapter there is a glossary containing key new concepts |
120 |
| -introduced in that chapter. Always check the glossary and convince yourself that |
121 |
| -you understand all the terms introduced there, this is a good check on whether |
122 |
| -you have understood the chapter as a whole. However, there is more to learning |
123 |
| -new concepts than just the vocabulary, so don't be tempted to skip reading the |
124 |
| -chapter and just jump to the glossary! |
125 |
| - |
126 |
| -The chapters broadly alternate between introducing new programming concepts, |
127 |
| -such as :ref:`objects <objects>`, :ref:`abstract data types |
128 |
| -<abstract_data_types>`, or :ref:`inheritance <inheritance>`, and |
129 |
| -covering various aspects of the craft of programming, such as :ref:`style |
130 |
| -<inheritance>` and :ref:`debugging <debugging>`. In this way the course combines specific programming knowledge |
131 |
| -with more general coding skills. |
132 |
| - |
133 |
| -The videos |
134 |
| -.......... |
135 |
| - |
136 |
| -Throughout the notes are links to videos. These aren't typical lecture videos in |
137 |
| -that they're not primarily focussed on delivering the new ideas in the course. |
138 |
| -In particular, the videos don't set out to duplicate the delivery of the |
139 |
| -material in the notes. Instead, the videos focus on putting the concepts into |
140 |
| -practice, often by showing live coding sessions. Usually you'll want to watch |
141 |
| -the video for a given section *after* reading the corresponding notes. |
142 |
| - |
143 |
| -The quizzes |
144 |
| -........... |
145 |
| - |
146 |
| -Towards the end of each chapter is a link back to a quiz on Imperial's |
147 |
| -Blackboard system. The quizzes are designed to allow you to convince yourself |
148 |
| -that you've understood the material in the chapter. Sometimes they will simply |
149 |
| -be multiple choice questions testing your understanding of the material, but |
150 |
| -sometimes you will need to open up Python and try things out in order to work |
151 |
| -out the right answer. The quizzes do not contribute to your module grade, but how |
152 |
| -well you are doing on them is an indication of your progress on the module. |
153 |
| - |
154 |
| -The exercises |
155 |
| -............. |
156 |
| - |
157 |
| -As we've already noted, really learning to program better is only achieved by |
158 |
| -writing code. The core of each week's activities is therefore to put the new |
159 |
| -concepts and programming structures you've learned into practice. The |
160 |
| -programming exercises are given at the end of each chapter, just before the |
161 |
| -glossary. Each time there will be a skeleton code available from |
162 |
| -:ref:`GitHub Classroom <fons:github_classroom_exercise>` which provides the starting |
163 |
| -point. Sometimes you might be asked to complete a piece of code while on other |
164 |
| -occasions you'll need to write a whole Python module from scratch. Each set of |
165 |
| -exercises will come with a matching set of tests. These are small programs which |
166 |
| -check whether your code produces the correct responses to a range of inputs. |
167 |
| -Tests like this provide immediate feedback and enable you to know how you are |
168 |
| -doing without having to wait for code to be submitted and marked. |
169 |
| - |
170 |
| -.. note:: |
171 |
| - |
172 |
| - Solutions to exercises will not be issued. The notes and accompanying |
173 |
| - example code contain examples of the same programming constructs that the |
174 |
| - exercises require you to implement, and the tests provide a mechanism to |
175 |
| - know when you have a correct answer. There are also help mechanisms via the |
176 |
| - course forum and the lab sessions. Issuing solutions to problems would |
177 |
| - simply encourage students to study the solutions rather than write code, and |
178 |
| - the only way to learn to program is to write code. |
179 |
| - |
180 |
| -Assessment |
181 |
| -.......... |
182 |
| - |
183 |
| -The weekly quiz and exercises are not assessable: they are formative activities |
184 |
| -designed to help you learn the module. Instead, the module will be assessed by |
185 |
| -two controlled programming assessments, effectively programming exams. The first |
186 |
| -programming assessment will be held in week 7 and will be worth 20% of the |
187 |
| -marks for the course. This provides an opportunity to receive feedback in the |
188 |
| -middle of the term, and is a practice for the main exam. The :ref:`course contents for |
189 |
| -week 7 <midterm>` will comprise practice programming exercises for this midterm test. |
190 |
| -The second programming assessment will be held in the main May exam period and |
191 |
| -will count for the other 80% of the course. |
192 |
| - |
193 |
| -The instructions and skeleton code for the programming exercises will be |
194 |
| -released at a fixed time on GitHub Classroom, and the code which you have |
195 |
| -committed to GitHub by the end of the allotted time will be marked. |
196 |
| - |
197 |
| -The exam questions will be similar to the weekly exercises in the course, |
198 |
| -and may include new programmes to write from specification, modifications or |
199 |
| -extensions to be made to code which is provided, and debugging exercises in |
200 |
| -which defective code is provided which you need to correct. Marks will be |
201 |
| -allocated both for the functional correctness of the code written, and for |
202 |
| -good style and following Python coding conventions. |
203 |
| - |
204 |
| - |
205 | 66 | Obtaining the right software tools
|
206 | 67 | ----------------------------------
|
207 | 68 |
|
|
0 commit comments