
diff -r 2e13dedd922e -r 29781ad780f0 slides/slides01.tex
--- a/slides/slides01.tex	Thu Nov 08 23:42:03 2018 +0000
+++ b/slides/slides01.tex	Fri Nov 09 01:08:43 2018 +0000
@@ -84,7 +84,8 @@
 \begin{bubble}[9cm]
   \small
   developed since 2004 by Martin Odersky\\
-  (he was behind Generic Scala which was included in Java 5)
+  (he was behind Generic Java which was included in Java 5
+  \ldots I am using it maybe since 2008?)
 \end{bubble}
 \end{textblock}
 
@@ -143,7 +144,7 @@
 \textbf{\large Java}
 \end{textblock}
 
-\begin{textblock}{6}(13,13.4)
+\begin{textblock}{6}(13,13.6)
 \textbf{\large Scala}
 \end{textblock}  
 
@@ -167,7 +168,7 @@
 \frametitle{First Steps: Scala Tools}
 
 \begin{itemize}
-\item I use VS Code and a Scala extension
+\item I use VS Code and a Scala extension (M'place)
 \begin{center}  
 \includegraphics[scale=0.10]{../pics/vscode.png}\\[-10mm]\mbox{}
 \end{center}\bigskip
@@ -183,10 +184,9 @@
 \begin{frame}[c]
   \frametitle{\bf
   \only<1>{\begin{tabular}{l}\\[2mm]Why Scala?\\ \mbox{}\end{tabular}}
-  \only<2->{\begin{tabular}{l}\\[2mm]Why Functional\\ Programming?\end{tabular}}
+  \only<2->{\begin{tabular}{c}\\[2mm]Why Functional\\[-2mm] Programming?\end{tabular}}
 }
 
-
   %
   \mbox{}\\[3.5cm]
   \small
@@ -203,9 +203,37 @@
 \end{bubble}
 \end{textblock}}
 
+\only<4>{
+\begin{textblock}{6}(5,5.8)
+\hspace{2mm}\includegraphics[scale=0.06]{../pics/assign.jpg}\\[-1mm]
+\Large\alert{\textbf{Immutability}}
+\end{textblock}}
+
+
 \end{frame}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
 
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\begin{frame}[c, fragile]
+
+{\Large Why bother? or\smallskip\\\hfill What is wrong with this?}\bigskip\bigskip
+
+  
+\begin{lstlisting}[language=C,numbers=none]
+for (int i = 10; i < 20; i++) {
+    
+  //...Do something interesting
+  //   with i...
+
+}
+\end{lstlisting}
+
+  
+\end{frame}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
 \begin{frame}[c]
 \mbox{}\\[-21mm]\mbox{}  
@@ -296,7 +324,7 @@
     \begin{bubble}[9cm]  
       \begin{tabular}{@{\hspace{8mm}}llll@{\hspace{8mm}}}
         \\
-      \multicolumn{4}{c}{\bf Speedup by Moore's Law}\medskip\\
+      \multicolumn{4}{c}{\alert{\bf Speedup by Moore's Law}}\medskip\\
       \textbf{1986:} & 3 days    & \textbf{1996:} & 135 mins\\
       \textbf{1988:} & 1.5 days  & \textbf{1998:} & 67 mins\\
       \textbf{1990:} & 18 hs     & \textbf{2000:} & 33 mins\\
@@ -313,12 +341,14 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \begin{frame}[c]
-\frametitle{Seq vs Par}
+\frametitle{Seq \;vs\; Par}
 
 \begin{center}
   \begin{tabular}[t]{@{}l@{}l@{}}
-    \includegraphics[scale=0.14]{../pics/mand4.png} &
-    \raisebox{1.2mm}{\includegraphics[scale=0.14]{../pics/mand3.png}}      
+    \includegraphics[scale=0.14]{../pics/mand4.png} & \hspace{4mm}
+    \raisebox{0mm}{\includegraphics[scale=0.14]{../pics/mand3.png}}\\
+    \hspace{6mm}\includegraphics[scale=0.5]{../pics/cpu2.png} &
+    \hspace{11mm}\includegraphics[scale=0.5]{../pics/cpu1.png}
   \end{tabular}     
 \end{center}  
 
@@ -331,10 +361,10 @@
   \end{textblock}}
 
 \only<3>{
-  \begin{textblock}{14.2}(1,12.3)
+  \begin{textblock}{14.2}(1,13.5)
     In FP: Once a variable is created, it is assigned a value and then
     never changed again $\Rightarrow$ no synchronisation\smallskip\\
-    \small\textcolor{gray}{(Andrew's second favourite feature of C++)}
+    %%\small\textcolor{gray}{(Andrew's second favourite feature of C++)}
   \end{textblock}}
 
 \end{frame}
@@ -370,7 +400,7 @@
     \textcolor{codegreen}{\texttt{List[(BigInt, String)]}} &
                                       lists of BigInt-String\\
                                       & pairs\\
-    \textcolor{codegreen}{\texttt{List[List[Int]]}} & list of lists of Int's\\                                  
+    \textcolor{codegreen}{\texttt{List[List[Int]]}} & list of lists of Int's\\      \textcolor{codegreen}{\texttt{Option[Int]}}     & options of Int's \\                            
   \end{tabular}
 
 \end{itemize}  
@@ -379,50 +409,50 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\begin{frame}[c]
-\frametitle{An Http Request}
+%\begin{frame}[c]
+%\frametitle{An Http Request}
   
-\begin{textblock}{1}(2,5)
-\begin{tabular}{c}
-\includegraphics[scale=0.15]{../pics/servers.png}\\[-2mm]
-\small Server
-\end{tabular}
-\end{textblock}
+%\begin{textblock}{1}(2,5)
+%\begin{tabular}{c}
+%\includegraphics[scale=0.15]{../pics/servers.png}\\[-2mm]
+%\small Server
+%\end{tabular}
+%\end{textblock}
 
-\begin{textblock}{1}(5.6,4)
-  \begin{tikzpicture}[scale=1.1]
-  \draw[white] (0,1) node (X) {};
-  \draw[white] (2,1) node (Y) {};
-   \draw[white] (0,0) node (X1) {};
-  \draw[white] (2,0) node (Y1) {};
-   \draw[white] (0,-1) node (X2) {};
-  \draw[white] (2,-1) node (Y2) {};
-  \draw[red, <-, line width = 2mm] (X) -- (Y);
-  \node [inner sep=5pt,label=above:\textcolor{black}{GET request}] at ($ (X)!.5!(Y) $) {};
-  \draw[red, ->, line width = 2mm] (X1) -- (Y1);
-  \node [inner sep=5pt,label=above:\textcolor{black}{webpage}] at ($ (X1)!.5!(Y1) $) {};
-  \draw[red, <-, line width = 2mm] (X2) -- (Y2);
-  \node [inner sep=7pt,label=above:\textcolor{black}{POST data}] at ($ (X2)!.5!(Y2) $) {};
-  \end{tikzpicture}
-\end{textblock}
+%\begin{textblock}{1}(5.6,4)
+%  \begin{tikzpicture}[scale=1.1]
+%  \draw[white] (0,1) node (X) {};
+%  \draw[white] (2,1) node (Y) {};
+%   \draw[white] (0,0) node (X1) {};
+%  \draw[white] (2,0) node (Y1) {};
+%   \draw[white] (0,-1) node (X2) {};
+%  \draw[white] (2,-1) node (Y2) {};
+%  \draw[red, <-, line width = 2mm] (X) -- (Y);
+%  \node [inner sep=5pt,label=above:\textcolor{black}{GET request}] at ($ (X)!.5!(Y) $) {};
+%  \draw[red, ->, line width = 2mm] (X1) -- (Y1);
+%  \node [inner sep=5pt,label=above:\textcolor{black}{webpage}] at ($ (X1)!.5!(Y1) $) {};
+%  \draw[red, <-, line width = 2mm] (X2) -- (Y2);
+%  \node [inner sep=7pt,label=above:\textcolor{black}{POST data}] at ($ (X2)!.5!(Y2) $) {};
+%  \end{tikzpicture}
+%\end{textblock}
 
 
-\begin{textblock}{1}(9,5.5)
-\begin{tabular}{c}
-\includegraphics[scale=0.15]{../pics/laptop.png}\\[-2mm]
-\small Browser
-\end{tabular}
-\end{textblock}
-\end{frame}
+%\begin{textblock}{1}(9,5.5)
+%\begin{tabular}{c}
+%\includegraphics[scale=0.15]{../pics/laptop.png}\\[-2mm]
+%\small Browser
+%\end{tabular}
+%\end{textblock}
+%\end{frame}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\begin{frame}[c]
-
-{\lstset{language=Java}\fontsize{7}{8}\selectfont
-\texttt{\lstinputlisting{URLReader.java}}}
-
-\end{frame}
+%\begin{frame}[c]
+%
+%{\lstset{language=Java}\fontsize{7}{8}\selectfont
+%\texttt{\lstinputlisting{URLReader.java}}}
+%
+%\end{frame}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -430,14 +460,16 @@
 \frametitle{Coursework}
 
 \begin{itemize}
-\item sorry, I might have been a bit wordy:\\
+\item Sorry, I might have been a bit wordy:\\
   CW description is 7 pages, but
-  I only needed \mbox{< 150} loc for all the CW\bigskip
+  I only needed \mbox{< 100} loc for \emph{all} the CW6.\bigskip
 
-\item there is email feedback when pushing code to github\bigskip
+\item there is email feedback when pushing code to github\medskip
 
-\item we want you to learn FP: \alert{no vars}, no mutable
-  datastructures, e.g.~\texttt{ListBuffer}
+\item there are \texttt{jar}-files you can use to test my implementation\bigskip
+  
+\item we want you to learn FP: \alert{\bf no vars}, no mutable
+  data-structures, e.g.~no \texttt{Arrays}, no \texttt{ListBuffer}
 \end{itemize}
 \end{frame}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -458,8 +490,9 @@
     val new_list = 0 :: old_list
   \end{lstlisting}}  
   
-\item You do not have to be defensive about who can access the data
-  (concurrency, lazyness).
+\item You do not have to be defensive about who can access the data.
+
+\item You can look at your code in isolation.  
 \end{itemize}  
 \end{frame}
 
@@ -632,10 +665,10 @@
   you a lot of rope to shoot yourself\bigskip
 
 \item learning functional programming is not easy\ldots{}when you have
-  spent all of your career thinking in a procedural way it is hard to
+  spent all of your career thinking in an imperative way, it is hard to
   change\bigskip\medskip
   
-\item hope you have fun with the coursework  
+\item hope you have fun with Scala and the assignments
 \end{itemize}
 \end{frame}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
@@ -646,13 +679,14 @@
 
 \begin{center}
   \begin{tabular}[t]{@{}l@{}l@{}}
-    \includegraphics[scale=0.1]{../pics/mand4.png} &
-    \raisebox{1.2mm}{\includegraphics[scale=0.1]{../pics/mand3.png}}      
+    \includegraphics[scale=0.1]{../pics/mand4.png} & \hspace{4mm}
+    \raisebox{0mm}{\includegraphics[scale=0.1]{../pics/mand3.png}}      
   \end{tabular}     
 \end{center}
 
 \begin{center}
-My Scala Office Hours: Thursdays 11 -- 13
+  My Office Hours: Mondays 12 -- 14\\
+  except next week: Tuesday 12 -- 14
 \end{center}
 \end{frame}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   




