Today I’d like to introduce an open-source software project I have been working on named Devito.

Devito is a URL-shortener that comes out-of-the-box ready for deployment to Gigalixir. What makes Devito special is that it is designed to work with it’s own CLI. No browser plugins. No web-app. Everything you need is accessible right through your terminal.

Image for post
Image for post
Devito ❤️ Elixir

The Interface

All actions for Devito can be performed through the CLI, and that is the recommended interface. After setting your configs, you will mostly want to generate links or see existing links. Here is what that looks like:

Image for post
Image for post
setting the config


Image for post
Image for post

If you have even a cursory knowledge of the Bible, you might recognize that tongue-in-cheek title paraphrased from Philippians 4:13. While I chose it because I thought it was catchy, it is also fair to say many developers have a religious affinity for certain databases.

The Purpose

The goal of this post is to shed some light on another way of thinking about development problems. As you’ll see, these problems could all be solved with Elixir code. I want to give some concrete examples of problems that are better solved with the database.

Advantages

There are some problems Postgres is just better at solving. Since it was introduced over 20 years ago, a lot of work has gone into adding features and performance. …


Image for post
Image for post
The warning you’ll see when your password has been breached.

As maintainers of a package manager, we are constantly balancing our efforts across feature requests, bug tickets, technical support and documentation improvements. But perhaps more important of all is our obligation to security.

There are many security vectors for package managers. As a team, we are constantly looking for solutions to eliminate or at least mitigate them.

Recently I worked on one such solution. …


Image for post
Image for post

Project Overview

I have seen a few implementations of smart mirrors, or magic mirrors, and was interested in building my own. After deciding on what data I wanted to show (time and weather) I considered what technologies to use to build it.

I decided on using an Elixir/Phoenix app. And for the real-time updates, Phoenix LiveView. I had also considered using Nerves and Scenic, which I still think would be a good option.

In case you have missed the multiple keynotes from Chris McCord, he defines this new library this way:

Phoenix LiveView enables rich, real-time user experiences with server-rendered HTML.

As a primarily backend-developer, my knowledge of and confidence in javascript is pretty limited. I have a working knowledge of ECMAScript, but it has been a while and it’s not controversial to…


If part (or all) of your job involves interviewing candidates for technical roles, I can guarantee you are doing some things wrong. We are all doing some things wrong, if you aren’t, please read this article instead.

The purpose of this article is to point out just one issue I have observed continuously over the years; When interviewing candidates for technical acumen, we rely too much on our personal experiences, not objective data.

Things you know

Image for post
Image for post
Things you know

When assessing a candidate, you are working from a point of the technical things you know and are comfortable talking about. …


Image for post
Image for post
https://www.etsy.com/au/listing/511391892/cash-rules-everything-around-me-wu-tang

An API project I have been working on recently uses a plug to get the current user and authenticate them. This is not uncommon, but as a user navigates through the application, they will be authenticating on every request. In the interest of performance, I wondered if we could do better.

First, let me describe what the authentication plug does. It pulls the user id from a JWT. Then it queries the local database for that user and loads the user attributes as well as preloading an association. …


Image for post
Image for post
Photo Credit: Marco Verch

I recently ran into this error on a project I have been working on:

Ecto.Query.CastError: lib/project/queries/project_query.ex:238: value `"xyz"` cannot be dumped to type :binary_id in query

It seems a user incorrectly entered a URL, replacing what should be a UUID with a regular binary. It could be a path that has changed, or a bad inbound link, or just a typo.

As a result of this error not being correctly intercepted, the user is bound to get a 500 error back. …


Image for post
Image for post
Everything you need to build a smart sprinkler controller (almost.)

If you are like me, you appreciate smart things. Smart lights, smart thermostats, smart speakers, etc. One problem that can really use a smart solution is home sprinkler systems.

Traditionally, home sprinklers were programmed to come on at the same time and turn off at the same time. …


Image for post
Image for post
49 inch Vizio Monitor running my dashboard.

One of my goals recently was to make a dashboard for my office to display information that is relevant to me. The TV in my office generally goes unused (other than to show the occasional MLB day game) so it makes a great display for a dashboard.

As an elixir enthusiast, I decided to use the phoenix framework to build the app. …


There are a few modules in the Elixir stdlib that everyone is familiar with. Modules like Enum, Map, and String are used so frequently they have earned a certain level of ubiquity.

If you dig a little deeper, you will find a few specialized modules. Ones with names like Path, and Port, and the one we are focusing on in this article — Version.

The module definition is pretty straightforward:

Functions for parsing and matching versions against requirements.

Before going any further, it is important to mention this module expects and relies on the versions to follow the SemVer 2.0 …

About

Todd Resudek

Software Engineer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store