These days, I'm discovering Elixir with Exercism.io. This service is really nice, it's perfect to discover a new language. You even have a mentor pushing you through recommandations to get a better solution. IMO it's the best to really get better at what you are learning. This is through a comment of my mentor, I …
Un ‘Game of life’ en Elixir
Comme annoncé dans mon article Prenons des risques, je continue mon apprentissage de la programmation fonctionnelle avec Elixir. Et je m'en sors aussi bien que Tchoupi! La meilleure façon d'apprendre quelque chose est de l'enseigner. Pour me familiariser avec le language, j'ai fait 2 présentations sur les points principaux d'Elixir. La première portait sur le …
Prenons des risques! 🧗♂️
Le confort ! C'est bien le confort. Un canapé moelleux, un bon plaid avec un chocolat chaud fumant. Sympa non ? On s'y voit déjà. Quand on utilise son langage de programmation préféré depuis plusieurs années, on se sent comme ça. On se sent à l'aise. On est tellement bien qu'on ne voit pas pourquoi …
Elixir et le module Agent
Voici un petit article sur le module Agent Elixir. Qu'est-ce qu'un Agent? Il faut voir cela comme un key /value store, une sorte de Redis vous permettant de stocker par exemple l'état d'une partie de poker ou tout autre information sur l'état de votre application. Un Agent est un serveur léger permettant de stocker et …
Elixir et le module Task
Hello les loulous! Oui Elixir est un beau langage. Cet remarque est purement personnelle et ne repose sur aucun argument technique. Mais c'est ainsi. Elixir est mon jouet. Je ne code pas professionnellement avec. Je l'utilise pour apprendre le paradigme fonctionnel. Certains râleurs diront que ce n'est pas le meilleur langage pour apprendre le fonctionnel …
Hanami my personal return of experience
TL;DR Hanami may be nice on paper but it's too constraining when it comes to work on real life situations. I'm sorry to say this but Hanami is a hipster framework. Hanami documentation consits of a starter guide and that's all. No in-depth documentation. You'll rapidly notice that if you look for a problem on …
How I stopped coffee
Why i decided to stop drinking coffee 25 years of drinking coffee everyday. 25 years of having difficulties to sleep correctly. 25 years of feeling irritable. It was time to do something. Here is my little story about why I decided to stop drinking coffee. At my parents As a teenager, I could always find …
Colemak keyboard Layout
After more than 10 years of Qwerty, I'm switching to Colemak. Why? I've realised alternative layouts are quiet popular in the Ruby on Rails community and in my company some people uses Dvorak layout. So I've started to read about the Qwerty alternatives. My interest got attracted by the Colemak and the Norman. They are …
Use template for your commits
Yes it's great to add descriptions and unicorns 🦄 in your tickets and pull request but where content is really needed is in your commits. It will always be connected to your code. It's a reference we (developers) have to care about. So your commits needs to be structured and they need to contain …
If your code do something and something else, it’s wrong !
One of my favorite driving principle when coding is separation of concerns (SoC). If your code is calculating the benefits of your company AND is storing the result, you are doing it wrong! So when you finish coding a class, ask yourself "what this class does?"
Ruby array shortcut %w
I'm used to create an array of strings in Ruby this way : but rubocop constantly reminds me there a shortcut for this syntax. Which is : The space is used as separator. The 2 syntaxes are identical.
Difference between Kernel.load and Kernel.require
First of you may ask yourself: "But gosh! What is the difference between 'require' and 'Kernel.require'?". And the response is NONE! It's the same. Ruby loads the Kernel module without a receiver and thus can be called in functional form: or Basically Kernel.load will reload every time the file. Where Kernel.require will load the file …
Continue reading "Difference between Kernel.load and Kernel.require"
Create a Rake task using Rake::Task
Yes it's true you can create a rake task in a rake file this way: But let's say, you want a gem to make available a rake task in the app loading it. The Rakefile of your application could look like this: The 2 last lines inject your new rake task in Rake.applications.tasks. The My::Gem::RakeTask.load …
Reloading your gem in the dummy app
Where is the dummy Rails app? The dummy app is a Rails app located in It allows to test the gem directly in an app. How to reload the Gem on modification? This is done in 3 steps : in Gemfile, add the option require: false: in config/application.rb, insert the lib directory of the gem …
Benchmarking sorting algorithms in Ruby
For some time now, I wanted to try the implementation of some simple sort algorithms in Ruby. So I did! I've implemented 4 sorting algorithms: - Quick sort - Merge sort - Bubble sort - Binary tree sort Quick sort It's one of the most efficients. In average, it makes O(n.log(n)) comparisons to sort n items. …
Dealing with the RTL8723BE Wireless Network Adapter & Ubuntu
This wifi card is killing me ... 2 years ago I've bought a Lenovo laptop. Ubuntu got installed smoothly on it. The only problem was the wifi. It was constantly being disconnected. That's when I discovered my new laptop had this disease, it has the RTL8723BE Wireless Network Adapter. After some research on internet I …
Continue reading "Dealing with the RTL8723BE Wireless Network Adapter & Ubuntu"
What will make you a better Elixir developer?
Practising, practising and practising. That's it 🙂 So that's what I did. During job interviews, you get these coding challenges, some are good, some are bad. I remember one: the bowling kata which is quiet fun. Here is the description of the coding test: Create a program, which, given a valid sequence of rolls …
Continue reading "What will make you a better Elixir developer?"
First steps with Elixir
Functional programming languages (FPL) are becoming more and more popular. Not sure if they are more and more used but at least they are more and more discussed on the web. I've finally decided to take the time to learn one of these FPL. And there was the problem, which one to choose! There is so …
Gitweb configuration, the easy way
Ok if you have juste one git repository, git instaweb is for you. This command automatically generate the config to connect with a webserver installed on your server. I recommand you to try, it's impressive as it's simple. For me the best config is : git instaweb -d webrick Now if you have several git …
UITextField with the keyboard automagically
On an UIView containing an UITextField, if you want the keyboard to appear when the view is displayed, you have to send the message becomeFirstResponder to the UITextField of the View like this: - (void)viewWillAppear:(BOOL)animated { [myTextField becomeFirstResponder]; }
