5th video in the series about building cryptocurrency trading bot in Elixir
5th video in the series about building cryptocurrency trading bot in Elixir - this time starting and running multiple traders at once
We will introduce a rebuy_interval which will allow us to start new traders as prices fluctuate. Before doing that we will work on a few things:
- buy price (by introducing buy_down interval)
- quantity (as it was hardcoded up to this moment)
- race condition related to multiple transactions per order
- rebuy interval mentioned above
- visibility (introducing unique ids for traders [for logging])
Embedded comments form
This is part of the Phoenix LiveView series, but nothing in this tutorial is related to LiveView.
There’s also a challenge at the end of the tutorial!
Why Guards in Elixir Fail to Serve sometimes?
The functional firewalls (Guards) can be penetrated if you don’t know how the comparison works in elixir.
Here, I took an example to demonstrate. It’s a known topic, yet to know bit deeper.
https://medium.com/blackode/why-guards-in-elixir-fail-to-serve-sometimes-d4ee23d6b328
Happy Coding : Stay Healthy :)
Updating and Deleting from Temporary Assigns in Phoenix LiveView
Leveraging temporary assigns is a great way to optimize Phoenix LiveView. This post explores how to update/delete from temporary assigns in your LV. https://newaperio.com/blog/updating-and-deleting-from-temporary-assigns-in-phoenix-live-view
Elixir Wizards S4E13a Elixir Wizards Dojo: Nerves Part 1
Latest episode of Elixir Wizards is out today! Check it out here: https://smartlogic.io/podcast/elixir-wizards/s4e13a-dojo/
ThinkingElixir 008: Careers and Dev Environments
In episode 8 of Thinking Elixir, we discuss career development as programmers, how COVID may change things, our dev environments including editors, resources, asdf, docker, and much more!
Starting a New Elixir Project from Scratch
The good(and some bad) parts on starting up a new Elixir Project from an Elixir noob, all the way from bootstrapping the project to setting up CI/CD https://boredhacking.com/starting-a-new-elixir-project/
Elixir Wizards S4E12 Greg Mefford on Nerves, Poncho vs Umbrella
Latest episode of Elixir Wizards is out today! Check it out here: https://smartlogic.io/podcast/elixir-wizards/s4e12-mefford/
Ecto.Multi Patterns: Batch Inserting Records
In this blog post we look at a common Ecto.Multi
pattern; batch inserting records using a reduce to accumulate records into a transaction.
Correios CEP 0.7.0 released! Improvements in error responses.
Correios CEP
allows to find Brazilian addresses by zip code, directly from Correios API. No HTML parsers.
Error responses were improved with the introduction of type
and message
attributes.
iex> Correios.CEP.find_address("00000-000")
{:error,
%Correios.CEP.Error{
type: :postal_code_not_found,
message: "Postal code not found",
reason: "CEP NAO ENCONTRADO"
}}
iex> Correios.CEP.find_address("1098PR")
{:error,
%Correios.CEP.Error{
type: :postal_code_invalid,
message: "Postal code in invalid format",
reason: nil
}}
Changelog for version 0.7.0
:
Changed
- Improve error responses. Issue #18
Check it out at:
Building the Brex Accounting API In Elixir
How Brex created an accounting API with a microservices/Protobuf/Elixir architecture https://medium.com/brexeng/building-the-brex-accounting-api-7984f570aac1
IntelliJ Elixir v11.8.0
Changelog
Enhancements
- Quick documentation (F1/Ctrl+Q)
- Run Icons in gutter next to ExUnit tests. The icon changes to the state of the test: green for passing and red for failing.
Bug Fixes
-
Fix Unchecking Show Method Separator still showing on
@doc
and@spec
.Previously, unchecking Show Method Separator would still show the method separator if it was the module attributes (such as
@doc
and@spec
) associated with the call definition (def
,defp
,defmacro
, ordefmacrop
) and only disabled the ones directly above the call definition. This is fixed by checking if method separators are enabled ingetLineMarkerInfo(PsiElement)
instead of the specializedgetLineMarkerInfo(Call)
, so that the check happens for both module attributes and call definitions. -
Remove “Unresolved module attribute” error annotation because module attributes cannot be resolved through
use
yet, so current annotation is a false positive in those cases. -
Use
SimpleTemplateLanguageFormattingModelBuilder
for EEx files, so that theTemplateDataLanguage
(i.e.html
when the extension is.html.eex
) formatter is used instead of the Elixir formatter.
Wolf, Goat, Cabbage… and Elixir
Using asynchronous traversal of a branched state graph to find a solution of a Lewis Carroll’s favorite puzzle.
https://rocket-science.ru/hacking/2020/08/04/wolf-goat-cabbage-and-elixir
ecto_psql_extras: PostgreSQL database performance insights
I’ve just released my first Elixir hex package. ecto_psql_extras provides powerful insights into the performance metrics of PostgreSQL database. Locks, index usage, buffer cache hit ratios, vacuum stats and more.
ThinkingElixir 007: Background Jobs with Miguel Palhaus
In episode 7 of Thinking Elixir, We talk with Miguel Palhaus about lessons learned while working with background jobs in production systems. He shares some tips he’s learned through experience. We share other mistakes made and what we learn from them. We cover background job options, choosing tech based on the team you have, IEx tips to remind yourself you’re on production, and much more!
Deploying Plug to Heroku
Need to deploy an app that just uses Plug? In this episode we’ll deploy a simple Plug.Router app to Heroku.
Leveraging Exceptions to handle errors in Elixir
Returning a tagged tuple {:ok, result} | {:error, reason} is the de facto practice to handle errors in Elixir, but that may not be enough for all situations and this article will explore how to leverage Exceptions to enrich errors and the benefits of doing so.
Check out at https://leandrocp.com.br/2020/08/leveraging-exceptions-to-handle-errors-in-elixir/
Building Backdoor: web console for Elixir & Phoenix applications - Part #2
In part 2 we are improving code execution by allowing usage of imports and macros, and also add exception handling and formatting. Check it out!
Building Backdoor: web console for Elixir & Phoenix applications - Part #2
In part 2 we are improving code execution by allowing usage of imports and macros, and also add exception handling and formatting. Check iit out!