CoinGecko’s engineering team successfully optimized a 1TB+ PostgreSQL table storing hourly crypto price data by implementing table partitioning. The initiative delivered dramatic performance improvements: 86% reduction in p99 response time (from 4.13s to 578ms) and 20% IOPS reduction.
I used to just share whatever I learned, no matter how small it was. However, at one point, I forgot about the practice due to my work commitments. So, this time I would like to talk about what it looks like on the other side of the interview session, which is the Interviewer. Let’s put the disclaimer out first. I haven’t done it for “years”, ok, maybe just around two…
Caching is something we use to reduce the access to the original source. To do that, we store the data temporarily on another medium. We can use various tech to achieve that, but whatever we choose should be faster or lighter than the original source. This will help our users to retrieve our data faster than before. It will also help lower the initial resource utilization. Depending on what we…
Someone on Twitter asked what if Khairul Aming wanted to set up his own website for his sambal? For those who may not know, his product has gained fame and typically sells out quickly once he opens orders. At present, he utilizes Shopee. From a business standpoint, it’s advisable for him to stay with Shopee. My post is primarily for educational purposes. Disclaimer: I am not an SRE/DevOps…
I’ve been talking to a prospective candidate who has been inquiring about the best way to prepare for the interview. I was surprised to see that his first email was sent in May 2022. His most recent question pertained to the interview process, and this was my response (with some additions): Disclaimer: Much of this work is handled by our Engineering Manager and HR department as they are the…
Although we use monolithic architecture, we actually “break down” the application into several parts in production, such as: Web Free API Paid API Mobile API Workers (background jobs) Therefore, when we deploy, it does not mean that all servers will receive the new application. If we deploy to the Web and there are issues, only the Web will be affected. However, some applications may…
I want to share how I manage multiple library/gem/package updates simultaneously while doing big upgrades. But before we start, it’s important to know why. Significant upgrades require a more considerable change of files. The number of files you need to change can get out of hand. You may have to replace some code due to the deprecations, or you may have to deploy in multiple stages to avoid…
Rails by default comes with connection pooler on the application side but I always wonder what is the difference if we use another connection pooler such as PgBouncer. So, here is some notes on trying to understand some of it. To try this out, I’m using docker so that I don’t have to install extra application: $ mkdir conn-poc; cd conn-poc $ rails new blog --api -T --database =…
In the previous post , we managed to figure out a way to make our Docker setup work for Development. It’s time to figure out how we can run our tests with it. In the end, we should be able to run single and multiple tests. This also includes Capybara tests using headless Chrome. We will also look into how to use multiple docker-compose files to override what we have based on the environment. But…
Check out my previous post if you want to start learning from just a Dockerfile. As you may have realized, it’s not scalable if we keep on using the long command to manage our containers. We haven’t even started talking about different services such as PostgreSQL and Redis, yet. In this post, we are aiming to use docker-compose to make our development experience easier. Prepare our…
I think everyone knows by now how good Docker is in making sure we have almost the same setup everywhere. However, I think it is not easy as everyone thought for people new to it. There are just so many questions that I have to the point they discouraged me from using it as my daily driver. I decided to spend some time to look into this and document this journey through this blog post. I hope this…
Code Reading: Calculate WBNB per Token Given a token, how do calculate its value against WBNB? Someone already solved this for us, but let us try to understand what the code is actually doing.
There will be a time when your Rails development environment started to become very slow due to multiple reasons, but mostly because your codebase is very big and the monolith architecture is just too sweet for you to pass on.
As you probably know, the charting library is not accessible publicly. You need to request access from them. So, I can’t really give a complete repo as an example. I did however open a PR at https://github.com/tradingview/charting-library-examples/pull/197 , but I’m not sure if it’s going to be accepted.
Overview Why would we even want to do this? Just imagine if you have data that are infrequently accessed. Keeping it in your RDS might costs you more than it should. Besides, having big table is gonna cause you a bigger headache with your database maintenance (indexing, auto vacuum, etc).
I was asked about this from my latest job application. Didn’t realize it’s going to be this long so I thought I should share it publicly, easier for me to show it to the next interviewer. The exact question was:
I haven’t really worked on Rails for a while so I decided to take a sneak peek on what’s going in Ruby on Rails land. The first thing I want to try is to integrate Rails with Bootstrap. It seems like a lot of tutorials are focusing on how to use webpack for CSS and JS.
Recently, I learned a trick to make my Telegram bot private to certain users. I tried not to create the whole CRUD thingy for the membership and after Googling I found out about one of the API provided.
These days we might have multiple local applications that are running on different ports (e.g: http://localhost:3000, http://localhost:3001 and so on). This is pretty troublesome as we have to remember which application is running on which port.
This is my notes for presentation by Eileen Uchitelle from RailsConf 2015. You can find the video at Confreaks . The slide can be found at Speaker Deck .
First of all, let’s get one thing straight. This is not a guide for those who are trying their best to not use Unix like environment in develop Rails application. This is more like a guide to do almost everything in Linux without replacing your Windows.
I was trying to deploy a Rails application using Apache and got into some problems when I tried to configure the app so that Apache will be the one that serves the precompiled assets (javascripts, css, images and others). Since I’m on tight deadline (yeah, I should’ve tested production mode much more earlier), I tried my luck with Nginx and it worked easily without any hassle. So, this…
This will be multi part post about high availability solution for Slackware. My first post will be about Corosync and Pacemaker. You need to combine Corosync and Pacemaker with other distributed storage system such as DRBD / OCFS2 / GFS . I’ll talk about these stacks in another post.
It’s official, almost every piece of our codes in Hospital Universiti Sains Malaysia (HUSM) has been versioned in either Git or Subversion (mostly the latter). We’ve also linked all of the repositories into Redmine for easier project management. It’s not really a walk in the park for us since this is the first time we tried to do it this big.
Most of the tutorial on the web focuses on the old version of Google Analytics. So, after poking around Google Analytics, I found out that there are two ways to see it (I stopped looking once I found the second method, so, there might be more). Go to Custom Reporting tab. Click Edit. If you’ve already added a tab, just click “+add report tab” for this purpose. Put the name of…
Recently, I noticed that there are other authors with a different name in my Git’s history. Apparently, I’ve accidentally committed into the repository using a different author’s name and email. This is mainly due to the way Netbeans stores author’s information history.
I’ve decided to merge posts about reading MyKad from my previous blog into a single post. Notes: The original codes were written by Xenon from Lowyat.net . Somehow, he managed to reverse engineer MyKad’s APDU so that we can read it without buying any SDK. This application only reads data from Jabatan Pendaftaran Negara (JPN).
On the 5th of July 2011, Hospital Universiti Sains Malaysia (HUSM) has been chosen as one of the speakers in Malaysia Open Source Conference 2011. It was presented by Mr Yusdirman Bin Yusoff as “Open Source in Health Care: HUSM 10 Years of Innovation”.
It has been quite a while since I wrote the previous guide. Since that particular post gained a lot of visitors, I decided to write a new guide based on the new Qt SDK and MySQL so that it will help people with new version for both softwares.
I’m pretty sure I’m going to forget these steps, so, just to be safe, I’m putting it here. I’m dividing this tutorial into two sections, one for default MySQL that comes from Slackware and the other one is for new MySQL.
First of all, at the time of this writing, NVIDIA Hybrid SLI Technology is not supported on Linux and without proper configuration, you won’t even be able to load your Desktop Environment such as Xfce.
The Story At the end of last year, my friends and I were tasked to read our staff card. The main objective was pretty simple which is to create a library where we don’t have to depend on the vendor every time we want to read our own staff card and the library should also work in Linux and Windows (that means Java to us).
Install CUPS-PDF based on your distro, you can download if from here . Go to http://localhost:631 . If the page requested a username and password, just enter your root as username and password for your root. Go to Administration > Add Printer . In the Add Printer page, put a name for your virtual PDF printe, any name will do. Then click Continue . For the Device for a , you should select CUPS-PDF…
Apparently, there’s a bug in Java where people using newer version of CUPS cannot print (can’t even display the print dialog) due to a null pointer exception and this is actually a known bug. So, how do we fix this? For people who use Gnome, you can refer to this page .
Apparently there’re some codes scattered on the net telling people that you can print to a Zebra printer by sending ZPL II codes using PrintService . But the problem is, it’s not working, I don’t know why, maybe because of a different version of printer or model but I’m pretty sure the thing that came out from the printer are just ordinary texts not barcode which is what…