This morning I read “Integrated systems for integrated programmers” article by DHH. I totally agree with it, replacing a monolith by microservices won’t solve all its problems automagically.Read more...
Sooner or later each of us encounters a situation where a method depends on time. The feature needs to be tested later on. Among Rubyists, the most popular gem which provides handy helpers to this problem is called
timecop. Since Ruby on Rails 5.2 it can be replaced by built-in methods defined within the
Go Modules has been the default since Go 1.13. One of microservices I am responsible for uses Golang 1.13 currently. The oldest Go version used by the application was 1.9 and at the time, dep was the most obvious choice for dependency management.Read more...
Every minor Ruby release brings some new features to the language. Few interesting articles describing Ruby 2.6.0 changelog have already been published, so describing them is not the goal of this article. However, one of them allowed me to do another open source contribution, and in my opinion, that is something worth sharing. Maybe it will inspire you to do the same.Read more...
Using strong parameters in Ruby on Rails applications to allow permitted values is usually not enough. Taking care of validating allowed values to make our applications is also important to make them more secure and less error-prone. To handle the validation properly we can write custom solution(s) or use handy gems like
Using constants is idiomatic for Ruby. We use them to store something meaningful (a well-suited name is very important), connected with a class that holds it. Consequently, we make our code easier to reason about, avoid duplication and, very often, more performant.Read more...
Array class is one of the most commonly used Ruby class in day-to-day development.
Enumerable module adds a comprehensive set of methods which makes playing with arrays a pleasant activity. I have just written set deliberately.
Everybody makes mistakes. Some of them are caught early in a deployment pipeline: during writing code, testing it locally or code review process. Unfortunately, some hide cleverly and pop up on the production environment.Read more...
TIL that Ruby, or to be more precise
Class class, offers
allocate public instance method.
In the previous article, we dived into
ActiveSupport::StringInquirer class and superpowers it gives to
String objects. After I had published that article I decided to take another look at the
ActiveSupport module and to my surprise, I found something even more interesting,