Tag: javascript

Translating your product into multiple languages

crysfel Programming

Presenting your product to different audiences in different languages is very challenging. Over the years I've tried different approaches, but the one problem in common for all those approaches is the maintenance of the translations, is just impossible to keep track of all the changes over time. In this post, I will explain the different attempts to solve this problem and will show you what has worked for me. Loading JSON files on demand The first and most popular approach when it comes to Continue reading

Downloading images with nodejs

crysfel Programming

A couple of weeks ago Facebook sent me an email informing me that all profile images will not be accessible anymore unless there's a token on every request. Given that I'm no longer supporting Facebook login, but still many of my users are using their Facebook profile image, I decided to pull all those images into my own server before facebook implements the new requirements. After a few hours of googling how to download images/binaries on NodeJS, and only finding old/deprecated implementations Continue reading

Optimizing aync calls in Node JS

crysfel Programming

A few months ago I was cleaning up an old node codebase, the endpoint was using promises to call several other API endpoints on the network, waiting for the response on all calls, and then building a JSON response to the client. While I was doing the refactor and cleaning up the code, I found some optimizations I'd like to share in this post. Improving readability In order to improve code readability and therefore lowering the maintenance cost for this service, I was introducing async/await to Continue reading