<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Orlando Del Aguila on Medium]]></title>
        <description><![CDATA[Stories by Orlando Del Aguila on Medium]]></description>
        <link>https://medium.com/@odelaguila?source=rss-7ee1ef7b14b3------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*k8h7jL68GJ0NZsKbHNKceg.jpeg</url>
            <title>Stories by Orlando Del Aguila on Medium</title>
            <link>https://medium.com/@odelaguila?source=rss-7ee1ef7b14b3------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 16:38:10 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@odelaguila/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[The Mozilla Fellowship and How it Changed the Way I Do Code]]></title>
            <link>https://medium.com/read-write-participate/the-mozilla-fellowship-and-how-it-changed-the-way-i-do-code-4154b075492e?source=rss-7ee1ef7b14b3------2</link>
            <guid isPermaLink="false">https://medium.com/p/4154b075492e</guid>
            <category><![CDATA[tech-for-good]]></category>
            <category><![CDATA[mozilla]]></category>
            <category><![CDATA[nonprofit]]></category>
            <dc:creator><![CDATA[Orlando Del Aguila]]></dc:creator>
            <pubDate>Mon, 20 Aug 2018 19:58:49 GMT</pubDate>
            <atom:updated>2018-09-20T16:39:11.645Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/778/1*Lm-6AHGFLh6G-ZRaq5cY-g.png" /><figcaption>Ravensbourne, Mozfest 2017 venue</figcaption></figure><p>The <a href="https://foundation.mozilla.org/fellowships/">Mozilla Fellowship</a> was one of the best experiences I ever had, focusing on problems that have a direct impact on people’s lives feels way different than making software that only cares about revenue.</p><p>For my fellowship, my host organization was <a href="http://majal.org/">Majal</a>. Majal is a non-profit based in the Middle East solving issues in the digital inclusion space, they create safe communities where people at risk can share and connect with others. I worked on building a new version of <a href="http://ahwaa.org/">Ahwaa</a>, with the goal of providing a better user experience and growing the community.</p><p>Ahwaa is an anonymous platform with a big community, it has more than 25,.000 messages and 9,000 members. The design feels dated and patrons were looking for alternatives in social networks like Facebook or dating apps like Tinder, which are not the best solutions given these are not designed for privacy, and given the situation of LGBT in the Middle East, this can be a life-threatening issue.</p><p>For the new version, we based our work in an open source discussion platform called <a href="https://discourse.org/">Discourse</a>, Discourse provided most of the featured we needed and could be customized through plugins, which makes it really powerful. We create a set of plugins and extensions that turned Discourse into what we wanted for Ahwaa. Here are the repositories we used so you can see how we did it.</p><ul><li><a href="https://gitlab.com/majalorg/discourse-ahwaa">https://gitlab.com/majalorg/discourse-ahwa</a>a</li><li><a href="https://gitlab.com/majalorg/discourse-available-locales">https://gitlab.com/majalorg/discourse-available-locales</a></li><li><a href="https://gitlab.com/majalorg/discourse-ahwaa-chat">https://gitlab.com/majalorg/discourse-ahwaa-chat</a></li><li><a href="https://gitlab.com/majalorg/ahwaa-terraform">https://gitlab.com/majalorg/ahwaa-terraform</a></li></ul><p>Here is how the old version looked compared to the new one.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/944/1*pbeBEFVVJ4ENRaBs9aWBnw.png" /><figcaption>Old</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gsybDu0rreov3LR-lBDHaw.png" /><figcaption>New</figcaption></figure><p>We are finalizing the last details to switch to the new version, but we don’t want to rush and would prefer to make sure everything is in place before going live.</p><p>The fellowship, besides giving me the opportunity to work on a tool that I care about, gave me tools and network to boost my work’s impact, while inspiring me to contribute back to Venezuela, the country that gave me everything to be what I am today. Venezuela is going through a rough time now, and all the help we can provide is welcomed.</p><p>Now that the fellowship has ended, I want to contribute to projects that are in the non-profit space. I’m working with the <a href="https://debtcollective.org/">Debt Collective</a>, we are building tools and a community to organize people and fight predatory debt.</p><p>I was hesitant to apply for the fellowship because I felt I didn’t have the background to do it, but after all, I’m glad that I did. The fellowship has changed how I see Software Engineering and I’m sure it will change your view too.</p><p>Feel free to reach out if you have questions about the fellowship or my experience via twitter or in the comments. My twitter is <a href="https://twitter.com/eatcodetravel">@eatcodetravel</a>, I’m more than happy to help you in your path to become an internet citizen.</p><p>Thanks ❤</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4154b075492e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/read-write-participate/the-mozilla-fellowship-and-how-it-changed-the-way-i-do-code-4154b075492e">The Mozilla Fellowship and How it Changed the Way I Do Code</a> was originally published in <a href="https://medium.com/read-write-participate">Read, Write, Participate</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Using Exception Context in Sentry with Rails]]></title>
            <link>https://medium.com/hash-labs/using-exception-context-in-sentry-with-rails-3dd5776c8b4e?source=rss-7ee1ef7b14b3------2</link>
            <guid isPermaLink="false">https://medium.com/p/3dd5776c8b4e</guid>
            <category><![CDATA[ruby]]></category>
            <category><![CDATA[sentry]]></category>
            <category><![CDATA[development]]></category>
            <category><![CDATA[error-handling]]></category>
            <category><![CDATA[ruby-on-rails]]></category>
            <dc:creator><![CDATA[Orlando Del Aguila]]></dc:creator>
            <pubDate>Fri, 12 May 2017 19:32:01 GMT</pubDate>
            <atom:updated>2017-05-14T19:39:16.312Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P3EgldBQblb4AJuO7v3vPA@2x.png" /></figure><p>The <a href="https://github.com/getsentry/raven-ruby"><strong>sentry_raven</strong></a> gem, used with Rails to report errors to <a href="https://sentry.io/">Sentry</a> has a great hidden functionality that is not in their documentation. This feature allows us to provide custom context to any Ruby Exception, and this information is later available in the Sentry application.</p><p>To use this feature you just have to define a <a href="https://github.com/hashlabs/sentry-rails-example/blob/master/lib/exceptions/exceptions.rb#L8-L10">raven_context</a> method in your exception; this method needs to return a Hash object. The <a href="https://github.com/getsentry/raven-ruby"><strong>sentry_raven</strong></a> gem will check if this method is present and then merge the return value with their internal context before sending the error to Sentry’s servers.</p><h3>Sentry Setup</h3><p>Setting up Sentry with Rails is pretty straight forward, just add the sentry_raven gem to your Gemfile and run bundle install.</p><p>Sentry looks for the SENTRY_DSN environment variable to be set, if this is the case then it will send all the exceptions it captures to that URL.</p><h3>Custom Exceptions with Context</h3><p>Here’s an example of how a custom exception with raven_context defined looks like.</p><pre># lib/exceptions/exceptions.rb</pre><pre>// Namespace errors inside the Exceptions module<br>module Exceptions<br>  // Define a base error<br>  class MyAppError &lt; StandardError<br>    def initialize(message, context={})<br>      super(message)<br>      <a href="http://twitter.com/context">@context</a> = context<br>    end</pre><pre>    def raven_context<br>      <a href="http://twitter.com/context">@context</a><br>    end<br>  end</pre><pre>  // Create more specific errors<br>  class SpecificError &lt; MyAppError<br>    def initialize(context={})<br>      super(&#39;Message for SpecificError&#39;, context)<br>    end<br>  end<br>end</pre><p>You can encapsulate the logic of raven_context as you wish, the only requirement is that it should return a Hash.</p><p>Here’s how you can trigger the error providing a custom context.</p><pre>raise Exceptions::SpecificError.new({<br>  extra: {<br>    date: DateTime.now,<br>    another_important_key: 4<br>  }<br>})</pre><p>This will set date and another_important_key as members of the <strong>Extra</strong> context in Sentry.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/861/1*4ECkC4fQKNtK7FQruThHUw.png" /></figure><p>You can use any of the different contexts Sentry provides, check out this <a href="https://docs.sentry.io/clients/ruby/context/">link to their documentation</a> for more information.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/237/1*MsqDgA6nIGoDi5tLoD_vWg.gif" /></figure><p>And that’s it!. You can check out our example application at <a href="https://github.com/hashlabs/sentry-rails-example">https://github.com/hashlabs/sentry-rails-example</a> and if you have any questions just leave it in the comments.</p><p><strong>If you learned something, click the 💚 to help others find this article.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3dd5776c8b4e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/hash-labs/using-exception-context-in-sentry-with-rails-3dd5776c8b4e">Using Exception Context in Sentry with Rails</a> was originally published in <a href="https://medium.com/hash-labs">Hash Labs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cambiando el color de un PDF — Para cuando no tienes tinta negra]]></title>
            <link>https://medium.com/eat-code-travel/cambiando-el-color-de-un-pdf-para-cuando-no-tienes-tinta-negra-156102ef9bb4?source=rss-7ee1ef7b14b3------2</link>
            <guid isPermaLink="false">https://medium.com/p/156102ef9bb4</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[printing]]></category>
            <dc:creator><![CDATA[Orlando Del Aguila]]></dc:creator>
            <pubDate>Mon, 21 Nov 2016 19:49:14 GMT</pubDate>
            <atom:updated>2016-11-21T19:54:24.905Z</atom:updated>
            <content:encoded><![CDATA[<h3>Cambiando el color de un PDF — Para cuando no tienes tinta negra</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ViTJzlva0RN2ZJm2USXrUQ.jpeg" /><figcaption>Nusa Lembongan. Bali, Indonesia</figcaption></figure><p>El otro día necesitaba imprimir un pasa de abordar, y mi impresora no tenia tinta negra, pero si tenia tinta azul. Este es un problema común, así que probablemente les sirva de algo luego.</p><p>Primero necesitan <strong>ImageMagick</strong> y <strong>Ghostscript</strong>. Asumo que su pase de abordar es un PDF (o pueden generar uno).</p><p><strong>Se debe instalar Ghostscript antes que ImageMagick.</strong></p><ol><li>Instalar Ghostscript -brew install ghostscript</li><li>Instalar ImageMagick -brew install imagemagick</li><li>Correr el siguiente commando. Donde input.pdf es el nombre de tu PDF original y output.pdf es el nombre del nuevo PDF azul</li></ol><pre>convert -density 300 input.pdf -fill blue -opaque black output.pdf</pre><p>Y listo, ya puedes imprimir tu documento usando tinta azul.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=156102ef9bb4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/eat-code-travel/cambiando-el-color-de-un-pdf-para-cuando-no-tienes-tinta-negra-156102ef9bb4">Cambiando el color de un PDF — Para cuando no tienes tinta negra</a> was originally published in <a href="https://medium.com/eat-code-travel">Eat Code Travel</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Reducir el tiempo de save en Vim usando Golang]]></title>
            <link>https://medium.com/eat-code-travel/reducir-el-tiempo-de-save-en-vim-usando-golang-16476a47e0d7?source=rss-7ee1ef7b14b3------2</link>
            <guid isPermaLink="false">https://medium.com/p/16476a47e0d7</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[golang]]></category>
            <category><![CDATA[developer]]></category>
            <category><![CDATA[vim]]></category>
            <dc:creator><![CDATA[Orlando Del Aguila]]></dc:creator>
            <pubDate>Fri, 26 Aug 2016 23:27:00 GMT</pubDate>
            <atom:updated>2016-08-27T00:00:26.125Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*22QjA-qzASiNppPkBNX25A.jpeg" /><figcaption>Cafe Understellet. Nørrebro, Copenhagen.</figcaption></figure><p>Mi environment de Vim ya se estaba volviendo un pain para usar, especialmente cuando programo en Go. Me encantan los tools que tiene go para el formating de la sintaxis de tu código (<strong>goimport</strong> y <strong>gofmt)</strong>, pero esto estaba tardando alrededor de 2 segundos en correr cada vez que guardaba, lo cual, dejaba Vim inutilizable por ese periodo de tiempo.</p><p>El problema resulto ser <a href="https://github.com/scrooloose/syntastic">Syntastic</a> cuando se usa en conjunto con <a href="https://github.com/fatih/vim-go">vim-go</a>. La manera de solucionarlo es agregando lo siguiente a tu archivo <strong>.vimrc</strong>.</p><pre>&quot; vim-go<br>let g:go_fmt_command = &quot;goimports&quot;</pre><pre>&quot; syntastic<br>let g:syntastic_mode_map = { ‘mode’: ‘active’, ‘passive_filetypes’: [‘go’] }</pre><p>Eso va a hacer el check de Syntastic pasivo, por lo cual no va a correr luego de cada save, pero sigue funcionando el check de vim-go, así que no pierdes el chequeo de <strong>goimports</strong>.</p><p>Siempre puedes correr Syntastic con el comando <strong>:SyntasticCheck</strong>.</p><p>Luego de hacer estos cambios, ya no se nota para nada el tiempo que <strong>goimports </strong>toma en correr, y ya vuelvo a ser un developer feliz otra vez.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=16476a47e0d7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/eat-code-travel/reducir-el-tiempo-de-save-en-vim-usando-golang-16476a47e0d7">Reducir el tiempo de save en Vim usando Golang</a> was originally published in <a href="https://medium.com/eat-code-travel">Eat Code Travel</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Continuous Integration Server por 5 USD/mes con Drone CI y Docker]]></title>
            <link>https://medium.com/eat-code-travel/continuous-integration-server-por-5-usd-mes-con-drone-ci-y-docker-539fdea76e60?source=rss-7ee1ef7b14b3------2</link>
            <guid isPermaLink="false">https://medium.com/p/539fdea76e60</guid>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[continous-integration]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[spanish]]></category>
            <dc:creator><![CDATA[Orlando Del Aguila]]></dc:creator>
            <pubDate>Mon, 11 Jul 2016 17:31:33 GMT</pubDate>
            <atom:updated>2016-07-11T17:33:43.956Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k6Sm3P9FDFN1RXhBvyRX1A.png" /></figure><p>En este video explico como pueden configurar un servidor de integración continua usando <a href="http://readme.drone.io/">Drone CI</a> y <a href="https://www.docker.com/">Docker</a>.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FPDM7HZtq64c%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DPDM7HZtq64c&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FPDM7HZtq64c%2Fhqdefault.jpg&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/c91e450a91883b711ecee9d896ed8b59/href">https://medium.com/media/c91e450a91883b711ecee9d896ed8b59/href</a></iframe><h4>Recursos</h4><ul><li>El cupón de Digital Ocean que pueden usar es <strong>DROPLET10. </strong>Con este cupón van a tener 10 USD, suficiente para correr el server por 2 meses. Este cupón solo aplica para cuentas nuevas.</li><li>Para la memoria swap, sigan estos pasos.</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/67d033f74c71673ac6170b924024543c/href">https://medium.com/media/67d033f74c71673ac6170b924024543c/href</a></iframe><ul><li>Este es un<strong> .drone.yml </strong>de ejemplo</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5a31206f1b7fe224aa284c83d5fcc21e/href">https://medium.com/media/5a31206f1b7fe224aa284c83d5fcc21e/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=539fdea76e60" width="1" height="1" alt=""><hr><p><a href="https://medium.com/eat-code-travel/continuous-integration-server-por-5-usd-mes-con-drone-ci-y-docker-539fdea76e60">Continuous Integration Server por 5 USD/mes con Drone CI y Docker</a> was originally published in <a href="https://medium.com/eat-code-travel">Eat Code Travel</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[About Orlando Del Aguila]]></title>
            <link>https://medium.com/eat-code-travel/about-orlando-del-aguila-b36216012ad6?source=rss-7ee1ef7b14b3------2</link>
            <guid isPermaLink="false">https://medium.com/p/b36216012ad6</guid>
            <category><![CDATA[about-me]]></category>
            <dc:creator><![CDATA[Orlando Del Aguila]]></dc:creator>
            <pubDate>Sun, 10 Jul 2016 19:34:08 GMT</pubDate>
            <atom:updated>2016-07-11T06:15:43.127Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XJ21ws5Strly9kUSfg1AXg.jpeg" /><figcaption>Via degli Avelli. Florence, Italy.</figcaption></figure><p>Hey!</p><p>Glad to have you around. <strong>Eat, code travel </strong>is where I share stuff about these three topics, but mostly about Software Development. I started this trying to escape the traditional technology blog. My hypothesis is when you limit yourself to only write about technology, you run out of content quickly. That happened to me, that’s why I’m trying to make this a more relaxed publication.</p><p>Also, I’ll be writing more in Spanish. There’s already a lot of content in English you can find online related to Software Development, but not everyone can read technical English. If I can help a non English speaker solving a problem, then I would be happy.</p><p>Here are some fact about myself:</p><ul><li>I’m living in beautiful Guadalajara, Mexico, with my wife and my cat.</li><li>Some of my hobbies are <em>Wines, Traveling, Photography, Cooking arepas and Longboarding. </em>I’m currently trying to learn kitesurf, I took some clases while I was in Bali, but it’s still a work in progress.</li><li>I’ve visited 18/196 countries. Countries from America, Europe and Asia.</li><li>I eat Taquiquesos at <a href="https://goo.gl/maps/aBKJ3YS2W3U2">Tacos el Güero</a> at least once a month.</li><li>I run with other two friends the <a href="http://www.meetup.com/Guadalajara-JS/">JavaScript developer group in Guadalajara</a>. We have a monthly meeting where we talk about web development in general.</li></ul><p>Professionally speaking, Here’s a list of facts about myself:</p><ul><li>I have been doing software development for 6 years now.</li><li>I know my way around the Full-stack, including infrastructure.</li><li>I know about design, but I’m not a designer. I believe that every developer should know about design (UI/UX). Developer input in design decisions is a must for every product.</li><li>I have experience managing teams, and working directly with Product owners on the design and planing of software products.</li><li>I have experience working with JavaScript, Ruby and Golang. Including tools like Reactjs, Redux, Node.js, Ruby on Rails, etc.</li><li>I have worked with React Native to build cross platform mobile applications. Also, I’ve played around with Electron.</li><li>I know about Infrastructure, for example using Docker with providers like AWS and Digital Ocean for the deployment of applications.</li><li>I’m a big fan of <a href="https://www.heroku.com/">Heroku</a>. If the application I’m working on can be deployed there, it’s my first choice due it’s simplicity.</li></ul><p>Lastly, you can find more about me in the links below:</p><ul><li>My personal website is <a href="http://orlando.delagui.la/">orlando.delagui.la</a>.</li><li>My Instagram account is <a href="http://instagram.com/eatcodetravel">eatcodetravel</a>.</li><li>My Github account is <a href="http://github.com/orlando">orlando</a>.</li><li>My Twitter account is <a href="http://twitter.com/eatcodetravel">eatcodetravel</a>.</li><li>My Linkedin account is <a href="https://www.linkedin.com/in/orlandodelaguila">orlandodelaguila</a>.</li><li>Here’s my <a href="http://careers.stackoverflow.com/orlando">Stackoverflow profile</a>.</li><li>I love to give tech talks, and I post all of them at my <a href="http://speakerdeck.com/orlando">SpeakerDeck profile</a></li></ul><p>If you have something to tell me, a question or a suggestion, just send me an email to <a href="/service/mailto:orlando@orlandodelaguila.com">orlando@orlandodelaguila.com</a>.</p><p>Thanks for reading!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b36216012ad6" width="1" height="1" alt=""><hr><p><a href="https://medium.com/eat-code-travel/about-orlando-del-aguila-b36216012ad6">About Orlando Del Aguila</a> was originally published in <a href="https://medium.com/eat-code-travel">Eat Code Travel</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Go testing patterns]]></title>
            <link>https://medium.com/eat-code-travel/go-testing-patterns-811e1d0223a4?source=rss-7ee1ef7b14b3------2</link>
            <guid isPermaLink="false">https://medium.com/p/811e1d0223a4</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[testing]]></category>
            <category><![CDATA[golang]]></category>
            <dc:creator><![CDATA[Orlando Del Aguila]]></dc:creator>
            <pubDate>Sat, 09 Apr 2016 11:50:36 GMT</pubDate>
            <atom:updated>2016-07-10T21:17:30.208Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vWABpepXQPx_EVPviw5z6Q.jpeg" /><figcaption><em>Somewhere inside the Moderna Museet. Stockholm, Sweden.</em></figcaption></figure><p>I saw this <a href="https://www.youtube.com/watch?v=yszygk1cpEc">video</a> about testing in go. The speaker on the video is Mitchell Hashimoto, founder of <a href="https://www.hashicorp.com/">HashiCorp</a>, the creators of vagrant and other really cool tools.</p><p>Some of the techniques discussed in the video are really cool, and I’ll talk about them in a bit.</p><h4>Table driven tests</h4><p>Table driven test cases is a cool thing that I used a few times when testing ruby code. You have a hashmap that contains the descriptions of the test cases and the test cases itself. Test cases can be a struct or another map that has input and expected output.</p><p>I’m using <a href="https://github.com/smartystreets/goconvey">GoConvey</a> to test go code. I like the BDD syntax, which is a lot more expressive than the TDD one. Here’s how you can make a table driven test in GoConvey.</p><pre>var cases = []struct{<br>  description ...<br>  input ...<br>  expected ...<br>} {<br>  // test case instances<br>}</pre><pre>Convey(&quot;Explain what&#39;g going on...&quot;, t, func() {<br>  // initial setup<br>  for _, test := range cases {<br>    // test case setup<br>    Convey(&quot;Something about: &quot; + test.description, func() {<br>      // invoke action being tested with inputs from test case (x.input)<br>      So(...) // compare results against expected result (x.expected)<br>    })<br>  }<br>})</pre><pre>Test fixtures</pre><pre>Test fixtures are thing you will use in your tests, can be dependencies, binaries, data, mock requests etc.</pre><pre>When you run go test , pwd will be set to package directory. This allows you to use relative paths for your test fixtures.</pre><pre>Convey(&quot;Test with fixtures&quot;, t, func() {<br>  data := filepath.Join(&quot;test-fixtures&quot;, &quot;my_cool_fixture.json&quot;)<br>  // do something with data<br>})</pre><pre>The standard HashiCorp follows is having a folder called <strong>text-fixtures, </strong>that contains.. well.. test fixtures. I like that approach and you can see the same folder name in the example code.</pre><h4>Golden files</h4><p>Golden files are useful when you have complex structures you don’t want to write inline in your tests. You can move this complex structure to assert to a golden file, load it in your tests and then compare to the actual result.</p><p>This is a pretty cool approach, that way you can modify the input of a test without touching your test file.</p><h4>Test Helpers</h4><p>Test helpers is something that you need to create to keep your test lean. Nobody wants to read 20 lines of setup just to get to the real 3 lines meet of the test.</p><p>This is basic, but the cool thing they mention is that instead of raising panic from for tests or returning errors. Inject the testing.T object into your helpers and make your test fail if the helper errors out.</p><p>Other cool thing is, when a helper needs to do a clean up, for example you are creating a temp file. They return as a second parameter a func() that does the clean up, so you can defer the call of this function in your main method and clean up your tests easily.</p><h4>Network</h4><p>When testing network, they recommend to set a real network connection. This sounds good, but I think I’ll do it only for local connections. When dealing with external services/connections I don’t think it’s a good approach. For third party network connections, a test fixture of the response should be enough. I’ve been using <a href="https://github.com/jarcoal/httpmock">https://github.com/jarcoal/httpmock</a> with great success.</p><h4>Interfaces</h4><p>Interfaces are mocking points. You can use to insert test doubles.</p><p>They mention a cool technique to test functionality using interfaces. The example the give is the following one</p><p>TestDownloader(t, Downloader) =&gt; Test all the properties a downloader should have</p><p>struct DownloaderMock{} =&gt; Implements Downloader as a mock. <br>Allowing recording and replaying of calls.<br>You can see that they accept a Downloader interface in the TestDownloader test. This way you can pass a mock or the real thing that complies with the interface. This is something I’ll start doing where’s needed</p><h4>Parallelism</h4><p>Go has t.Parallel() , which will allow a test to run in parallel with others. They recommend not doing that, because you will end testing that you code works, and your code works in parallel. Also when your test fails, you don’t know if it’s failing because of running tests in parallel or because it’s because your code.</p><p>They recommend instead running multiple processes to run your tests (if you want them to run faster)</p><h4>Closing</h4><p>These are patterns that I’ll be integrating to my workflow from now on. I like my tests to be as clean and expressive as my code, so learning to write better tests is something that pays off in no time.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=811e1d0223a4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/eat-code-travel/go-testing-patterns-811e1d0223a4">Go testing patterns</a> was originally published in <a href="https://medium.com/eat-code-travel">Eat Code Travel</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Github Issues and Pull request Templates]]></title>
            <link>https://medium.com/eat-code-travel/github-issues-and-pull-request-templates-d56faa207d10?source=rss-7ee1ef7b14b3------2</link>
            <guid isPermaLink="false">https://medium.com/p/d56faa207d10</guid>
            <category><![CDATA[github]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Orlando Del Aguila]]></dc:creator>
            <pubDate>Tue, 08 Mar 2016 14:56:52 GMT</pubDate>
            <atom:updated>2016-07-10T17:22:32.241Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bRJ4Ew7VsBVr_uV64hR7Iw.jpeg" /><figcaption><em>Somewhere around Möllevången. Malmö, Sweden.</em></figcaption></figure><p>Github released a month ago a feature that was requested a lot by open source projects maintainers, <a href="https://github.com/blog/2111-issue-and-pull-request-templates">Issues and Pull request templates</a>. The approach they took is really simple, and the benefits are far more standardized and easier to triage issues.</p><p>This feature was released in the middle of a shitstorm that caught Github, starting with a <a href="https://twitter.com/slicknet/status/697801051966058496?lang=es">tweet</a> from <a href="https://twitter.com/slicknet">Nicholas Zakas</a> where he stated he was considering to move ESLint out of Github due <em>the lack of support for large projects.</em> After this was posted, the <a href="https://github.com/eslint/eslint/issues/5205">ESLint’s Github issue</a> got a lot of traction and later on <a href="https://github.com/bkeepers">Brandon Keepers</a> responded with a <a href="https://github.com/dear-github/dear-github/pull/115">sorry letter</a> to open source maintainers know that they will be working on featured around issues and pull request, to make the process more streamlined.</p><p>I’m using this approach to handle talk proposals in <a href="http://www.gdljs.com/">GDLJS</a>, a meet up I run with other two friends, just drop a <a href="https://github.com/gdljs/gdljs/blob/master/ISSUE_TEMPLATE.md"><strong>ISSUES_TEMPLATE.md</strong></a><strong> </strong>file in the root of your project and you are set.</p><p>Start using this feature today, I’m pretty sure it will help your private and open source projects to be more organized.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d56faa207d10" width="1" height="1" alt=""><hr><p><a href="https://medium.com/eat-code-travel/github-issues-and-pull-request-templates-d56faa207d10">Github Issues and Pull request Templates</a> was originally published in <a href="https://medium.com/eat-code-travel">Eat Code Travel</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Practicing your craft]]></title>
            <link>https://medium.com/eat-code-travel/practicing-your-craft-a1e4c5e3770a?source=rss-7ee1ef7b14b3------2</link>
            <guid isPermaLink="false">https://medium.com/p/a1e4c5e3770a</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[craft]]></category>
            <dc:creator><![CDATA[Orlando Del Aguila]]></dc:creator>
            <pubDate>Fri, 19 Feb 2016 20:01:44 GMT</pubDate>
            <atom:updated>2016-07-10T17:22:46.782Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YgJah_JPn6WazRegXlaYMA.jpeg" /><figcaption><em>Somewhere around Södra Sofielund. Malmö, Sweden.</em></figcaption></figure><p>I’m a developer. I love to code, and in my free time I code for fun (and for profit).</p><p>Today I was talking with <a href="https://twitter.com/duranmla">Alexis</a> about coding for fun and practicing each day, so we went and start looking for options where to do some code challenges online. I found three options that were really good</p><ul><li><a href="http://www.hackerrank.com/">HackerRank</a></li><li><a href="http://www.codewars.com/">Codewars</a></li><li><a href="https://codility.com/programmers/">Codility</a></li></ul><p>We started doing some challenges in HackerRank, the idea is to practice the programming craft and learn from each other. We are going to start making these challenges on Friday (at least two each Friday, just to have fun and learn from each other)</p><p>To master something you need to practice, and practice a lot. So dedicate some time to learn and think how to solve problems. This will help you to get better at what you do. Also, having a partner to review and discuss each others implementation will help you to learn even faster.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a1e4c5e3770a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/eat-code-travel/practicing-your-craft-a1e4c5e3770a">Practicing your craft</a> was originally published in <a href="https://medium.com/eat-code-travel">Eat Code Travel</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Morning Rituals]]></title>
            <link>https://medium.com/eat-code-travel/morning-rituals-f870b0919ae6?source=rss-7ee1ef7b14b3------2</link>
            <guid isPermaLink="false">https://medium.com/p/f870b0919ae6</guid>
            <category><![CDATA[thoughts]]></category>
            <dc:creator><![CDATA[Orlando Del Aguila]]></dc:creator>
            <pubDate>Mon, 08 Feb 2016 15:12:40 GMT</pubDate>
            <atom:updated>2016-07-10T17:22:57.480Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qw4kee65-7GmJmne30j4Xw.jpeg" /><figcaption><em>Michelangelo’s David at the Gallery of the Academy. Florence, Italy.</em></figcaption></figure><p>The other day, I saw a tweet from <a href="https://twitter.com/mattangriffel/status/598579233842139136">Mattan Griffel</a> talking about morning rituals. This is a concept that I had in mind a while ago, but never implemented it.</p><p>After a google search for <strong>morning rituals</strong>, I found <a href="http://mymorningroutine.com/">mymorningroutine.com</a>. They have some pretty cool interviews with people describing their morning rituals (including <a href="http://mymorningroutine.com/mattan-griffel/">Mattan Griffel</a>). I checkout some of these and grabbed some ideas to build my own.</p><p>Right now I’m doing crossfit from Monday to Friday. But I need to integrate other activities like reading, meditating and writing.</p><p>From today I’ll formalize my morning rutine and it will go like this (I’m not including breakfast and morning gromming because I’ll do that after I finish the routine)</p><ol><li>Crossfit (1 hour)</li><li>Listen an audio book (the time it takes to walk from the gym to my house)</li><li>Meditation (15 min, using <a href="https://www.headspace.com/">Headspace</a> app)</li><li>Reading (around 30 min, dead tree book)</li></ol><p>So that should take me around two hours, plus one hour for breakfast and grooming.</p><p>Another thing I wanted to do is to document my dreams. The goal is to have lucid dreams.</p><p>Writing about your dreams is the first tip you find around the web. You have to write as soon as you wake up. This is to resemble your dreams later on, which will make you lucid when dreaming.</p><p>I’ll put a notebook nearby my bed to write about my dreams, and if I see some interesting things happening, I’ll blog about it.</p><p>Do you have a morning ritual?. If that’s the case, leave your thoughts in the comments.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f870b0919ae6" width="1" height="1" alt=""><hr><p><a href="https://medium.com/eat-code-travel/morning-rituals-f870b0919ae6">Morning Rituals</a> was originally published in <a href="https://medium.com/eat-code-travel">Eat Code Travel</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>