A strong application is a well-logged application

many sets of footprints in sand
many sets of footprints in sand
Photo by Marten Bjork on Unsplash

Your application is serving hundreds of customers per day. One day, some customers call you and complain that they are not able to proceed because of broken functionality. You then look into the database and see new data coming in just fine from other customers. What would you do next to resolve the issue?

Logging is an essential thing to have when your application is deployed to production. Without logging, you’re flying blind. In the scenario above, the next logical thing to do is to check the application log. …


Write better, more testable Rust

image of a ball with scale pattern
image of a ball with scale pattern
Photo by timJ on Unsplash

In this article, we will see how to structure a Rust project so that it’s easily testable. We will build a simple authentication module that is exposed via REST API while storing the data to PostgreSQL and Redis. We will use actix-web for handling the REST API part, sqlx for interacting with PostgreSQL, and redis-rs for interacting with Redis. We will see how the application is decomposed into smaller components that are testable. The final application source code can be accessed from GitHub.

Background

It’s a well-known fact that incorporating automated testing in a software project leads to better software. Automated tests help to ensure the correctness of the software while also improving its maintainability. …


In this post, I’d like to explain how I use xdotool to easily tile windows to my preferred layout on my 49" 5K monitor.

The Problem

I recently bought a 49" monitor with 5K resolution, which I intend to use mostly for productivity work. My previous monitor was a 27" with 1080p resolution. So it’s quite a generous upgrade on the screen real estate department.

There’s one issue, though, with the new monitor: The screen is simply too large for one program. Even worse, since most programs start from the top left, I need to turn my head left. This is not nice for my neck and posture. I had expected about this problem, but I thought I could just split the screen by two: left and right side. …

About

Ecky Putrady

I solve real world problems with Software. Java | Rust | Haskell | Javascript

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store