slides/slides01.tex
changeset 309 b192bc772613
parent 308 e86add5a6961
child 314 21b52310bd8b
--- a/slides/slides01.tex	Sun Nov 03 14:42:17 2019 +0000
+++ b/slides/slides01.tex	Mon Nov 04 00:51:10 2019 +0000
@@ -4,6 +4,7 @@
 \usepackage{../graphics}
 \usepackage{../langs}
 %\usepackage{../data}
+\usetikzlibrary{shapes}
 
 \hfuzz=220pt 
 
@@ -16,7 +17,29 @@
         numbers=none,
         xleftmargin=0mm}
 
-\newcommand{\bl}[1]{\textcolor{blue}{#1}}     
+\newcommand{\bl}[1]{\textcolor{blue}{#1}}    
+
+\newcommand{\RIGHTarrow}[3]{%
+\begin{textblock}{0}(#2,#3)%
+\onslide<#1>{%
+\begin{tikzpicture}%
+\node at (0,0) [single arrow, shape border rotate=0, fill=red,text=red]{a};%
+\end{tikzpicture}}%
+\end{textblock}}
+\newcommand{\LEFTarrow}[3]{%
+\begin{textblock}{0}(#2,#3)%
+\onslide<#1>{%
+\begin{tikzpicture}%
+\node at (0,0) [single arrow, shape border rotate=180, fill=red,text=red]{a};%
+\end{tikzpicture}}%
+\end{textblock}}
+\newcommand{\DOWNarrow}[3]{%
+\begin{textblock}{0}(#2,#3)%
+\onslide<#1>{%
+\begin{tikzpicture}%
+\node at (0,0) [single arrow, shape border rotate=270, fill=red,text=red]{a};%
+\end{tikzpicture}}%
+\end{textblock}}
 
 % beamer stuff 
 \renewcommand{\slidecaption}{PEP (Scala) \liningnums{01}, King's College London}
@@ -37,8 +60,8 @@
   \begin{center}
   \begin{tabular}{ll}
     Email:  & christian.urban at kcl.ac.uk\\
-    Office: & N\liningnums{7.07} (North Wing, Bush House)\\
-    Slides \& Code: & KEATS\medskip\\
+    Office: & N\liningnums{7.07} (North Wing, Bush House)\bigskip\\
+    Slides \& Code: & KEATS\bigskip\\
     Office Hours: &  Thursdays 12:00 -- 14:00\\
     Additionally: & (for Scala) Tuesdays 10:45 -- 11:45\\ 
   \end{tabular}
@@ -94,18 +117,6 @@
 \end{frame}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
 
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%\begin{frame}[c]
-%\frametitle{Why Scala?}
-%
-%In the last few years there is  a ``Cambrian explosion'' of
-%languages from both academia and industry.
-%
-%It is essential for students to have skills to pick up new languages
-%quickly.
-%
-%\end{frame}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
 
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -153,16 +164,6 @@
 \end{frame}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
 
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%\begin{frame}[c]
-%\frametitle{Scala (imperative) vs Scala (functional)}
-%
-%Reham's example
-%
-%
-%\end{frame}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
 
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -184,19 +185,50 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\begin{frame}[t]
+\frametitle{Why Scala?}
+
+\onslide<2->{%
+\begin{center} 
+{\large\bf{}Money?}\bigskip\\  
+\begin{tabular}{@{}c@{}c@{}}
+\includegraphics[scale=0.2]{../pics/salary1.png} &
+\includegraphics[scale=0.2]{../pics/salary2.png}\\
+\multicolumn{2}{r@{}}{\footnotesize$^*$ source: Stackoverflow Developer Survey, 2019}
+\end{tabular}  
+\end{center}
+\RIGHTarrow{2}{2.3}{5.45}
+\DOWNarrow{2}{10.1}{3.6}
+}
+
+
+\small
+Elm, Rust, Haskell, Ocaml, F$\#$, Erlang, ML, Lisp (Racket)\ldots 
+
+\only<3>{
+\begin{textblock}{6}(3.3,6.2)
+\begin{bubble}[6.5cm]
+\bf\huge\textcolor{RoyalBlue}{Functional Programming!}
+\end{bubble}
+\end{textblock}}
+
+\end{frame}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \begin{frame}[c]
-  \frametitle{\bf
-  \only<1>{\begin{tabular}{l}\\[2mm]Why Scala?\\ \mbox{}\end{tabular}}
-  \only<2->{\begin{tabular}{c}\\[2mm]Why Functional\\[-2mm] Programming?\end{tabular}}
+  \frametitle{\begin{tabular}{c}\\[2mm]
+  Why Functional\\[-2mm] Programming?\end{tabular}
 }
 
   %
   \mbox{}\\[3.5cm]
   \small
-Scala, Elm, Haskell, Ocaml, F$\sharp$, Erlang, ML, Lisp (Racket), \ldots 
+Elm, Haskell, Ocaml, F$\#$, Erlang, ML, Lisp (Racket)\ldots 
 
-\only<3>{
-\begin{textblock}{6}(2,6.2)
+\only<2>{
+\begin{textblock}{6}(1.3,6.2)
 \begin{bubble}[10cm]
 \normalsize``If you want to see which features will be in mainstream programming
   languages tomorrow, then take a look at functional programming
@@ -206,10 +238,10 @@
 \end{bubble}
 \end{textblock}}
 
-\only<4>{
+\only<3>{
 \begin{textblock}{6}(5,5.8)
 \hspace{2mm}\includegraphics[scale=0.06]{../pics/assign.jpg}\\[-1mm]
-\Large\alert{\textbf{Immutability}}
+\Large\alert{\hspace{5mm}\textbf{Immutability}}
 \end{textblock}}
 
 
@@ -217,6 +249,20 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\begin{frame}[c]
+
+\begin{center}  
+\includegraphics[scale=0.4]{../pics/pure.png}
+\end{center}
+
+\begin{textblock}{6}(9,14)
+\tiny$^*$ from ``What pure functional programming is all about?''
+\end{textblock}
+\end{frame}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+  
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \begin{frame}[c, fragile]
 
 {\Large Why bother? or\smallskip\\\hfill What is wrong with this?}\bigskip\bigskip
@@ -460,6 +506,28 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \begin{frame}[c]
+  \frametitle{Coursework Dates}
+  
+Similar to C++:\bigskip
+
+\begin{itemize}
+  \item Preliminary Parts: Wednesdays 4pm
+    \begin{itemize}
+      \item Preliminary Part 6: 3\% (13 November)
+      \item Preliminary Part 7: 4\% (20 November)
+      \item Preliminary Part 8: 4\% (27 November)
+      \item Preliminary Part 9: 4\% (5 December) 
+    \end{itemize}\medskip    
+  \item Core Part: 35\% (15 January 2020) 
+  
+\end{itemize}
+\end{frame}
+  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+  
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\begin{frame}[c]
 \frametitle{Coursework}
 
 \begin{itemize}
@@ -469,11 +537,14 @@
 
 \item there is feedback when pushing code to github\medskip
 
-\item there are \texttt{jar}-files you can use to test my implementation\bigskip
+\item there are \texttt{jar}-files you can use to test 
+  my reference 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}
+\item we want you to learn FP!\smallskip\\ \alert{\bf no vars}, no mutable
+  data-structures\\ \quad{}e.g.~no \texttt{Arrays}, no \texttt{ListBuffer}
 \end{itemize}
+
+\LEFTarrow{1}{11}{11.8}
 \end{frame}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
@@ -659,10 +730,11 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \begin{frame}[c]
-\frametitle{Conclusion}
+\frametitle{Conclusion for Today}
 
 \begin{itemize}
-\item Scala is still under heavy development\\ (the compiler is terribly slow)\medskip
+\item Scala is still under development, 2.13.1 came out in Sept.\\ 
+  (the compiler is terribly slow)\medskip
 \item {\bf\url{http://www.scala-lang.org/}}\bigskip
   
 \item it is a rather \textbf{\alert{deep}} language\ldots i.e.~gives
@@ -690,7 +762,7 @@
 
 \begin{center}
   My Office Hours: Thursdays 12 -- 14\\
-  And specifically for Scala: Tuesday 10:45 -- 11:45
+  And specifically for Scala: Tuesdays 10:45 -- 11:45
 \end{center}
 \end{frame}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%