<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
 
 <title>Makingsensers</title>
 <link href="http://makingsensers.github.com/atom.xml" rel="self"/>
 <link href="http://makingsensers.github.com"/>
 <updated>2013-04-15T09:06:39-07:00</updated>
 <id>http://makingsensers.github.com</id>
 <author>
   <name>Makingsensers</name>
   <email>no@mail.com</email>
 </author>

 
 <entry>
   <title>Training de HTML5 y CSS3 finalizado</title>
   <link href="http://makingsensers.github.com/2013/04/15/training-de-htm5-y-css3-finalizado"/>
   <updated>2013-04-15T00:00:00-07:00</updated>
   <id>http://makingsensers.github.com/2013/04/15/training-de-htm5-y-css3-finalizado</id>
   <content type="html">&lt;p&gt;Juan Muguruza terminó su self-training &lt;a href='http://jira.makingsense.com/browse/CAP-56'&gt;CAP-56&lt;/a&gt; de introducción a HTML y CSS. En el transcurso de su capacitación también exploró varias opciones interesantes de aprendizaje online, además se familiarizó con Sublime Text, Visual Studio 2012, Web Essentials, Git, GitHub, Git Extensions y GitHub Pages, donde creó su &lt;a href='http://jsmuguruza.github.io'&gt;portfolio&lt;/a&gt; que invito a visitar.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href='https://github.com/jsmuguruza/jsmuguruza.github.com'&gt;Código fuente&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;&lt;a href='http://jsmuguruza.github.io/'&gt;Sitio de demostración y portfolio&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;&lt;a href='http://www.codecademy.com/users/jm00g'&gt;Perfil de Codecademy de Juan&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;¡Felicitaciones Juan!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Si trabajás en Making Sense, podés encontrar más información sobre el programa de capacitaciones en la Intranet: &lt;a href='http://intranet.makingsense.com/display/DTRU/Programa+de+Capacitaciones'&gt;display/DTRU/Programa+de+Capacitaciones&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Antiforgery Token for AJAX</title>
   <link href="http://makingsensers.github.com/2013/04/08/ajax-antiforgery"/>
   <updated>2013-04-08T00:00:00-07:00</updated>
   <id>http://makingsensers.github.com/2013/04/08/ajax-antiforgery</id>
   <content type="html">&lt;p&gt;Cómo sabrán, utilizando &lt;em&gt;Forms Authentication&lt;/em&gt;, si no tenemos especial cuidado es muy fácil exponer nuestra aplicación a &lt;em&gt;Cross-site Request Forgery Attacks&lt;/em&gt; o &lt;em&gt;CSRF&lt;/em&gt;, Phil Haack lo explica muy claramente en su post &lt;a href='http://haacked.com/archive/2009/04/02/anatomy-of-csrf-attack.aspx'&gt;Anatomy of a Cross-site Request Forgery Attack&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Básicamente esto significa que un sitio malicioso podría realizar una petición a nuestro sitio y utilizando nuestra cookie de autenticación y así utilizar los permisos del usuario para realizar una acción indeseada por este.&lt;/p&gt;

&lt;p&gt;Por ejemplo, supongamos que nuestro sitio es un banco y mediante una API JSON exponemos un servicio &lt;code&gt;http://www.mybanco.com/account/transfer&lt;/code&gt;. Nuestro usuario está logueado revisando sus cuentas y recibe por email un link de una página de &lt;em&gt;chicas lindas&lt;/em&gt;. Él, sin dudarlo, ingresa a dicha página, desde donde se realiza un POST nuestro servicio &lt;code&gt;transfer&lt;/code&gt; solicitando una transferencia desde la cuenta del usuario a una cuenta bancaria en las islas Caiman. La transferencia es realizada ya que nuestro servicio recibe el request con la autenticación del usuario.&lt;/p&gt;

&lt;p&gt;La forma más común de prevenirlo en una aplicación ASP.NET MVC consiste en utilizar el atributo &lt;a href='http://msdn.microsoft.com/en-us/library/system.web.mvc.validateantiforgerytokenattribute.aspx'&gt;ValidateAntiForgeryToken&lt;/a&gt; en conjunto con el helper &lt;a href='http://msdn.microsoft.com/en-us/library/system.web.mvc.htmlhelper.antiforgerytoken.aspx'&gt;Html.AntiForgeryToken()&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Internamente ASP.NET genera un token que es almacenado en una cookie &lt;a href='https://www.owasp.org/index.php/HttpOnly'&gt;HttpOnly&lt;/a&gt; y el helper renderiza un input hidden con el nombre &lt;code&gt;__RequestVerificationToken&lt;/code&gt; y con el valor correspondiente a un hash del token; ese valor se envía en el POST de un formulario y al recibirlo una &lt;em&gt;action&lt;/em&gt; marcada con el atributo &lt;code&gt;ValidateAntiForgeryToken&lt;/code&gt;, verifica que se correspondan el valor almacenado en la cookie y el valor &lt;code&gt;__RequestVerificationToken&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Pero esto no es tan simple en llamadas AJAX si se utiliza &lt;code&gt;json&lt;/code&gt; como &lt;code&gt;contentType&lt;/code&gt; ya que por defecto &lt;em&gt;ASP.NET&lt;/em&gt; espera un parámetro &lt;code&gt;__RequestVerificationToken&lt;/code&gt; codificado como &lt;code&gt;www-form-urlencoded&lt;/code&gt;.&lt;/p&gt;

&lt;h2 id='la_solucin'&gt;La solución&lt;/h2&gt;

&lt;h3 id='server_side'&gt;Server side&lt;/h3&gt;

&lt;p&gt;Siguiendo &lt;a href='http://haacked.com/archive/2011/10/10/preventing-csrf-with-ajax.aspx'&gt;las recomendaciones de Phil Haack&lt;/a&gt; y actualizándolas para &lt;em&gt;ASP.NET MVC 4&lt;/em&gt; preparé la clase &lt;code&gt;ValidateJsonAntiForgeryTokenAttribute&lt;/code&gt; que puede utilizarse para decorar &lt;em&gt;controllers&lt;/em&gt; o &lt;em&gt;actions&lt;/em&gt; de manera de que se obtenga el parámetro &lt;code&gt;__RequestVerificationToken&lt;/code&gt; de los &lt;em&gt;headers&lt;/em&gt; del request.&lt;/p&gt;
&lt;div class='highlight'&gt;&lt;pre&gt;&lt;code class='c#'&gt;&lt;span class='na'&gt;    [AttributeUsage(AttributeTargets.Method | AttributeTargets.Class, AllowMultiple = false, Inherited = true)]&lt;/span&gt;
    &lt;span class='k'&gt;public&lt;/span&gt; &lt;span class='k'&gt;class&lt;/span&gt; &lt;span class='nc'&gt;ValidateJsonAntiForgeryTokenAttribute&lt;/span&gt; &lt;span class='p'&gt;:&lt;/span&gt; &lt;span class='n'&gt;FilterAttribute&lt;/span&gt;&lt;span class='p'&gt;,&lt;/span&gt; &lt;span class='n'&gt;IAuthorizationFilter&lt;/span&gt;
    &lt;span class='p'&gt;{&lt;/span&gt;
        &lt;span class='k'&gt;private&lt;/span&gt; &lt;span class='k'&gt;const&lt;/span&gt; &lt;span class='kt'&gt;string&lt;/span&gt; &lt;span class='n'&gt;key&lt;/span&gt; &lt;span class='p'&gt;=&lt;/span&gt; &lt;span class='s'&gt;&amp;quot;__RequestVerificationToken&amp;quot;&lt;/span&gt;&lt;span class='p'&gt;;&lt;/span&gt;
        &lt;span class='k'&gt;public&lt;/span&gt; &lt;span class='k'&gt;void&lt;/span&gt; &lt;span class='nf'&gt;OnAuthorization&lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='n'&gt;AuthorizationContext&lt;/span&gt; &lt;span class='n'&gt;filterContext&lt;/span&gt;&lt;span class='p'&gt;)&lt;/span&gt;
        &lt;span class='p'&gt;{&lt;/span&gt;
            &lt;span class='k'&gt;if&lt;/span&gt; &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='n'&gt;filterContext&lt;/span&gt; &lt;span class='p'&gt;==&lt;/span&gt; &lt;span class='k'&gt;null&lt;/span&gt;&lt;span class='p'&gt;)&lt;/span&gt;
                &lt;span class='k'&gt;throw&lt;/span&gt; &lt;span class='k'&gt;new&lt;/span&gt; &lt;span class='nf'&gt;ArgumentNullException&lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='s'&gt;&amp;quot;filterContext&amp;quot;&lt;/span&gt;&lt;span class='p'&gt;);&lt;/span&gt;

            &lt;span class='kt'&gt;var&lt;/span&gt; &lt;span class='n'&gt;request&lt;/span&gt; &lt;span class='p'&gt;=&lt;/span&gt; &lt;span class='n'&gt;filterContext&lt;/span&gt;&lt;span class='p'&gt;.&lt;/span&gt;&lt;span class='n'&gt;HttpContext&lt;/span&gt;&lt;span class='p'&gt;.&lt;/span&gt;&lt;span class='n'&gt;Request&lt;/span&gt;&lt;span class='p'&gt;;&lt;/span&gt;

            &lt;span class='k'&gt;if&lt;/span&gt; &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='n'&gt;request&lt;/span&gt;&lt;span class='p'&gt;.&lt;/span&gt;&lt;span class='n'&gt;HttpMethod&lt;/span&gt; &lt;span class='p'&gt;==&lt;/span&gt; &lt;span class='s'&gt;&amp;quot;GET&amp;quot;&lt;/span&gt;&lt;span class='p'&gt;)&lt;/span&gt;
                &lt;span class='k'&gt;return&lt;/span&gt;&lt;span class='p'&gt;;&lt;/span&gt;

            &lt;span class='n'&gt;HttpCookie&lt;/span&gt; &lt;span class='n'&gt;cookie&lt;/span&gt; &lt;span class='p'&gt;=&lt;/span&gt; &lt;span class='n'&gt;request&lt;/span&gt;&lt;span class='p'&gt;.&lt;/span&gt;&lt;span class='n'&gt;Cookies&lt;/span&gt;&lt;span class='p'&gt;[&lt;/span&gt;&lt;span class='n'&gt;key&lt;/span&gt;&lt;span class='p'&gt;];&lt;/span&gt;
            &lt;span class='kt'&gt;var&lt;/span&gt; &lt;span class='n'&gt;cookieToken&lt;/span&gt; &lt;span class='p'&gt;=&lt;/span&gt; &lt;span class='n'&gt;cookie&lt;/span&gt; &lt;span class='p'&gt;==&lt;/span&gt; &lt;span class='k'&gt;null&lt;/span&gt; &lt;span class='p'&gt;||&lt;/span&gt; &lt;span class='n'&gt;String&lt;/span&gt;&lt;span class='p'&gt;.&lt;/span&gt;&lt;span class='n'&gt;IsNullOrEmpty&lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='n'&gt;cookie&lt;/span&gt;&lt;span class='p'&gt;.&lt;/span&gt;&lt;span class='n'&gt;Value&lt;/span&gt;&lt;span class='p'&gt;)&lt;/span&gt; &lt;span class='p'&gt;?&lt;/span&gt; &lt;span class='kt'&gt;string&lt;/span&gt;&lt;span class='p'&gt;.&lt;/span&gt;&lt;span class='n'&gt;Empty&lt;/span&gt; &lt;span class='p'&gt;:&lt;/span&gt; &lt;span class='n'&gt;cookie&lt;/span&gt;&lt;span class='p'&gt;.&lt;/span&gt;&lt;span class='n'&gt;Value&lt;/span&gt;&lt;span class='p'&gt;;&lt;/span&gt;
            &lt;span class='kt'&gt;var&lt;/span&gt; &lt;span class='n'&gt;formToken&lt;/span&gt; &lt;span class='p'&gt;=&lt;/span&gt; &lt;span class='n'&gt;request&lt;/span&gt;&lt;span class='p'&gt;.&lt;/span&gt;&lt;span class='n'&gt;Headers&lt;/span&gt;&lt;span class='p'&gt;[&lt;/span&gt;&lt;span class='n'&gt;key&lt;/span&gt;&lt;span class='p'&gt;]&lt;/span&gt; &lt;span class='p'&gt;??&lt;/span&gt; &lt;span class='kt'&gt;string&lt;/span&gt;&lt;span class='p'&gt;.&lt;/span&gt;&lt;span class='n'&gt;Empty&lt;/span&gt;&lt;span class='p'&gt;;&lt;/span&gt;

            &lt;span class='n'&gt;AntiForgery&lt;/span&gt;&lt;span class='p'&gt;.&lt;/span&gt;&lt;span class='n'&gt;Validate&lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='n'&gt;cookieToken&lt;/span&gt;&lt;span class='p'&gt;,&lt;/span&gt; &lt;span class='n'&gt;formToken&lt;/span&gt;&lt;span class='p'&gt;);&lt;/span&gt;
        &lt;span class='p'&gt;}&lt;/span&gt;
    &lt;span class='p'&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Además, no lo chequearemos para los GET, ya que se supone que estas acciones son de solo lectura y no presentan un peligro en este sentido, de esta manera podemos decorar un &lt;em&gt;controller&lt;/em&gt; entero, sin preocuparnos por las &lt;em&gt;actions&lt;/em&gt; GET.&lt;/p&gt;

&lt;h3 id='client_side'&gt;Client side&lt;/h3&gt;

&lt;p&gt;Desde el lado del cliente, debemos incluir el hash del token en nuestro &lt;em&gt;layout&lt;/em&gt;:&lt;/p&gt;
&lt;div class='highlight'&gt;&lt;pre&gt;&lt;code class='html'&gt;    &lt;span class='cp'&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;
    &lt;span class='nt'&gt;&amp;lt;html&amp;gt;&lt;/span&gt;
    &lt;span class='nt'&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
        &lt;span class='nt'&gt;&amp;lt;link&lt;/span&gt; &lt;span class='na'&gt;rel=&lt;/span&gt;&lt;span class='s'&gt;&amp;quot;shortcut icon&amp;quot;&lt;/span&gt; &lt;span class='na'&gt;href=&lt;/span&gt;&lt;span class='s'&gt;&amp;quot;@Url.Content(&amp;quot;&lt;/span&gt;&lt;span class='err'&gt;~/&lt;/span&gt;&lt;span class='na'&gt;Content&lt;/span&gt;&lt;span class='err'&gt;/&lt;/span&gt;&lt;span class='na'&gt;Images&lt;/span&gt;&lt;span class='err'&gt;/&lt;/span&gt;&lt;span class='na'&gt;favicon&lt;/span&gt;&lt;span class='err'&gt;.&lt;/span&gt;&lt;span class='na'&gt;ico&lt;/span&gt;&lt;span class='err'&gt;&amp;quot;)&amp;quot;&lt;/span&gt; &lt;span class='na'&gt;type=&lt;/span&gt;&lt;span class='s'&gt;&amp;quot;image/x-icon&amp;quot;&lt;/span&gt;&lt;span class='nt'&gt;/&amp;gt;&lt;/span&gt;
        &lt;span class='nt'&gt;&amp;lt;title&amp;gt;&lt;/span&gt;@ViewBag.Title&lt;span class='nt'&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;    
    &lt;span class='nt'&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
    &lt;span class='nt'&gt;&amp;lt;body&amp;gt;&lt;/span&gt;
        @Html.AntiForgeryToken() &lt;span class='c'&gt;&amp;lt;!-- Acá está lo importante! --&amp;gt;&lt;/span&gt;
        @RenderBody()
    &lt;span class='nt'&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
    &lt;span class='nt'&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Y desde &lt;em&gt;Javascript&lt;/em&gt;, al realizar las llamadas AJAX debemos asegurarnos de incluir el parámetro &lt;code&gt;__RequestVerificationToken&lt;/code&gt; en el header.&lt;/p&gt;
&lt;div class='highlight'&gt;&lt;pre&gt;&lt;code class='javascript'&gt;    &lt;span class='nx'&gt;$&lt;/span&gt;&lt;span class='p'&gt;.&lt;/span&gt;&lt;span class='nx'&gt;ajax&lt;/span&gt;&lt;span class='p'&gt;({&lt;/span&gt;
        &lt;span class='nx'&gt;url&lt;/span&gt;&lt;span class='o'&gt;:&lt;/span&gt; &lt;span class='s1'&gt;&amp;#39;http://www.mybanco.com/account/transfer&amp;#39;&lt;/span&gt;&lt;span class='p'&gt;,&lt;/span&gt;
        &lt;span class='nx'&gt;data&lt;/span&gt;&lt;span class='o'&gt;:&lt;/span&gt; &lt;span class='p'&gt;{&lt;/span&gt; &lt;span class='nx'&gt;destinationAccount&lt;/span&gt;&lt;span class='o'&gt;:&lt;/span&gt; &lt;span class='s1'&gt;&amp;#39;1241524545&amp;#39;&lt;/span&gt;&lt;span class='p'&gt;,&lt;/span&gt; &lt;span class='nx'&gt;amount&lt;/span&gt;&lt;span class='o'&gt;:&lt;/span&gt; &lt;span class='mi'&gt;500&lt;/span&gt; &lt;span class='p'&gt;},&lt;/span&gt;
        &lt;span class='nx'&gt;contentType&lt;/span&gt;&lt;span class='o'&gt;:&lt;/span&gt; &lt;span class='s1'&gt;&amp;#39;application/json; charset=utf-8&amp;#39;&lt;/span&gt;&lt;span class='p'&gt;,&lt;/span&gt;
        &lt;span class='nx'&gt;dataType&lt;/span&gt;&lt;span class='o'&gt;:&lt;/span&gt; &lt;span class='s1'&gt;&amp;#39;json&amp;#39;&lt;/span&gt;&lt;span class='p'&gt;,&lt;/span&gt;
        &lt;span class='nx'&gt;headers&lt;/span&gt;&lt;span class='o'&gt;:&lt;/span&gt; &lt;span class='p'&gt;{&lt;/span&gt; &lt;span class='nx'&gt;__RequestVerificationToken&lt;/span&gt;&lt;span class='o'&gt;:&lt;/span&gt; &lt;span class='nx'&gt;$&lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='s1'&gt;&amp;#39;input[name=&amp;quot;__RequestVerificationToken&amp;quot;]&amp;#39;&lt;/span&gt;&lt;span class='p'&gt;).&lt;/span&gt;&lt;span class='nx'&gt;val&lt;/span&gt;&lt;span class='p'&gt;()&lt;/span&gt; &lt;span class='p'&gt;},&lt;/span&gt; &lt;span class='c1'&gt;// Acá está lo importante!&lt;/span&gt;
        &lt;span class='nx'&gt;type&lt;/span&gt;&lt;span class='o'&gt;:&lt;/span&gt; &lt;span class='s1'&gt;&amp;#39;POST&amp;#39;&lt;/span&gt;
    &lt;span class='p'&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Eso es todo, de esta forma simple ya tenemos nuestros servicios para AJAX un poco más protegidos.&lt;/p&gt;

&lt;h2 id='disclamer'&gt;Disclamer&lt;/h2&gt;

&lt;p&gt;Recuerden que el código presentado aquí está realizado con fines didácticos y que no está listo para &lt;em&gt;copypastear&lt;/em&gt; y poner en producción.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Programando Arkanoid - Parte 1</title>
   <link href="http://makingsensers.github.com/2013/03/18/programando-arkanoid-parte-1"/>
   <updated>2013-03-18T00:00:00-07:00</updated>
   <id>http://makingsensers.github.com/2013/03/18/programando-arkanoid-parte-1</id>
   <content type="html">&lt;p&gt;&lt;img src='/img/posts/2013-03-18-programando-arkanoid-parte-1/arkanoid.jpg' alt='Arkanoid' /&gt;&lt;/p&gt;

&lt;p&gt;Haciendo ya mucho que no trabajaba en JavaScript sin la utilización de ningún framework, me propuse crear algo simple que a la vez fuera divertido. Pensé en algunas opciones y la ganadora fue un juego de &lt;a href='http://en.wikipedia.org/wiki/Arkanoid'&gt;Arkanoid&lt;/a&gt;, (que, ahora me entero, es &lt;a href='http://en.wikipedia.org/wiki/Breakout_clones'&gt;una de las tantas copias del Breakout&lt;/a&gt;, y para mí el nombre original siempre fue Arkanoid, en fin).&lt;/p&gt;

&lt;p&gt;El resultado final lo pueden ver &lt;a href='http://randomjs.alphasmanifesto.com/arkanoid-canvas/arkanoid.html'&gt;aquí&lt;/a&gt; y el código en mi &lt;a href='https://github.com/AlphaGit/random-javascript'&gt;repositorio de GitHub&lt;/a&gt;, pero no es tanto el resultado sino el viaje lo que fue interesante y &lt;strong&gt;quiero describir las cosas que aprendí en ese camino&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Vengan y acompáñenme en mi viaje.&lt;/p&gt;

&lt;h2 id='documentacin'&gt;Documentación:&lt;/h2&gt;

&lt;p&gt;Como todo principiante, o incluso como todo experto que cada tanto necesita verificar el estado de los estándares, la documentación de referencia es importante. Para hacer este pequeño proyecto me basé en algo de mi experiencia previa, y en la documentación disponible en los siguientes sitios:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href='https://developer.mozilla.org/'&gt;Mozilla Development Network&lt;/a&gt;, impagable, la calidad de la documentación es increíble.&lt;/li&gt;

&lt;li&gt;&lt;a href='http://www.webplatform.org/'&gt;WebPlatform.org&lt;/a&gt;, acabo de enterarme de este sitio por la clase de juegos HTML5 en Udacity, pero está también muy completa.&lt;/li&gt;

&lt;li&gt;&lt;a href='http://www.w3schools.com/'&gt;W3Schools&lt;/a&gt; para refrescar cosas básicas (&amp;#8220;¿cómo eran los parámetros de &lt;code&gt;array.slice&lt;/code&gt;?&amp;#8221; y similares)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id='el_contenedor'&gt;El contenedor:&lt;/h2&gt;

&lt;p&gt;(Lo que escribiré ahora se puede &lt;a href='https://github.com/AlphaGit/random-javascript/commit/90e6540100631e1a3ae590c3bde4a21b74f7abd9'&gt;ver en el commit 90e6…4f7abd9&lt;/a&gt;.)&lt;/p&gt;

&lt;p&gt;Lo primero y principal, y lo más simple fue setear el HTML y los estilos necesarios. &lt;strong&gt;Todo estará hecho en HTML5 Canvas&lt;/strong&gt; y siendo manejado a través de JavaScript, nuestra estructura en el DOM en sí no debería ser demasiado compleja. Sí necesitamos, sin embargo, un documento válido y limpio.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html&amp;gt;
    &amp;lt;head&amp;gt;
      &amp;lt;title&amp;gt;Arkanoid with canvas&amp;lt;/title&amp;gt;
		&amp;lt;link rel=&amp;quot;stylesheet&amp;quot; type=&amp;quot;text/css&amp;quot; href=&amp;quot;arkanoid.css&amp;quot;&amp;gt;
		&amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;arkanoid.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;
	&amp;lt;/head&amp;gt;
	&amp;lt;body onload=&amp;quot;arkanoid.init();&amp;quot;&amp;gt;
	&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Esto está claro: sólo tenemos un DOM HTML5, en donde asignamos un título, una referencia a un archivo CSS para que nos de los estilos a la página. Luego, por supuesto, la referencia a nuestro script, en donde se encontrará toda la lógica de la aplicación. Vamos a suponer por ahora que este archivo JavaScript expone un objeto llamado &lt;code&gt;arkanoid&lt;/code&gt;, el cuál tiene un método llamado &lt;code&gt;.init()&lt;/code&gt; al que podemos llamar. Eso lo hacemos, por supuesto, en el momento en que la página carga.&lt;/p&gt;

&lt;p&gt;Ahora, los estilos no deben ser complejos tampoco. Todo lo que necesitamos es que en el cuerpo de la página exista un canvas y que este se vea como ocupando todo el espacio disponible. Por supuesto que esto significa poner los márgenes y los paddings a cero, pero lo que yo no sabía es que para evitar tener scrollbars o espaciados innecesarios, debemos indicar específicamente que el objeto canvas va a comportase como bloque, y que &lt;strong&gt;todo&lt;/strong&gt; en la página carezca de espaciados. Esto lo aprendí de &lt;a href='http://stackoverflow.com/questions/4288253/html5-canvas-100-width-height-of-viewport'&gt;una respuesta de StackOverflow&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Para esto podemos usar muy apropiadamente el selector de CSS &lt;em&gt;, que matcheará absolutamente todo elemento. Este selector se llama &lt;a href='http://www.w3.org/TR/selectors/#universal-selector'&gt;Universal Selector&lt;/a&gt; y está disponble para los navegadores que soporten características de CSS3. Por supuesto, estamos trabajando en Canvas con lo que es muy factible que los navegadores que soportan el segundo también soporten el primero.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Nuestro CSS se ve, entonces, así:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;/* from http://stackoverflow.com/questions/4288253/html5-canvas-100-width-height-of-viewport */
 
* {
    margin: 0;
	padding: 0;
}
 
html, body {
	width: 100%;
	height: 100%;
}
 
canvas {
	display: block;
}&lt;/code&gt;&lt;/pre&gt;

&lt;h2 id='el_cdigo'&gt;El código&lt;/h2&gt;

&lt;p&gt;Para proceder a la parte de JavaScript, ya teníamos una limitación particular: debemos crear un objeto &lt;code&gt;arkanoid&lt;/code&gt; que tenga la función &lt;code&gt;init()&lt;/code&gt;. De una forma simplista entonces instanciaremos el objeto arkanoid asignándole un valor al objeto window, o podríamos haberla declarado de forma independiente. Para mayor seguridad, podemos devolver los resultados de una función auto-ejecutable, de forma que todas las variables que creemos sean locales y no estén manchando el namespace global.&lt;/p&gt;

&lt;p&gt;Como también estaremos codificando lógica interna, seguramente querremos tener varias funciones y variables privadas. Nuestra función autoejecutable tiene solo que devolver entonces aquello que queramos hacer público, en nuestro caso, la función &lt;code&gt;init()&lt;/code&gt;.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;window.arkanoid = (function(userOptions) {
 
  // private fields
  var canvas = null;
  var ctx = null;
  var options = null;
 
  var defaultOptions = {
    fullWidth: true,
    fullHeight: true,
    stageHeight: 600,
    stageWidth: 1024
  };
 
 
  // private methods
  function initOptions(userOptions) {
    options = mergeObjects(defaultOptions, userOptions);
    if (options.fullWidth) options.stageWidth = document.documentElement.clientWidth;
    if (options.fullHeight) options.stageHeight = document.documentElement.clientHeight;
  }
 
  function mergeObjects(toOverride, overridingWith) {
    for (var property in overridingWith) {
      toOverride[property] = overridingWith[property];
    }
    return toOverride;
  }
 
  function initCanvas() {
    var body = document.getElementsByTagName(&amp;quot;body&amp;quot;)[0];
    var height = options.stageWidth;
    var width = options.stageHeight;
    canvas = document.createElement(&amp;quot;canvas&amp;quot;);
    canvas.width = height;
    canvas.height = width;
    body.appendChild(canvas);
    ctx = canvas.getContext(&amp;quot;2d&amp;quot;);
  }
 
  function initAll() {
    initOptions();
    initCanvas();
 
    var stage = new ArkanoidStage(ctx, options.stageHeight, options.stageWidth);
  }
 
  // public methods
  return {
    init: initAll
  };
})()&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Vayamos analizando ese código línea a línea:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;La línea 1 define el objeto &lt;code&gt;arkanoid&lt;/code&gt; que necesitábamos.&lt;/strong&gt; Lo define como el resultado de una función que será llamada, y tiene la capacidad de recibir parámetros que serán las opciones del usuario. Esto es, en caso en que quisiéramos pasar información al momento de inicializarlo.&lt;/p&gt;
&lt;/li&gt;

&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Las líneas 4 a 6 definen variables locales&lt;/strong&gt;, solamente disponibles para este objeto arkanoid, que serán utilizadas por las demás funciones interiores. Estas no estarán disponibles a los objetos externos al momento de devolver el resultado, y más aún, tampoco se encontrarán disponible a elementos que hagan referencias a &lt;code&gt;this&lt;/code&gt; o a &lt;code&gt;self&lt;/code&gt;. Si eso los confunde, a mí también me ocurrió, checkeen esta pregunta en StackOverflow: &lt;a href='http://stackoverflow.com/q/15046910/147507'&gt;JavaScript local scoping: var vs. this&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;

&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Las líneas 8 a 13 definen otra variable local&lt;/strong&gt;, pero esta será un objeto literal, para agrupar las posibles opciones con valores por defecto que tomaremos en caso en que el usuario (quien llama a esta función) no las provea.&lt;/p&gt;
&lt;/li&gt;

&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Las líneas 17 a 21 definen la función &lt;code&gt;initOptions&lt;/code&gt;&lt;/strong&gt;, que se encargará de identificar el conjunto de opciones válidas a utilizar, basado tanto en lo provisto por el usuario, los defaults, y la lógica interna. En este caso, obtendremos el override de lo que proveyó el usuario sobre lo default, y verificaremos que si estamos trabajando a pantalla completa (&lt;code&gt;fullWidth&lt;/code&gt; y &lt;code&gt;fullHeight&lt;/code&gt;), actualizaremos las variables de ancho y alto para que sean consistentes (&lt;code&gt;stageWidth&lt;/code&gt; y &lt;code&gt;stageHeight&lt;/code&gt;).&lt;/p&gt;
&lt;/li&gt;

&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Las líneas 23 a 28 hacen la magia de obtener el conjunto de opciones desde los defaults y con lo que el usuario proveyó.&lt;/strong&gt; La lógica es tan simple como copiar todo lo que el usuario nos dio sobre el objeto de las opciones por default. Cabe destacar que aquí estamos escribiendo sobre el objeto de destino, por lo que si quisiéramos volver al valor por defecto, ya lo habríamos perdido. Una forma simple de haber hecho esto es, en lugar de llamarlo así:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;options = mergeObjects(defaultOptions, userOptions);&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Deberíamos llamarlo así:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;options = mergeObjects({}, defaultOptions); // creates a copy
options = mergeObjects(options, userOptions); // overrides defaults&lt;/code&gt;&lt;/pre&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Las líneas 30 a 39 inicializan el objeto canvas que se utilizará.&lt;/strong&gt; Muy básicamente se obtiene el objeto body, se crea un objeto &lt;code&gt;canvas&lt;/code&gt; y se le anexa, con el tamaño apropiado según las opciones. Para uso posterior, se almacenan las referencias al canvas y al contexto de dibujo 2D.&lt;/li&gt;

&lt;li&gt;&lt;strong&gt;Las líneas 41 a 46 realizan ese trabajo en sucesión&lt;/strong&gt; llamando a las funciones apropiadas, e inicializa el stage sobre el que la magia ocurrirá.&lt;/li&gt;

&lt;li&gt;Por último, &lt;strong&gt;las líneas 49 a 51 devuelven el objeto&lt;/strong&gt; exponiendo sólo la última función, y dándole el nombre de &lt;code&gt;init&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Por ahora nos detendremos aquí y continuaremos en la parte dos. Mientras lo preparo, estoy dispuesto a responder preguntas, y seguramente las preguntas y los comentarios ayudarán a generar las partes posteriores.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Nos mudamos a GitHub</title>
   <link href="http://makingsensers.github.com/2013/02/19/nos-mudamos-a-github"/>
   <updated>2013-02-19T00:00:00-08:00</updated>
   <id>http://makingsensers.github.com/2013/02/19/nos-mudamos-a-github</id>
   <content type="html">&lt;p&gt;Si bien el &lt;a href='http://makingsensers.wordpress.com/'&gt;blog de Makingsensers en WordPress&lt;/a&gt; seguirá abierto para que pueda postear allí aquel a quien le resulte más cómodo, desde &lt;a href='intranet.makingsense.com/display/DTRU'&gt;Dev&amp;amp;Tech&lt;/a&gt; promoveremos el uso del &lt;a href='http://makingsensers.github.com/'&gt;blog de Makingsensers en GitHub&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;La idea es que cualquier &lt;em&gt;Makingsenser&lt;/em&gt; pueda postear allí, e inclusive mejorar las características del blog o el diseño del mismo &lt;strong&gt;&lt;a href='http://makingsensers.github.com/colaborar'&gt;Ver más detalles acerca de como colaborar&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Como mencionaba en los posts &amp;#8221;&lt;a href='http://makingsensers.github.com/2012/12/27/a-blogging-framework-for-hackers/'&gt;A blogging framework for hackers&lt;/a&gt;&amp;#8221; y &amp;#8221;&lt;a href='http://makingsensers.github.com/2013/01/22/a-blogging-framework-for-hackers-continuacion/'&gt;A blogging framework for hackers (Continuación)&lt;/a&gt;&amp;#8221;, creo que como desarrolladores de software, podemos encontrar opciones más adecuadas para nosotros que WordPress o Blogger.&lt;/p&gt;

&lt;p&gt;Conociendo &lt;em&gt;Markdown&lt;/em&gt; o &lt;em&gt;HTML&lt;/em&gt;, tener que lidiar con un dudoso editor WYSIWYG es innecesario. Por otro lado, GitHub Pages nos permite utilizar nuestro editor de texto favorito y Git; para posts rápidos o para quienes no utilizan Git, GitHub provee convenientes &lt;a href='https://github.com/blog/1327-creating-files-on-github'&gt;utilidades online&lt;/a&gt; o hay heramientas como &lt;a href='http://prose.io/about.html'&gt;Prose&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Para simplificar el mantenimiento, preferimos no hostear nosotros el blog, sino utilizarlo como un servicio. En ese case WordPress nos limita mucho: no podemos decidir que archivos JavaScript o CSS incluir en nuestro propio sitio. Con GitHub Pages y Jekyll, nosotros definimos los templates, la lógica del blog, y hasta la generación de los RSS. Además, es posible incluir cualquier archivo y páginas. Entre ellas, &lt;strong&gt;&lt;a href='http://makingsensers.github.com/colaborar'&gt;las instrucciones para colaborar aquí&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;¡Espero ver sus contribuciones pronto!&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Training finalizado – Doppler Monitor para iOS</title>
   <link href="http://makingsensers.github.com/2013/02/18/training-finalizado-doppler-monitor-para-ios"/>
   <updated>2013-02-18T00:00:00-08:00</updated>
   <id>http://makingsensers.github.com/2013/02/18/training-finalizado-doppler-monitor-para-ios</id>
   <content type="html">&lt;img src=&quot;/img/posts/2013-02-18-training-finalizado-doppler-monitor-para-ios/breezi_placeit.jpg&quot; alt=&quot;Pizza&quot;&gt;

&lt;p&gt;Según la recomendación de JF, Facundo Schwindt construyo un cliente del monitor de envíos de emails de Doppler para dispositivos &lt;em&gt;iOS&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Para ello desarrollo una aplicación en &lt;em&gt;Objective-C&lt;/em&gt; que consume el webservice existente, aplicó directivas de diseño y usabilidad recomendadas por el área de UI de la empresa, y además, creó su propio control para animar las transiciones entre los números.&lt;/p&gt;

&lt;p&gt;Aquí podemos ver el demo realizado por Facundo:&lt;/p&gt;
&lt;div class=&quot;preview-box&quot;&gt;&lt;div id=&quot;video&quot;&gt;
	&lt;object type=&quot;application/x-shockwave-flash&quot; name=&quot;anonymous_element_5&quot; data=&quot;https://www.dropbox.com/static/swf/jwplayer-5.10-licensed-2393.swf&quot; width=&quot;828&quot; height=&quot;480&quot; id=&quot;anonymous_element_5&quot; style=&quot;visibility: visible; display: inline-block !important;&quot;&gt;
		&lt;param name=&quot;allowfullscreen&quot; value=&quot;true&quot;&gt;
		&lt;param name=&quot;allowScriptAccess&quot; value=&quot;always&quot;&gt;
		&lt;param name=&quot;wmode&quot; value=&quot;opaque&quot;&gt;
		&lt;param name=&quot;bgcolor&quot; value=&quot;#000000&quot;&gt;
		&lt;param name=&quot;flashvars&quot; value=&quot;file=https://showbox-tr.dropbox.com/get_transcoded/t/aaarwsp8vnjvrea/DMS%2520Doppler%2520Counters%2520VideoDemo.mov%3Fsecure_hash%3D%26token_hash%3DAAF8wNSJTujs-uESDlbL2mFrHzbkrEgKd-n9yT7HuvRixQ&amp;amp;skin=https://www.dropbox.com/static/swf/bekle.swf&amp;amp;controlbar=over&amp;amp;autostart=false&amp;amp;type=video&quot;&gt;
	&lt;/object&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Esperamos que en estos días pueda instalar la aplicación en los dispositivos iOS de los interesados.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Links&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href='https://www.dropbox.com/s/aaarwsp8vnjvrea/DMS%20Doppler%20Counters%20VideoDemo.mov'&gt;Ver Demo en Dropbox&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;&lt;a href='http://jira.makingsense.com/browse/CAP-41'&gt;CAP-41 en Jira&lt;/a&gt; (con capturas de pantalla y comentarios)&lt;/li&gt;

&lt;li&gt;&lt;a href='https://github.com/facushwindt/DMS-Doppler-counters'&gt;Código Fuente en GitHub&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Felicitaciones Facundo!&lt;/strong&gt;&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>La Prueba de la Pizza</title>
   <link href="http://makingsensers.github.com/2013/01/27/la-prueba-de-la-pizza"/>
   <updated>2013-01-27T00:00:00-08:00</updated>
   <id>http://makingsensers.github.com/2013/01/27/la-prueba-de-la-pizza</id>
   <content type="html">&lt;p&gt;&lt;img src='/img/posts/2013-01-27-la-prueba-de-la-pizza/Pizza.jpg' alt='Pizza' /&gt;&lt;/p&gt;

&lt;p&gt;Hace tiempo atrás, en &lt;strong&gt;MakingSense&lt;/strong&gt; tuvimos la oportunidad de trabajar en el desarrollo de una aplicación móvil. No sólo era para una empresa grande, sino que la aplicación iba a ser mostrada en vivo por Microsoft en la presentación &lt;strong&gt;//BUILD 2012&lt;/strong&gt; junto a Rackspace. Mi historia tratará sobre otra cosa, pero si les interesa, pueden &lt;a href='http://blog.makingsense.com/2012/11/windows-8-app-with-rackspace/'&gt;leer más sobre eso en el blog de MakingSense&lt;/a&gt;, o asimismo &lt;a href='http://www.rackspace.com/blog/manage-the-rackspace-open-cloud-with-windows-8/'&gt;en el blog de Rackspace&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Participé de este proyecto a pesar de muchos factores internos que lo dificultaban, pero me alegra haberlo hecho porque tenía características muy interesantes. Al comienzo de dicho proyecto, obtuvimos los requerimientos y analizamos sistemas de Rackspace para tener más contexto sobre lo que teníamos que hacer. En una de esas oportunidades, realizamos una reunión sobre alcance, diseño y experiencia de usuario.&lt;/p&gt;

&lt;p&gt;&lt;a href='https://twitter.com/CesarDOnofrio'&gt;César D&amp;#8217;Onofrio&lt;/a&gt; fue parte de esa reunión, y nos compartió su opinión sobre la usabilidad deseada de una forma muy clara.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Deben imaginar que el usuario es un tipo que está en su casa mirando televisión, tiene una pizza en una mano y una tableta en la otra, usando la aplicación. Si para él no es fácil usar una mano y rápidamente ver lo que tiene que hacer, fallamos.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;La prueba de la pizza quedó grabada en mi mente. Ustedes deben también recordar la sensación de mezclar pizza y dispositivos táctiles: En el mejor caso son difíciles de manejar, o una suciedad. Intentando evitar la suciedad, terminamos utilizando una mano para comer (y parte de nuestra atención) mientras con la otra mano sostenemos el dispositivo y manejarlo, o sólo usarlo si tenemos la suerte de una mesa. Alternativas incluyen las rodillas, pies, sillas, bancos, mascotas y objetos inanimados de variada forma.&lt;/p&gt;

&lt;p&gt;Si estoy comiendo, viendo televisión o hablando con alguien, &lt;strong&gt;no quiero que una aplicación me haga pensar&lt;/strong&gt;. Quiero grandes carteles rojos con calaveras si algo grave ocurrió, y si no es el caso, quiero un gráfico grande y fácil de leer para saber cómo anda todo, con botones grandes que sean claros en lo que ocurriría si los oprimo.&lt;/p&gt;

&lt;p&gt;La posibilidad de tomar decisiones rápidas y no afectar nuestra comodidad son también características importantes, no sólo beneficios extra. La primera porque, obviamente, pensar y decidir requiere esfuerzo. Suena tonto, pero imaginen que son las 3 de la mañana, les llega un aviso importante y tienen que tomar una decisión. La decisión puede significar salvar a tu empresa o perder tu trabajo (sí, así es la administración de servidores). ¿Preferirían tener que concentrarse y evaluar las opciones, o preferirían que las opciones fueran claras y directas?&lt;/p&gt;

&lt;p&gt;La característica de no afectar nuestra comodidad negativamente es también importante. Dejando de lado que una aplicación mal diseñada o incómoda puede resultar en que nos equivoquemos, para el usuario puede significa la diferencia entre la próxima vez utilizar esa aplicación u otra. Y para nosotros, como vendedores de aplicaciones, esto nos importa y mucho.&lt;/p&gt;

&lt;p&gt;Hay quienes han logrado que sus aplicaciones sean hasta divertidas y adictivas. Ejemplos hay miles, y si ustedes analizan sus elecciones, encontrarán seguramente muchas de esas. ¿Por qué eligieron esas y no otras alternativas? Las respuestas pueden ser muy variadas, pero todo cuenta. Recordarán el juicio anti-monopolio contra Microsoft por entregar Internet Explorer preinstalado en Windows. ¿Por qué valió la pena un juicio para esto, si también era verdad que cualquiera podía instalar el navegador que más le gustara? La respuesta es que la mayoría de la gente no quería pasar por la incomodidad de elegir un navegador, bajarlo e instalarlo. Microsoft alegaba que le hacía la vida más fácil a los usuarios, los demandantes aseguraban que Microsoft se aseguraba tener más mercado con esas movidas desleales. ¿Qué piensan ustedes?&lt;/p&gt;

&lt;p&gt;Al fin y al cabo, &lt;strong&gt;la prueba de la pizza es contundente&lt;/strong&gt;. ¿Pueden comer pizza y jugar Angry Birds? Yo pude. ¿Pueden comer pizza y manejar Excel? Yo pude. ¿Pueden comer pizza y escribir un artículo de un blog? Yo no.&lt;/p&gt;

&lt;p&gt;¿Pueden comer pizza y administrar servidores en Rackspace? Sí, y fue muy divertido lograrlo.&lt;/p&gt;

&lt;p&gt;(via &lt;a href='http://blog.alphasmanifesto.com/2013/01/26/la-prueba-de-la-pizza/'&gt;Alpha&amp;#8217;s Manifesto&lt;/a&gt;)&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>My Menu - Instructivo</title>
   <link href="http://makingsensers.github.com/2013/01/24/my-menu-instructivo"/>
   <updated>2013-01-24T00:00:00-08:00</updated>
   <id>http://makingsensers.github.com/2013/01/24/my-menu-instructivo</id>
   <content type="html">&lt;p&gt;Al entrar a la página principal &lt;strong&gt;&lt;em&gt;&lt;code&gt;1&lt;/code&gt;&lt;/em&gt;&lt;/strong&gt;, se muestra el plato y lugar seleccionado para el día actual &lt;strong&gt;&lt;em&gt;&lt;code&gt;2&lt;/code&gt;&lt;/em&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src='/img/posts/2013-01-24-my-menu-instructivo/01.jpg' alt='Pantalla principal' /&gt;&lt;/p&gt;

&lt;h3 id='configuracin'&gt;Configuración&lt;/h3&gt;

&lt;p&gt;En la solapa de &lt;strong&gt;Configuración&lt;/strong&gt; definir el &lt;strong&gt;lugar por defecto&lt;/strong&gt; &lt;strong&gt;&lt;em&gt;&lt;code&gt;3&lt;/code&gt;&lt;/em&gt;&lt;/strong&gt; donde se espera el almuerzo.&lt;/p&gt;

&lt;p&gt;&lt;img src='/img/posts/2013-01-24-my-menu-instructivo/02.jpg' alt='Menú semanal' /&gt;&lt;/p&gt;

&lt;p&gt;En las solapas de las semanas (&lt;strong&gt;Semana 1&lt;/strong&gt;, &lt;strong&gt;Semana 2&lt;/strong&gt;, &lt;strong&gt;Semana 3&lt;/strong&gt;, &lt;strong&gt;Semana 4&lt;/strong&gt;, &lt;strong&gt;Semana 5&lt;/strong&gt;) seleccionar el plato deseado para cada día &lt;strong&gt;&lt;em&gt;&lt;code&gt;4&lt;/code&gt;&lt;/em&gt;&lt;/strong&gt;. También puede modificarse el lugar &lt;strong&gt;&lt;em&gt;&lt;code&gt;5&lt;/code&gt;&lt;/em&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;La fecha &lt;strong&gt;&lt;em&gt;&lt;code&gt;6&lt;/code&gt;&lt;/em&gt;&lt;/strong&gt; está a modo de referencia e indica la fecha más cercana en que corresponde ese menú. Por ejemplo, en la imagen vemos que yo seleccioné &lt;em&gt;&amp;#8220;Milanesa de Zapallitos&amp;#8230;&amp;#8221;&lt;/em&gt;: esa será mi comida el día &lt;em&gt;11 de febrero&lt;/em&gt; y, a menos que algo cambie, también lo será el &lt;em&gt;día 18 de marzo&lt;/em&gt; (cinco semanas después).&lt;/p&gt;

&lt;p&gt;&lt;img src='/img/posts/2013-01-24-my-menu-instructivo/03.jpg' alt='Días específicos' /&gt;&lt;/p&gt;

&lt;p&gt;En la solapa &lt;strong&gt;Días específicos&lt;/strong&gt; puede agregarse días en que se modifica la selección semanal. Se debe ingresar la fecha &lt;strong&gt;&lt;em&gt;&lt;code&gt;7&lt;/code&gt;&lt;/em&gt;&lt;/strong&gt; y un comentario &lt;strong&gt;&lt;em&gt;&lt;code&gt;8&lt;/code&gt;&lt;/em&gt;&lt;/strong&gt;. Se puede cancelar totalmente la comida &lt;strong&gt;&lt;em&gt;&lt;code&gt;9&lt;/code&gt;&lt;/em&gt;&lt;/strong&gt;, cambiar el plato &lt;strong&gt;&lt;em&gt;&lt;code&gt;10&lt;/code&gt;&lt;/em&gt;&lt;/strong&gt; o indicar que se espera la comida en otra oficina &lt;strong&gt;&lt;em&gt;&lt;code&gt;11&lt;/code&gt;&lt;/em&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;ATENCION&lt;/strong&gt;: Recordar guardar los cambios &lt;strong&gt;&lt;em&gt;&lt;code&gt;12&lt;/code&gt;&lt;/em&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;h3 id='hora_lmite'&gt;Hora límite&lt;/h3&gt;

&lt;p&gt;A las 9:30 AM de cada día se genera el pedido correspondiente, por lo que cualquier cambio realizado luego de esa hora no se verá reflejado.&lt;/p&gt;

&lt;p&gt;&lt;img src='/img/posts/2013-01-24-my-menu-instructivo/04.jpg' alt='Pedido no realizado' /&gt;&lt;/p&gt;

&lt;p&gt;Es fácil saber si el pedido ya se ha realizado observando la barra indicativa verde o naranja &lt;strong&gt;&lt;em&gt;&lt;code&gt;13&lt;/code&gt;&lt;/em&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src='/img/posts/2013-01-24-my-menu-instructivo/05.jpg' alt='Pedido ya realizado' /&gt;&lt;/p&gt;

&lt;p&gt;Como se ve en la captura anterior, luego de realizado el pedido los cambios para el día no se aplican.&lt;/p&gt;

&lt;h3 id='disclaimer'&gt;Disclaimer&lt;/h3&gt;

&lt;p&gt;Recordar que &lt;a href='http://commonjobs.makingsense.com/documentation'&gt;CommonJobs&lt;/a&gt; y MyMenu son desarrollos OpenSource realizados en ratos libres. Cualquier mejora es bienvenida, descargá el &lt;a href='https://github.com/CommonJobs/CommonJobs'&gt;código fuente de GitHub&lt;/a&gt; y hacé tu &lt;em&gt;Pull Request&lt;/em&gt;.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Hello World!</title>
   <link href="http://makingsensers.github.com/2013/01/22/hello-world"/>
   <updated>2013-01-22T00:00:00-08:00</updated>
   <id>http://makingsensers.github.com/2013/01/22/hello-world</id>
   <content type="html">&lt;p&gt;This is our &lt;strong&gt;first post&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Hello world!&lt;/em&gt;&lt;/p&gt;
&lt;div class='highlight'&gt;&lt;pre&gt;&lt;code class='c#'&gt;&lt;span class='k'&gt;using&lt;/span&gt; &lt;span class='nn'&gt;System&lt;/span&gt;&lt;span class='p'&gt;;&lt;/span&gt;
&lt;span class='k'&gt;using&lt;/span&gt; &lt;span class='nn'&gt;System.Collections.Generic&lt;/span&gt;&lt;span class='p'&gt;;&lt;/span&gt;
&lt;span class='k'&gt;using&lt;/span&gt; &lt;span class='nn'&gt;System.Linq&lt;/span&gt;&lt;span class='p'&gt;;&lt;/span&gt;
&lt;span class='k'&gt;using&lt;/span&gt; &lt;span class='nn'&gt;System.Text&lt;/span&gt;&lt;span class='p'&gt;;&lt;/span&gt;

&lt;span class='k'&gt;namespace&lt;/span&gt; &lt;span class='nn'&gt;HelloWorld&lt;/span&gt;
&lt;span class='p'&gt;{&lt;/span&gt;
    &lt;span class='k'&gt;class&lt;/span&gt; &lt;span class='nc'&gt;Program&lt;/span&gt;
    &lt;span class='p'&gt;{&lt;/span&gt;
        &lt;span class='k'&gt;static&lt;/span&gt; &lt;span class='k'&gt;void&lt;/span&gt; &lt;span class='nf'&gt;Main&lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='kt'&gt;string&lt;/span&gt;&lt;span class='p'&gt;[]&lt;/span&gt; &lt;span class='n'&gt;args&lt;/span&gt;&lt;span class='p'&gt;)&lt;/span&gt;
        &lt;span class='p'&gt;{&lt;/span&gt;
            &lt;span class='n'&gt;Console&lt;/span&gt;&lt;span class='p'&gt;.&lt;/span&gt;&lt;span class='n'&gt;WriteLine&lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='s'&gt;&amp;quot;Hello World!&amp;quot;&lt;/span&gt;&lt;span class='p'&gt;);&lt;/span&gt;
            &lt;span class='n'&gt;Console&lt;/span&gt;&lt;span class='p'&gt;.&lt;/span&gt;&lt;span class='n'&gt;ReadLine&lt;/span&gt;&lt;span class='p'&gt;();&lt;/span&gt;
        &lt;span class='p'&gt;}&lt;/span&gt;
    &lt;span class='p'&gt;}&lt;/span&gt;
&lt;span class='p'&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</content>
 </entry>
 
 <entry>
   <title>A blogging framework for hackers (Continuación)</title>
   <link href="http://makingsensers.github.com/2013/01/22/a-blogging-framework-for-hackers-continuacion"/>
   <updated>2013-01-22T00:00:00-08:00</updated>
   <id>http://makingsensers.github.com/2013/01/22/a-blogging-framework-for-hackers-continuacion</id>
   <content type="html">&lt;p&gt;Luego de desahogarme en un &lt;a href='/2012/12/27/a-blogging-framework-for-hackers/'&gt;post anterior&lt;/a&gt;, continué investigando y probando opciones de blogs basados en &lt;a href='http://jekyllrb.com/'&gt;jekyll&lt;/a&gt; y GitHub.&lt;/p&gt;

&lt;p&gt;&lt;a href='http://tom.preston-werner.com/2008/11/17/blogging-like-a-hacker.html'&gt;La idea&lt;/a&gt; es interesante: preparamos los fuentes jekyll del sitio y los post, luego GitHub se encarga de generar el sitio HTML. Los fuentes de posts son archivos HTML con Liquid o Markdown y tenemos total libertad en cuanto a la estructura del sitio y el contenido. Además, no tenemos que lidiar con esos editores de texto online pseudo WYSIWYG ya que trabajamos con archivos de texto y la publicación la realizamos con nuestro sistema de control de versiones preferido: &lt;strong&gt;Git&lt;/strong&gt;.&lt;/p&gt;

&lt;h3 id='intento_1__preparar_un_sitio_desde_cero'&gt;Intento 1 - Preparar un sitio desde cero&lt;/h3&gt;

&lt;p&gt;En principio intenté preparar un sitio desde cero, o copiando otros como el de &lt;a href='http://erjjones.github.com/'&gt;Eric Jones&lt;/a&gt;. Dado mi escaso conocimiento de &lt;em&gt;Ruby&lt;/em&gt;, &lt;em&gt;Jekyll&lt;/em&gt; y &lt;em&gt;Liquid&lt;/em&gt;, creo que no fue una buena elección ya que la estructura no resultó la mejor y algunos literales como la URL base del sitio quedaron repartidos por todo el código. De cualquier manera, rescaté la experiencia y unos snippets de código que utilicé luego.&lt;/p&gt;

&lt;h3 id='intento_2__octopress'&gt;Intento 2 - Octopress&lt;/h3&gt;

&lt;p&gt;&lt;a href='http://octopress.org/'&gt;Octopress&lt;/a&gt; está muy bien, es muy completo y tiene buena terminación.&lt;/p&gt;

&lt;p&gt;Pero, el sitio no es generado por GitHub sino que cuenta con unos scripts para generarlo localmente. Para un blog personal no me parece una mala opción, pero si son muchos los editores, creo que se vuelve un poco más incomodo. Además, perdemos la posibilidad de postear directamente desde GitHub con la &lt;a href='https://github.com/blog/1327-creating-files-on-github'&gt;feature de crear archivos&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Como en el caso anterior, Octopress será una buena &lt;em&gt;cantera&lt;/em&gt; para extraer ejemplos, snippets e ideas para utilizar.&lt;/p&gt;

&lt;h3 id='intento_3__jekyllbootstrap'&gt;Intento 3 - Jekyll-Bootstrap&lt;/h3&gt;

&lt;p&gt;&lt;a href='http://jekyllbootstrap.com/'&gt;Jekyll-Bootstrap&lt;/a&gt; resultó ser la opción elegida. Tiene un diseño modular, con templates y helpers. No está tan pulido como Octopress, pero es un buen punto de partida para comenzar a personalizar el sitio.&lt;/p&gt;

&lt;h3 id='mi_prueba_de_concepto'&gt;Mi prueba de concepto&lt;/h3&gt;

&lt;p&gt;El objetivo era que las mejoras en estilos, templates y layout no se mezclen con la instancia del sitio, de manera de que se puedan utilizar en otros blogs.&lt;/p&gt;

&lt;p&gt;Preparé un repositorio &lt;a href='https://github.com/makingsense/jekyll-bootstrap-ms'&gt;Jekyll-Bootstrap-MS&lt;/a&gt;, basado en Jekyll-Bootstrap, con algunas modificaciones y adaptaciones. Es aquí donde se deberían realizar las mejoras y personalizaciones de estilos, templates y layout que puedan reutilizarse.&lt;/p&gt;

&lt;p&gt;Por otro lado, creé otro &lt;a href='https://github.com/andresmoschini/andresmoschini.github.com'&gt;repositorio&lt;/a&gt; para mi &lt;a href='http://andresmoschini.github.com'&gt;blog personal&lt;/a&gt; basado en el anterior. Aquí publicaré mis posts, realizaré cambios puntuales en el layout e ire mergeando las mejoras realizadas en Jekyll-Bootstrap-MS.&lt;/p&gt;

&lt;h3 id='para_probar_jekyllbootstrapms_desde_github'&gt;Para probar Jekyll-Bootstrap-MS desde GitHub&lt;/h3&gt;

&lt;p&gt;El &lt;a href='https://github.com/makingsense/jekyll-bootstrap-ms/tree/gh-pages'&gt;branch gh-pages de Jekyll-Bootstrap-MS&lt;/a&gt; está publicado en &lt;a href='http://makingsense.github.com/jekyll-bootstrap-ms'&gt;http://makingsense.github.com/jekyll-bootstrap-ms&lt;/a&gt;. Es posible realizar un &lt;a href='https://github.com/MakingSense/jekyll-bootstrap-ms/fork_select'&gt;Fork de este repositorio&lt;/a&gt; y probarlo con la propia cuenta de GitHub, sin necesidad de descargar nada, utilizando las herramientas provistas por GitHub.&lt;/p&gt;

&lt;h3 id='para_probar_jekyllbootstrapms_localmente_en_windows'&gt;Para probar Jekyll-Bootstrap-MS localmente en Windows&lt;/h3&gt;

&lt;h4 id='requistos'&gt;Requistos&lt;/h4&gt;

&lt;h5 id='cliente_git'&gt;Cliente Git&lt;/h5&gt;

&lt;p&gt;Yo utilizó &lt;a href='https://code.google.com/p/gitextensions/'&gt;Git Extensions&lt;/a&gt; que ya incluye MINGW y Git Bash.&lt;/p&gt;

&lt;h5 id='instalar_de_ruby'&gt;Instalar de Ruby&lt;/h5&gt;

&lt;ol&gt;
&lt;li&gt;Desde &lt;a href='http://rubyinstaller.org/downloads/'&gt;Ruby Installer&lt;/a&gt; descargar e instalar la última versión de Ruby.&lt;/li&gt;

&lt;li&gt;Verificar que Ruby esté en el Path o agregarlo.&lt;/li&gt;

&lt;li&gt;También desde &lt;a href='http://rubyinstaller.org/downloads/'&gt;Ruby Installer&lt;/a&gt; descargar el Development Kit, descomprimirlo.&lt;/li&gt;

&lt;li&gt;Desde &lt;em&gt;Git bash&lt;/em&gt; ejecutar:&lt;/li&gt;
&lt;/ol&gt;
&lt;div class='highlight'&gt;&lt;pre&gt;&lt;code class='bash'&gt;&lt;span class='nv'&gt;$ &lt;/span&gt;&lt;span class='nb'&gt;cd &lt;/span&gt;C:/RubyDevKit
&lt;span class='nv'&gt;$ &lt;/span&gt;ruby dk.rb init
&lt;span class='nv'&gt;$ &lt;/span&gt;ruby dk.rb install
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h5 id='instalar_python_requerido_si_hay_pginas_con_resaltado_de_sintaxis'&gt;Instalar Python (requerido si hay páginas con resaltado de sintaxis)&lt;/h5&gt;

&lt;ol&gt;
&lt;li&gt;&lt;a href='http://www.python.org/getit/'&gt;Descargar Python 2.7&lt;/a&gt; e instalar&lt;/li&gt;

&lt;li&gt;Verificar que Python esté en el Path o agregarlo.&lt;/li&gt;
&lt;/ol&gt;

&lt;h5 id='instalar_jekyll'&gt;Instalar Jekyll&lt;/h5&gt;

&lt;p&gt;Desde &lt;em&gt;Git bash&lt;/em&gt; instalar Jekyll:&lt;/p&gt;
&lt;div class='highlight'&gt;&lt;pre&gt;&lt;code class='bash'&gt;&lt;span class='nv'&gt;$ &lt;/span&gt;gem install jekyll
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h4 id='descargar_jekyllbootstrapms'&gt;Descargar Jekyll-Bootstrap-MS&lt;/h4&gt;

&lt;p&gt;Desde &lt;em&gt;Git bash&lt;/em&gt;:&lt;/p&gt;
&lt;div class='highlight'&gt;&lt;pre&gt;&lt;code class='bash'&gt;&lt;span class='nv'&gt;$ &lt;/span&gt;git clone https://github.com/MakingSense/jekyll-bootstrap-ms.git
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h4 id='ejecutar_jekyll'&gt;Ejecutar Jekyll&lt;/h4&gt;
&lt;div class='highlight'&gt;&lt;pre&gt;&lt;code class='bash'&gt;&lt;span class='nv'&gt;$ &lt;/span&gt;&lt;span class='nb'&gt;cd &lt;/span&gt;jekyll-bootstrap-ms
&lt;span class='nv'&gt;$ &lt;/span&gt;jekyll --server
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Abrir &lt;a href='http://localhost:4000'&gt;http://localhost:4000&lt;/a&gt; en el navegador&lt;/p&gt;

&lt;h3 id='pendiente'&gt;Pendiente&lt;/h3&gt;

&lt;p&gt;Algunas posibles mejoras (ver &lt;a href='https://trello.com/board/jekyll-bootstrap-ms/50fd498b591dbec63d0081d1'&gt;board en trello&lt;/a&gt;):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Estaría bien agregar los números de línea en los snippets de código&lt;/li&gt;

&lt;li&gt;Definir mejor la estructura por defecto del sitio. Por ejemplo, en lugar de un listado de posts en la página de indice, se podrían mostrar los últimos posts completos y la posibilidad de ver los anteriores.&lt;/li&gt;

&lt;li&gt;Link a la página de GitHub de la cuenta asociada al blog.&lt;/li&gt;

&lt;li&gt;Link al source en GitHub del post o página actual.&lt;/li&gt;

&lt;li&gt;Mejorar la utilización de Twitter Bootstrap, por ejemplo utilizando &lt;code&gt;fluid rows&lt;/code&gt;&lt;/li&gt;

&lt;li&gt;Personalizar Twitter Bootstrap y los estilos.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id='invitacin'&gt;Invitación&lt;/h3&gt;

&lt;p&gt;Creo que este es el motor ideal para un blog de desarrolladores de software. Espero su feedback, críticas, refutaciones, consultas o &lt;em&gt;pull requests&lt;/em&gt; en &lt;a href='https://github.com/makingsense/jekyll-bootstrap-ms'&gt;Jekyll-Bootstrap-MS&lt;/a&gt;.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>My Menu - Invitación</title>
   <link href="http://makingsensers.github.com/2013/01/21/my-menu-invitacion"/>
   <updated>2013-01-21T00:00:00-08:00</updated>
   <id>http://makingsensers.github.com/2013/01/21/my-menu-invitacion</id>
   <content type="html">&lt;p&gt;Trabajamos en una empresa de soft, desarrollamos software y somos buenos haciendoló. Por eso, creo que es bueno que participemos en el desarrollo y mejoras de las aplicaciones que utilizamos día a día. Ese es el caso del sistema de selección de las comidas diarias: nosotros deberíamos arreglarlo, mejorarlo, optimizarlo y, llegado el caso, reemplazarlo completamente.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;My Menu&lt;/em&gt; (sistema que presenté en un &lt;a href='http://makingsensers.wordpress.com/2012/12/26/self-training-my-menu/'&gt;post anterior&lt;/a&gt;) fue creado con el objetivo principal de probar y conocer algunas tecnologías, sé que el código y diseño no es el mejor. Tampoco está en producción actualmente.&lt;/p&gt;

&lt;p&gt;Igualmente, creo que tiene algunas características interesantes y que puede ser una buena base para continuar juntos el desarrollo de una herramienta que utilizamos todos los días. Por eso me decidí a invitar a que visiten el código fuente y a que propongan cambios y mejoras.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;My Menu&lt;/em&gt; forma parte de &lt;em&gt;&lt;a href='http://commonjobs.makingsense.com/documentation'&gt;CommonJobs&lt;/a&gt;&lt;/em&gt;, un sistema de uso interno del área de recursos humanos de la empresa, y utiliza su base de datos y servidores.&lt;/p&gt;

&lt;p&gt;En el assembly &lt;a href='https://github.com/CommonJobs/CommonJobs/tree/master/source/CommonJobs/CommonJobs.Domain.MyMenu'&gt;CommonJobs.Domain.MyMenu&lt;/a&gt; se describe el dominio; en &lt;a href='https://github.com/CommonJobs/CommonJobs/tree/master/source/CommonJobs/CommonJobs.Application.MyMenu'&gt;CommonJobs.Application.MyMenu&lt;/a&gt; se utiliza la infraestructura de &lt;em&gt;CommonJobs&lt;/em&gt; para persistencia, y tareas recurrentes; y el grueso del código está en el proyecto &lt;a href='https://github.com/CommonJobs/CommonJobs/tree/master/source/CommonJobs/CommonJobs.Mvc.UI'&gt;CommonJobs.Mvc.UI&lt;/a&gt; donde están los &lt;em&gt;ViewModels&lt;/em&gt; y los &lt;em&gt;templates&lt;/em&gt; de las páginas:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href='https://github.com/CommonJobs/CommonJobs/blob/master/source/CommonJobs/CommonJobs.Mvc.UI/Scripts/my-menu.ts'&gt;my-menu.ts&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;&lt;a href='https://github.com/CommonJobs/CommonJobs/blob/master/source/CommonJobs/CommonJobs.Mvc.UI/Scripts/my-menu-pages.ts'&gt;my-menu-pages.ts&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;&lt;a href='https://github.com/CommonJobs/CommonJobs/blob/master/source/CommonJobs/CommonJobs.Mvc.UI/Scripts/my-menu-admin-page.ts'&gt;my-menu-admin-page.ts&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;&lt;a href='https://github.com/CommonJobs/CommonJobs/blob/master/source/CommonJobs/CommonJobs.Mvc.UI/Scripts/my-menu-order-page.ts'&gt;my-menu-order-page.ts&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;&lt;a href='https://github.com/CommonJobs/CommonJobs/tree/master/source/CommonJobs/CommonJobs.Mvc.UI/Areas/MyMenu'&gt;CommonJobs.Mvc.UI.Areas.MyMenu&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Espero en futuros posts ir más en detalle sobre los puntos o tecnologías interesantes. Mientras tanto, ¡espero pull requests en GitHub!&lt;/p&gt;

&lt;h3 id='bonus_track'&gt;Bonus Track&lt;/h3&gt;

&lt;p&gt;Dado que no encontré ningún &lt;em&gt;datepicker&lt;/em&gt; con las características deseadas y que se integrara correctamente con &lt;em&gt;TypeScript&lt;/em&gt;, &lt;em&gt;Bootstrap&lt;/em&gt;, &lt;em&gt;Knockout&lt;/em&gt; y &lt;em&gt;Moment.js&lt;/em&gt;, preparé &lt;a href='http://makingsense.github.com/moment-datepicker/'&gt;moment-datepicker&lt;/a&gt; basado en bootstrap-datepicker de Stefan Petre. Es simple, fácil de usar y tiene su &lt;a href='https://nuget.org/packages/MomentDatepicker'&gt;paquete de nuget&lt;/a&gt; listo para utilizar en Visual Studio.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>AMD & RequireJS</title>
   <link href="http://makingsensers.github.com/2013/01/10/amd-requirejs"/>
   <updated>2013-01-10T00:00:00-08:00</updated>
   <id>http://makingsensers.github.com/2013/01/10/amd-requirejs</id>
   <content type="html">&lt;p&gt;Hi everyone, this is my first post here! So I encourage you to be comprehensive with my bad writing skills :)&lt;/p&gt;

&lt;p&gt;That being said, let’s start!&lt;/p&gt;

&lt;p&gt;In this post, I’ll give you a first glance about modules in javascript, and a library to load them, RequireJS, so you can keep your code modularized and loading faster than ever!&lt;/p&gt;

&lt;p&gt;So, AMD, is not what you are thinking (Advanced Micro Devices), it actually stands for Asynchronous Module Definition. AMD definitions makes your modules faster to load, organizes your app, and let’s you load modules only when you need them.&lt;/p&gt;

&lt;p&gt;I suggest you read &lt;a href='http://unscriptable.com/code/Using-AMD-loaders/#6'&gt;this presentation&lt;/a&gt; about AMD as it helps you understand what is it, and how you can use it.&lt;/p&gt;

&lt;p&gt;But no worries, I’ll explain that too!&lt;/p&gt;

&lt;p&gt;How we define a javascript module using AMD? is super easy, this is a simple module:&lt;/p&gt;
&lt;div class='highlight'&gt;&lt;pre&gt;&lt;code class='js'&gt;&lt;span class='nx'&gt;define&lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;
    &lt;span class='p'&gt;[&lt;/span&gt;
        &lt;span class='s1'&gt;&amp;#39;depA&amp;#39;&lt;/span&gt;&lt;span class='p'&gt;,&lt;/span&gt;
        &lt;span class='s1'&gt;&amp;#39;depB&amp;#39;&lt;/span&gt;&lt;span class='p'&gt;,&lt;/span&gt;
        &lt;span class='s1'&gt;&amp;#39;depC&amp;#39;&lt;/span&gt;
    &lt;span class='p'&gt;],&lt;/span&gt;
    &lt;span class='kd'&gt;function&lt;/span&gt; &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nx'&gt;depA&lt;/span&gt;&lt;span class='p'&gt;,&lt;/span&gt; &lt;span class='nx'&gt;depB&lt;/span&gt;&lt;span class='p'&gt;,&lt;/span&gt; &lt;span class='nx'&gt;depC&lt;/span&gt;&lt;span class='p'&gt;)&lt;/span&gt; &lt;span class='p'&gt;{&lt;/span&gt;
        &lt;span class='kd'&gt;var&lt;/span&gt; &lt;span class='nx'&gt;myModule&lt;/span&gt; &lt;span class='o'&gt;=&lt;/span&gt; &lt;span class='p'&gt;{};&lt;/span&gt;
        &lt;span class='c1'&gt;// build your module here&lt;/span&gt;
        &lt;span class='nx'&gt;myModule&lt;/span&gt;&lt;span class='p'&gt;.&lt;/span&gt;&lt;span class='nx'&gt;foo&lt;/span&gt; &lt;span class='o'&gt;=&lt;/span&gt; &lt;span class='nx'&gt;depA&lt;/span&gt;&lt;span class='p'&gt;.&lt;/span&gt;&lt;span class='nx'&gt;getFoo&lt;/span&gt;&lt;span class='p'&gt;();&lt;/span&gt;
        &lt;span class='k'&gt;return&lt;/span&gt; &lt;span class='nx'&gt;myModule&lt;/span&gt;&lt;span class='p'&gt;;&lt;/span&gt;
    &lt;span class='p'&gt;}&lt;/span&gt;
&lt;span class='p'&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;To define a module, you need:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;To define a dependency list (or not), that needs to be load in order to use this module.&lt;/li&gt;

&lt;li&gt;And to define your javascript module. Just create a function, with the dependencies as parameters, and then return your module so it can be use from outside&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That’s it!&lt;/p&gt;

&lt;p&gt;Now that we have our module working, let’s learn how to load it, and that’s where require comes in.&lt;/p&gt;

&lt;p&gt;In order to load a module, with its dependencies, asynchronously and only when you really need it, you need to use require as this:&lt;/p&gt;
&lt;div class='highlight'&gt;&lt;pre&gt;&lt;code class='js'&gt;&lt;span class='nx'&gt;require&lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;
    &lt;span class='p'&gt;[&lt;/span&gt;&lt;span class='s2'&gt;&amp;quot;modA&amp;quot;&lt;/span&gt;&lt;span class='p'&gt;,&lt;/span&gt; &lt;span class='s2'&gt;&amp;quot;modB&amp;quot;&lt;/span&gt;&lt;span class='p'&gt;],&lt;/span&gt;
    &lt;span class='kd'&gt;function&lt;/span&gt; &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nx'&gt;modA&lt;/span&gt;&lt;span class='p'&gt;,&lt;/span&gt; &lt;span class='nx'&gt;modB&lt;/span&gt;&lt;span class='p'&gt;)&lt;/span&gt; &lt;span class='p'&gt;{&lt;/span&gt;
        &lt;span class='c1'&gt;// do something with modA and modB&lt;/span&gt;
        &lt;span class='c1'&gt;// when they are fully loaded&lt;/span&gt;
    &lt;span class='p'&gt;}&lt;/span&gt;
&lt;span class='p'&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;To load a module, you need:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;To ask for what modules you need using require&lt;/li&gt;

&lt;li&gt;Once they are loaded, use them!!&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Yup, that’s it.&lt;/p&gt;

&lt;p&gt;Notice that the function using the modules, is a callback function, that means, it won’t execute until all modules finished loading.&lt;/p&gt;

&lt;p&gt;Now let’s see some actual code.&lt;/p&gt;

&lt;p&gt;First, you need to download &lt;a href='http://requirejs.org/'&gt;RequireJS&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Once you downloaded it, create an &lt;code&gt;index.html&lt;/code&gt; with a head that looks like this:&lt;/p&gt;
&lt;div class='highlight'&gt;&lt;pre&gt;&lt;code class='html'&gt;&lt;span class='cp'&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;
&lt;span class='nt'&gt;&amp;lt;html&amp;gt;&lt;/span&gt;
  &lt;span class='nt'&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
    &lt;span class='nt'&gt;&amp;lt;title&amp;gt;&lt;/span&gt;Using RequireJS&lt;span class='nt'&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
    &lt;span class='c'&gt;&amp;lt;!-- we reference requirejs and tell it that what we want to load is specified in data-main --&amp;gt;&lt;/span&gt;
    &lt;span class='nt'&gt;&amp;lt;script &lt;/span&gt;&lt;span class='na'&gt;data-main=&lt;/span&gt;&lt;span class='s'&gt;&amp;quot;scripts/main&amp;quot;&lt;/span&gt; &lt;span class='na'&gt;src=&lt;/span&gt;&lt;span class='s'&gt;&amp;quot;scripts/require.js&amp;quot;&lt;/span&gt;&lt;span class='nt'&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
  &lt;span class='nt'&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
  &lt;span class='nt'&gt;&amp;lt;body&amp;gt;&lt;/span&gt;
  &lt;span class='nt'&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;span class='nt'&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;In this simple expample, our Structure is very very super! basic.&lt;/p&gt;
&lt;div class='highlight'&gt;&lt;pre&gt;&lt;code class='js'&gt;&lt;span class='nx'&gt;Project&lt;/span&gt;
&lt;span class='nx'&gt;Project&lt;/span&gt;&lt;span class='o'&gt;/&lt;/span&gt;&lt;span class='nx'&gt;index&lt;/span&gt;&lt;span class='p'&gt;.&lt;/span&gt;&lt;span class='nx'&gt;html&lt;/span&gt;
&lt;span class='nx'&gt;Project&lt;/span&gt;&lt;span class='o'&gt;/&lt;/span&gt;&lt;span class='nx'&gt;scripts&lt;/span&gt;
&lt;span class='nx'&gt;Project&lt;/span&gt;&lt;span class='o'&gt;/&lt;/span&gt;&lt;span class='nx'&gt;scripts&lt;/span&gt;&lt;span class='o'&gt;/&lt;/span&gt;&lt;span class='nx'&gt;require&lt;/span&gt;&lt;span class='p'&gt;.&lt;/span&gt;&lt;span class='nx'&gt;js&lt;/span&gt;
&lt;span class='nx'&gt;Project&lt;/span&gt;&lt;span class='o'&gt;/&lt;/span&gt;&lt;span class='nx'&gt;scripts&lt;/span&gt;&lt;span class='o'&gt;/&lt;/span&gt;&lt;span class='nx'&gt;main&lt;/span&gt;&lt;span class='p'&gt;.&lt;/span&gt;&lt;span class='nx'&gt;js&lt;/span&gt;
&lt;span class='nx'&gt;Project&lt;/span&gt;&lt;span class='o'&gt;/&lt;/span&gt;&lt;span class='nx'&gt;scripts&lt;/span&gt;&lt;span class='o'&gt;/&lt;/span&gt;&lt;span class='nx'&gt;movie&lt;/span&gt;&lt;span class='p'&gt;.&lt;/span&gt;&lt;span class='nx'&gt;js&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Let’s take a look at main.js&lt;/p&gt;
&lt;div class='highlight'&gt;&lt;pre&gt;&lt;code class='js'&gt;&lt;span class='c1'&gt;// Here we are loading a &amp;quot;movie&amp;quot; module to use in our callback function&lt;/span&gt;
&lt;span class='nx'&gt;require&lt;/span&gt;&lt;span class='p'&gt;([&lt;/span&gt;&lt;span class='s2'&gt;&amp;quot;movie&amp;quot;&lt;/span&gt;&lt;span class='p'&gt;],&lt;/span&gt; &lt;span class='kd'&gt;function&lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nx'&gt;Movie&lt;/span&gt;&lt;span class='p'&gt;)&lt;/span&gt; &lt;span class='p'&gt;{&lt;/span&gt;
    &lt;span class='kd'&gt;var&lt;/span&gt; &lt;span class='nx'&gt;a&lt;/span&gt; &lt;span class='o'&gt;=&lt;/span&gt; &lt;span class='k'&gt;new&lt;/span&gt; &lt;span class='nx'&gt;Movie&lt;/span&gt;&lt;span class='p'&gt;();&lt;/span&gt;
	  &lt;span class='nx'&gt;a&lt;/span&gt;&lt;span class='p'&gt;.&lt;/span&gt;&lt;span class='nx'&gt;setAttribute&lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='s1'&gt;&amp;#39;name&amp;#39;&lt;/span&gt;&lt;span class='p'&gt;,&lt;/span&gt;&lt;span class='s1'&gt;&amp;#39;terminator&amp;#39;&lt;/span&gt;&lt;span class='p'&gt;);&lt;/span&gt;
	  &lt;span class='nx'&gt;console&lt;/span&gt;&lt;span class='p'&gt;.&lt;/span&gt;&lt;span class='nx'&gt;log&lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nx'&gt;a&lt;/span&gt;&lt;span class='p'&gt;.&lt;/span&gt;&lt;span class='nx'&gt;getAttribute&lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='s1'&gt;&amp;#39;name&amp;#39;&lt;/span&gt;&lt;span class='p'&gt;));&lt;/span&gt;
&lt;span class='p'&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;As we said before, we ask require for the modules we want to use (&lt;code&gt;movie&lt;/code&gt;) and create a callback function (&lt;code&gt;function(movie)&lt;/code&gt;) to use it. Here we are just seting its name to &amp;#8220;terminator&amp;#8221;, since is an awesome movie.&lt;/p&gt;

&lt;p&gt;Now let’s take a look at movie.js&lt;/p&gt;
&lt;div class='highlight'&gt;&lt;pre&gt;&lt;code class='js'&gt;&lt;span class='nx'&gt;define&lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='s2'&gt;&amp;quot;movie&amp;quot;&lt;/span&gt;&lt;span class='p'&gt;,&lt;/span&gt; &lt;span class='kd'&gt;function&lt;/span&gt; &lt;span class='p'&gt;()&lt;/span&gt; &lt;span class='p'&gt;{&lt;/span&gt;
  &lt;span class='c1'&gt;//Constructor&lt;/span&gt;
	&lt;span class='kd'&gt;var&lt;/span&gt; &lt;span class='nx'&gt;Movie&lt;/span&gt; &lt;span class='o'&gt;=&lt;/span&gt; &lt;span class='kd'&gt;function&lt;/span&gt; &lt;span class='p'&gt;()&lt;/span&gt; &lt;span class='p'&gt;{&lt;/span&gt;
	&lt;span class='p'&gt;};&lt;/span&gt;
 
	&lt;span class='c1'&gt;//Private vars and functions&lt;/span&gt;
	&lt;span class='kd'&gt;var&lt;/span&gt; &lt;span class='nx'&gt;attributes&lt;/span&gt; &lt;span class='o'&gt;=&lt;/span&gt; &lt;span class='p'&gt;{};&lt;/span&gt;			
	&lt;span class='nx'&gt;Movie&lt;/span&gt;&lt;span class='p'&gt;.&lt;/span&gt;&lt;span class='nx'&gt;prototype&lt;/span&gt; &lt;span class='o'&gt;=&lt;/span&gt; &lt;span class='p'&gt;{&lt;/span&gt;
		&lt;span class='nx'&gt;constructor&lt;/span&gt; &lt;span class='o'&gt;:&lt;/span&gt; &lt;span class='nx'&gt;Movie&lt;/span&gt;
		&lt;span class='p'&gt;,&lt;/span&gt;&lt;span class='nx'&gt;getAttribute&lt;/span&gt; &lt;span class='o'&gt;:&lt;/span&gt; &lt;span class='kd'&gt;function&lt;/span&gt; &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nx'&gt;key&lt;/span&gt;&lt;span class='p'&gt;){&lt;/span&gt;
			&lt;span class='k'&gt;return&lt;/span&gt; &lt;span class='nx'&gt;attributes&lt;/span&gt;&lt;span class='p'&gt;[&lt;/span&gt;&lt;span class='nx'&gt;key&lt;/span&gt;&lt;span class='p'&gt;];&lt;/span&gt;
			&lt;span class='p'&gt;}&lt;/span&gt;
 
		&lt;span class='p'&gt;,&lt;/span&gt;&lt;span class='nx'&gt;setAttribute&lt;/span&gt; &lt;span class='o'&gt;:&lt;/span&gt; &lt;span class='kd'&gt;function&lt;/span&gt; &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nx'&gt;key&lt;/span&gt;&lt;span class='p'&gt;,&lt;/span&gt;&lt;span class='nx'&gt;value&lt;/span&gt;&lt;span class='p'&gt;){&lt;/span&gt;
				&lt;span class='nx'&gt;attributes&lt;/span&gt;&lt;span class='p'&gt;[&lt;/span&gt;&lt;span class='nx'&gt;key&lt;/span&gt;&lt;span class='p'&gt;]&lt;/span&gt; &lt;span class='o'&gt;=&lt;/span&gt; &lt;span class='nx'&gt;value&lt;/span&gt;&lt;span class='p'&gt;;&lt;/span&gt;
			&lt;span class='p'&gt;}&lt;/span&gt;				
	&lt;span class='p'&gt;};&lt;/span&gt;
	&lt;span class='k'&gt;return&lt;/span&gt; &lt;span class='nx'&gt;Movie&lt;/span&gt;&lt;span class='p'&gt;;&lt;/span&gt;
&lt;span class='p'&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Let’s see the code:&lt;/p&gt;

&lt;p&gt;First, we declare our dependencies (in this case, since we don’t have any, we just ommit them), then, we have the option to declare a module with a name. In this case I called it movie. And after that, the declaration of the module itself.&lt;/p&gt;

&lt;p&gt;There are a few ways to do this, but to make the post shorter, I’ll explain one, using &lt;code&gt;constructor&lt;/code&gt;, &lt;code&gt;prototype&lt;/code&gt;, &lt;code&gt;private vars&lt;/code&gt;, etc.&lt;/p&gt;
&lt;div class='highlight'&gt;&lt;pre&gt;&lt;code class='js'&gt;&lt;span class='c1'&gt;//Constructor&lt;/span&gt;
    &lt;span class='kd'&gt;var&lt;/span&gt; &lt;span class='nx'&gt;Movie&lt;/span&gt; &lt;span class='o'&gt;=&lt;/span&gt; &lt;span class='kd'&gt;function&lt;/span&gt; &lt;span class='p'&gt;()&lt;/span&gt; &lt;span class='p'&gt;{&lt;/span&gt;
&lt;span class='p'&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;This code just creates a variable, called Movie, of type function, so it takes its prototype.&lt;/p&gt;

&lt;p&gt;After that, we create a simple private variable that we’ll use as a hash table.&lt;/p&gt;
&lt;div class='highlight'&gt;&lt;pre&gt;&lt;code class='js'&gt;&lt;span class='c1'&gt;//Private vars and functions&lt;/span&gt;
&lt;span class='kd'&gt;var&lt;/span&gt; &lt;span class='nx'&gt;attributes&lt;/span&gt; &lt;span class='o'&gt;=&lt;/span&gt; &lt;span class='p'&gt;{};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;And then, we extend the prototype of the Movie variable.&lt;/p&gt;

&lt;p&gt;We specify its constructor function (Wich is called Movie if you remember). After that we add two methos to set and get the values from our private variables.&lt;/p&gt;
&lt;div class='highlight'&gt;&lt;pre&gt;&lt;code class='js'&gt;&lt;span class='nx'&gt;Movie&lt;/span&gt;&lt;span class='p'&gt;.&lt;/span&gt;&lt;span class='nx'&gt;prototype&lt;/span&gt; &lt;span class='o'&gt;=&lt;/span&gt; &lt;span class='p'&gt;{&lt;/span&gt;
  &lt;span class='nx'&gt;constructor&lt;/span&gt; &lt;span class='o'&gt;:&lt;/span&gt; &lt;span class='nx'&gt;Movie&lt;/span&gt;
	&lt;span class='p'&gt;,&lt;/span&gt;&lt;span class='nx'&gt;getAttribute&lt;/span&gt; &lt;span class='o'&gt;:&lt;/span&gt; &lt;span class='kd'&gt;function&lt;/span&gt; &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nx'&gt;key&lt;/span&gt;&lt;span class='p'&gt;){&lt;/span&gt;
		&lt;span class='k'&gt;return&lt;/span&gt; &lt;span class='nx'&gt;attributes&lt;/span&gt;&lt;span class='p'&gt;[&lt;/span&gt;&lt;span class='nx'&gt;key&lt;/span&gt;&lt;span class='p'&gt;];&lt;/span&gt;
	&lt;span class='p'&gt;}&lt;/span&gt;
	&lt;span class='p'&gt;,&lt;/span&gt;&lt;span class='nx'&gt;setAttribute&lt;/span&gt; &lt;span class='o'&gt;:&lt;/span&gt; &lt;span class='kd'&gt;function&lt;/span&gt; &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nx'&gt;key&lt;/span&gt;&lt;span class='p'&gt;,&lt;/span&gt;&lt;span class='nx'&gt;value&lt;/span&gt;&lt;span class='p'&gt;){&lt;/span&gt;
			&lt;span class='nx'&gt;attributes&lt;/span&gt;&lt;span class='p'&gt;[&lt;/span&gt;&lt;span class='nx'&gt;key&lt;/span&gt;&lt;span class='p'&gt;]&lt;/span&gt; &lt;span class='o'&gt;=&lt;/span&gt; &lt;span class='nx'&gt;value&lt;/span&gt;&lt;span class='p'&gt;;&lt;/span&gt;
	&lt;span class='p'&gt;}&lt;/span&gt;			
&lt;span class='p'&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;And once we are done, we return our module:&lt;/p&gt;
&lt;div class='highlight'&gt;&lt;pre&gt;&lt;code class='js'&gt;&lt;span class='k'&gt;return&lt;/span&gt; &lt;span class='nx'&gt;Movie&lt;/span&gt;&lt;span class='p'&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;There are several discussion topics in the last code, I encourage you to read about &lt;a href='http://javascriptweblog.wordpress.com/2010/06/07/understanding-javascript-prototypes/'&gt;prototypes&lt;/a&gt; if you are interested on how they work. And Here is my github &lt;a href='https://github.com/nicolasmbatista/startup/tree/master/04-amd-requirejs'&gt;code&lt;/a&gt; that shows something very similar to what is shown on this post&lt;/p&gt;

&lt;p&gt;Ok that’s it for today, I hope I didn’t bored you to death and see you next time!&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Training finalizado – HTML5 and jQuery</title>
   <link href="http://makingsensers.github.com/2013/01/02/training-finalizado-html5-and-jquery"/>
   <updated>2013-01-02T00:00:00-08:00</updated>
   <id>http://makingsensers.github.com/2013/01/02/training-finalizado-html5-and-jquery</id>
   <content type="html">&lt;p&gt;&lt;em&gt;Leo Lopez&lt;/em&gt; terminó su self-training relacionado con &lt;em&gt;MVC&lt;/em&gt;, &lt;em&gt;EF&lt;/em&gt;, &lt;em&gt;HTML5&lt;/em&gt; y &lt;em&gt;jQuery&lt;/em&gt; (&lt;code&gt;CAP-34&lt;/code&gt;). Experimentó consumiendo webservices RESTlike desde .NET, también con varias librerías de JavaScript interesantes: &lt;em&gt;jquery-tmpl&lt;/em&gt;, &lt;em&gt;Flot&lt;/em&gt;, &lt;em&gt;Raphael&lt;/em&gt; y con &lt;em&gt;Boilerplate&lt;/em&gt;, un template para crear sitios HTML5 siguiendo buenas prácticas.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href='http://newsataglance.apphb.com/'&gt;Demo&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;&lt;a href='http://makingsensers.wordpress.com/category/self-training-2/news-at-a-glance/'&gt;Post Relacionados&lt;/a&gt; (van a ir agregándose más)&lt;/li&gt;

&lt;li&gt;&lt;a href='https://github.com/leoslopez/Account-At-A-Glance-App'&gt;Código&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;¡Felicitaciones Leo!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Encontrá más información sobre el programa de capacitaciones en la Intranet: &lt;code&gt;display/DTRU/Programa+de+Capacitaciones&lt;/code&gt;.&lt;/em&gt;&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>jquery-tmpl (templates)</title>
   <link href="http://makingsensers.github.com/2012/12/28/jquery-tmpl-templates"/>
   <updated>2012-12-28T00:00:00-08:00</updated>
   <id>http://makingsensers.github.com/2012/12/28/jquery-tmpl-templates</id>
   <content type="html">&lt;h3 id='jquery_plugin_jquerytmpl'&gt;jQuery plug-in: &lt;a href='http://api.jquery.com/category/plugins/templates/'&gt;jquery-tmpl&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;Aclaración:&lt;/strong&gt; Es conveniente aclarar que el equipo de jQuery ha decidido no hacer uso de este plugin ya que no está siendo activamente desarrollado o mantenido desde hace un tiempo ya. Cuando se comenzó a utilizar en el self training no se tenía conocimiento de esto pero de todos modos, para el uso que se le dió, fue útil y funcionó correctamente.&lt;/em&gt;&lt;/p&gt;

&lt;h3 id='uso_en_news_at_a_glance'&gt;Uso en News At A Glance&lt;/h3&gt;

&lt;p&gt;(&lt;em&gt;) &lt;a href='https://github.com/leoslopez/Account-At-A-Glance-App'&gt;News at a Glance en GitHub&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h4 id='situacin_planteada'&gt;Situación planteada&lt;/h4&gt;

&lt;p&gt;Se necesitaba poder contar con templates para los diferentes tamaños de ’tiles’ que debía mostrar, y manejar, la aplicación (small, medium y large) para los diferentes tipos de información mostrada (noticias, equipos y videos publicitarios)&lt;/p&gt;

&lt;h4 id='resolucin_usando_jquerytmpl_plugin'&gt;Resolución usando &lt;em&gt;jquery-tmpl&lt;/em&gt; plugin&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href='http://ajax.aspnetcdn.com/ajax/jquery.templates/beta1/jquery.tmpl.min.js'&gt;Descargar&lt;/a&gt; e incluir en el proyecto el plugin:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;div class='highlight'&gt;&lt;pre&gt;&lt;code class='html'&gt;&lt;span class='nt'&gt;&amp;lt;script &lt;/span&gt;&lt;span class='na'&gt;src=&lt;/span&gt;&lt;span class='s'&gt;&amp;quot;@Url.Content(&amp;quot;&lt;/span&gt;&lt;span class='err'&gt;~/&lt;/span&gt;&lt;span class='na'&gt;Scripts&lt;/span&gt;&lt;span class='err'&gt;/&lt;/span&gt;&lt;span class='na'&gt;Libs&lt;/span&gt;&lt;span class='err'&gt;/&lt;/span&gt;&lt;span class='na'&gt;jQuery&lt;/span&gt;&lt;span class='err'&gt;.&lt;/span&gt;&lt;span class='na'&gt;tmpl&lt;/span&gt;&lt;span class='err'&gt;.&lt;/span&gt;&lt;span class='na'&gt;min&lt;/span&gt;&lt;span class='err'&gt;.&lt;/span&gt;&lt;span class='na'&gt;js&lt;/span&gt;&lt;span class='err'&gt;&amp;quot;)&amp;quot;&lt;/span&gt; &lt;span class='na'&gt;type=&lt;/span&gt;&lt;span class='s'&gt;&amp;quot;text/javascript&amp;quot;&lt;/span&gt;&lt;span class='nt'&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Agregar un archivo html para cada tipo de información a mostrar (noticias, equipos, videos). En nuestro caso, para las noticias, se agregó &lt;code&gt;News.html&lt;/code&gt;.&lt;/li&gt;

&lt;li&gt;Dentro de cada archivo incluir los 3 templates, 1 para cada tamaño de tile considerado: &lt;em&gt;small&lt;/em&gt;, &lt;em&gt;medium&lt;/em&gt; y &lt;em&gt;large&lt;/em&gt;. El tag principal del template debe tener la siguiente forma:&lt;/li&gt;
&lt;/ul&gt;
&lt;div class='highlight'&gt;&lt;pre&gt;&lt;code class='html'&gt;&lt;span class='c'&gt;&amp;lt;!-- template para noticia tamaño small --&amp;gt;&lt;/span&gt;
&lt;span class='nt'&gt;&amp;lt;script &lt;/span&gt;&lt;span class='na'&gt;id=&lt;/span&gt;&lt;span class='s'&gt;&amp;quot;NewsTemplate_Small&amp;quot;&lt;/span&gt; &lt;span class='na'&gt;type=&lt;/span&gt;&lt;span class='s'&gt;&amp;quot;text/x-jquery-tmpl&amp;quot;&lt;/span&gt;&lt;span class='nt'&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;Ahora, usando &lt;code&gt;$(&amp;quot;#myTemplate&amp;quot;).tmpl([data])&lt;/code&gt; se indica que el &lt;strong&gt;template&lt;/strong&gt; correspondiente se bindeará con determinada &lt;strong&gt;data&lt;/strong&gt; (puede ser algún JavaScript type, incluyendo &lt;code&gt;Array&lt;/code&gt; u &lt;code&gt;Object&lt;/code&gt;). En la app:&lt;/li&gt;
&lt;/ul&gt;
&lt;div class='highlight'&gt;&lt;pre&gt;&lt;code class='js'&gt;&lt;span class='kd'&gt;var&lt;/span&gt; &lt;span class='nx'&gt;template&lt;/span&gt; &lt;span class='o'&gt;=&lt;/span&gt; &lt;span class='nx'&gt;$&lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='s1'&gt;&amp;#39;#&amp;#39;&lt;/span&gt; &lt;span class='o'&gt;+&lt;/span&gt; &lt;span class='nx'&gt;tileName&lt;/span&gt; &lt;span class='o'&gt;+&lt;/span&gt; &lt;span class='s1'&gt;&amp;#39;Template_&amp;#39;&lt;/span&gt; &lt;span class='o'&gt;+&lt;/span&gt; &lt;span class='nx'&gt;size&lt;/span&gt;&lt;span class='p'&gt;);&lt;/span&gt; &lt;span class='c1'&gt;//se obtiene el template&lt;/span&gt;
&lt;span class='nx'&gt;template&lt;/span&gt;&lt;span class='p'&gt;.&lt;/span&gt;&lt;span class='nx'&gt;tmpl&lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nx'&gt;data&lt;/span&gt;&lt;span class='p'&gt;);&lt;/span&gt; &lt;span class='c1'&gt;//se bindea la data correspondiente&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Para identificar los valores a tener en cuenta al momento de renderizar la &lt;strong&gt;data&lt;/strong&gt; sobre el &lt;strong&gt;template&lt;/strong&gt; se debe considerar la siguiente sintaxis en la definición del template: &lt;code&gt;&amp;lt;span id=&amp;quot;spNewsSource&amp;quot;&amp;gt;${Source}&amp;lt;/span&amp;gt;&lt;/code&gt;. Con el template tag: &lt;code&gt;${Source}&lt;/code&gt; se indica que la &lt;strong&gt;data&lt;/strong&gt; pasada por parametro tendrá una property llamada &lt;code&gt;Source&lt;/code&gt; con un value que será renderizado sobre el &lt;code&gt;&amp;lt;span&amp;gt;&lt;/code&gt; en cuestión. &lt;strong&gt;Se puede bindear de esta forma ya sea el value de un span como la property &lt;code&gt;ref&lt;/code&gt; en un anchor &lt;code&gt;&amp;lt;a id=&amp;quot;lnkNews&amp;quot; href=&amp;quot;${Url}&amp;quot;&lt;/code&gt;, el source de una imagen, los ids de elementos html, etc&lt;/strong&gt;. Ver documentación para los varios template tags: &lt;a href='http://www.jquerysdk.com/api/template-tag-equal'&gt;&lt;code&gt;${}&lt;/code&gt;&lt;/a&gt;, &lt;a href='http://www.jquerysdk.com/api/template-tag-each'&gt;&lt;code&gt;{{each}}&lt;/code&gt;&lt;/a&gt;, &lt;a href='http://www.jquerysdk.com/api/template-tag-if'&gt;&lt;code&gt;{{if}}&lt;/code&gt;&lt;/a&gt;, &lt;a href='http://www.jquerysdk.com/api/template-tag-else'&gt;&lt;code&gt;{{else}}&lt;/code&gt;&lt;/a&gt;, &lt;a href='http://www.jquerysdk.com/api/template-tag-html'&gt;&lt;code&gt;{{html}}&lt;/code&gt;&lt;/a&gt;, &lt;a href='http://www.jquerysdk.com/api/template-tag-tmpl'&gt;&lt;code&gt;{{tmpl}}&lt;/code&gt;&lt;/a&gt; &lt;a href='http://www.jquerysdk.com/api/template-tag-wrap'&gt;&lt;code&gt;{{wrap}}&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;

&lt;li&gt;
&lt;p&gt;El método &lt;code&gt;$.tmpl()&lt;/code&gt; retorna una jQuery collection y es diseñado para encadenar con &lt;code&gt;.appendTo&lt;/code&gt;, &lt;code&gt;.prependTo&lt;/code&gt;, &lt;code&gt;.insertAfter&lt;/code&gt; or &lt;code&gt;.insertBefore&lt;/code&gt;, como en este ejemplo: &lt;code&gt;$.tmpl(&amp;quot;&amp;lt;li&amp;gt;${Name}&amp;lt;/li&amp;gt;&amp;quot;,{&amp;quot;Name&amp;quot; : &amp;quot;John Doe&amp;quot;}).appendTo(&amp;quot;#target&amp;quot;)&lt;/code&gt;. En la app, el valor retornado por este método, se utilizó de la siguiente manera: &lt;code&gt;tileDiv.html(template)&lt;/code&gt; (Para el &lt;code&gt;div&lt;/code&gt; del tile en cuestión se define la property &lt;code&gt;html&lt;/code&gt; usando el &lt;strong&gt;template&lt;/strong&gt;).&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id='conclusin'&gt;Conclusión&lt;/h4&gt;

&lt;p&gt;El plugin permitió una gran comodidad y facilidad para mostrar, bindear y manejar templates previamente definidos sobre los cuales debía mostrarse diferente información, dependiendo del tamaño del template, de manera dinámica (en el momento de la obtención de la noticias).&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Flot</title>
   <link href="http://makingsensers.github.com/2012/12/28/flot"/>
   <updated>2012-12-28T00:00:00-08:00</updated>
   <id>http://makingsensers.github.com/2012/12/28/flot</id>
   <content type="html">&lt;h2 id='flot_librera_javascript_para_jquery'&gt;&lt;a href='http://www.flotcharts.org/'&gt;Flot&lt;/a&gt; (librería javascript para JQuery)&lt;/h2&gt;

&lt;p&gt;(*) En GitHub: https://github.com/flot/flot/blob/master/README.md&lt;/p&gt;

&lt;h3 id='instalacin'&gt;Instalación&lt;/h3&gt;

&lt;p&gt;&lt;a href='http://www.flotcharts.org/'&gt;Descargar&lt;/a&gt; e incluir el archivo javascript después de la inclusión del archivo de JQuery. &lt;em&gt;(Generalmente todos los browsers que soportan el tag de HTML5 canvas soportan el uso del plugin)&lt;/em&gt;&lt;/p&gt;

&lt;h3 id='uso_bsico'&gt;Uso básico&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Crear un div contenedor para poner el gráfico: &lt;code&gt;&amp;lt;div id=&amp;quot;placeholder&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;

&lt;li&gt;
&lt;p&gt;Se necesita definir el ancho y el alto del div porque sino la librería de ploteado no sabe manejar la escala del gráfico: &lt;code&gt;&amp;lt;div id=&amp;quot;placeholder&amp;quot; style=&amp;quot;width:600px;height:300px&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;

&lt;li&gt;
&lt;p&gt;Cuando el div esté listo en el DOM invocamos a la función &lt;strong&gt;plot&lt;/strong&gt;: &lt;code&gt;$.plot($(&amp;quot;#placeholder&amp;quot;), data, options);&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;

&lt;li&gt;
&lt;p&gt;La &lt;strong&gt;data&lt;/strong&gt; es un arreglo con las series a bindear y &lt;strong&gt;options&lt;/strong&gt; es un objeto con diversos settings para customizar la gráfica resultante del ploteado. Este es un ejemplo rápido que dibuja una línea desde el punto (0,0) a (1,1): &lt;code&gt;$.plot($(&amp;quot;#placeholder&amp;quot;), [ [[0, 0], [1, 1]] ], { yaxis: { max: 1 } });&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;(*) La función &lt;strong&gt;plot&lt;/strong&gt; inmediatamente dibuja la gráfica y returna un objeto &lt;em&gt;plot&lt;/em&gt; con algunos métodos.&lt;/p&gt;

&lt;h2 id='uso_en_news_at_a_glance'&gt;Uso en News At A Glance&lt;/h2&gt;

&lt;h3 id='situacin_planteada'&gt;Situación planteada&lt;/h3&gt;

&lt;p&gt;Graficar el progreso en la posición en el campeonato para un determinado equipo.&lt;/p&gt;

&lt;h3 id='solucin_usando_el_plugin'&gt;Solución usando el plugin&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;En el archivo de Team.html, donde se encuentran los &lt;a href='https://github.com/leoslopez/Account-At-A-Glance-App/blob/master/AccountAtAGlance/NewsAtAGlance/docs/Jquery%20Templates.md'&gt;templates&lt;/a&gt; definidos para los distintos tamaños de información a mostrar para un equipo, se definió el div contenedor del gráfico de la siguiente manera: &lt;code&gt;&amp;lt;div id=&amp;quot;progressPositionCanvas${GraphName}&amp;quot; class=&amp;quot;canvas&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;/code&gt; (esto para el template de tamaño large)&lt;/p&gt;
&lt;/li&gt;

&lt;li&gt;
&lt;p&gt;En la funcion &lt;code&gt;formatTeams&lt;/code&gt; del &lt;code&gt;scene.tile.formatter.js&lt;/code&gt; se obtiene el div contenedor: &lt;code&gt;var canvasDiv = $(&amp;#39;#progressPositionCanvas&amp;#39; + 
tileDiv.data().tileData.GraphName);&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;

&lt;li&gt;
&lt;p&gt;Luego se invoca a la función &lt;code&gt;renderCanvas&lt;/code&gt; pasandole este div previamente obtenido (más otros valores como la data a bindear, ancho, alto, etc): &lt;code&gt;renderCanvas(canvasDiv, width, height, json.AltColor, json, json.PositionProgress);&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;

&lt;li&gt;
&lt;p&gt;Dentro de &lt;code&gt;renderCanvas&lt;/code&gt; lo que hacemos es armar el arreglo de puntos a bindear (&lt;code&gt;points&lt;/code&gt;), definimos un objeto chartOptions que son los settings para customizar la gráfica:&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class='highlight'&gt;&lt;pre&gt;&lt;code class='js'&gt;&lt;span class='kd'&gt;var&lt;/span&gt; &lt;span class='nx'&gt;chartOptions&lt;/span&gt; &lt;span class='o'&gt;=&lt;/span&gt; &lt;span class='p'&gt;{&lt;/span&gt;
	&lt;span class='nx'&gt;series&lt;/span&gt;&lt;span class='o'&gt;:&lt;/span&gt; &lt;span class='p'&gt;{&lt;/span&gt;
		&lt;span class='nx'&gt;lines&lt;/span&gt;&lt;span class='o'&gt;:&lt;/span&gt; &lt;span class='p'&gt;{&lt;/span&gt; &lt;span class='nx'&gt;show&lt;/span&gt;&lt;span class='o'&gt;:&lt;/span&gt; &lt;span class='kc'&gt;true&lt;/span&gt;&lt;span class='p'&gt;,&lt;/span&gt; &lt;span class='nx'&gt;fill&lt;/span&gt;&lt;span class='o'&gt;:&lt;/span&gt; &lt;span class='kc'&gt;true&lt;/span&gt; &lt;span class='p'&gt;},&lt;/span&gt;
		&lt;span class='nx'&gt;points&lt;/span&gt;&lt;span class='o'&gt;:&lt;/span&gt; &lt;span class='p'&gt;{&lt;/span&gt; &lt;span class='nx'&gt;show&lt;/span&gt;&lt;span class='o'&gt;:&lt;/span&gt; &lt;span class='kc'&gt;true&lt;/span&gt;&lt;span class='p'&gt;,&lt;/span&gt; &lt;span class='nx'&gt;radius&lt;/span&gt;&lt;span class='o'&gt;:&lt;/span&gt; &lt;span class='mi'&gt;10&lt;/span&gt; &lt;span class='p'&gt;}&lt;/span&gt;
	&lt;span class='p'&gt;},&lt;/span&gt;

	&lt;span class='nx'&gt;grid&lt;/span&gt;&lt;span class='o'&gt;:&lt;/span&gt; &lt;span class='p'&gt;{&lt;/span&gt; &lt;span class='nx'&gt;hoverable&lt;/span&gt;&lt;span class='o'&gt;:&lt;/span&gt; &lt;span class='kc'&gt;true&lt;/span&gt;&lt;span class='p'&gt;,&lt;/span&gt; &lt;span class='nx'&gt;autoHighlight&lt;/span&gt;&lt;span class='o'&gt;:&lt;/span&gt; &lt;span class='kc'&gt;true&lt;/span&gt; &lt;span class='p'&gt;},&lt;/span&gt;
	&lt;span class='nx'&gt;legend&lt;/span&gt;&lt;span class='o'&gt;:&lt;/span&gt; &lt;span class='p'&gt;{&lt;/span&gt; &lt;span class='nx'&gt;position&lt;/span&gt;&lt;span class='o'&gt;:&lt;/span&gt; &lt;span class='s1'&gt;&amp;#39;se&amp;#39;&lt;/span&gt; &lt;span class='p'&gt;},&lt;/span&gt;

    &lt;span class='c1'&gt;// Explaination for tickFormatter definition: Max value on axis Y is replaced by custom string: &amp;#39;Pos.&amp;#39;. The same to the axis X.&lt;/span&gt;
    &lt;span class='nx'&gt;yaxis&lt;/span&gt;&lt;span class='o'&gt;:&lt;/span&gt; &lt;span class='p'&gt;{&lt;/span&gt; &lt;span class='nx'&gt;max&lt;/span&gt;&lt;span class='o'&gt;:&lt;/span&gt; &lt;span class='nx'&gt;maxY&lt;/span&gt;&lt;span class='p'&gt;,&lt;/span&gt; &lt;span class='nx'&gt;min&lt;/span&gt;&lt;span class='o'&gt;:&lt;/span&gt; &lt;span class='mi'&gt;1&lt;/span&gt;&lt;span class='p'&gt;,&lt;/span&gt; &lt;span class='nx'&gt;tickFormatter&lt;/span&gt;&lt;span class='o'&gt;:&lt;/span&gt; &lt;span class='kd'&gt;function&lt;/span&gt; &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nx'&gt;val&lt;/span&gt;&lt;span class='p'&gt;,&lt;/span&gt; &lt;span class='nx'&gt;axis&lt;/span&gt;&lt;span class='p'&gt;)&lt;/span&gt; &lt;span class='p'&gt;{&lt;/span&gt; &lt;span class='k'&gt;return&lt;/span&gt; &lt;span class='nx'&gt;val&lt;/span&gt; &lt;span class='o'&gt;&amp;lt;&lt;/span&gt; &lt;span class='nx'&gt;axis&lt;/span&gt;&lt;span class='p'&gt;.&lt;/span&gt;&lt;span class='nx'&gt;max&lt;/span&gt; &lt;span class='o'&gt;?&lt;/span&gt; &lt;span class='nx'&gt;val&lt;/span&gt;&lt;span class='p'&gt;.&lt;/span&gt;&lt;span class='nx'&gt;toFixed&lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='mi'&gt;0&lt;/span&gt;&lt;span class='p'&gt;)&lt;/span&gt; &lt;span class='o'&gt;:&lt;/span&gt; &lt;span class='s2'&gt;&amp;quot;Pos.&amp;quot;&lt;/span&gt;&lt;span class='p'&gt;;&lt;/span&gt; &lt;span class='p'&gt;}&lt;/span&gt; &lt;span class='p'&gt;},&lt;/span&gt;
    &lt;span class='nx'&gt;xaxis&lt;/span&gt;&lt;span class='o'&gt;:&lt;/span&gt; &lt;span class='p'&gt;{&lt;/span&gt; &lt;span class='nx'&gt;max&lt;/span&gt;&lt;span class='o'&gt;:&lt;/span&gt; &lt;span class='nx'&gt;maxX&lt;/span&gt;&lt;span class='p'&gt;,&lt;/span&gt; &lt;span class='nx'&gt;min&lt;/span&gt;&lt;span class='o'&gt;:&lt;/span&gt; &lt;span class='mi'&gt;1&lt;/span&gt;&lt;span class='p'&gt;,&lt;/span&gt; &lt;span class='nx'&gt;tickFormatter&lt;/span&gt;&lt;span class='o'&gt;:&lt;/span&gt; &lt;span class='kd'&gt;function&lt;/span&gt; &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nx'&gt;val&lt;/span&gt;&lt;span class='p'&gt;,&lt;/span&gt; &lt;span class='nx'&gt;axis&lt;/span&gt;&lt;span class='p'&gt;)&lt;/span&gt; &lt;span class='p'&gt;{&lt;/span&gt; &lt;span class='k'&gt;return&lt;/span&gt; &lt;span class='nx'&gt;val&lt;/span&gt; &lt;span class='o'&gt;&amp;lt;&lt;/span&gt; &lt;span class='nx'&gt;axis&lt;/span&gt;&lt;span class='p'&gt;.&lt;/span&gt;&lt;span class='nx'&gt;max&lt;/span&gt; &lt;span class='o'&gt;?&lt;/span&gt; &lt;span class='nx'&gt;val&lt;/span&gt;&lt;span class='p'&gt;.&lt;/span&gt;&lt;span class='nx'&gt;toFixed&lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='mi'&gt;0&lt;/span&gt;&lt;span class='p'&gt;)&lt;/span&gt; &lt;span class='o'&gt;:&lt;/span&gt; &lt;span class='s2'&gt;&amp;quot;Fecha&amp;quot;&lt;/span&gt;&lt;span class='p'&gt;;&lt;/span&gt; &lt;span class='p'&gt;}&lt;/span&gt; &lt;span class='p'&gt;}&lt;/span&gt;
&lt;span class='p'&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Se puede notar como se define el máximo y mínimo para el eje X e Y. Se defina la ubicación de la leyenda sobre la gráfica. Se indica que se haga highlight automático cuando se pasa el mouse sobre la gráfica. Se define, también, para las series el tamaño de los puntos y el formato de las líneas. Y se pueden definir varias opciones más.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Por ultimo invocamos a &lt;strong&gt;plot&lt;/strong&gt; para dibujar la gráfica con los datos y las opciones que definimos: &lt;code&gt;$.plot(canvasDiv, chartOptions);&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id='conclusin'&gt;Conclusión&lt;/h3&gt;

&lt;p&gt;Muy sencilla manera de aprovechar la característica canvas de HTML5 para construir gráficas agradables y con muchas opciones más de las aquí explicadas.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>A blogging framework for hackers</title>
   <link href="http://makingsensers.github.com/2012/12/27/a-blogging-framework-for-hackers"/>
   <updated>2012-12-27T00:00:00-08:00</updated>
   <id>http://makingsensers.github.com/2012/12/27/a-blogging-framework-for-hackers</id>
   <content type="html">&lt;p&gt;Estaba escribiendo mi segundo post de la serie sobre mi self-training, pero me siento raro con WordPress. No me siento cómodo escribiendo en su editor wysiwyg; el resaltado de código es feo; hasta ahora ninguno de los templates que pusimos me resultó agradable; quise pegar texto que escribí en markdown o html y me lo rompió. Si no tenemos hosting propio no tenemos control sobre el javascript, css ni podemos instalar plugins.&lt;/p&gt;

&lt;p&gt;Este es un blog de desarrolladores de software, deberíamos utilizar un blog engine hecho para nosotros.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;GitHub Pages&lt;/em&gt; parece ideal: tenemos hosting gratis, git, markdown, resaltado de código, etc. En su momento yo lo había descartado porque no permitía comentarios, pero eso se resuelve con &lt;a href='http://disqus.com/'&gt;Disqus&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Otra opción es &lt;a href='http://octopress.org/'&gt;Octopress&lt;/a&gt;, pero necesitaríamos hosting (Update: funciona con GitHub, pero el build del sitio se realiza manualmente).&lt;/p&gt;

&lt;p&gt;Algunos ejemplos de blogs sobre GitHub Pages:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href='http://erjjones.github.com/blog/How-I-built-my-blog-in-one-day/'&gt;Another developer blog&lt;/a&gt; (&lt;a href='https://github.com/erjjones/erjjones.github.com/blob/master/_posts/2012-03-08-How-I-built-my-blog-in-one-day.markdown'&gt;sources&lt;/a&gt;)&lt;/li&gt;

&lt;li&gt;&lt;a href='http://www.alexrothenberg.com/2011/01/27/moved-blog-to-jekyll-and-github-pages.html'&gt;Alex Rothenberg&lt;/a&gt; (&lt;a href='https://github.com/alexrothenberg/alexrothenberg.github.com/blob/master/_posts/2011-01-27-moved-blog-to-jekyll-and-github-pages.md'&gt;sources&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Más lindo está &lt;a href='http://blog.pixelingene.com/2011/09/switching-to-the-octopress-blogging-engine/'&gt;Pixel-in-Gene&lt;/a&gt;, construido sobre &lt;em&gt;Octopress&lt;/em&gt;, pero no parece tener nada interesante que no se pueda hacer con Jekill y GitHub Pages.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;¿Ustedes que opinan? ¿Conocen otras opciones?&lt;/strong&gt;&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>My Menu - Introducción</title>
   <link href="http://makingsensers.github.com/2012/12/26/my-menu-introduccion"/>
   <updated>2012-12-26T00:00:00-08:00</updated>
   <id>http://makingsensers.github.com/2012/12/26/my-menu-introduccion</id>
   <content type="html">&lt;p&gt;En el marco del self-training &lt;code&gt;CAP-42&lt;/code&gt; estuve experimentando con varias tecnologías en las que quería profundizar. Próximamente espero realizar una serie de posts con mis impresiones sobre cada una y de la interacción entre ellas.&lt;/p&gt;

&lt;h3 id='las_tecnologas'&gt;Las tecnologías&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href='http://knockoutjs.com/'&gt;KnockoutJS&lt;/a&gt; - Librería de JavaScript para facilitar la creación de interfaces web ricas y dinámicas mediante el patrón de MVVM, bindings y observables.&lt;/li&gt;

&lt;li&gt;&lt;a href='http://typescript.codeplex.com/'&gt;TypeScript&lt;/a&gt; - Súper conjunto de JavaScript que le añade tipado opcional, clases y módulos. Al compilarse genera código JavaScript limpio y basado en estándares.&lt;/li&gt;

&lt;li&gt;&lt;a href='http://twitter.github.com/bootstrap'&gt;Twitter Bootstrap&lt;/a&gt; - Framework CSS para desarrollar aplicaciones web rápidamente, con un estilo consistente, simple y agradable. También incluye algunas utilidades extensiones JavaScript.&lt;/li&gt;

&lt;li&gt;&lt;a href='http://nuget.org/'&gt;NuGet&lt;/a&gt; - Extensión de Visual Studio para instalar y actualizar librerías de terceros (en realidad lo que me interesaba a mi era la publicación de paquetes).&lt;/li&gt;

&lt;li&gt;&lt;a href='http://momentjs.com/'&gt;Moment.js&lt;/a&gt; - Librería JavaScript para parseo, validación, manipulación, y formateo de fechas.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id='el_sistema'&gt;El sistema&lt;/h3&gt;

&lt;p&gt;El objetivo, a la vez de aprender, era desarrollar un sistema para simplificar la gestión de los pedidos diarios de comida realizados en la empresa.&lt;/p&gt;

&lt;p&gt;El sistema se empezó a construir sin apuro, con la idea de investigar, experimentar y probar lo aprendido en un entorno real. Entre tanto, dado que ocurrieron algunos inconvenientes con los pedidos, en tiempo récord JF implementó e implantó un sistema con similar objetivo, el cual está cumpliendo muy bien su cometido. Por lo tanto, es probable que mi sistema nunca salga a producción.&lt;/p&gt;

&lt;p&gt;De cualquier manera, está disponible para ser probado en &lt;a href='http://commonjobs.apphb.com/MyMenu/admin'&gt;AppHarbor&lt;/a&gt; y, para los empleados de la empresa, como parte del sistema de uso interno &lt;a href='https://commonjobs.makingsense.com/mymenu'&gt;CommonJobs&lt;/a&gt;.&lt;/p&gt;

&lt;h4 id='el_problema'&gt;El problema&lt;/h4&gt;

&lt;p&gt;Cada día, antes de las 10 de la mañana, los empleados pueden elegir la comida del día entre 3 opciones (_Normal_, &lt;em&gt;Light&lt;/em&gt;, &lt;em&gt;Vegetariano&lt;/em&gt;). Los platos correspondientes a cada opción son diferentes cada día durante 5 semanas (pasados los cuales los platos se repiten).&lt;/p&gt;

&lt;p&gt;Originalmente, estábamos utilizando una planilla de Google Docs para marcar las preferencias de cada empleado en cada día de las 5 semanas. Pero dado que esa planilla era compartida, no se permitía acceso de edición a todos y era complicado realizar modificaciones. Por otro lado, solía ocurrir que por una situación particular un empleado cancelara el menú de un día, y pasadas las 5 semanas no recibiera su comida ya que alguien olvidó quitar la &lt;em&gt;“cancelación”&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Otra característica que me interesaba incluir, era la posibilidad de seleccionar el lugar donde comer. No es tan común, pero a veces ocurre que, un empleado, un día en particular, por ejemplo por una reunión, no coma en la oficina de siempre sino en otra, por lo que sería bueno que la comida se le envíe allí.&lt;/p&gt;

&lt;h4 id='ui_del_empleado'&gt;UI del empleado&lt;/h4&gt;

&lt;p&gt;Cuando el empleado entra al sistema, ve una pantalla con su selección para el día actual.&lt;/p&gt;

&lt;p&gt;&lt;img src='/img/posts/2012-12-26-my-menu-introduccion/employee1.jpg' alt='Selección del día' /&gt;&lt;/p&gt;

&lt;p&gt;Si ya ha pasado la hora límite para cambiar el pedido, se le indica con una barra amarilla que el pedido ya se realizó. Si aún hay tiempo para modificarlo, se le indica con una barra verde.&lt;/p&gt;

&lt;p&gt;&lt;img src='/img/posts/2012-12-26-my-menu-introduccion/employee2.jpg' alt='Aún se puede editar!' /&gt;&lt;/p&gt;

&lt;p&gt;El empleado puede marcar sus preferencias (menú y lugar) para cada día de las 5 semanas. Las fechas que se observan a la derecha son solo referencias: La configuración del &lt;em&gt;Lunes de la semana 2&lt;/em&gt; será válida tanto para el &lt;em&gt;28 de Enero 2013&lt;/em&gt; como para el &lt;em&gt;4 de Marzo&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src='/img/posts/2012-12-26-my-menu-introduccion/employee3.jpg' alt='Menú semanal' /&gt;&lt;/p&gt;

&lt;p&gt;Se puede modificar la elección para días particulares, sobrescribiendo la elección semanal. Por ejemplo, si el empleado sabe que el día &lt;em&gt;9 de Enero de 2013&lt;/em&gt; (dentro de dos meses o mañana) no estará presente, puede cancelarlo indicando la fecha. De la misma manera puede modificarse el menú o lugar para una fecha puntual.&lt;/p&gt;

&lt;p&gt;&lt;img src='/img/posts/2012-12-26-my-menu-introduccion/employee4.jpg' alt='Días específicos' /&gt;&lt;/p&gt;

&lt;p&gt;Por último, todos los empleados pueden ver el resumen y detalle completo del pedido, lo cual es muy útil si alguno de ellos no puede acceder al sistema o hay que resolver una discusión acerca de un plato faltante.&lt;/p&gt;

&lt;p&gt;&lt;img src='/img/posts/2012-12-26-my-menu-introduccion/employee5.jpg' alt='Pedido completo del día' /&gt;&lt;/p&gt;

&lt;h4 id='ui_de_administracin'&gt;UI de administración&lt;/h4&gt;

&lt;p&gt;El administrador del menú, además de ver el pedido del día, antes de las 10 de la mañana, puede generarlo por anticipado; O bien, luego de las 10, puede volver a generar un pedido en base a la selección actual de cada empleado.&lt;/p&gt;

&lt;p&gt;&lt;img src='/img/posts/2012-12-26-my-menu-introduccion/admin1.jpg' alt='Pedido completo del día' /&gt;&lt;/p&gt;

&lt;p&gt;También puede editar las selecciones de cualquier empleado.&lt;/p&gt;

&lt;p&gt;&lt;img src='/img/posts/2012-12-26-my-menu-introduccion/admin2.jpg' alt='Selección de del empleado' /&gt;&lt;/p&gt;

&lt;p&gt;Definir los platos correspondientes a cada día del menú.&lt;/p&gt;

&lt;p&gt;&lt;img src='/img/posts/2012-12-26-my-menu-introduccion/admin3.jpg' alt='Definición del menú' /&gt;&lt;/p&gt;

&lt;p&gt;Y redefinir completamente el menú: modificar o agregar opciones y lugares, cambiar las fechas y la cantidad de semanas.&lt;/p&gt;

&lt;p&gt;&lt;img src='/img/posts/2012-12-26-my-menu-introduccion/admin4.jpg' alt='Opciones del menú' /&gt;&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Clean Code Tips (Week 3)</title>
   <link href="http://makingsensers.github.com/2012/12/07/clean-code-tips-week-3"/>
   <updated>2012-12-07T00:00:00-08:00</updated>
   <id>http://makingsensers.github.com/2012/12/07/clean-code-tips-week-3</id>
   <content type="html">&lt;p&gt;Hi there! A new weekend is coming. The weekly Clean Code Tips are here:&lt;/p&gt;

&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;Clear and expressive code with few comments is far superior to cluttered and complex code with lots of comments. Rather than spend your time writing the comments that explain what you’ve made, spend it cleaning your code&lt;/li&gt;

&lt;li&gt;Choosing descriptive names will clarify the design of the module in your mind and help you to improve it. It is not at all uncommon that hunting for a good name results in a favorable restructuring of the code.&lt;/li&gt;

&lt;li&gt;Short functions don’t need much description. A well-chosen name for a small function that does one thing is usually better than a comment header.&lt;/li&gt;

&lt;li&gt;It is sometimes reasonable to leave “To do” notes in the form of &lt;code&gt;//TODO&lt;/code&gt; comments. In that case, the &lt;code&gt;TODO&lt;/code&gt; comment explains why the function has a degenerate or unfinished implementation and what that function should do in the future. Another good choice is to use &lt;code&gt;FIXME&lt;/code&gt; comments.&lt;/li&gt;

&lt;li&gt;Use searchable names: Single-letter names and numeric constants have a particular problem in that they are not easy to locate across a body of text&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;p&gt;Special thanks to &lt;em&gt;Ale Fantini&lt;/em&gt;, who added some new Clean Code ideas. Everybody is invited to share more tips. All tips have been taken from Robert Martin’s Clean Code book&lt;/p&gt;

&lt;p&gt;You will find a new post on December 21, since I’m on vacation the next week&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>UX 2012, Jornada de Experiencia de Usuario</title>
   <link href="http://makingsensers.github.com/2012/12/06/ux-2012-jornada-de-experiencia-de-usuario"/>
   <updated>2012-12-06T00:00:00-08:00</updated>
   <id>http://makingsensers.github.com/2012/12/06/ux-2012-jornada-de-experiencia-de-usuario</id>
   <content type="html">&lt;p&gt;El 28 de noviembre de 2012, Día Mundial de la Usabilidad, asistimos junto a Nacho Caldentey a la &lt;strong&gt;Jornada de Experiencia de Usuario UX2012&lt;/strong&gt; en el Centro Cultural San Martín.&lt;/p&gt;

&lt;p&gt;Este es el principal evento profesional en Argentina sobre Experiencia de Usuario, Usabilidad, Diseño de Interacción, Accesibilidad y temáticas relacionadas.&lt;/p&gt;

&lt;p&gt;Si bien no era un evento multitudinario hubo mas de 400 asistentes y una variedad de oradores nacionales e internacionales dando hasta cuatro charlas en simultaneo, así que con Nacho nos repartimos un poco entre las charlas que nos resultaron mas interesantes.&lt;/p&gt;

&lt;p&gt;Algunas de las charlas fueron introductorias en las que te alentaban a incorporar la usabilidad y la accesibilidad en los procesos de diseño y desarrollo de interfaces. Otras eran mas avanzadas, con el objetivo de perfeccionarse en las técnicas y metodologías de UX. También se dictaron algunos talleres para poner en práctica las técnicas básicas del Diseño Centrado en el Usuario como lo fue el Taller prototipado rápido y testo de usabilidad de usuarios que dicto Guillermo Ermel (Lider de Usabilidad en MercadoLibre).&lt;/p&gt;

&lt;p&gt;Tambien fue bueno encontrar diversidad en los asistentes, ya que había profesionales de diferentes areas como Sociologos, Psicologos y no solo estudiantes y profesionales de Diseño, esto hizo mas rico el feedback en las charlas y ver mas perspectivas de un mismo topico.&lt;/p&gt;

&lt;p&gt;En conclusion fue un evento motivador de muchas maneras, no solo por aprender cosas nuevas y volver con muchas ganas para aplicarlas en nuestro productos, sino tambien porque hay una comunidad en crecimiento en nuestro país interesada en hacer crecer la disciplina y compartir conocimientos.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Clean Code Tips (Week 2)</title>
   <link href="http://makingsensers.github.com/2012/11/30/clean-code-tips-week-2"/>
   <updated>2012-11-30T00:00:00-08:00</updated>
   <id>http://makingsensers.github.com/2012/11/30/clean-code-tips-week-2</id>
   <content type="html">&lt;p&gt;Hello again! The Clean Code tips for the current week are…&lt;/p&gt;

&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;The first rule of functions is that they should be small. This implies that the blocks within if statements,else statements,while statements, and so on should be one line long.&lt;/li&gt;

&lt;li&gt;The smaller and more focused a function is, the easier it is to choose a descriptive name.&lt;/li&gt;

&lt;li&gt;If a function is divided into sections this is an obvious symptom of doing more than one thing. Functions that do one thing cannot be reasonably divided into sections.&lt;/li&gt;

&lt;li&gt;Don’t be afraid to make a name long. A long descriptive name is better than a short enigmatic name. A long descriptive name is better than a long descriptive comment.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;p&gt;I hope it helps in your daily work!&lt;/p&gt;

&lt;p&gt;All tips have been taken from Robert Martin’s Clean Code book&lt;/p&gt;

&lt;p&gt;Stay tuned for the next week.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Html5 Boilerplate</title>
   <link href="http://makingsensers.github.com/2012/11/23/html5-boilerplate"/>
   <updated>2012-11-23T00:00:00-08:00</updated>
   <id>http://makingsensers.github.com/2012/11/23/html5-boilerplate</id>
   <content type="html">&lt;p&gt;HTML5 Boilerplate nos ofrece simplificar el proceso de construcción de sitios web en HTML5 y para ello nos permite descargar una especie de template o plantilla que puede ayudar no solo a los desarrolladores web novatos, sino también a los más experimentados.&lt;/p&gt;

&lt;p&gt;Con H5BP podemos obtener código del mejor (está desarrollado por gurues como Paul Irish) para: normalización para todos los navegadores (cross-browsing), optimización de performance, optmizaciones para navegadores en dispositivos móviles, clases específicas para IE, clases “no-js” y “js” para estilos basados en capacidades del navegador, un archivo .htaccess que permite el uso correcto de características HTML5 y carga de página más rápida, y mucho más; todo hecho teniendo en cuenta las mejores prácticas de hoy en día en el desarrollo web.&lt;/p&gt;

&lt;p&gt;Incluso aunque no lo vayas a usar, puede ser algo muy instructivo el solo hecho de ver cómo está desarrollado.&lt;/p&gt;

&lt;p&gt;Al visitar el &lt;a href='http://html5boilerplate.com/'&gt;sitio&lt;/a&gt; tienes 3 opciones: descargar la versión comentada y explicada, descargar la versión sin comentarios o la opción de personalizar lo que descargues.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Para &lt;a href='http://newsataglance.apphb.com/'&gt;News At A Glance&lt;/a&gt; tome en cuenta las siguientes consideraciones:&lt;/strong&gt; (Para mayor detalle referirse a HTML5 &lt;a href='https://github.com/h5bp/html5-boilerplate/blob/master/doc/TOC.md'&gt;Boilerplate documentation&lt;/a&gt;)&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;El orden de los meta tags y &lt;code&gt;&amp;lt;title&amp;gt;&lt;/code&gt;:&lt;/strong&gt; Como se recomienda en las especificaciones de HTML5, se debe agregar la declaración de “charset” tempranamente (antes de cualquier ASCII) para evitar un potencial problema de seguridad relacionado al encoding en IE.El charset debería, además, aparecer antes del &lt;code&gt;&amp;lt;title&amp;gt;&lt;/code&gt; para evitar un potencial &lt;a href='http://code.google.com/p/doctype-mirror/wiki/ArticleUtf7'&gt;XSS vectors&lt;/a&gt;. El meta tag que define la comptibilidad necesita estar antes que todos los elementos (&lt;code&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/code&gt;).&lt;/li&gt;

&lt;li&gt;&lt;strong&gt;X-UA-Compatible:&lt;/strong&gt; Esto asegura que la última version de IE es usada en versiones de IE que contienen multiples motores de renderizado. Aun, si se estuviese usando IE8 o IE9, es posible que ellos no esten usando el último motor de renderizado que el browser contiene. Entonces, para solucionar esto, se usa: &lt;code&gt;&amp;lt;meta http-equiv=”X-UA-Compatible” content=”IE=edge,chrome=1″&amp;gt;&lt;/code&gt; El meta tag le dice al motor de renderizado de IE 2 cosas: 1) Debería usar la última version (edge) del motor de renderizado. 2) Si está instalado debería usar el motor de renderizado Google Chrome Frame. Este meta tag asegura que cualquiera que “browsee” tu sitio será “recibido” con la mejor expriencia de usuario posible que su browser pueda ofrecer.&lt;/li&gt;

&lt;li&gt;&lt;strong&gt;Modernizr:&lt;/strong&gt; HTML5 Boilerplate usa un build customizado de Modernizr.Modernizr es una librería de Javascript la cual nos ofrece la posibilidad de detectar el soporte que tiene el actual navegador para la especificación de HTML5 y además nos permite crear un estilo css en caso de que la especificación de css3 no funcione. Y para IE permite dar estilo a las nuevas etiquetas de HTML5. En general, con el fin de minimizar el tiempo de carga de la pagina, es mejor llamar a cualquier js al final de la pagina. Pero, dicho esto, el script de Modernizr necesita correr antes que el browser comienze a renderizar la página, por lo que los browsers que carecen de apoyo para algunos de los nuevos elementos de HTML5 sean capaces de manejarlos adecuadamente. Por lo tanto, el script Modernizr es el único js sincrono cargado al comienzo del documento.&lt;/li&gt;

&lt;li&gt;&lt;strong&gt;Google CDN for jQuery:&lt;/strong&gt; La version de Google CDN de la librería de JQuery es referenciada hacia el final de la pagina usando un &lt;a href='https://github.com/h5bp/html5-boilerplate/blob/master/doc/faq.md'&gt;protocolo independiente&lt;/a&gt;.Una refencia a una librería local de JQuery es incluida para los raros casos en que la version de CDN no se encuentre disponible, y para facilitar el desarrollo off-line.&lt;/li&gt;
&lt;/ul&gt;</content>
 </entry>
 
 <entry>
   <title>Training de WPF finalizado</title>
   <link href="http://makingsensers.github.com/2012/11/22/training-de-wpf-finalizado"/>
   <updated>2012-11-22T00:00:00-08:00</updated>
   <id>http://makingsensers.github.com/2012/11/22/training-de-wpf-finalizado</id>
   <content type="html">&lt;p&gt;Gastón Claret terminó sus self-trainings relacionados con WPF (&lt;code&gt;CAP-45&lt;/code&gt; y &lt;code&gt;CAP-48&lt;/code&gt;). Obtuvo conocimientos y conclusiones interesantes, que nos pueden servir a quienes queremos conocer un poco más de esta tecnología. Además, profundizó en algunas características avanzadas de C# y .NET en general.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Código: &lt;a href='https://github.com/MakingSense/st-wpf-tvShows'&gt;st-wpf-tvShows&lt;/a&gt; y &lt;a href='https://github.com/gclaret/WPF-Unleashed'&gt;WPF-Unleashed&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;Documentación: &lt;a href='http://makingsense.github.com/st-wpf-tvShows/'&gt;st-wpf-tvShows&lt;/a&gt;, &lt;a href='http://gclaret.github.com/WPF-Unleashed/'&gt;WPF-Unleashed&lt;/a&gt; e &lt;a href='http://makingsensers.wordpress.com/2012/11/22/intro-to-mvvm/'&gt;intro-to-mvvm&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Algunos temas incluidos:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;XAML &amp;amp; Binding&lt;/li&gt;

&lt;li&gt;ICommand Interface&lt;/li&gt;

&lt;li&gt;MVVM Desing Pattern&lt;/li&gt;

&lt;li&gt;Validaciones en WPF&lt;/li&gt;

&lt;li&gt;Parametrized queries con ADO.NET&lt;/li&gt;

&lt;li&gt;Delegates, Anonymous Methods and Lambda Expressions&lt;/li&gt;

&lt;li&gt;WPF Styles and Control Templates&lt;/li&gt;

&lt;li&gt;Dependency Injection with Unity&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Felicitaciones Gastón!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Encontrá más información sobre el programa de capacitaciones en la Intranet: &lt;code&gt;display/DTRU/Programa+de+Capacitaciones&lt;/code&gt;.&lt;/em&gt;&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Intro to MVVM</title>
   <link href="http://makingsensers.github.com/2012/11/22/intro-to-mvvm"/>
   <updated>2012-11-22T00:00:00-08:00</updated>
   <id>http://makingsensers.github.com/2012/11/22/intro-to-mvvm</id>
   <content type="html">&lt;p&gt;In this post, I want to share a very interesting presentation explaining the Model View ViewModel (MVVM) pattern, and how it can be implemented in WPF. After reading several blogs and web pages about this design pattern, I still couldn’t get my head around how it worked and it’s uses/advantages.&lt;/p&gt;

&lt;p&gt;Then, I stumbled upon a post in which over 30 comments recommended a video on this topic by Jason Dollinger. I immediately decided to look it up, and give it a go. I must say, that hour and a half of presentation was far more productive than all the days I had spent on this topic!&lt;/p&gt;

&lt;p&gt;What’s really good about this video, is that Jason starts out with a simple, yet powerful project example. He explains how to solve the problem in a more “traditional” way, with button clicks handled by event-handlers in the code behind, which then updated other parts of the UI. This is probably the approach that anyone without knowledge of WPF’s binding potential would take.&lt;/p&gt;

&lt;p&gt;Here is where this gets interesting. After a lot of explanation about why this isn´t the way to do this, if you want to take full advantage of WPF, he starts to introduce the MVVM design concept. Using WPF, data binding and Commands, he transformed the application in a more manageable, readable and testable one.&lt;/p&gt;

&lt;p&gt;A lot of other topics are covered in this video, such as Dependency Injection via Unity, Inversion of Control, Unit Testing, Blendability and much more. All of these concepts are really important to learn how to build a decoupled and testable application.&lt;/p&gt;

&lt;p&gt;What’s really important about using this design patter, is that if you are building a robust application, with this separation of concerns, you can be working on all the logic of the code, while a designer is doing the View, totally oblivious of one another. Also, using mock ViewModels (also shown in the video), the designers can create test data to use in Blend, and see how it would look in dynamic data containers, such as GridViews.&lt;/p&gt;

&lt;p&gt;After watching this presentation, I decided to watch it yet again, following the steps in his code, and recreate the application gradually. In this &lt;a href='https://github.com/gclaret/WPF-Unleashed/tree/master/StockSubscriber/WpfApplication1'&gt;GitHub repository&lt;/a&gt;, you can see this implementation. Keep in mind, that this was done in the same step-by-step fashion as the video, so in each commit, a new concept was introduced.&lt;/p&gt;

&lt;p&gt;Also, if you are interested in downloading this video, it can be found &lt;a href='https://www.dropbox.com/s/7v2061ft6u67ikt/Jason_Dolinger_MVVM.wmv'&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Check it out. It is, by far, the best introduction to MVVM and WPF I have found on the web!&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>CSS Tip</title>
   <link href="http://makingsensers.github.com/2012/11/22/csstip"/>
   <updated>2012-11-22T00:00:00-08:00</updated>
   <id>http://makingsensers.github.com/2012/11/22/csstip</id>
   <content type="html">&lt;p&gt;If you find elements that use the same properties and values, group them together by using a comma (,) to separate each selector. This will save you from repetition.&lt;/p&gt;

&lt;p&gt;For example, if you have the following:&lt;/p&gt;
&lt;div class='highlight'&gt;&lt;pre&gt;&lt;code class='css'&gt;&lt;span class='nt'&gt;h1&lt;/span&gt; &lt;span class='p'&gt;{&lt;/span&gt;
    &lt;span class='k'&gt;color&lt;/span&gt;&lt;span class='o'&gt;:&lt;/span&gt;&lt;span class='m'&gt;#000&lt;/span&gt;&lt;span class='p'&gt;;&lt;/span&gt;
&lt;span class='p'&gt;}&lt;/span&gt;
&lt;span class='nt'&gt;h2&lt;/span&gt; &lt;span class='p'&gt;{&lt;/span&gt;
    &lt;span class='k'&gt;color&lt;/span&gt;&lt;span class='o'&gt;:&lt;/span&gt;&lt;span class='m'&gt;#000&lt;/span&gt;&lt;span class='p'&gt;;&lt;/span&gt;
&lt;span class='p'&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Combine them as such:&lt;/p&gt;
&lt;div class='highlight'&gt;&lt;pre&gt;&lt;code class='css'&gt;&lt;span class='nt'&gt;h1&lt;/span&gt;&lt;span class='o'&gt;,&lt;/span&gt; &lt;span class='nt'&gt;h2&lt;/span&gt; &lt;span class='p'&gt;{&lt;/span&gt;
    &lt;span class='k'&gt;color&lt;/span&gt;&lt;span class='o'&gt;:&lt;/span&gt;&lt;span class='m'&gt;#000&lt;/span&gt;&lt;span class='p'&gt;;&lt;/span&gt;
&lt;span class='p'&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</content>
 </entry>
 
 <entry>
   <title>Clean Code Tips (Week 1)</title>
   <link href="http://makingsensers.github.com/2012/11/22/clean-code-tips-week-1"/>
   <updated>2012-11-22T00:00:00-08:00</updated>
   <id>http://makingsensers.github.com/2012/11/22/clean-code-tips-week-1</id>
   <content type="html">&lt;p&gt;Hello MakingSensers! Today I want to share the latest Clean Code Tips from the last week with you.&lt;/p&gt;

&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;The name of a variable, function, or class should answer all the big questions. It should tell you why it exists, what it does, and how it is used. If a name requires a comment, then the name does not reveal its intent.&lt;/li&gt;

&lt;li&gt;Programmers must avoid leaving false clues that obscure the meaning of code. We should avoid words whose entrenched meanings vary from our intended meaning. For example, hp, aix, and sco would be poor variable names. Abbreviations can be disinformative.&lt;/li&gt;

&lt;li&gt;Avoid the “Do”, “Data”, “Work”, “Process”. These spawn strange creatures like “DoWork” “CheckData”, “ProcessEmployee” and other nameless horrors.&lt;/li&gt;

&lt;li&gt;Noise words are redundant. The word variable should never appear in a variable name. The word table should never appear in a table name. How is NameString better than Name? Would a Name ever be a floating point number?&lt;/li&gt;

&lt;li&gt;Classes and objects should have noun or noun phrase names like Customer, WikiPage,Account, and AddressParser. Methods should have verb or verb phrase names like postPayment, deletePage, or save.&lt;/li&gt;

&lt;li&gt;Pick one word for one abstract concept and stick with it. For instance, it’s confusing to have “fetch”, “retrieve”,and “get” as equivalent methods of different classes.&lt;/li&gt;

&lt;li&gt;People who read your code will be programmers. So, its a good idea to use computer science terms, algorithm names, pattern names, math terms, and so forth.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;p&gt;Special thanks to JD Raimondi, who added some new Clean Code ideas. Everybody is invited to share more tips. All tips have been taken from Robert Martin’s Clean Code book&lt;/p&gt;

&lt;p&gt;Stay tuned for the next week.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Agregar epígrafes de manera semántica con HTML5</title>
   <link href="http://makingsensers.github.com/2012/11/22/agregar-epigrafes-de-manera-semantica-con-html5"/>
   <updated>2012-11-22T00:00:00-08:00</updated>
   <id>http://makingsensers.github.com/2012/11/22/agregar-epigrafes-de-manera-semantica-con-html5</id>
   <content type="html">&lt;p&gt;Actualmente cuando queremos ponerle el epigrafe al pie una imagen (caption) haríamos algo así&lt;/p&gt;
&lt;div class='highlight'&gt;&lt;pre&gt;&lt;code class='html'&gt;&lt;span class='nt'&gt;&amp;lt;img&lt;/span&gt; &lt;span class='na'&gt;src=&lt;/span&gt;&lt;span class='s'&gt;&amp;quot;path/a-la/imagen&amp;quot;&lt;/span&gt; &lt;span class='na'&gt;alt=&lt;/span&gt;&lt;span class='s'&gt;&amp;quot;Acerca de la imagen&amp;quot;&lt;/span&gt; &lt;span class='nt'&gt;/&amp;gt;&lt;/span&gt; 
&lt;span class='nt'&gt;&amp;lt;p&amp;gt;&lt;/span&gt;Breve descripción de lo que hay en la imagen&lt;span class='nt'&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
Esta forma de hacerlo no dejaba asociado de manera semántica la imagen a su epígrafe.
Pero hoy con HTML5 y los elementos figure y figcaption se puede hacer de la siguiente manera.
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class='highlight'&gt;&lt;pre&gt;&lt;code class='html'&gt;&lt;span class='nt'&gt;&amp;lt;figure&amp;gt;&lt;/span&gt; 
   &lt;span class='nt'&gt;&amp;lt;img&lt;/span&gt; &lt;span class='na'&gt;src=&lt;/span&gt;&lt;span class='s'&gt;&amp;quot;path/to/image&amp;quot;&lt;/span&gt; &lt;span class='na'&gt;alt=&lt;/span&gt;&lt;span class='s'&gt;&amp;quot;About image&amp;quot;&lt;/span&gt; &lt;span class='nt'&gt;/&amp;gt;&lt;/span&gt; 
   &lt;span class='nt'&gt;&amp;lt;figcaption&amp;gt;&lt;/span&gt; 
      &lt;span class='nt'&gt;&amp;lt;p&amp;gt;&lt;/span&gt;This is an image of something interesting. &lt;span class='nt'&gt;&amp;lt;/p&amp;gt;&lt;/span&gt; 
   &lt;span class='nt'&gt;&amp;lt;/figcaption&amp;gt;&lt;/span&gt; 
&lt;span class='nt'&gt;&amp;lt;/figure&amp;gt;&lt;/span&gt; 
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Para ver el soporte que tiene en los navegadores podés checkearlo &lt;a href='http://caniuse.com/#search=figurea'&gt;http://caniuse.com/#search=figurea&lt;/a&gt;&lt;/p&gt;</content>
 </entry>
 
 
</feed>