TIL: wrapping an execution in a tuple
One of the advantages of Elixir is its openness. You can get more readable code with the command wrapped in tuple. You don’t need to modify the response from functions itself.
What is Open Graph protocol and how to use it for your website?
The presentation of extra details about your website is straightforward. All you need to do is use Open Graph protocol. Any web page can become a rich object in a social graph. You can use it to show a thumbnail, author details, or even a short description.
Ecto Changeset for verifying parameters used in your API
You can use Ecto to check any information from the user. Extra, we have another layer of security. Only the supported parameters are passed to the domain layer. Using Ecto to verify parameters from the user is not difficult and can be part of your API verification pipeline.
How to feel less overwhelmed as a developer
A lot is happening in the IT world. Instead of jumping from one topic to another nervously, it’s worth concentrating on one thing. Stop for a moment and identify the problems. Also, remember that there is no right way in life. One is faster, and the other is slower. Don’t be afraid to ask for help.
Elixir tap and then macros - life-saving helpers
Elixir 1.12 introduced two very useful macros. They can be life savings helpers in your codebase. Instead of write extra functions, you can have nice logging and executing actions based on given data.
Check your password security with Have I Been Pwned?
Users often do not see the dangers of a weak password. Often, they reuse the same passwords on different sites to make their daily lives easier. Security is one of the critical aspects of any project. With Have I Been Pwned? it is possible to check passwords based on various leaks.
TIL: Custom timestamps fields in Elixir
Ecto Schema is very easy to adapt to our needs. Besides changing the type of the primary key, you can also change the type and names of the fields created by the timestamps()
macro.
Zero downtime deployments
Not so long ago, to release the application, it was necessary to modify the binary files on the servers. Thanks to good DevOps practices, the entire process can be changed. It is possible to achieve tens or hundreds of releases each day. Everything without the downtime of the application.
A ways to be a more effective engineer
Start from understanding the needs and point of view of the organization. Take care of good communication with customers. Don’t be afraid to develop both technical and soft skills. You will have a lot of battles at work. Choose wisely what you can engage in, given your limited time capacity. Act locally, think globally to change the project in small steps. Use non-hanging fruit to be successful and avoid burnout.
Skills development as the best investment in life
In my opinion, the best investment is our development. It allows us to achieve better results, receives promotions, and increase our remuneration. By investing in ourselves, we invest in our future. You didn’t know everything (and you still don’t know everything). It is worth trying to help others and learning at the same time.
Using View as a way to simplify your system
Many applications introduce some kind of status to make it easier to share data. However, more and more modules in your codebase need to be explicit about these assumptions. Views can eliminate the problematic SQL query. It’s also great way to introduce well-defined entities.
TIL: Log SQL generated by Ecto migration
Understanding exactly what SQL commands are running is helpful to ensure safe migrations. By default, Ecto does not log the raw SQL. However, we can change it.
Understand the domain of your project
Understanding the business is critical. It allows you to achieve better results in a shorter time. Don’t try to be an expert right away. Learn and don’t be afraid to ask when something is unclear. A common language is an opportunity for discussion with the client.
Elixir 1.13 released: The developer’s point of view
Let’s check what has changed in the latest version of Elixir. Most interesting, from my perspective, will be improving compilation time. However, that’s not all! New map support, information logging level and changes inside Inspect are waiting for you.
TIL: How to remove unused dependencies from mix.lock
What if a dependency is no longer needed? One library less is potentially one place of conflict between different versions of dependencies less. You can do it with one command, and clear your lock file.