slides/slides01.tex
changeset 98 1f3d89fe9820
parent 97 60a3ba90dd53
child 215 828303e8e4af
equal deleted inserted replaced
97:60a3ba90dd53 98:1f3d89fe9820
    16 \usetikzlibrary{automata}
    16 \usetikzlibrary{automata}
    17 \usetikzlibrary{shapes}
    17 \usetikzlibrary{shapes}
    18 \usetikzlibrary{shadows}
    18 \usetikzlibrary{shadows}
    19 \usetikzlibrary{positioning}
    19 \usetikzlibrary{positioning}
    20 \usetikzlibrary{calc}
    20 \usetikzlibrary{calc}
       
    21 \usetikzlibrary{plotmarks}
    21 \usepackage{graphicx} 
    22 \usepackage{graphicx} 
       
    23 \usepackage{pgfplots}
    22 
    24 
    23 \definecolor{javared}{rgb}{0.6,0,0} % for strings
    25 \definecolor{javared}{rgb}{0.6,0,0} % for strings
    24 \definecolor{javagreen}{rgb}{0.25,0.5,0.35} % comments
    26 \definecolor{javagreen}{rgb}{0.25,0.5,0.35} % comments
    25 \definecolor{javapurple}{rgb}{0.5,0,0.35} % keywords
    27 \definecolor{javapurple}{rgb}{0.5,0,0.35} % keywords
    26 \definecolor{javadocblue}{rgb}{0.25,0.35,0.75} % javadoc
    28 \definecolor{javadocblue}{rgb}{0.25,0.35,0.75} % javadoc
    73 	numbersep=10pt,
    75 	numbersep=10pt,
    74 	tabsize=2,
    76 	tabsize=2,
    75 	showspaces=false,
    77 	showspaces=false,
    76 	showstringspaces=false}
    78 	showstringspaces=false}
    77 
    79 
       
    80 
       
    81 \begin{filecontents}{interpreted2.data}
       
    82 %1 0.00503
       
    83 200 1.005863
       
    84 400 7.8296765
       
    85 600 27.2321885
       
    86 800 65.249271
       
    87 1000 135.4493445
       
    88 1200 232.134097
       
    89 1400 382.527227
       
    90 \end{filecontents}
       
    91 
       
    92 \begin{filecontents}{compiled2.data}
       
    93 200 0.222058
       
    94 400 0.215204
       
    95 600 0.202031
       
    96 800 0.21986
       
    97 1000 0.205934
       
    98 1200 0.1981615
       
    99 1400 0.207116
       
   100 \end{filecontents}
       
   101 
    78 % beamer stuff 
   102 % beamer stuff 
    79 \renewcommand{\slidecaption}{AFL 01, King's College London, 25.~September 2013}
   103 \renewcommand{\slidecaption}{AFL 01, King's College London, 25.~September 2013}
    80 
   104 
    81 
   105 
    82 \begin{document}
   106 \begin{document}
   210 \item a web-crawler
   234 \item a web-crawler
   211 \item an email harvester
   235 \item an email harvester
   212 \item a web-scraper
   236 \item a web-scraper
   213 \end{itemize}
   237 \end{itemize}
   214 
   238 
       
   239 \begin{textblock}{6}(10,7)
       
   240 \begin{tikzpicture}[scale=0.38]
       
   241 \begin{axis}[axis x line=bottom, axis y line=left, ylabel=secs,
       
   242     xlabel=n,
       
   243     enlargelimits=0.05,
       
   244     ybar interval=0.7, legend style=small]
       
   245 \addplot file {interpreted2.data};
       
   246 \addplot file {compiled2.data};
       
   247 %\legend{interpreted, compiled}
       
   248 \end{axis}
       
   249 \end{tikzpicture}
       
   250 \end{textblock}
       
   251 
       
   252 
   215 \end{frame}}
   253 \end{frame}}
   216 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
   254 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
   217 
   255 
   218 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   256 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   219 \mode<presentation>{
   257 \mode<presentation>{
   257 \begin{frame}[c]
   295 \begin{frame}[c]
   258 \frametitle{\begin{tabular}{c}Scala\end{tabular}}
   296 \frametitle{\begin{tabular}{c}Scala\end{tabular}}
   259 
   297 
   260 \small a simple Scala function for reading webpages\\[-3mm]
   298 \small a simple Scala function for reading webpages\\[-3mm]
   261 
   299 
       
   300 \footnotesize
   262 {\lstset{language=Scala}\texttt{\lstinputlisting{../progs/app0.scala}}}\pause
   301 {\lstset{language=Scala}\texttt{\lstinputlisting{../progs/app0.scala}}}\pause
   263 {\lstset{language=Scala}\texttt{\lstinline{get_page("""http://www.inf.kcl.ac.uk/staff/urbanc/""")}}}\pause\bigskip
   302 {\lstset{language=Scala}\texttt{\lstinline{get_page("""http://www.inf.kcl.ac.uk/staff/urbanc/""")}}}\pause\bigskip
   264 
   303 
   265 
   304 
   266 \small slightly more complicated for handling errors properly:\\[-3mm]
   305 \small slightly more complicated for handling errors properly:\\[-3mm]
   267 
   306 
   268 \small
   307 \footnotesize
   269 {\lstset{language=Scala}\texttt{\lstinputlisting{../progs/app1.scala}}}
   308 {\lstset{language=Scala}\texttt{\lstinputlisting{../progs/app1.scala}}}
   270 
   309 
   271 
   310 
   272 \end{frame}}
   311 \end{frame}}
   273 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
   312 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
       
   313 
       
   314 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
   315 \mode<presentation>{
       
   316 \begin{frame}[c]
       
   317 \frametitle{\begin{tabular}{c}Why Scala?\end{tabular}}
       
   318 
       
   319 \begin{textblock}{6}(1,3)
       
   320 \begin{tabular}{l}
       
   321 \mbox{}\hspace{-1mm}\includegraphics[scale=0.36]{pics/twitter.png}\\[-1mm]
       
   322 \includegraphics[scale=0.30]{pics/linked.png}\\
       
   323 \includegraphics[scale=0.30]{pics/guardian.jpg}\\[-3mm]
       
   324 \mbox{}\hspace{-2mm}\includegraphics[scale=0.38]{pics/morgan.png}\\[-3mm]
       
   325 \includegraphics[scale=0.30]{pics/suisse.png}\\
       
   326 \includegraphics[scale=0.20]{pics/edf.png}\\[-1mm]
       
   327 \includegraphics[scale=0.08]{pics/novell.png}\\[-1mm]
       
   328 \includegraphics[scale=0.30]{pics/foursquare.png}\\
       
   329 \includegraphics[scale=0.30]{pics/hsbc.png}\\
       
   330 {\large\bf ...}
       
   331 \end{tabular}
       
   332 \end{textblock}
       
   333  
       
   334 \only<2->{  
       
   335 \begin{textblock}{6}(6,3)
       
   336 \includegraphics[scale=0.35]{pics/jobgraph.png}\\
       
   337 \end{textblock}}  
       
   338   
       
   339 \only<3->{  
       
   340 \begin{textblock}{6}(7.3,9.2)
       
   341 \begin{tabular}{l}
       
   342 \footnotesize 2013: 1$\%$\\[-2mm]
       
   343 \footnotesize 2014: 3$\%$\\[-2mm]
       
   344 \footnotesize 2015: 9$\%$\\[-2mm]
       
   345 \footnotesize 2016: 27$\%$\\[-2mm]
       
   346 \footnotesize 2017: 81$\%$\\[-2mm]
       
   347 \footnotesize 2018: 243$\%$ \raisebox{-1mm}{\includegraphics[scale=0.02]{pics/smiley.jpg}}
       
   348 \end{tabular}
       
   349 \end{textblock}} 
       
   350   
       
   351 \only<3->{  
       
   352 \begin{textblock}{6}(6,9.5)
       
   353 \footnotesize 5 yrs $\begin{cases}\mbox{}\\[1.4cm]\end{cases}$
       
   354 \end{textblock}}
       
   355 
       
   356 \only<4->{  
       
   357 \begin{textblock}{11}(5,14.1)
       
   358 \textcolor{gray}{
       
   359 \footnotesize {\bf in London today:} 1 Scala job for every 30 Java jobs;\\[-2mm]
       
   360 Scala programmers seem to get up to 20\% better salary}
       
   361 \end{textblock}}
       
   362 
       
   363 
       
   364 \only<5->{
       
   365 \begin{textblock}{1}(3,6)
       
   366 \begin{tikzpicture}
       
   367 \draw (0,0) node[inner sep=2mm,fill=cream, ultra thick, draw=red, rounded corners=2mm] 
       
   368 {\normalsize\color{darkgray}
       
   369 \begin{minipage}{8.5cm}\raggedright\normalsize
       
   370 Scala is a functional and object-oriented programming language; compiles to the JVM; does not 
       
   371 need null-pointer exceptions; a course on Coursera\\
       
   372 \mbox{}\hfill\textcolor{blue}{\url{http://www.scala-lang.org}}
       
   373 \end{minipage}};
       
   374 \end{tikzpicture}
       
   375 \end{textblock}}
       
   376 
       
   377   
       
   378 \end{frame}}
       
   379 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
       
   380 
   274 
   381 
   275 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   382 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   276 \mode<presentation>{
   383 \mode<presentation>{
   277 \begin{frame}[t]
   384 \begin{frame}[t]
   278 \frametitle{\begin{tabular}{c}A Regular Expression\end{tabular}}
   385 \frametitle{\begin{tabular}{c}A Regular Expression\end{tabular}}