My name is José Diogo Viana, but everyone calls me /(Zé|Diogo)/.
I'm a Backend Engineer at Remote.
Here, you can find posts about random things I explored either in my free time or discoveries at work.
At night, I'm building Albwer, with a great friend.
Look around the post list or other website pages to know a bit more about what I do: 👨🏼💻🍺⚽️
Do you see any error? This website is open source
If something happened to you now, and you couldn’t communicate your actions for a long time, what would you need to say to your family, friends or co-workers? Albwer allows you to configure messages to be delivered when you are absent for a certain amount of time. In its essence, it works as a Dead Man’s Switch, but we believe it can be much more than that.
As the title implies, I wanted to analyse and discover patterns in my house’s electricity consumption. Which days consumed the most electricity, and what hours do we have peak consumption? On the other side, we also have some photovoltaic panels that produce energy for direct consumption. With both metrics, I can discover a lot of interesting heuristics, for example, the best hours to power the washing machine and take direct advantage of the sunlight we get in Portugal ☀️. For that, I’m using Elixir’s Livebook for the whole data manipulation and visualization.
Even if you’re relatively new to the Elixir ecosystem, you have likely come across the concept of generators. These generators are very common and you may recognize them from running commands like
mix new hello_world, or
Phoenix related commands. The cool thing is that these generators are not unique to big projects you have been following or using in the past. You can develop custom generators for your projects quite easily if they benefit from having something similar in place.
Metamask is an Ethereum crypto wallet, and serves as a gateway to dApps (decentralized Apps). By using a solution such as
Sign in with Metamask (or any other wallet, as highlighted before) the user doesn’t need to worry about an extra
username + password combo. There are several solutions to do this using React or any modern JS Framework, but in this blogpost I’ll tackle this using Elixir’s LiveView.
In this post you get an insight into how you can turn asynchronous requests into synchronous ones, using a
GenServer and the
handle_call function without a reply in place. This is possible because of an existing
reply/2 function that enables us to explicitly send a reply to a client when the reply cannot be specified in the return value of
handle_call/3. There are a few catches, of course, so be sure to read till the end