4 tips for mastering test-driven development

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.

https://www.welcometothejungle.co/fr/articles/tips-test-driven-development

ExUnit Deep Dive

@dnlserrano on ExUnit and how it works internally. In it, some details of how the @elixirlang testing framework uses macros and process spawning to run our tests blazingly fast 🏃‍♂️💨

Event Sourcing With Elixir - Part 5

In Part 5 of this series on Event Sourcing we’ll round up account closure, deposits and withdrawals to set the stage for transfers using process managers.

Shameless plug: Check out @elixirstatus' other community project:

Credo, a new static code analysis tool that acts as a code linter, but also focusses on teaching coding practices and code consistency.

Phoenix Live View debounce

While waiting for phoenix live view debounce feature, it is easy to add it with very few lines of code. A blog post

Using protocols in your own code

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.

IntelliJ Elixir 10.5.1

  • Numerous users have reported that annotation can encounter a StackOverflowError. A reproduction case shows that they are called by Phoenix Web modules where one function containing quote block uses the same module again, such as an admin_view depending on the base view through use App.Web, :view. When the use App.Web, :view is resolving, the defmacro __using__ is re-entered as is the admin_view because 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_view is skipped and the other call definition clauses can be checked to find view.

Installation Instructions

Configuring Distillery

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.”

Tracking Users in a Chat App with LiveView, PubSub Presence

Supercharge your LiveView with PubSub and Phoenix Presence to track user state in a chat app! https://elixirschool.com/blog/live-view-with-presence/

Deploying Elixir - Demo

This week Eric live streamed a demo of how we deploy Elixir at SmartLogic with Distillery and Docker https://smr.tl/2LYawJt

ElixirWeekly: The Elixir Community Newsletter, covering community news you easily miss, shared on ElixirStatus and the web, in one email every Thursday.

ElixirMix Podcast 052 - Production Pitfall Pontification

In this episode of ElixirMix, Josh and Michael talk about lessons learned from production pitfalls. They discuss Heroku, shortcomings, and alternatives. They discuss configuration tools, clustering, career hacks and much more!

Podcast Episode

Minimum Viable Phoenix

Follow along commit by commit as we build a minimum viable Phoenix application from the ground up.

http://www.petecorey.com/blog/2019/05/20/minimum-viable-phoenix/

Phoenix vs Rails benchmark. How fast is Phoenix?

To understand how fast Phoenix is when compared to Rails, I created a simple application to benchmark both frameworks. The results are quite interesting.

https://www.elviovicosa.com/2019/05/16/phoenix-vs-rails-benchmark

Introducing MerkleMap, the new library powering Horde's improved performance.

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.

https://medium.com/@derek.kraan2/introducing-merklemap-the-new-library-powering-hordes-improved-performance-9cd0b74a481

Preload, or not preload, that is the question

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.

https://medium.com/@SergeyChechaev/preload-or-not-preload-that-is-the-question-2b706da51cea

Tracking changes with context using Phoenix and Ecto

Learn how to track data changes in your application using Phoenix and Ecto.

https://luizdamim.com/blog/tracking-changes-with-context-using-phoenix-and-ecto/

Registration for #spawnfest 2019 is OPEN! / #erlang #elixirlang

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.

How to use Mint, an awesome HTTP library for Elixir - Part 01

https://scoutapm.com/blog/how-to-use-mint-an-awesome-http-library-for-elixir-part-01

Oban — Reliable and Observable Job Processing

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.

Version 0.2.0 was released today!

https://github.com/sorentwo/oban

Using Python Trained Machine Learning Models from Phoenix (Elixir) Applications

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.

https://itnext.io/using-machine-learning-models-python-from-phoenix-elixir-applications-cd028e4e5f01

ElixirMix Podcast 051 - Nerves and Farmbot with Connor Rigby

In this episode of ElixirMix, We talk with Connor Rigby about all things Nerves. We discuss FarmBot, embedded tooling, robots, SQLite Ecto, unit testing on Nerves, Grisp as an alternative to Nerves, Farmbot’s trip to NASA and much more!

Podcast Episode