Need some guidance for the best way to carry out test-driven development (TDD) with Elixir? Read on.
Here, we share some useful tips, such as how to isolate your code to simplify unit testing. We’ll also look at an important aspect that doesn’t often get tested—database-migration rollback—as well as how code coverage could prevent you from omitting testing some important parts of your code. Finally, there’s a helpful overview of property-based testing—a new way of writing tests that’s a great complement to unit testing.
Protocols can be a useful tool when building Elixir libraries and provide a way for users to extend your library for their own uses. I haven’t had much occasion to work with protocols, but recently had occasion to use them in a side project. I found that they are also a useful tool for encapsulating logic and wrote up my experience in a blog post.
- Numerous users have reported that annotation can encounter a
StackOverflowError. A reproduction case shows that they are called by Phoenix
Webmodules where one function containing
uses the same module again, such as an
admin_viewdepending on the base
use App.Web, :view. When the
use App.Web, :viewis resolving, the
defmacro __using__is re-entered as is the
admin_viewbecause there was no tracking of already visited
PsiElements. The fix is to track the visited elements and not re-enter the visited elements so that
admin_viewis skipped and the other call definition clauses can be checked to find
Latest post from Eric over at the SmartLogic blog: “Following up on our last post about generating an Erlang release through Docker, let’s talk about how we configure Distillery to generate the actual release. Here again I’m using the example of the scripts I use to deploy Grapevine, to give us a real example to look at.”
Supercharge your LiveView with PubSub and Phoenix Presence to track user state in a chat app! https://elixirschool.com/blog/live-view-with-presence/
ElixirWeekly: The Elixir Community Newsletter, covering community news you easily miss, shared on ElixirStatus and the web, in one email every Thursday.
Follow along commit by commit as we build a minimum viable Phoenix application from the ground up.
To understand how fast Phoenix is when compared to Rails, I created a simple application to benchmark both frameworks. The results are quite interesting.
The newest version of Horde, v0.5.0, includes some large performance improvements. This blog post explores the new library that’s behind these performance improvements, MerkleMap.
Preload is a part of Ecto.Query module that provides the Query DSL. Preload is a powerful tool that allows you to avoid N+1 queries from negatively affecting our performance. We must explicitly preload the data that we are accessing for an association between data. However, it’s easy to make mistakes when using preload. During the article, I will try to answer questions about making a decision on how to use preload.
Learn how to track data changes in your application using Phoenix and Ecto.
Registration for SpawnFest 2019 is OPEN! You can start building your teams and get ready to play on September 21st & 22nd!
We updated the rules this year with 2 major changes:
- You’ll be able to watch the action LIVE, since all repos will be public from the start! :scream:
- We added a deadline for our judges, that way you know when the results will be published and you don’t panic thinking we forgot about that :slight_smile:
And, as usual, we’re looking for sponsors. We have a very cool form where you can register your company and provide prizes for the contest.
Announcing Oban, an Ecto/PostgreSQL based job processing library with a focus on reliability and historical observability.
Oban’s primary goals are reliability , consistency and observability. It is fundamentally different from other background job processing tools because it retains job data for historic metrics and inspection.
0.2.0 was released today!
Python is the de facto language for machine learning and data science. There are numerous libraries and frameworks available in Python for this purpose. Elixir on the other hand is relatively new and doing machine learning in Elixir is still not easy. In this article, I will present how we can use a machine learning model trained using Python from a Phoenix (Elixir) web application. Since the process remains the same, it does not necessarily have to be web application. Any Elixir application can use similar approach and use pre-trained Python ML models.