Holidays helper in Ruby on Rails

Today, while doing a calendar I found a module on Rails called Holidays. I will use the Rails console to demonstrate: bundle exec rails c Loading development environment (Rails 5.0.1) [1] pry(main)> Holidays.on(Date.tomorrow, :pt) => [{:date=>Wed, 01 Nov 2017, :name=>”Dia de Todos-os-Santos”, :regions=>[:pt]}] [2] pry(main)> Holidays.on(Date.today, :pt) => []

Read More Holidays helper in Ruby on Rails

The importance of a Backup

Before I started working professionally as a software engineer, I would see a lot of people talking about the importance of backups in the IT industry. A few weeks ago I worked on a project that didn’t have any backups and was in production! The first thing I did was a backup and used the […]

Read More The importance of a Backup

Ruby cover? instead of include?

Last week I learned that we should use cover? instead of include?. When you ask a range if it includes something, ruby is going to instantiate every object within that range and then check if the object you pass into include? exists in there. If you ask cover? it’s just going to figure out and […]

Read More Ruby cover? instead of include?

Taking more than you can handle

Some time ago a friend gave me a coding challenge which I decided to make it in Ruby on Rails, I hesitated because was expecting that an Enterprise would give me a task to build something in JavaScript/HTML/CSS, so the time passed. Then I applied for a company that is hiring any kind of developer […]

Read More Taking more than you can handle

My first programming interview

First of all I finished after work the Ruby Koans, it was an awesome experience and made me understand much more about testing. It happened so fast that I felt sad for being so short but at the same time felt an inner feeling that I have accomplished something good. Rails Tutorial is next (for […]

Read More My first programming interview