RSSAmplifier

Blog

Jordi Noguera

jordinl.comRSS feed ↗5 posts

Latest posts

How We Enhanced the User Experience for Mass Payouts with the PayPal API: A Comprehensive Case Study

A case study on enhancing the user experience for mass payouts using the PayPal API. Learn about the challenges, solutions, and outcomes of streamlining the payout process and providing real-time feedback to users.

I once reduced response time by 80% with one line change

Shortly after I started a job I noticed we were storing, for each of our customers, Stripe customer data as JSON in the DB. I actually said in a meeting that I thought it would be better to just store only the attributes we needed as columns instead, but I was told not to worry about it and that it worked beautifully. It was actually worse than that because Stripe allows to expand responses when…

How to generate random geocoordinates within a given radius using the Haversine Formula

Introduction On a previous project we needed to show markers on a map to indicate there was a property, but for privacy reasons we wanted to show the marker on the map close to the property but not at the exact location of the property. So we needed to generate random points within a fixed distance of the original point location. As you would expect, I did some Googling first but, to my surprise,…

How to run periodic jobs with Sidekiq for free

One of the features not included in the free version of Sidekiq is running periodic jobs (or cron jobs or recurring jobs). There are gems that offer this functionality as an add-on, but it turns out that it can be implemented in less that 40 lines of code, so there is no need to pull an additional bloated dependency.

How to calculate business time between two times efficiently

Given a company’s work schedule and two arbitrary times in two arbitrary days, we want to calculate the amount of time between these two times that falls inside the company’s work schedule (accounting for holidays too).