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 [Update Sep 2025] 💡This blog has been updated in Sep 2025 with new insights. new insights and updates * An example of using JobRunr is shown in PlayFast (an opinionated production-ready PlayFramework template that make you productive). * The admin dashboard can run on the same instance as the background server. We don't
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
[Deprecated] Integrate New Relic into Play Framework 💡Update on Oct 2025 My position is to pipe syslog to New Relic at the OS level instead of using the NewRelic agent, which is the approach described in this blog. The downside of using the NewRelic agent is that it doesn't capture exceptions and logs before the
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."