One of my recent projects was to try to identify unused pieces of code and remove them safely. This can be quite a difficult task in Ruby, as there is little way to be certain what calls what.
One of the focus of our engineering team recently was to extract features from our main Rails monolith to different smaller micro-services. One of these tasks was to take care of the UI that is used to create a “Job Post”. This new Single Page App micro-service was developed using React and TypeScript. Since we needed it to support multiple languages (at least Japanese and English for now), I would like to share here the process of translating that UI with the lingui-js library (2.8.3).
When developing a Rails application, performance might not always be our main focus, and things might degrade little by little until we decide to say: “That’s enough, let’s do something about it”. At that point, we might have hundreds of models/views/partials/controllers etc… and as much places where we can seek improvements. Here we will focus on a specific case of partials rendering.
As mentioned in the official doc, partials are a good tool to make views more readable and reduce duplication. But this comes at the (usually small) cost of rendering that partial separately.
Let’s assume we have one of…
Software Engineer @Wantedly