<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Programming on Leif Thoughts</title>
    <link>https://leif.io/categories/programming/</link>
    <description>Recent content in Programming on Leif Thoughts</description>
    <generator>Hugo</generator>
    <language>en</language>
    <copyright>Leif Gensert</copyright>
    <lastBuildDate>Sat, 27 May 2023 16:24:29 -0700</lastBuildDate>
    <atom:link href="https://leif.io/categories/programming/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Play Wordle for a Different Day</title>
      <link>https://leif.io/blog/2022/01/12/play-wordle-for-a-different-day/</link>
      <pubDate>Wed, 12 Jan 2022 17:55:24 -0800</pubDate>
      <guid>https://leif.io/blog/2022/01/12/play-wordle-for-a-different-day/</guid>
      <description>&lt;p&gt;&lt;strong&gt;UPDATE 13 January 2022:&lt;/strong&gt; A previous version of the article did not include Google Chrome&amp;rsquo;s Override instructions.&lt;/p&gt;&#xA;&lt;p&gt;One element of writing my last &#xA;      &#xA;    &lt;a href=&#34;https://leif.io/blog/2022/01/09/building-a-wordle-solver-with-regex-and-elixir/&#34;&gt;wordle article&lt;/a&gt; was creating screenshots to illustrate the solving algorithm. But I didn&amp;rsquo;t want to use the word of that day (which was &amp;ldquo;gorge&amp;rdquo;), I wanted to use a specific word (&amp;ldquo;tiger&amp;rdquo; fom Jan 5).&lt;/p&gt;&#xA;&lt;p&gt;This is where my digging into the workings behind wordle started. I was curious how the word of the day is chosen. I noticed that the new word is always available at midnight of &amp;ldquo;your&amp;rdquo; timezone so I suspected that all of the logic is implemented in the frontend (no secrets that are fetched from a server).&lt;/p&gt;</description>
    </item>
    <item>
      <title>Building a Wordle Solver With Regular Expressions and Elixir</title>
      <link>https://leif.io/blog/2022/01/09/building-a-wordle-solver-with-regex-and-elixir/</link>
      <pubDate>Sun, 09 Jan 2022 16:46:21 -0800</pubDate>
      <guid>https://leif.io/blog/2022/01/09/building-a-wordle-solver-with-regex-and-elixir/</guid>
      <description>&lt;p&gt;This is one of these articles that is predestined to start with &amp;ldquo;unless you&amp;rsquo;ve been living under a rock, you have heard of &amp;hellip;&amp;rdquo;. Unfortunately I don&amp;rsquo;t know how popular the thing I&amp;rsquo;m gonna write about is outside my bubble but here we go.&lt;/p&gt;&#xA;&lt;p&gt;Among my group of friends and colleagues the online game &lt;a href=&#34;https://www.powerlanguage.co.uk/wordle/&#34; target=&#34;_blank&#34; rel=&#34;noreferrer&#34;&gt;wordle&lt;/a&gt; has been hugely popular. It&amp;rsquo;s a mix of &lt;a href=&#34;https://en.wikipedia.org/wiki/Scrabble&#34; target=&#34;_blank&#34; rel=&#34;noreferrer&#34;&gt;Scrabble&lt;/a&gt; and &lt;a href=&#34;https://en.wikipedia.org/wiki/Mastermind_%28board_game%29&#34; target=&#34;_blank&#34; rel=&#34;noreferrer&#34;&gt;Mastermind&lt;/a&gt; where you&amp;rsquo;ll have to guess a five letter word. Hints about individual characters are conveyed to you via yellow, green and gray indicators. Green means the target word has this character at this location, yellow means the target word has this character but in a different location and gray means the character is not in the target word at all.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Grep Bundler Version From Gemfile.lock</title>
      <link>https://leif.io/blog/2021/12/10/grep-bundler-version-from-gemfile/</link>
      <pubDate>Fri, 10 Dec 2021 17:31:27 -0800</pubDate>
      <guid>https://leif.io/blog/2021/12/10/grep-bundler-version-from-gemfile/</guid>
      <description>&lt;p&gt;If you&amp;rsquo;re working on any kind of Ruby project you probably won&amp;rsquo;t be able to avoid &lt;a href=&#34;https://bundler.io&#34; target=&#34;_blank&#34; rel=&#34;noreferrer&#34;&gt;bundler&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;This is just a quick tip to install the exact same version of bundler than the Gemfile was originally installed with.&lt;/p&gt;&#xA;&lt;p&gt;Here you go:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;gem install bundler -v &lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;grep &lt;span class=&#34;s1&#34;&gt;&amp;#39;BUNDLED WITH&amp;#39;&lt;/span&gt; -A1 Gemfile.lock &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; tail -n &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;I used it a couple of times and it can be useful to keep bundler versions in sync when you&amp;rsquo;re using &lt;a href=&#34;https://www.docker.com&#34; target=&#34;_blank&#34; rel=&#34;noreferrer&#34;&gt;docker&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Overengineering My Blog for Fun and Definitely not Profit</title>
      <link>https://leif.io/blog/2021/12/07/overengineering-my-blog-for-fun-and-not-profit/</link>
      <pubDate>Tue, 07 Dec 2021 17:08:09 -0800</pubDate>
      <guid>https://leif.io/blog/2021/12/07/overengineering-my-blog-for-fun-and-not-profit/</guid>
      <description>&lt;p&gt;This publication has been around a while. According to my &#xA;      &#xA;    &lt;a href=&#34;https://leif.io/blog/2010/01/04/what-i-like-about-the-play-framework/&#34;&gt;first article&lt;/a&gt; it goes back all the way to January 2010 and was hosted on Wordpress. In the meantime I switched from there to &#xA;      &#xA;    &lt;a href=&#34;https://leif.io/blog/2010/06/18/jekyll-blogging-without-pain/&#34;&gt;Jekyll&lt;/a&gt; until I switched to &#xA;      &#xA;    &lt;a href=&#34;https://leif.io/blog/2013/12/13/im-blogging-again/&#34;&gt;ghost&lt;/a&gt; in late 2013.&lt;/p&gt;&#xA;&lt;p&gt;This is where the blog spent most of its time, and even thought I had &lt;a href=&#34;https://news.ycombinator.com/item?id=15909870&#34; target=&#34;_blank&#34; rel=&#34;noreferrer&#34;&gt;some&lt;/a&gt; &lt;a href=&#34;https://news.ycombinator.com/item?id=27210604&#34; target=&#34;_blank&#34; rel=&#34;noreferrer&#34;&gt;stories&lt;/a&gt; reach the front page of Hacker News it was mostly quiet around here and infrequently updated (I did not write a single post in all of 2016).&lt;/p&gt;</description>
    </item>
    <item>
      <title>Implement a GIT Branch Checkout History</title>
      <link>https://leif.io/blog/2021/02/22/implement-a-git-checkout-branch-command/</link>
      <pubDate>Mon, 22 Feb 2021 16:11:46 -0800</pubDate>
      <guid>https://leif.io/blog/2021/02/22/implement-a-git-checkout-branch-command/</guid>
      <description>&lt;p&gt;Take this alias&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# .gitconfig&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;alias&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;nv&#34;&gt;hist&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;!f() { for i in &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;seq &lt;span class=&#34;m&#34;&gt;9&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$END&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;; do echo &amp;#34;&lt;/span&gt;@&lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;-&lt;span class=&#34;nv&#34;&gt;$i&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;: &lt;span class=&#34;sb&#34;&gt;`&lt;/span&gt;git rev-parse --abbrev-ref @&lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;-&lt;span class=&#34;nv&#34;&gt;$i&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;sb&#34;&gt;`&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;; done }; f &amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This will show the last 9 branches you have checked out with the abbreviation to switch to it.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;❯ git hist&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;@&lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;-1&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;: main&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;@&lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;-2&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;: add-healthchecks-io&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;@&lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;-3&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;: main&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;@&lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;-4&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;: fix-visible-flag&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;@&lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;-5&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;: main&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;@&lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;-6&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;: implement-join-code&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;@&lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;-7&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;: main&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;@&lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;-8&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;: fix-visible-flag&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;@&lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;-9&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;: main&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;You can of course use the branch name to check it out, or use the abbreviation in front of it &lt;code&gt;git checkout @{-6}&lt;/code&gt; will check out &lt;code&gt;implement-join-code&lt;/code&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>My First Event Sourced Application</title>
      <link>https://leif.io/blog/2018/01/09/my-first-event-sourced-application/</link>
      <pubDate>Tue, 09 Jan 2018 17:53:43 +0700</pubDate>
      <guid>https://leif.io/blog/2018/01/09/my-first-event-sourced-application/</guid>
      <description>&lt;p&gt;&lt;em&gt;TL;DR:&lt;/em&gt; I built an event sourced application that shows the latest version of common programming languages. Find it &lt;a href=&#34;https://releaseping.com&#34; target=&#34;_blank&#34; rel=&#34;noreferrer&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;For I while I thought about building an &lt;a href=&#34;https://martinfowler.com/eaaDev/EventSourcing.html&#34; target=&#34;_blank&#34; rel=&#34;noreferrer&#34;&gt;event sourced&lt;/a&gt; application. The concept is so different from a classical CRUD approach that I was very intrigued.&lt;/p&gt;&#xA;&lt;p&gt;I tried once with a podcasting transcription app (the details of that can be read &#xA;      &#xA;    &lt;a href=&#34;https://leif.io/blog/2017/12/12/how-playing-around-with-experimental-technologies-landed-me-a-6-month-freelance-gig/&#34;&gt;here&lt;/a&gt;) but I quickly became overwhelmed by all the design decisions I had to make.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Use docker to run the new Elixir Code Formatter</title>
      <link>https://leif.io/blog/2017/10/12/use-docker-to-run-the-new-elixir-code-formatter/</link>
      <pubDate>Thu, 12 Oct 2017 17:47:33 +0200</pubDate>
      <guid>https://leif.io/blog/2017/10/12/use-docker-to-run-the-new-elixir-code-formatter/</guid>
      <description>&lt;p&gt;&lt;em&gt;TL;DR:&lt;/em&gt; Run this to format your code:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;docker run --rm -it -v &lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;pwd&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;:/app -w /app leifg/elixir:edge mix format&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The community has been very excited in the last couple of days about the &lt;a href=&#34;http://devonestes.herokuapp.com/everything-you-need-to-know-about-elixirs-new-formatter&#34; target=&#34;_blank&#34; rel=&#34;noreferrer&#34;&gt;Elixir 1.6 Code Formatter Announcement&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Of course you can use one of the many &lt;a href=&#34;https://github.com/mururu/exenv&#34; target=&#34;_blank&#34; rel=&#34;noreferrer&#34;&gt;Elixir&lt;/a&gt;&lt;a href=&#34;https://github.com/asdf-vm/asdf&#34; target=&#34;_blank&#34; rel=&#34;noreferrer&#34;&gt;Version&lt;/a&gt;&lt;a href=&#34;https://github.com/robisonsantos/evm&#34; target=&#34;_blank&#34; rel=&#34;noreferrer&#34;&gt;Management&lt;/a&gt;&lt;a href=&#34;https://github.com/taylor/kiex&#34; target=&#34;_blank&#34; rel=&#34;noreferrer&#34;&gt;Tools&lt;/a&gt; to try out the formatter. But if you don&amp;rsquo;t want to switch around between versions or if you (like me) stick to system Elixir, there is an easier way: Docker.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Configure your Elm app with ENV variables</title>
      <link>https://leif.io/blog/2017/10/01/configure-your-elm-app-with-env-variables/</link>
      <pubDate>Sun, 01 Oct 2017 23:53:54 +0200</pubDate>
      <guid>https://leif.io/blog/2017/10/01/configure-your-elm-app-with-env-variables/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://github.com/halfzebra/create-elm-app&#34; target=&#34;_blank&#34; rel=&#34;noreferrer&#34;&gt;Create Elm App&lt;/a&gt; makes it very easy to get started with Elm because it provides a zero configuration application that just works.&lt;/p&gt;&#xA;&lt;p&gt;However sometimes it is very useful to have some kind of configuration in your app. The example that I recently ran into is making your backend api url configurable. Or do you really want to develop against your production API?&lt;/p&gt;&#xA;&lt;p&gt;Lucky for you &lt;a href=&#34;https://github.com/halfzebra/create-elm-app&#34; target=&#34;_blank&#34; rel=&#34;noreferrer&#34;&gt;Create Elm App&lt;/a&gt; already comes with all necessary tools. It&amp;rsquo;s kinda tricky to find and that&amp;rsquo;s why I&amp;rsquo;m writing this post.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Deploying Elixir with Docker Part 4</title>
      <link>https://leif.io/blog/2017/09/01/deploying-elixir-with-docker-part-4/</link>
      <pubDate>Fri, 01 Sep 2017 17:36:28 +0200</pubDate>
      <guid>https://leif.io/blog/2017/09/01/deploying-elixir-with-docker-part-4/</guid>
      <description>&lt;p&gt;This last post is about bringing it all together.&lt;/p&gt;&#xA;&lt;p&gt;Right now we are at a point where we have random script snippets that executed in the right order will launch a service in the cloud.&lt;/p&gt;&#xA;&lt;p&gt;But we need to get this in a more structured way on a build server. As a CI provider I use &lt;a href=&#34;https://circleci.com&#34; target=&#34;_blank&#34; rel=&#34;noreferrer&#34;&gt;CircleCI&lt;/a&gt; and I&amp;rsquo;ve been waiting to try out their &lt;a href=&#34;https://circleci.com/docs/2.0/&#34; target=&#34;_blank&#34; rel=&#34;noreferrer&#34;&gt;2.0 version&lt;/a&gt; including &lt;a href=&#34;https://circleci.com/docs/2.0/workflows/&#34; target=&#34;_blank&#34; rel=&#34;noreferrer&#34;&gt;workflows&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;As CircleCI heavily relies on Docker, we can just go ahead and use our &lt;a href=&#34;https://hub.docker.com/r/leifg/time_tracking-base/&#34; target=&#34;_blank&#34; rel=&#34;noreferrer&#34;&gt;base image&lt;/a&gt; for building.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Deploying Elixir with Docker Part 3</title>
      <link>https://leif.io/blog/2017/08/25/deploying-elixir-with-docker-part-3/</link>
      <pubDate>Fri, 25 Aug 2017 09:51:33 +0200</pubDate>
      <guid>https://leif.io/blog/2017/08/25/deploying-elixir-with-docker-part-3/</guid>
      <description>&lt;p&gt;&lt;em&gt;This is the third part of the Docker Elixir deployment adventure. Read &#xA;      &#xA;    &lt;a href=&#34;https://leif.io/blog/2017/08/11/deploying-elixir-projects-with-docker-and-distillery/&#34;&gt;part 1&lt;/a&gt; and &#xA;      &#xA;    &lt;a href=&#34;https://leif.io/blog/2017/08/17/deploying-elixir-with-docker-part-2/&#34;&gt;part 2&lt;/a&gt; first.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;In this part we are going to deploy our Docker container to &lt;a href=&#34;https://console.hyper.sh/register/invite/j6lwdRzl5duM1ar7jM4Ktgzj8rae9xIj&#34; target=&#34;_blank&#34; rel=&#34;noreferrer&#34;&gt;hyper.sh&lt;/a&gt; (Affiliate Link). It&amp;rsquo;s a relatively new platform that makes it very easy to deploy containers.&lt;/p&gt;&#xA;&lt;p&gt;You will need the hyper cli to get started. Refer to the &lt;a href=&#34;https://docs.hyper.sh/GettingStarted/install.html&#34; target=&#34;_blank&#34; rel=&#34;noreferrer&#34;&gt;official documentation&lt;/a&gt; for details.&lt;/p&gt;&#xA;&lt;p&gt;We will start by starting an instance of our container. By the time of writing this blog post, the latest version of time_tracking is &lt;code&gt;1.8.3&lt;/code&gt;:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Deploying Elixir with Docker Part 2</title>
      <link>https://leif.io/blog/2017/08/17/deploying-elixir-with-docker-part-2/</link>
      <pubDate>Thu, 17 Aug 2017 18:20:26 +0200</pubDate>
      <guid>https://leif.io/blog/2017/08/17/deploying-elixir-with-docker-part-2/</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a continuation of the &#xA;      &#xA;    &lt;a href=&#34;https://leif.io/blog/2017/08/11/deploying-elixir-projects-with-docker-and-distillery/&#34;&gt;first part&lt;/a&gt; of the post where we created a release.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;Now that we have a release, let&amp;rsquo;s pack it into a docker container.&lt;/p&gt;&#xA;&lt;p&gt;We will use a &lt;a href=&#34;https://docs.docker.com/engine/userguide/eng-image/multistage-build/&#34; target=&#34;_blank&#34; rel=&#34;noreferrer&#34;&gt;multi stage container&lt;/a&gt; to create the container.&lt;/p&gt;&#xA;&lt;p&gt;First let&amp;rsquo;s focus on the build part. A base container will come in handy as we need to run several commands. We need Erlang and Elixir installed (obviously) but I also need a tool to calculate the version number. I use &lt;a href=&#34;https://github.com/semantic-release&#34; target=&#34;_blank&#34; rel=&#34;noreferrer&#34;&gt;Semantic Release&lt;/a&gt; for that. I decided to switch from the &lt;a href=&#34;https://github.com/semantic-release/semantic-release&#34; target=&#34;_blank&#34; rel=&#34;noreferrer&#34;&gt;JavaScript version&lt;/a&gt; to the &lt;a href=&#34;https://github.com/semantic-release/go-semantic-release&#34; target=&#34;_blank&#34; rel=&#34;noreferrer&#34;&gt;Go version&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Deploying Elixir with Docker Part 1</title>
      <link>https://leif.io/blog/2017/08/11/deploying-elixir-projects-with-docker-and-distillery/</link>
      <pubDate>Fri, 11 Aug 2017 19:37:45 +0200</pubDate>
      <guid>https://leif.io/blog/2017/08/11/deploying-elixir-projects-with-docker-and-distillery/</guid>
      <description>&lt;p&gt;This is a multi part article about deployment of an Elixir application with Docker.&lt;/p&gt;&#xA;&lt;p&gt;This part will be about building a distillery release for a Phoenix Application.&lt;/p&gt;&#xA;&lt;p&gt;&#xA;      &#xA;    &lt;a href=&#34;https://leif.io/blog/2017/08/17/deploying-elixir-with-docker-part-2/&#34;&gt;Part 2&lt;/a&gt; will discuss packaging this release into a Docker container&lt;/p&gt;&#xA;&lt;p&gt;&#xA;      &#xA;    &lt;a href=&#34;https://leif.io/blog/2017/08/25/deploying-elixir-with-docker-part-3/&#34;&gt;Part 3&lt;/a&gt; will show you how to deploy this container to a container runtime.&lt;/p&gt;&#xA;&lt;p&gt;&#xA;      &#xA;    &lt;a href=&#34;https://leif.io/blog/2017/09/01/deploying-elixir-with-docker-part-4/&#34;&gt;Part 4&lt;/a&gt; will wrap it all up and show you how to integrate all if this into a Continuous Delivery Workflow&lt;/p&gt;</description>
    </item>
    <item>
      <title>Try out your code on the latest OTP and Elixir</title>
      <link>https://leif.io/blog/2017/06/18/try-out-your-code-on-the-latest-otp-and-elixir/</link>
      <pubDate>Sun, 18 Jun 2017 20:06:44 +0200</pubDate>
      <guid>https://leif.io/blog/2017/06/18/try-out-your-code-on-the-latest-otp-and-elixir/</guid>
      <description>&lt;p&gt;&lt;em&gt;TL;DR:&lt;/em&gt; If you want an easy way to run the latest version of elixir (an the latest version of OTP) and you have docker installed, do this:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;docker pull leifg/elixir:edge&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;docker run --rm -it leifg/elixir:edge iex&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;elixir-docker-builds&#34; class=&#34;relative group&#34;&gt;Elixir Docker Builds &lt;span class=&#34;absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100&#34;&gt;&lt;a class=&#34;group-hover:text-primary-300 dark:group-hover:text-neutral-700&#34; style=&#34;text-decoration-line: none !important;&#34; href=&#34;#elixir-docker-builds&#34; aria-label=&#34;Anchor&#34;&gt;#&lt;/a&gt;&lt;/span&gt;&lt;/h2&gt;&lt;p&gt;A while ago I started building my custom &lt;a href=&#34;https://hub.docker.com/r/leifg/elixir&#34; target=&#34;_blank&#34; rel=&#34;noreferrer&#34;&gt;Elixir Docker image&lt;/a&gt; using &lt;a href=&#34;github.com/leifg/docker-elixir&#34;&gt;Github&lt;/a&gt; and &lt;a href=&#34;https://docs.docker.com/docker-hub/builds/&#34; target=&#34;_blank&#34; rel=&#34;noreferrer&#34;&gt;Docker hub automated builds&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;I tagged the Elixir versions I wanted to build to create a &lt;code&gt;1.x&lt;/code&gt; and &lt;code&gt;1.x.y&lt;/code&gt; tag on Docker Hub. In addition the &lt;code&gt;master&lt;/code&gt; branch would be tagged with &lt;code&gt;latest&lt;/code&gt;. I always used the latest stable OTP to reduce complexity.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Never compare dates in Elixir using &#34;&lt;&#34; or &#34;&gt;&#34;</title>
      <link>https://leif.io/blog/2017/05/29/never-use-to-compare-dates/</link>
      <pubDate>Mon, 29 May 2017 12:23:23 +0200</pubDate>
      <guid>https://leif.io/blog/2017/05/29/never-use-to-compare-dates/</guid>
      <description>&lt;p&gt;For the examples in this article I use the data structure &lt;a href=&#34;https://hexdocs.pm/elixir/1.4.4/Date.html&#34; target=&#34;_blank&#34; rel=&#34;noreferrer&#34;&gt;Date&lt;/a&gt;. The same applies for &lt;a href=&#34;https://hexdocs.pm/elixir/1.4.4/DateTime.html&#34; target=&#34;_blank&#34; rel=&#34;noreferrer&#34;&gt;DateTime&lt;/a&gt; or &lt;a href=&#34;https://hexdocs.pm/elixir/1.4.4/NaiveDateTime.html&#34; target=&#34;_blank&#34; rel=&#34;noreferrer&#34;&gt;NaiveDateTime&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Consider this:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-elixir&#34; data-lang=&#34;elixir&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;early_june&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;sx&#34;&gt;~D[2017-06-01]&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;late_june&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;sx&#34;&gt;~D[2017-06-30]&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;How do you find out what&amp;rsquo;s earlier?&lt;/p&gt;&#xA;&lt;p&gt;The naive approach is to use the comparison operator &lt;code&gt;&amp;lt;&lt;/code&gt;:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-elixir&#34; data-lang=&#34;elixir&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;early_june&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;late_june&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# =&amp;gt; true&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;That works. But this is tricky. It only works in some cases.&lt;/p&gt;&#xA;&lt;p&gt;Now consider this:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-elixir&#34; data-lang=&#34;elixir&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;late_june&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;sx&#34;&gt;~D[2017-06-30]&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;early_july&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;sx&#34;&gt;~D[2017-07-01]&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;What do you think the output is now?&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-elixir&#34; data-lang=&#34;elixir&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;late_june&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;early_july&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# =&amp;gt; false&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Turns out: comparison with &lt;code&gt;&amp;lt;&lt;/code&gt; (or &lt;code&gt;&amp;gt;&lt;/code&gt;) just compares the struct fields (as the &lt;a href=&#34;https://hexdocs.pm/elixir/master/DateTime.html&#34; target=&#34;_blank&#34; rel=&#34;noreferrer&#34;&gt;current version of the documentation&lt;/a&gt; states. My best guess is for same reason the day field has higher priority than the month field so this comparison fail sometimes.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Export your Salesforce Objects to SQLite</title>
      <link>https://leif.io/blog/2015/12/10/export-your-salesforce-objects-to-sqlite/</link>
      <pubDate>Thu, 10 Dec 2015 18:11:22 -0800</pubDate>
      <guid>https://leif.io/blog/2015/12/10/export-your-salesforce-objects-to-sqlite/</guid>
      <description>&lt;p&gt;Sometimes it can be quite useful to export data you have in Salesforce Org (transferring your data over to a new system is probably the biggest use case).&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://help.salesforce.com/HTViewHelpDoc?id=exporting_data.htm&#34; target=&#34;_blank&#34; rel=&#34;noreferrer&#34;&gt;Saleforce&amp;rsquo;s suggestion&lt;/a&gt; is to use the &lt;a href=&#34;http://dataloader.io&#34; target=&#34;_blank&#34; rel=&#34;noreferrer&#34;&gt;dataloader&lt;/a&gt; but that has a lot of drawbacks:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Flat File Format only&lt;/li&gt;&#xA;&lt;li&gt;Not (sufficiently) scriptable&lt;/li&gt;&#xA;&lt;li&gt;Manual process to select the fields you want (instead of just &lt;em&gt;everything&lt;/em&gt;)&lt;/li&gt;&#xA;&lt;li&gt;Only one object at a time&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;As most of the information you need for a proper export a available via Salesforce&amp;rsquo;s field description, it was pretty simple to come up with a solution that would let me export a range of objects to a database format (SQLite currently but very easy to extend for other RDBMS).&lt;/p&gt;</description>
    </item>
    <item>
      <title>Redis Tips &amp; Tricks #2 - Connections</title>
      <link>https://leif.io/blog/2015/09/04/redis-tips-tricks-2-connections/</link>
      <pubDate>Fri, 04 Sep 2015 11:30:44 -0700</pubDate>
      <guid>https://leif.io/blog/2015/09/04/redis-tips-tricks-2-connections/</guid>
      <description>&lt;p&gt;As it turns out, connecting to redis may introduce a bit of problem if you&amp;rsquo;re not aware of the connection handling.&lt;/p&gt;&#xA;&lt;p&gt;I haven&amp;rsquo;t tried with every client out there but especially the &lt;a href=&#34;https://github.com/redis/redis-rb&#34; target=&#34;_blank&#34; rel=&#34;noreferrer&#34;&gt;redis ruby client&lt;/a&gt; has this problem.&lt;/p&gt;&#xA;&lt;p&gt;So imagine this scenario:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-ruby&#34; data-lang=&#34;ruby&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;..&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;10000&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;each&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;num&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;Redis&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;connect&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;get&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;key_&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;#{&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;num&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)}&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Every iteration will open a new file handle and will keep it open (I have not been waiting forever but I have seen open files for more than 24 hours).&lt;/p&gt;</description>
    </item>
    <item>
      <title>First steps in Elixir</title>
      <link>https://leif.io/blog/2015/08/28/first-steps-in-elixir/</link>
      <pubDate>Fri, 28 Aug 2015 17:53:15 -0700</pubDate>
      <guid>https://leif.io/blog/2015/08/28/first-steps-in-elixir/</guid>
      <description>&lt;p&gt;From time to time I look into new programming languages. But usually I rarely do more than browse the general introduction guide.&lt;/p&gt;&#xA;&lt;p&gt;However this time I dove a little bit deeper into &lt;a href=&#34;http://elixir-lang.org/&#34; target=&#34;_blank&#34; rel=&#34;noreferrer&#34;&gt;Elixir&lt;/a&gt; and even got myself a &lt;a href=&#34;https://github.com/leifg/excellent&#34; target=&#34;_blank&#34; rel=&#34;noreferrer&#34;&gt;pet project&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;I tried to find a use case for a little library and I ended up writing a &lt;a href=&#34;https://github.com/leifg/excellent&#34; target=&#34;_blank&#34; rel=&#34;noreferrer&#34;&gt;parser for Excel documents&lt;/a&gt;. It&amp;rsquo;s still under heavy development but I gladly accept Pull-Requests.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Executrix is now known as Bulkforce</title>
      <link>https://leif.io/blog/2015/07/28/executrix-is-now-known-as-bulkforce/</link>
      <pubDate>Tue, 28 Jul 2015 13:36:59 +0200</pubDate>
      <guid>https://leif.io/blog/2015/07/28/executrix-is-now-known-as-bulkforce/</guid>
      <description>&lt;p&gt;Today I released a new version of the ruby gem to interact with the Salesforce &lt;a href=&#34;https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/&#34; target=&#34;_blank&#34; rel=&#34;noreferrer&#34;&gt;Bulk API&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;I decided to go with a different name and introduce some breaking changes.&lt;/p&gt;&#xA;&lt;p&gt;And here it is: &lt;a href=&#34;http://github.com/propertybase/bulkforce&#34; target=&#34;_blank&#34; rel=&#34;noreferrer&#34;&gt;Bulkforce&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;The [old gem](old gem) will still be available as a reference and to provide a backwards compatible option for all users out there. New features however will only be introduced in Bulkforce.&lt;/p&gt;&#xA;&lt;p&gt;Not only did I rename the gem, I also introduced a new feature. The authentication has been overhauled.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Redis Tips &amp; Tricks #1 - Memory</title>
      <link>https://leif.io/blog/2014/12/19/redis-tips-tricks-1/</link>
      <pubDate>Fri, 19 Dec 2014 18:15:36 +0100</pubDate>
      <guid>https://leif.io/blog/2014/12/19/redis-tips-tricks-1/</guid>
      <description>&lt;p&gt;It&amp;rsquo;s neither a tip, nor a trick. It&amp;rsquo;s more a statement:&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;ALL data is kept in memory&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;&amp;ldquo;No shit&amp;rdquo; some of you might say, but I actually have to confess: I did not know that when I started using redis. I always assumed &amp;ldquo;there is a file on the disk, that is where my data lives&amp;rdquo;.&lt;/p&gt;&#xA;&lt;p&gt;The truth is: all of redis&amp;rsquo; data is kept in memory and from time to time it is &lt;a href=&#34;http://redis.io/topics/persistence&#34; target=&#34;_blank&#34; rel=&#34;noreferrer&#34;&gt;also written to disk&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Why ActiveRecord Enums Have Been Implemented in the Worst Possible Way</title>
      <link>https://leif.io/blog/2014/11/14/why-activerecord-enums-have-been-implemented-in-the-worst-possible-way/</link>
      <pubDate>Fri, 14 Nov 2014 11:38:04 +0100</pubDate>
      <guid>https://leif.io/blog/2014/11/14/why-activerecord-enums-have-been-implemented-in-the-worst-possible-way/</guid>
      <description>&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt; I tried out enums in ActiveRecord 5.0 and the biggest pet peeve has been eliminated. Point 3 is no longer valid. Nevertheless decide for yourself if you want to use it.&lt;/p&gt;&#xA;&lt;p&gt;With Rails 4.1 &lt;a href=&#34;http://edgeguides.rubyonrails.org/4_1_release_notes.html#active-record-enums&#34; target=&#34;_blank&#34; rel=&#34;noreferrer&#34;&gt;enums have been introduced to ActiveRecord&lt;/a&gt;. I took a good look at it and from the start I didn&amp;rsquo;t like it. Here are 3 reasons why:&lt;/p&gt;&#xA;&lt;h2 id=&#34;1-its-all-in-the-application-layer&#34; class=&#34;relative group&#34;&gt;1. It&amp;rsquo;s all in the application layer &lt;span class=&#34;absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100&#34;&gt;&lt;a class=&#34;group-hover:text-primary-300 dark:group-hover:text-neutral-700&#34; style=&#34;text-decoration-line: none !important;&#34; href=&#34;#1-its-all-in-the-application-layer&#34; aria-label=&#34;Anchor&#34;&gt;#&lt;/a&gt;&lt;/span&gt;&lt;/h2&gt;&lt;p&gt;Ok this might be a bit unfair as Rails &lt;strong&gt;is&lt;/strong&gt; the application layer. Nevertheless the feature could have taken advantage of &lt;a href=&#34;http://www.postgresql.org/docs/9.1/static/datatype-enum.html&#34; target=&#34;_blank&#34; rel=&#34;noreferrer&#34;&gt;Postgres&amp;rsquo;&lt;/a&gt; or &lt;a href=&#34;http://dev.mysql.com/doc/refman/5.0/en/enum.html&#34; target=&#34;_blank&#34; rel=&#34;noreferrer&#34;&gt;MySQL&amp;rsquo;s&lt;/a&gt; native type. An example of how that could look like is in my experimental gem &lt;a href=&#34;http://github.com/leifg/activerecord-real_enums&#34; target=&#34;_blank&#34; rel=&#34;noreferrer&#34;&gt;activerecord-real_enums&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Redis Tips Tricks - #0 Introduction</title>
      <link>https://leif.io/blog/2014/02/10/redis-tips-tricks-0-introduction/</link>
      <pubDate>Mon, 10 Feb 2014 15:21:02 +0100</pubDate>
      <guid>https://leif.io/blog/2014/02/10/redis-tips-tricks-0-introduction/</guid>
      <description>&lt;p&gt;Yai, a series \o/&lt;/p&gt;&#xA;&lt;p&gt;Here I try to explain in short steps some tricks for beginners in handling &lt;a href=&#34;http://redis.io&#34; target=&#34;_blank&#34; rel=&#34;noreferrer&#34;&gt;redis&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Some of those tricks may be specific to redis, some other might be relevant for all key-value-stores.&lt;/p&gt;&#xA;&lt;p&gt;So stay tuned.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Morf Hashes Into Hashes</title>
      <link>https://leif.io/blog/2013/12/21/morf-hashes-into-hashes/</link>
      <pubDate>Sat, 21 Dec 2013 16:14:33 +0100</pubDate>
      <guid>https://leif.io/blog/2013/12/21/morf-hashes-into-hashes/</guid>
      <description>&lt;p&gt;In the last few months I did a lot of work concerning imports.&lt;/p&gt;&#xA;&lt;p&gt;Using the &lt;a href=&#34;http://sequel.jeremyevans.net/&#34; target=&#34;_blank&#34; rel=&#34;noreferrer&#34;&gt;Sequel Toolokit&lt;/a&gt; I was able to treat every query row as a hash and the whole thing has been working out pretty good so far.&lt;/p&gt;&#xA;&lt;p&gt;However I always needed to do conversions on the hashes (map keys to a different name, concatenate values etc&amp;hellip;.). Therefore I implemented several mapping classes that helped me with that but was never quite satisfied with the implementation.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Get Yourself a Simple Project for Explaining Stuff</title>
      <link>https://leif.io/blog/2013/12/15/get-yourself-a-simple-project-for-explaining-stuff/</link>
      <pubDate>Mon, 16 Dec 2013 00:56:35 +0100</pubDate>
      <guid>https://leif.io/blog/2013/12/15/get-yourself-a-simple-project-for-explaining-stuff/</guid>
      <description>&lt;p&gt;A while ago I spent some time at home, working on a Rails project. I was very passionate about it and at one point I shouted out: &amp;ldquo;Finally! The tests are running&amp;rdquo;.&lt;/p&gt;&#xA;&lt;p&gt;That was the point when my dad got curious about what I was doing and asked me something like &amp;ldquo;What tests are you talking about?&amp;rdquo;. I tried to showed him my specs. Unfortunately in order to explain the whole specs I also needed to explain ORM, mocking, factories and a couple of other stuff, because it was a Rails project and gotten pretty far by that point of time.&#xA;That got me thinking: &amp;ldquo;If it had been a simple class without any dependencies it would have been a lot easier to explain the tests.&amp;rdquo;&lt;/p&gt;</description>
    </item>
    <item>
      <title>New Project calcsub.net</title>
      <link>https://leif.io/blog/2011/05/01/new-project-calcsub-net/</link>
      <pubDate>Sun, 01 May 2011 17:54:47 +0200</pubDate>
      <guid>https://leif.io/blog/2011/05/01/new-project-calcsub-net/</guid>
      <description>&lt;p&gt;Over the easter holidays I started working on a new project. Today it has finally reached a state where I&amp;rsquo;m confident to say: I can go public.&lt;/p&gt;&#xA;&lt;p&gt;It&amp;rsquo;s just a simple subnet calculator that takes IPv4 and IPv6 addresses and then calculates the start address and the end address.&lt;/p&gt;&#xA;&lt;p&gt;You can have a look at it &lt;a href=&#34;https://web.archive.org/web/20130601060932/http://calcsub.net/&#34; target=&#34;_blank&#34; rel=&#34;noreferrer&#34;&gt;here (NON FUNCTIONAL)&lt;/a&gt; or see the source on &lt;a href=&#34;https://github.com/leifg/calcsub.net&#34; target=&#34;_blank&#34; rel=&#34;noreferrer&#34;&gt;github&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;picture created by Leif Gensert. &lt;a href=&#34;http://creativecommons.org/licenses/by/2.0/&#34; target=&#34;_blank&#34; rel=&#34;noreferrer&#34;&gt;CC BY 2.0&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Simplequeue - My First Project</title>
      <link>https://leif.io/blog/2010/10/24/simplequeue-my-first-project/</link>
      <pubDate>Sun, 24 Oct 2010 16:18:36 +0200</pubDate>
      <guid>https://leif.io/blog/2010/10/24/simplequeue-my-first-project/</guid>
      <description>&lt;p&gt;Today I released my first project on &lt;a href=&#34;http://github.com/leifg/simplequeue&#34; target=&#34;_blank&#34; rel=&#34;noreferrer&#34;&gt;github&lt;/a&gt;. It&amp;rsquo;s called &lt;a href=&#34;http://github.com/leifg/simplequeue&#34; target=&#34;_blank&#34; rel=&#34;noreferrer&#34;&gt;simplequeue&lt;/a&gt; and is a little tool to queue tasks. In this case everything is a task which can be expressed in a single line of text.&lt;/p&gt;&#xA;&lt;p&gt;It&amp;rsquo;s written in ruby and as I&amp;rsquo;m new to ruby I would really appreciate it if someone took the time and make a code review. Just &lt;a href=&#34;http://grepthepipe.com/contact.html&#34; target=&#34;_blank&#34; rel=&#34;noreferrer&#34;&gt;contact me&lt;/a&gt; or fork the project if you have suggestions.&lt;/p&gt;&#xA;&lt;p&gt;I also added a &lt;a href=&#34;http://grepthepipe.com/portfolio.html&#34; target=&#34;_blank&#34; rel=&#34;noreferrer&#34;&gt;portfolio&lt;/a&gt; page to this site. I will do my best to add more projects to my portfolio.&lt;/p&gt;</description>
    </item>
    <item>
      <title>So You Want to Be a Programmer?</title>
      <link>https://leif.io/blog/2010/07/23/so-you-want-to-be-a-programmer/</link>
      <pubDate>Fri, 23 Jul 2010 23:35:12 +0200</pubDate>
      <guid>https://leif.io/blog/2010/07/23/so-you-want-to-be-a-programmer/</guid>
      <description>&lt;p&gt;If you&amp;rsquo;re anything like me, you have always wanted to learn a programming language, do an awesome application and get filthy rich. To achieve this goal you find plenty of resources available online. But all articles on how to become a programmer really boil down to just 2 letters:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;#do&lt;/p&gt;&lt;/blockquote&gt;&#xA;&lt;p&gt;That sums it up pretty well. You won&amp;rsquo;t become a good programmer unless you&amp;rsquo;ll write code. It&amp;rsquo;s as simple as that. But as putting out just 2 letters for a guide might seem arrogant, I summed up 3 points which I find very helpful in learning a programming language.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Superfantastic Password Management With Supergenpass</title>
      <link>https://leif.io/blog/2010/07/14/superfantastic-password-management-with-supergenpass/</link>
      <pubDate>Wed, 14 Jul 2010 10:40:27 +0200</pubDate>
      <guid>https://leif.io/blog/2010/07/14/superfantastic-password-management-with-supergenpass/</guid>
      <description>&lt;p&gt;Nowadays, there are a million websites out there which force you to create an account. During this step you are required to provide a username and a password. If this process gets repeated more often, the need of a proper password management increases. The currently most used password management is the simple &amp;ldquo;use one for all&amp;rdquo; method. I hope we alle agree that is the worst of all methods. The best available method however (generating long arbitrary passwords and memorizing them) is not that practicable. So you need to find a system between those two extremes. A few months back, I chose a password managing system with the help of &lt;a href=&#34;https://www.supergenpass.com&#34; target=&#34;_blank&#34; rel=&#34;noreferrer&#34;&gt;SuperGenPass&lt;/a&gt; and stuck since then.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Jekyll: Blogging Without Pain</title>
      <link>https://leif.io/blog/2010/06/18/jekyll-blogging-without-pain/</link>
      <pubDate>Fri, 18 Jun 2010 02:21:00 +0200</pubDate>
      <guid>https://leif.io/blog/2010/06/18/jekyll-blogging-without-pain/</guid>
      <description>&lt;p&gt;A long time hast passed since my last blog post. But I did a complete redesign of my blog. Not only is the frontend completely different. The underlying backend has changed as well. I completely freed myself from &lt;a href=&#34;http://wordpress.com&#34; target=&#34;_blank&#34; rel=&#34;noreferrer&#34;&gt;Wordpress&lt;/a&gt; and changed to an engine that fits my workflow much better: &lt;a href=&#34;http://wiki.github.com/mojombo/jekyll/&#34; target=&#34;_blank&#34; rel=&#34;noreferrer&#34;&gt;jekyll&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;To call jekyll a blogging-engine is (IMHO) not quite right. It&amp;rsquo;s just a generator for static contents. The general idea behind it is that you write all your articles in a markup language (e.g. &lt;a href=&#34;http://www.w3.org/MarkUp/&#34; target=&#34;_blank&#34; rel=&#34;noreferrer&#34;&gt;HTML&lt;/a&gt;, &lt;a href=&#34;http://daringfireball.net/projects/markdown/&#34; target=&#34;_blank&#34; rel=&#34;noreferrer&#34;&gt;Markdown&lt;/a&gt; or &lt;a href=&#34;http://textile.thresholdstate.com/&#34; target=&#34;_blank&#34; rel=&#34;noreferrer&#34;&gt;Textile&lt;/a&gt;), define the layout via the &lt;a href=&#34;http://www.liquidmarkup.org/&#34; target=&#34;_blank&#34; rel=&#34;noreferrer&#34;&gt;Liquid Templating engine&lt;/a&gt;, run the jekyll generator and end up with a complete directory structure containing HTML/CSS and JavaScript files which can be used as the actual site.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
