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 […]
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 […]
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?”
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.
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 […]
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 […]
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 […]