Latest — Mar 23, 2025 The correct way to model a timestamp range is [start, end) Or things that are not mathematically precise will cause you pain down the line.
Building the load more mechanism for an infinite scroll Let's set up the problem first. You have a list of posts and you want to show them "infinite-scroll"-style sorting from the newest post to the oldest post. Well, obviously, you can't just load every single post into the page at once. Therefore,
Play Framework: Session's Gotchas I've just switched our cookies to Play's Session. I was previously under the impression that "Session" is temporary, as in the stored value isn't persisted after the browser is closed. After looking closely at it, Play's Session is implemented using
Integrate JobRunr into Play Framework This blog shows you how you can integrate JobRunr with Play Framework. JobRunr is one of the popular background processing for a JVM application, but it is catered toward Java and Spring Boot. Since there's no popular Scala background processing framework, and I don't want to
A succinct early exit trick for Option in Scala I've realised that return in Scala only apply to a method. This led me to a cool early exit trick that I use everywhere. It looks a bit off because I, for some reason, think return should have applied to the current lambda. But that's not
Java: Meridiem (am/pm) date parsing surprise Our team was perplexed with the date parsing logic where it seemed we couldn't parse 11/19/2024 11:25 am or 11/19/2024 11:25 AM depending on the machine. I eventually decided to ask on Reddit's r/javahelp. It turns out that it
GraalVM and ChromeDriver in a Docker image for Render.com This should work on Heroku or in any Docker-based deployment as well. Adding Chrome and ChromeDriver into a GraalVM Docker image isn't as straightforward as I thought. The main complication originates from the fact that GraalVM is lean. There are 2 problems from being lean: (1) microdnf as
Integrate New Relic into Play Framework Yesterday I was choosing a monitoring system for our production app. I was looking at NewRelic, Datadog, and ScoutAPM. Unfortunately, ScoutAPM doesn't support JVM applications. It looks great though. I've eventually chosen NewRelic due to ease of integration. It's quite straightforward if you know
Connect Chromecast to a wifi with 2-step sign-in A Chromecast doesn't support signing in to a wifi that requires you to sign in through a browser. You can imagine most hotels are using this kind of wifis. A wifi with 2-step sign-in is probably using a MAC address as an identifier. Therefore, a way to solve
When high quality conflicts with solving user needs Imagine you go to the DMV. The DMV has a waiting time of 3 hours. One employee walks up to you and says "oh well hey we have a new beta program for you, and you'll only need to wait 1 minute instead of 3 hours."