updated
authorChristian Urban <christian dot urban at kcl dot ac dot uk>
Tue, 24 Sep 2013 23:31:53 +0100
changeset 98 1f3d89fe9820
parent 97 60a3ba90dd53
child 99 91145f6d9b0e
updated
slides/slides01.pdf
slides/slides01.tex
Binary file slides/slides01.pdf has changed
--- a/slides/slides01.tex	Tue Sep 24 23:16:00 2013 +0100
+++ b/slides/slides01.tex	Tue Sep 24 23:31:53 2013 +0100
@@ -18,7 +18,9 @@
 \usetikzlibrary{shadows}
 \usetikzlibrary{positioning}
 \usetikzlibrary{calc}
+\usetikzlibrary{plotmarks}
 \usepackage{graphicx} 
+\usepackage{pgfplots}
 
 \definecolor{javared}{rgb}{0.6,0,0} % for strings
 \definecolor{javagreen}{rgb}{0.25,0.5,0.35} % comments
@@ -75,6 +77,28 @@
 	showspaces=false,
 	showstringspaces=false}
 
+
+\begin{filecontents}{interpreted2.data}
+%1 0.00503
+200 1.005863
+400 7.8296765
+600 27.2321885
+800 65.249271
+1000 135.4493445
+1200 232.134097
+1400 382.527227
+\end{filecontents}
+
+\begin{filecontents}{compiled2.data}
+200 0.222058
+400 0.215204
+600 0.202031
+800 0.21986
+1000 0.205934
+1200 0.1981615
+1400 0.207116
+\end{filecontents}
+
 % beamer stuff 
 \renewcommand{\slidecaption}{AFL 01, King's College London, 25.~September 2013}
 
@@ -212,6 +236,20 @@
 \item a web-scraper
 \end{itemize}
 
+\begin{textblock}{6}(10,7)
+\begin{tikzpicture}[scale=0.38]
+\begin{axis}[axis x line=bottom, axis y line=left, ylabel=secs,
+    xlabel=n,
+    enlargelimits=0.05,
+    ybar interval=0.7, legend style=small]
+\addplot file {interpreted2.data};
+\addplot file {compiled2.data};
+%\legend{interpreted, compiled}
+\end{axis}
+\end{tikzpicture}
+\end{textblock}
+
+
 \end{frame}}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
 
@@ -259,13 +297,14 @@
 
 \small a simple Scala function for reading webpages\\[-3mm]
 
+\footnotesize
 {\lstset{language=Scala}\texttt{\lstinputlisting{../progs/app0.scala}}}\pause
 {\lstset{language=Scala}\texttt{\lstinline{get_page("""http://www.inf.kcl.ac.uk/staff/urbanc/""")}}}\pause\bigskip
 
 
 \small slightly more complicated for handling errors properly:\\[-3mm]
 
-\small
+\footnotesize
 {\lstset{language=Scala}\texttt{\lstinputlisting{../progs/app1.scala}}}
 
 
@@ -274,6 +313,74 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \mode<presentation>{
+\begin{frame}[c]
+\frametitle{\begin{tabular}{c}Why Scala?\end{tabular}}
+
+\begin{textblock}{6}(1,3)
+\begin{tabular}{l}
+\mbox{}\hspace{-1mm}\includegraphics[scale=0.36]{pics/twitter.png}\\[-1mm]
+\includegraphics[scale=0.30]{pics/linked.png}\\
+\includegraphics[scale=0.30]{pics/guardian.jpg}\\[-3mm]
+\mbox{}\hspace{-2mm}\includegraphics[scale=0.38]{pics/morgan.png}\\[-3mm]
+\includegraphics[scale=0.30]{pics/suisse.png}\\
+\includegraphics[scale=0.20]{pics/edf.png}\\[-1mm]
+\includegraphics[scale=0.08]{pics/novell.png}\\[-1mm]
+\includegraphics[scale=0.30]{pics/foursquare.png}\\
+\includegraphics[scale=0.30]{pics/hsbc.png}\\
+{\large\bf ...}
+\end{tabular}
+\end{textblock}
+ 
+\only<2->{  
+\begin{textblock}{6}(6,3)
+\includegraphics[scale=0.35]{pics/jobgraph.png}\\
+\end{textblock}}  
+  
+\only<3->{  
+\begin{textblock}{6}(7.3,9.2)
+\begin{tabular}{l}
+\footnotesize 2013: 1$\%$\\[-2mm]
+\footnotesize 2014: 3$\%$\\[-2mm]
+\footnotesize 2015: 9$\%$\\[-2mm]
+\footnotesize 2016: 27$\%$\\[-2mm]
+\footnotesize 2017: 81$\%$\\[-2mm]
+\footnotesize 2018: 243$\%$ \raisebox{-1mm}{\includegraphics[scale=0.02]{pics/smiley.jpg}}
+\end{tabular}
+\end{textblock}} 
+  
+\only<3->{  
+\begin{textblock}{6}(6,9.5)
+\footnotesize 5 yrs $\begin{cases}\mbox{}\\[1.4cm]\end{cases}$
+\end{textblock}}
+
+\only<4->{  
+\begin{textblock}{11}(5,14.1)
+\textcolor{gray}{
+\footnotesize {\bf in London today:} 1 Scala job for every 30 Java jobs;\\[-2mm]
+Scala programmers seem to get up to 20\% better salary}
+\end{textblock}}
+
+
+\only<5->{
+\begin{textblock}{1}(3,6)
+\begin{tikzpicture}
+\draw (0,0) node[inner sep=2mm,fill=cream, ultra thick, draw=red, rounded corners=2mm] 
+{\normalsize\color{darkgray}
+\begin{minipage}{8.5cm}\raggedright\normalsize
+Scala is a functional and object-oriented programming language; compiles to the JVM; does not 
+need null-pointer exceptions; a course on Coursera\\
+\mbox{}\hfill\textcolor{blue}{\url{http://www.scala-lang.org}}
+\end{minipage}};
+\end{tikzpicture}
+\end{textblock}}
+
+  
+\end{frame}}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\mode<presentation>{
 \begin{frame}[t]
 \frametitle{\begin{tabular}{c}A Regular Expression\end{tabular}}