% -*- mode: latex; -*- mustache tags:  
\ifx\wholebook\relax\else

	\documentclass[10pt,twoside,english]{root/support/latex/sbabook/sbabook}
  \usepackage{import}
  \subimport{root/support/latex/}{common.tex}

  \hypersetup{pdfinfo = {
    Title = {{Pharo Mooc}},
    Author = {},
    Keywords = {pharo, smalltalk}}}
  \begin{document}
\fi

\chapter{Challenge 1}
Using the Zinc HTTP library, get a photo from an email address through gravatar \url{http://www.gravatar.com/avatar/}. Convert it into a morph and open it in Pharo. Using stephane.ducasse@inria.fr so that you are sure to get a .jpg. The result should look like situation shown in the figure below.
\subsubsection{Hints:}
\begin{itemize}
\item The path to the photo associated to an email is composed as follows: \textcode{http://www.gravatar.com/avatar/(MD5 email-based hex).jpg}
\item To build an MD5 cypher from the email use \textcode{MD5 hashMessage:} .Pay attention that you should convert its result in  hexadecimal.
\item Do not forget to trim blanks around the email and use it in lower case.
\item \textcode{asMorph} convert pictures into Morphs.
\item Message \textcode{openInHand} is fun.
\end{itemize}


\begin{figure}

\begin{center}
\includegraphics[width=0.8\textwidth]{figures/gravatar.png}\caption{Grabbing the gravatar associated with stephane.ducasse@inria.fr . \label{figures/gravatar.png}}\end{center}
\end{figure}



\ifx\wholebook\relax\else
\end{document}
\fi