inaka

Latest blog entries

/
The Art of Writing a Blogpost

The Art of Writing a Blogpost

Mar 09 2017 : Matias Vera

/
SpellingCI: No more spelling mistakes in your markdown flies!

Feb 14 2017 : Felipe Ripoll

/
Fast reverse geocoding with offline-geocoder

Do you need a blazing fast reverse geocoder? Enter offline-geocoder!

Jan 18 2017 : Roberto Romero

/
Using Jayme to connect to the new MongooseIM REST services

MongooseIM has RESTful services!! Here I show how you can use them in an iOS application.

Dec 13 2016 : Sergio Abraham

/
20 Questions, or Maybe a Few More

20 Questions, or Maybe a Few More

Nov 16 2016 : Stephanie Goldner

/
The Power of Meeting People

Because conferences and meetups are not just about the technical stuff.

Nov 01 2016 : Pablo Villar

/
Finding the right partner for your app build

Sharing some light on how it is to partner with us.

Oct 27 2016 : Inaka

/
Just Play my Sound

How to easily play a sound in Android

Oct 25 2016 : Giaquinta Emiliano

/
Opening our Guidelines to the World

We're publishing our work guidelines for the world to see.

Oct 13 2016 : Brujo Benavides

/
Using NIFs: the easy way

Using niffy to simplify working with NIFs on Erlang

Oct 05 2016 : Hernan Rivas Acosta

/
Function Naming In Swift 3

How to write clear function signatures, yet expressive, while following Swift 3 API design guidelines.

Sep 16 2016 : Pablo Villar

/
Jenkins automated tests for Rails

How to automatically trigger rails tests with a Jenkins job

Sep 14 2016 : Demian Sciessere

/
Erlang REST Server Stack

A description of our usual stack for building REST servers in Erlang

Sep 06 2016 : Brujo Benavides

/
Replacing JSON when talking to Erlang

Using Erlang's External Term Format

Aug 17 2016 : Hernan Rivas Acosta

/
Gadget + Lewis = Android Lint CI

Integrating our Android linter with Github's pull requests

Aug 04 2016 : Fernando Ramirez and Euen Lopez

/
Passwordless login with phoenix

Introducing how to implement passwordless login with phoenix framework

Jul 27 2016 : Thiago Borges

/
Beam Olympics

Our newest game to test your Beam Skills

Jul 14 2016 : Brujo Benavides

/
Otec

Three Open Source Projects, one App

Jun 28 2016 : Andrés Gerace

/
CredoCI

Running credo checks for elixir code on your github pull requests

Jun 16 2016 : Alejandro Mataloni

/
Thoughts on rebar3

Thoughts on rebar3

Jun 08 2016 : Hernán Rivas Acosta

/
See all Inaka's blog posts >>

/
Announcing xref_runner

Iñaki Garay wrote this on February 10, 2015 under erlang, inaka, workflow, xref .

Erlang has many strengths, stemming from its design decisions. One of those decisions was to be as dynamic as possible and bind attributes to language entities as late as possible. One example is when resolving calls to functions, finding the code's location is done just before the call, instead of, say, at compile-time. This gives you flexibility when writing code and allows the underlying platform VM to swap code while it's running.

The tradeoff is that you can write code that calls a function which doesn't exist, and the error will be detected at run-time. Erlang's fail-fast philosphy (at least, if you are following it) means you'll find out sooner than later that the call will blow up, but NOW is better than sooner, especially if now is before time is spent running tests and reviewing code!

Checking your code is trivial (for a certain definition of "trivial"; c.f. mathematical proofs), all you have to do is parse the compiled .beam files, build a callgraph and check whether undefined functions are called. Of course, Erlang/OTP includes a tool that does just this: xref. And it's really easy to use. Rebar simplifies its use further and allows you to check your code with a single command: rebar xref. Every developer should compile, test and xref their code before committing and pushing (dialyzer too!).

At Inaka, we sure can get lazy sometimes. The good kind of lazy, the kind that doesn't want to do repetitive repetitive repetitive and boring work twice. We like our little robots to do the menial work that we sometimes forget, like making sure our code conforms to all our guidelines, or xreffing our code. In the same spirit in which we created elvis and elvis.inakalabs.com, we now started on xref-runner.

To use xref_runner, make sure it’s in your code path and call xref_runner:check/2 with the appropriate parameters. The first one is the type of check made by xref, since it can do much more than check for undefined functions. The second parameter is a configuration map, all fields are optional. To check the full documentation see the README.md file in the github repo.

1> xref_runner:check(undefined_functions, #{}).

We envision a suite of tools to automatically sanitize your Erlang code, and up your game level.

Stay tuned for more, same inaka-channel, same inaka-time.