Category: Programming

Topics about software development

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

Sticky banner with Tailwind

crysfel Programming

A few days ago I had to implement a sticky banner at work, at first I thought it would be a simple task but it took me quite some time to figure everything out. On the bright side, I've learned a few new things about CSS in the process. Here are the requirements: The component might be present sometimes depending on some custom logic on the backend. When present, it had to push all the content down and when closed by the user, it had to disappear with a slide up animation. Effectively animating Continue reading