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.
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:
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 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.
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. …
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. …
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.
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.
When assessing a candidate, you are working from a point of the technical things you know and are comfortable talking about. …
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. …
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. …
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. …
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.
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.
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 …