inaka

Latest blog entries

/
Erlang and Elixir Factory Lite B.A.

A brief introduction about what was the Erlang Factory Conference in Buenos Aires for some Inaka team members

Jul 07 2017 : Euen Lopez

/
The Art of Writing a Blogpost

The Art of Writing a Blogpost

Apr 11 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

/
See all Inaka's blog posts >>

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

A photo of Felipe Ripoll wrote this on February 14, 2017 under erlang, inaka, spelling .

Spelling CI / Sheldon

You probably know the feeling...

...when you fix a very important issue in that "super cool" open-source project. You keep all your attention to those parts of the code where your changes could affect something, you run the tests until you can confirm: "It is fixed now, I am sure"; but then again, you run all the tests again up until, as the brave developer you are, you click the "open pull request" button. You are happy because you know the problem is fixed, everyone is going to love you... but a reviewer appears and rejects your changes because, on the documentation, you wrote "wihle" instead of "while". Damn!

You have to pay as much attention to your documentation as to your code, but when English is not your mother tongue, you will definitely have to spend time improving your grammar and spelling. If your problems have to do with grammar, sorry man, but you'll have to continue studying... But if they are related to spelling, here at Inaka we developed a tool to help you out with that...

Sheldon

Sheldon is a simple Erlang Application for spell checking. You can find it here. Its API accepts a text (iodata() for Erlangers) and checks all the words. If sheldon doesn't understand a word it will try to help you with some suggestions. For suggestions we were inspired highly by the Elixir project spell_check.

Let's try:

1> sheldon:start().
ok
2> sheldon:check("My name is Felipe and I am aware wrote wihle instead of while once").
#{bazinga => <<"Too bad, I'll have a virgin Cuba Libre.">>,
  misspelled_words => [#{candidates => ["while","wile"],line_number => 1,word => "wihle"},
   #{candidates => ["flipe","feline"],line_number => 1,word => "Felipe"}]}

Sheldon has detected our misspelled word ("wihle") and the line where it is; it also gave us some suggestions ("while" and "wile") and a bazinga message.

But wait! sheldon doesn't recognize my royal name ("Felipe"). I confess that the "feline" suggestion is cool too, but my parents wouldn't be happy if I switch it now. This is because sheldon works with a dictionary and, as expected, it is impossible to have all the words there. We have 2 choices here: update the dictionary or escape the word. Let's escape!

sheldon gives you the possibility to escape some words like "Felipe" in this example. We only have to create a configuration map like this.

3> Config = #{ignore_words => ["Felipe"]}.
#{ignore_words => ["Felipe"]}
4> sheldon:check("My name is Felipe and I am aware wrote wihle instead of while once", Config).
#{bazinga => <<"Does it affect me? Then suffer in silence.">>,
  misspelled_words => [#{candidates => ["while","wile"],line_number => 1,word => "wihle"}]}

Great, now "Felipe" is ignored.

That was a very simple example, but sheldon also provides the way to ignore patterns or blocks of code. For that you can check this example.

But... what if one day we are the Pull Request Reviewers? How can we prevent someone from writing "wihle", even if we think "wihle" is correctly spelled?

Spelling CI

At Inaka we also wrote Spelling CI. It is a continuous integration tool built on top of sheldon. Basically you must log in using your Github account and select the Github projects you want to check.

spellingci is only integrated with Github platform. It works for both public and private repositories.

By default, it will check the spelling for all the .md and .markdown files in your branch, but you can configure spellingci in order to check different ones or ignore some words, patterns, blocks of code... all through a configuration json file.

Every time sheldon finds a misspelled word, it will write a comment there with the suggested words.

Lovely, isn't it?

Where to find them

sheldon and spellingci are open-source. You can find the source code here:

sheldon is also available at hex

Here is spellingci deployed, feel free to use it and check your PRs!

Conclusion

As software developers, we tend to focus entirely on the code and sometimes we forget about the spelling. With sheldon and spellingci, at least we have help. For example, this blog is a Github repository, so now we are going to check our post with sheldon/spellingci

And remember: for grammar... keep studying!

A photo of

Felipe Ripoll

Erlang Developer