
Going over guidelines for successful code reviews

% Full instructions available at:
% https://github.com/elauksap/focus-beamertheme
\documentclass{beamer}
\usetheme{focus}
\title{Code Reviews}
\subtitle{or: how to catch bugs and share knowledge}
\author{osher de paz}
\titlegraphic{
    \includegraphics[scale=0.19]{images/review-icon.png}
}
\begin{document}
    \begin{frame}
        \maketitle
    \end{frame}
    
    \begin{frame}{overview}
        \tableofcontents
    \end{frame}
    
    \section{Introduction}
    
    \begin{frame}{you're here}
        \includegraphics[width=\textwidth]
            {images/from-idea-to-production.png}
    \end{frame}
    
    \begin{frame}{goals of code reviews}
        \begin{itemize}
            \item Detect bugs early
            \begin{itemize}
                \item $\implies$ Reviewers are maintainers / senior developers
            \end{itemize}
            \item Share knowledge
            \begin{itemize}
                \item $\implies$ Reviewers are juniors / random fellas
            \end{itemize}
            \item Maintain clean code
            \begin{itemize}
                \item Do you follow traditional code conventions?
                \item Do you have your code conventions written?
            \end{itemize}
        \end{itemize}
    \end{frame}
    
    \begin{frame}{the human factor}
        \begin{itemize}
            \item Tools should be powerful enough
            \begin{itemize}
                \item ... but not beyond! Intuitive too!
            \end{itemize}
        \end{itemize}
    \end{frame}
    
    \section{Ten Commandments of CR \cite{commandments}}
    \begin{frame}{thou shalt not take it personally}
        \centering \includegraphics[height=0.75\textheight]
            {images/take-it-easy.png}
    \end{frame}
    
    \begin{frame}{thou shalt not marry the code}
        \centering \includegraphics[height=0.75\textheight]
            {images/dont-marry-the-code.jpg}
    \end{frame}
    
    \begin{frame}{thou shalt consider all feedback}
        \begin{itemize}
            \item At least try... at least treat feedback appropriately...
            \item Still, don't take it blindly!
        \end{itemize}
    \end{frame}
    
    \begin{frame}{thou shalt articulate your rationale}
        \centering \includegraphics[height=0.75\textheight]
            {images/rational.jpg}
    \end{frame}
    
    \begin{frame}{thou shalt be willing to compromise}
        \begin{description}
            \item[Reviewer] Why not using a simple for loop?
            \item[You] At first, I thought the same.
                       But... <here you articulate your rationale, yada yada yada...>
            \item[Reviewer] It still doesn't look good though...
            \item[You] I hear you. Let's sit together and find the right solution
        \end{description}
    \end{frame}
    
    \begin{frame}{thou shalt contribute to others' code reviews}
        \begin{itemize}
            \item Try to review as much as you can
            \item You'll learn a lot, and gain respect when you'll see things others have not seen :)
        \end{itemize}
    \end{frame}
    
    \begin{frame}{Treat submitters how you want to be treated}
        \includegraphics[width=\textwidth]
            {images/domino.jpg}
    \end{frame}
    
    \begin{frame}{Don't be intimidated by the number of comments}
        \includegraphics[width=\textwidth]
            {images/lots-of-comments.png}
    \end{frame}
    
    \begin{frame}{thou shalt not repeat the same mistakes}
        \includegraphics[width=\textwidth]{images/here-and-everywhere.png}
    \end{frame}
    
    \begin{frame}{thou shalt embrace the nits}
        \begin{itemize}
            \item Don't be annoyed if the reviewer have lots of comments about misspelling and white spaces.
                \begin{itemize}
                    \item He probably can't control it
                    \item It means there are no bigger problems in your code
                \end{itemize}
            \item Fix it and move on!
        \end{itemize}
    \end{frame}
    
    \section{Live Demo}
    
    \section{Last Tips}
    
    \begin{frame}{Last Tips}
        \begin{itemize}
            \item Automate the process
            \item Define CR culture
                \begin{itemize}
                    \item How do people acknowledge comments
                    \item How many reviewers per review
                \end{itemize}
            \item Prioritize CR over other missions
        \end{itemize}
    \end{frame}
    
    \begin{frame}{Last Tips (Cont.)}
        \begin{columns}[onlytextwidth]
            \column{0.5\textwidth}
                \begin{itemize}
                    \item Review small chunks of code
                    \item Still, don't be intimidated by large code changes
                \end{itemize}
            
            \column{0.6\textwidth}
                \includegraphics[width=0.8\textwidth]
                    {images/small-cr-big-cr.png}
        \end{columns}
    \end{frame}
    
    \section{Questions?}
    \begin{frame}[focus]
        Thank \textbf{You}!
    \end{frame}
    
    \appendix
    \begin{frame}{References}
        \nocite{*}
        \bibliography{demo_bibliography}
        \bibliographystyle{plain}
    \end{frame}
\end{document}