Things you didn't know about Ruby

Things you didn

From time to time, when I create a code, people ask me: Is this working? , or they tell me: I didn’t know that. Being in those situations allows me to understand that something normal for me can be new for someone else. So, today I would like to share with you some Ruby tips and tricks. I hope you will like them.

Ruby map(&:method) syntax - meaning & usage

Ruby map(&:method) syntax - meaning & usage

A few days ago, I worked on a customer project, and I wanted to use one line map but with an argument for a method inside this map. I never had this need before. Normally in one line map, I do something like .map(&:next). This time I needed something else. So, I did a short research on how can I do that. The results of this research were so interesting to me that I decided to create an article about this topic. So let’s get started!

Slack - a communication tool

Slack - a communication tool

I often say: Premature optimization is the root of all evil. and this is true. Nevertheless, I will talk today about optimization. The optimization of work environment or, in other words, efficiency is very important. Who doesn’t want to work faster? Do the work and have more time for yourself? For sure, I want. So, today I will share some tips and keyboard shortcuts for Slack.

Good programmer skills

Good programmer skills

People often ask me what they should do to be a programmer. In most cases, they expect advice like: read this book, learn this technology or do this course. They want the silver bullet answer, but it’s not so simple. Of course, you can graduate and feel more confident in programming. Even then, you can be a bad programmer. Programming is one of these fields, where you always evolving, improving your skills, your mindset, and learning new things. Today, I would like to show you some skills, which are, in my opinion, important for a programmer.

Logitech G915 TKL with Ubuntu

Logitech G915 TKL with Ubuntu

I bought a Logitech G915 TKL keyboard at a beginning of the 2021 year. This keyboard works pretty well on Windows and Logitech G Hub software. There is a ton of ways to customize it. It can be fun. The problem comes when you cannot normally install G Hub software on your system, like on Ubuntu. Since I use the Logitech G915 TKL keyboard for a while with my Ubuntu, I would like to share what I already know about customizing it on Linux.

Test doubles - the difference between stubs and mocks

Test doubles - the difference between stubs and mocks

In the testing world, we have stubs, mocks, dummy objects, and so on. It can be confusing what to use and when to use it. I would like to organize all of those terms in a more accessible way. There is one problem. In many different sources, we have discrepancies regards to those terms. I will show you my understanding of this topic. Of course, based on chosen sources.

Dynamic configuration using YAML in Ruby

Dynamic configuration using YAML in Ruby

From time to time using Ruby or even more often using Ruby on Rails, I need additional configuration with some secret API keys. I don’t want to save those data in the git repository, but it is too early to put them in the database. In this case, environment variables can do the trick. You put sensitive data to the .env file, and you don’t track this file in the git repository. We’re done! Not exactly, in my case. I wanted to have the structured data in one file. So I used the environment variable together with YAML (recursive acronym...