The (not so) Magic Tricks of Testing in Elixir (1/2)
A new blog post by Daniel Caixinha about testing in Elixir. This is part 1. More to come soon! https://medium.com/onfido-tech/the-not-so-magic-tricks-of-testing-in-elixir-1-2-89bfcf252321
PostgresDescribe
I found myself wanting documented state of my database within my Elixir/Phoenix app, similar to what schema.rb or schema.sql provides in a Rails app.
Announcing the initial release of PostgresDescribe. Does what you think it does - generates a set of files on disk that contain the output of the \d command in a PG shell.
AC5 Adding EEx templates to a Cowboy web server
Building the Alchemist.Camp website, Part 5.
Today, we added ability to dynamically render and serve up EEx template files, without requiring a restart of the web server. In the process of building this, it was convenient to flesh out our minimal clone of Plug.Conn a little bit.
AC4: a minimal Plug.Conn clone to handle 404s
Building the Alchemist.Camp website, Part 4.
In order to properly set response headers, we begin writing a minimal clone of Plug.Conn. Soon it will be possible to write templates, views and controllers for our site
IntelliJ Elixir v7.0.0
Performance improvements
- More WHITE_SPACE/less EOLs, so less reparsing when adding/removing spaces or line
- Credo annotator can be configured to trade-off less details for less CPU usage
Elixir & Phoenix Tutorial: Build an Authenticated App
Tutorial for building an authenticated app (using Auth0) for a countdown event app:
https://auth0.com/blog/elixir-and-phoenix-tutorial-build-an-authenticated-app/
Thinking Functionally
A Plataformatec’s team member and PragProg are releasing the book “Learn Functional Programming with Elixir”, and we’re giving away the first chapter, “Thinking Functionally”.
Isolating code in contexts
I wrote a blog post about how I isolate code in contexts for better maintainability.
https://medium.com/@lasseebert/isolating-code-in-contexts-172ec93ce532
Phoenix for Rails Developers book is available
I just published the book “Phoenix for Rails Developers”: http://www.phoenixforrailsdevelopers.com.
Use the promo code elixirstatus to get a 10% OFF discount.
Panoptikum - Podcasting showcase and social network
Panoptikum is a podcasting directory (>26.000 podcasts, >1.600.000 episodes), search engine, showcase and social network. You can find out more on our about page, the source code on Github or read about our progress on our blog.
Panoptikum is free software written in Phoenix and Elixir and respecting your privacy. We are interested in your feedback or even your applications using our API.
Pattern Matching in Elixir
In this introduction to pattern matching we walk through a few examples of how it’s used in Elixir.
Sage - Implementation of Sagas pattern in pure Elixir.
Sage is an dependency-free implementation of Sagas pattern in pure Elixir. It is go to way when you dealing with distributed transactions, especially with an error recovery/cleanup. Sage guarantees that either all the transactions in a saga are successfully completed or compensating transactions are run to amend a partial execution.
It’s like Ecto.Multi but across business logic and third-party APIs.
The Secret Behind Elixir Operator Re-Definitions: + to -
https://medium.com/blackode/the-secret-behind-elixir-operator-overriding-to-a564fd6c0dd6
This article comprises things like creating new definitions for existing operators.
Extra Cheese
- Live Demo with Explanation
- Humour Touch
- Screen Shots
Fleshing out URLs with Elixir
Step one of crawling a web page is getting a fully fleshed out URL pointing to that page. The problem is that people usually think of URLs in fuzzy, incomplete terms. Thankfully, fleshing out the missing details is simple with Elixir.
Benchmarking guard clauses
I used to think that because length/1 was slow in guard clauses and could easily be replaced by pattern matching, that all guard clauses should be replaced by pattern matching. Turns out, some of those guard clauses are really quite quick!
Looking for feedback about stdlib Logger improvements!
Posted a new proposal to the mailing list, please take the time to read over it and let me know your thoughts! As new features can only be added if they’re supported on the mailing list, it’s vital that thoughts make it there :)
https://groups.google.com/forum/#!topic/elixir-lang-core/q-2pUCWwHAE
Three tutorials covering deploying Phoenix apps to Google Cloud
For those interested in deploying an Elixir/Phoenix app to Google Cloud, I’ve posted three getting-started tutorials on Google’s community site:
- Deploying to App Engine for spinning up an app with a minimum of work
- Deploying to Kubernetes Engine to get on board with containers
- Deploying to Compute Engine if you want complete control over your cloud resources
#TIL: mix hex.docs open ecto
I love that mix hex.docs open ecto opens Ecto’s docs in my Browser. I’d love to have something like mix hex.readme open plug to open README.md files just as easy.
SpawnFest Registration Deadline extended
Given the current rage in team registrations (we have 28 already 😱), we decided to extend the registration deadline for @spawnfest one more day! #erlang, #elixir, #lfe devs… you have until tomorrow to register your team at https://spawnfest.github.io/registration and win some awesome prizes!
