HTTP unit tests using ExVCR
ExVCR is an HTTP request/response recorder for Elixir. It supports rapid test-driven development when accessing external web services.
For an Elixir library I authored, the execution time for the test suite reduced by a factor of ten when using ExVCR’s recorded fixture data. From 44 seconds down to 4 seconds.
Livecoding a FizzBuzz implementation in Elixir
Last week I gave a lightning talk on Elixir to a local tech meetup. I thought it’d be a good, quick introduction for people to see the power of Elixir and a few of my favorite language features. It turned out to be only 6 minutes long and 7 lines of code.
Short post with embedded video: http://geoffreylessel.com/2016/livecoding-fizzbuzz-in-elixir-lightning-talk/
How to link your Java application to Elixir/Erlang
So you are developing an Elixir/Erlang application and you discovered a use case where you need to use so Java code in your app. This, as many other use cases, is easily donable in BEAM.
To connect our Java code with Elixir/Erlang we’ll use JInterface package. Read more http://nsomar.com/p/1571936b-cc83-4233-998d-802fc5098969/
Counting Nucleotides with Elixir (a first learner's perspective)
It’s my first contact with Elixir and Functional Programming. Explaining a bit of recursion and Elixir’s beautiful pattern matching on function’s signature. http://codebikeandmore.com/code/2016/11/06/the-beauty-of-elixirs-pattern-matching.html
Javascript-style Destructuring for Elixir
A simple enhancement for Elixir’s already excellent pattern matching, to make it a little less verbose:
Using mocks and explicit contracts to test remote dependencies
How we use mocks and explicit contracts to manage remote dependencies and associated tests in our Elixir projects.
http://engineering.spreedly.com/blog/mocks-and-explicit-contracts-in-practice.html
Strategies for Migrating a Phoenix App on Heroku
For those of you who have deployed to Heroku and are sick of running heroku run mix ecto.migrate
https://blog.learnphoenix.io/strategies-for-migrating-a-phoenix-app-on-heroku-ed0ea3aee4e5
EctoAutoslugField: Added Ecto 2 support
We have released a new version of ecto_autoslug_field
. We now support Ecto
version 2.
ecto_autoslug_field
automatically creates slugs for your Ecto models.
Check it out: https://github.com/sobolevn/ecto_autoslug_field
ExNrel - API client for NREL
Just finished initial version of ExNrel to interact with API from @NRELdev
Pluralsight Course: Getting Started w/ Elixir
I just released Getting Started with Elixir on Pluralsight. It goes over the basics of data types, functions, recursion, iex, and mix. It concludes by creating a supervisor application to send out Tweets using ExTwitter
Ecto.Rut v1.2.0 Released - Ecto Shortcuts to make your Life easier!
New version of Ecto.Rut
released today, with detailed documentation and tests.
Ecto.Rut provides you with simple shortcut methods to perform Ecto operations (without calling YourApp.Repo
or involving yourself with changesets everytime).
Beyond 10,000 Lines
I wrote a blog post about lessons learned from building a large Phoenix project, (> 20,000 lines) on Infinite Red’s Red Shift blog:
https://shift.infinite.red/beyond-10-000-lines-ba1adc17cc7b#.yo19iz4nu
peselx 0.2.0 released
New version of peselx package released today.
Fixed few bugs and add validation for length.
What is peselx?
Peselx is module to validation PESEL number – Polish national ID.
String manipulation micro optimisation using IO lists: A small refactoring shows positive gains in benchmark
Inspired by Nathan Long’s “Elixir and IO Lists” Part 1 and Part 2 articles on the performance impact of using IO lists for string concatenation and interpolation.
String manipulation micro optimisation using IO lists demonstrates a real-world example of swapping naive string manipulation for an IO list. The benchmarked gains for the affected use case were a 20 - 25% performance improvement.
Distributed Supervisor test
This is a small experiment I’ve done to test out a system where we have multiple nodes and a single worker process, registered globally, and running a task every two seconds. The process can only be running in one of the nodes, so the task it runs doesn’t get duplicated in the other nodes. If one of the nodes dies, the remaining ones will try to restart the process.
Any feedback or suggestions will be greatly appreciated :)
https://github.com/bigardone/elixir-distributed-supervisors-test
Debugging "HTTPoison + SSL = Connection Closed"
When running our app in production, we had a bit of a WTF moment: some HTTPS calls over HTTPoison were failing with a mysterious “connection closed” error. This blog post explains what the root cause was and how we fixed it.
Mock Modules and Where to Find Them
When you create mock modules in Elixir, how to you keep them out of your production code?