Skip to content

Commit 0c7949d

Browse files
Sebastien Poncesponce
authored andcommitted
Adapted exercise list slide to more exercises
Made font smaller and go to 3 columns Also allowed to have short cuts for exercies name in the list
1 parent 1cd2e71 commit 0c7949d

File tree

8 files changed

+28
-17
lines changed

8 files changed

+28
-17
lines changed

talk/basicconcepts/auto.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@
2727

2828
\begin{frame}[fragile]
2929
\frametitlecpp[98]{Loops, references, auto}
30-
\begin{exercise}{Loops, references, auto}
30+
\begin{exerciseWithShortcut}{Loops, references, auto}{Loops, refs, auto}
3131
Familiarise yourself with range-based for loops and references
3232
\begin{itemize}
3333
\item go to \texttt{code/loopsRefsAuto}
3434
\item Look at \texttt{loopsRefsAuto.cpp}
3535
\item Compile it (\texttt{make}) and run the program (\texttt{./loopsRefsAuto})
3636
\item Work on the tasks that you find in \texttt{loopsRefsAuto.cpp}
3737
\end{itemize}
38-
\end{exercise}
38+
\end{exerciseWithShortcut}
3939
\end{frame}

talk/basicconcepts/control.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,13 +274,13 @@
274274

275275
\begin{frame}[fragile]
276276
\frametitlecpp[11]{Control structures}
277-
\begin{exercise}{Control structures}
277+
\begin{exerciseWithShortcut}{Control structures}{Control structs}
278278
Familiarise yourself with different kinds of control structures. Re-implement them in different ways.
279279
\begin{itemize}
280280
\item Go to \texttt{code/control}
281281
\item Look at \texttt{control.cpp}
282282
\item Compile it (\texttt{make}) and run the program (\texttt{./control})
283283
\item Work on the tasks that you find in \texttt{README.md}
284284
\end{itemize}
285-
\end{exercise}
285+
\end{exerciseWithShortcut}
286286
\end{frame}

talk/concurrency/condition.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,13 +102,13 @@
102102

103103
\begin{frame}[fragile]
104104
\frametitle{Condition variables}
105-
\begin{exercise}{Condition variables}
105+
\begin{exerciseWithShortcut}{Condition variables}{Condition vars}
106106
\begin{itemize}
107107
\item Go to code/condition\_variable
108108
\item Look at the code and run it\\
109109
See that it has a race condition
110110
\item Fix the race condition in the usage of the condition variable
111111
\item Try to make threads process data in parallel
112112
\end{itemize}
113-
\end{exercise}
113+
\end{exerciseWithShortcut}
114114
\end{frame}

talk/concurrency/mutexes.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,15 +134,15 @@
134134

135135
\begin{frame}[fragile]
136136
\frametitle{Mutexes and Locks}
137-
\begin{exercise}{Mutexes and Locks}
137+
\begin{exerciseWithShortcut}{Mutexes and Locks}{Mutexes/Locks}
138138
\begin{itemize}
139139
\item Go to code/race
140140
\item Look at the code and try it\\
141141
See that it has a race condition
142142
\item Use a mutex to fix the issue
143143
\item See the difference in execution time
144144
\end{itemize}
145-
\end{exercise}
145+
\end{exerciseWithShortcut}
146146
\end{frame}
147147

148148
\begin{frame}[fragile]

talk/expert/modules.tex

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -657,10 +657,14 @@
657657

658658
\begin{frame}[fragile]
659659
\frametitlecpp[20]{Modules}
660-
\begin{exercise}{Modules and header units}
660+
\begin{exercise}{Modules}
661661
\begin{itemize}
662662
\item go to \texttt{code/modules}
663663
\item convert the \texttt{Complex.hpp} header into a module named \texttt{math}
664+
\end{itemize}
665+
\end{exercise}
666+
\begin{exercise}{Header units}
667+
\begin{itemize}
664668
\item go to \texttt{code/header\_units}
665669
\item convert all \mintinline{cpp}{#include}s into header unit \mintinline{cpp}{import}s
666670
\end{itemize}

talk/expert/variadictemplate.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,11 +181,11 @@
181181

182182
\begin{frame}[fragile]
183183
\frametitlecpp[11]{Variadic templates}
184-
\begin{exercise}{Variadic templates}
184+
\begin{exerciseWithShortcut}{Variadic templates}{Variadic tpl}
185185
\begin{itemize}
186186
\item go to code/variadic
187187
\item you will extend the \mintinline{cpp}{tuple} from the last slides
188188
\item follow the instructions in the source code
189189
\end{itemize}
190-
\end{exercise}
190+
\end{exerciseWithShortcut}
191191
\end{frame}

talk/objectorientation/advancedoo.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@
545545

546546
\begin{frame}[fragile]
547547
\frametitlecpp[98]{Virtual inheritance}
548-
\begin{exercise}{Virtual inheritance}
548+
\begin{exerciseWithShortcut}{Virtual inheritance}{Virtual OO}
549549
\begin{itemize}
550550
\item go to code/virtual\_inheritance
551551
\item look at the code
@@ -554,7 +554,7 @@
554554
\item Fix the code to call both draws by using types
555555
\item retry with virtual inheritance
556556
\end{itemize}
557-
\end{exercise}
557+
\end{exerciseWithShortcut}
558558
\end{frame}
559559

560560
\begin{frame}[fragile]

talk/setup.tex

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,8 @@
133133
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
134134
\newcommand\listofexercises{%
135135
\addtocontents{lex}{\end{enumerate}}
136-
\footnotesize
137-
\begin{multicols}{2}
136+
\scriptsize
137+
\begin{multicols}{3}
138138
\@starttoc{lex}%
139139
\end{multicols}
140140
}
@@ -143,17 +143,24 @@
143143
\newcounter{ex@counter}
144144
\regtotcounter{ex@counter}
145145

146-
\newenvironment{exercise}[1]
146+
\newenvironment{exerciseWithShortcut}[2]
147147
{%
148148
\hypertarget<1>{exercise.\theex@counter}{}
149-
\addtocontents{lex}{\protect\item \protect\hyperlink{exercise.\theex@counter}{#1\protect\hfill\insertframenumber}}
149+
\addtocontents{lex}{\protect\item \protect\hyperlink{exercise.\theex@counter}{#2\protect\hfill\insertframenumber}}
150150
\stepcounter{ex@counter}
151151
% The box that shows up on the slide
152152
\begin{alertblock}{Exercise: #1}
153153
}%
154154
{%
155155
\end{alertblock}
156156
}
157+
\newenvironment{exercise}[1]
158+
{%
159+
\begin{exerciseWithShortcut}{#1}{#1}
160+
}%
161+
{%
162+
\end{exerciseWithShortcut}
163+
}
157164

158165
\makeatother
159166

0 commit comments

Comments
 (0)