Welcome to Coding!
If you have feedback please send me a message (links on the bottom).
The Pattern Matching Approach Talks Elixir Ruby
How pattern matching affects coding in Elixir? Let’s talk about Elixir pattern matching and how this would change the way we solve problems.
Testing in Elixir Talks Elixir Testing
Testing help developers to speed up, so let’s talk testing in Elixir.
Elegant SQL Queries PostgreSQL
This is a short blog post for sharing some sql examples to solve some daily problems in an elegant way. There are some simple business requests that could easily be solved with N+1 queries, but watch out this is a trap. If you want to scale your app you’ll need to leverage queries processing to the DB. Let’s see how though these examples.
Generating fake data using SQL PostgreSQL
Fake data are very useful in development environment for testing your application or some query performances for example. In this Blog Post I’ll share how I created a simple SQL script for PostgreSQL 🐘 to generate some fake data. Enjoy!
This is a short post, more like a straightforward recipe for new Elixir on Phoenix projects to use twitter bootstrap. Kind of sharing some frontend management tips to backend developers like me.
Docker for all environments Docker Rails
Should we use Docker 🐳 for local development ❓? It seems easy to argue to not use it, just use local and that’s it. But it’s also easy to find cases where the convenience of Docker play a big role on a daily basis job. In case you want to consider it for any reason you have it read this post and have fun.
Wait for Docker Container Docker
You may have some docker 🐳 containers 📦 to start your app but there are some startup order to be followed. You are probably using a solution such as
docker-composeand wonder why they don’t have this implemented yet? On this blog post I’ll present my solution for this problem, a very simple shell script for waiting a container.
Have you ever noticed that sometimes Github lists your commits in a weird order? I’d say disordered. Was that a bug? Or was that a feature? Was that the developer fault? Should we blame
git rebase? All these questions and a hacky trick as an alternative solution.
Struct Factory for Elixir Elixir
How easy is to build a Factory solution for Elixir applications? In this post I share a simple 20ish lines-of-code solution and its testing ✅. Check this out and start using factories for building data for tests and seed.
Ruby OptionParser Ruby
In order to parse user inputs passed to CLI Scripts we can use the Ruby class
OptionParser. With that it’s possible to define an argument specification like required/optional, or restrict values or even convert into a specified class. Find out how to configure
OptionParserand use it.
Ruby CLI Script Ruby
To create CLI script that runs Ruby code is super fast and straightforward. With that you can run any Ruby code directly from terminal, including your own gem. Let’s take a look what’s need to be done in order to get a nice maintainable CLI script written in Ruby.
OpenStructare two different classes that handle to keep some data into a class instance. Although they have similar name and features they are actually very different in usage. Let’s highlight the differences between these two classes and find out the best scenarios for using each one.
case/when/elsestatement uses the Ruby operator
===, also known as threequals. There are some nice implementations of
===that we have to know. So let’s see some of them.
That’s the final part of a series regarding Chrome Extension Development. In this post I’m using a simple version of NetFlex for showing how to configure the injection of your
js/cssfiles into an existing thrid part website. Also how to receive a message from your popup and then interact with the main application.
This is the 2nd/3 post about Chrome Extension Development, and in this post I’m going to talk about Popup. Using NetFlex as an example let’s see how to configure a Popup, what you can do with it and how to send messages from your Popup and the main page.
Here’s a 1st/3 post regarding Chrome Extension Development, and for illustrating I’ll use my own NetFlex plugin as example. This is a powerful way to add features to the user for existing pages that you don’t even have access to the code. It’s crazy how many possible solutions you can come up with.
ES2015 has some improvements for functions including the lexical this, implicit return and more. All in a short syntax, so let’s use new ES2015 syntax for functions.
DSL for Rails API calls Ruby Rails
My goal is to encapsulate a API with service classes using a DSL similar to
ActiveRecord. This way we can use methods like
find_by, etc. In order to achieve that I created a class to abstract a json API using the gem faraday and the result is very cool.
Configuring a Rails Application Ruby Rails
There are a lot to consider when configuring a Rails application, such as variables organization, environments, security credentials, etc. Among so many different ways to do that I’m going to show my preferred way using what Rails has to offer with