RSSAmplifier

Blog

Jia Hao

Jia Hao's blog

jiahao.ggRSS feed ↗4 posts

Latest posts

Running Ghostty on a Playdate to control tmux

My Playdate connects to a remote tmux session. Crank to scroll or push B to talk (and exit vim). Under the hood, it uses ghostty-vt to emulate a terminal and connects to the remote session over mTLS. Demo: Over the past few weeks, I’ve been working on turning the game console into a remote control for my terminal. It’s a Cortex M7 with a 1-bit display, Wi-Fi and a mic. There is a C SDK and people…

Writing Java With a Dash of Functional Programming

After learning a little bit of Haskell, writing idiomatic Java leaves me wanting a little more from the normal object orientated constructs and traditional imperative programming paradigms. I realized during one of my projects that I could apply some functional concepts to it to make the code more elegant and readable, which I’ll share in this post using a slimmed down example! Problem A typical…

Optimistic Locking with the DynamoDB Mapper

Amazon DynamoDB is a non-relational managed database on Amazon Web Services that provides the DynamoDB Mapper Java library, to map Plain Old Java Objects (POJOs) to the non-relational representation of the document data in storage. With this object-orientated interface, it is easy to ensure that records are updated correctly on DynamoDB, through optimistic locking . This is a strategy to ensure…

Deep Dive into Database Timeouts in Rails

This article was originally published on Grab’s Engineering Blog A couple of weeks ago, we had a production outage for one of our internal Ruby on Rails application servers. One of the databases that the application connects to had a failover event. It was expected that the server should continue functioning for endpoints which do not depend on this database, but it was observed that our server…