The First Cry of Atom

Why we should avoid default_scope in Rails

ActiveRecord in Rails provides a way called scope to keep the readability along with encapsulating the detail of the business logic in the model class. It enables us to add a more intuitive interface to the model so that we can quickly call the scoped method without caring about the complicated underlying implementation. This also contributes to... Read more

Google Keep for TODO List

When you get a chance to learn a new programming language or framework, you might encounter the exercise to develop a TODO app. The reason behind this kind of exercise is that the TODO app generally covers all functionality most web/mobile app needs, such as user identity management, data persistence, and presentation rendering. Still, the TODO ... Read more

Light way to remove whitespace in PostgreSQL

We might have the experience to remove the white space in the string recorded in PostgreSQL. There is a function TRIM, but it only removes the white space on the left/right side of the string. How can we do that when we want to omit the whitespace in the middle of the given string? REGEXP_REPLACE is available to replace any string with the regu... Read more

Visualize COVID-19 situation in Japan

Visualization often provides us a vivid image to grasp the situation at a glance. It is one of the recommended ways as a starting point of more in-depth understanding and investigation in general. COVID-19 keeps spreading all around the world. The number of infectious cases is growing, especially in Europe. That challenge will keep going on for... Read more

Open Dataset for COVID-19

The epicenter of the outbreak of COVID-19 moves to Europe in these weeks. The situation is still highly unpredictable. We need to manage to keep away from the threat of the COVID-19. Washing hands properly and staying away from the crowded area is our duty to stop the spread of COVID-19. Fortunately, many scientific efforts are happening to dea... Read more