RSSAmplifier

Blog

Amree Zaid

Recent content on Amree Zaid

amree.devRSS feed ↗52 posts

Latest posts

Scaling PostgreSQL Performance with Table Partitioning

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.

As an interviewer...

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 101

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…

Tiny Guide to Webscaling

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…

CoinGecko's Interview Process for Level 1 to Level 3

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…

Minimizing Problems Before and When They Occur

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…

How I used chained branches to help with the major upgrade

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 Connection Pool vs Pgbouncer

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 =…

Ruby on Rails and Docker for Testing

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…

Ruby on Rails Development Using Docker

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…

Introduction to Ruby on Rails and Dockerfile

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

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.

Speed Up Ruby on Rails Development Environment

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.

TradingView Charting Library with Rails 6

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.

Exporting data from RDS to S3 using AWS Glue

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).

Order Update with Two-Step Payment

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:

Rails 6 with Bootstrap (Webpacker for JS, Asset Pipeline for CSS)

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.

Trick to Make Telegram Bot Private

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.

How Bcrypt Compares Password

I’ve always wondered about this.

Manage Multiple App URL in Local Development

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.

About Proc, Lambda and Block

I keep on searching for this topic, so I guess it’s time I put it on my blog.

Notes on Demystifying Contributing to Rails

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 .

Getting Started with Rails on Windows

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.

Setup Free Uptime Monitoring Service in Heroku

A free way for us to setup free version of uptime service.

Rails, Unicorn and Nginx on Slackware

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…

Getting Started with Xen on Slackware

Here’s a guide on how to setup Xen virtualization in Slackware.

Corosync and Pacemaker in Slackware

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.

Using GRUB instead of LILO in Slackware

These are the steps I used to replace LILO with GRUB as the boot manager after upgrading my kernel to v3 .

Upgrading to Kernel v3 for Slackware v13.37

It’s time for an upgrade!

Redmine with Git and Subversion in HUSM

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.

See Full Referrer URL in Google Analytics

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…

A Not So Simple Introduction to Git

Found another presentation from Speaker Deck about Git.

A Good Introduction to Agile and Scrum

Found this in Speaker Deck. Love the simple explanation.

Renaming Author in Git

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.

Git Remote Commands

These are some of the git commands that I usually use.

How to Read MyKad

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).

HUSM at Malaysia Open Source Conference 2011

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”.

How to enable MySQL Support in Qt SDK for Windows

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.

A Simple Working Example for Qt NCReport

This should help you with NCReport in Qt.

Using Sybase with Ruby on Rails on Linux

This guide will help you (mostly will help me in the future) to configure your Ruby on Rails to support connection to Sybase.

Running Multiple MySQL on a Single Server

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.

Adding memcached support to PHP in Slackware 13.1

I just started learning Zend Framework and in one of the tutorials I read, I need to enable memcached in my PHP which is not available by default.

Configuring Linux to work with NVidia Hybrid SLI Technology

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.

How to Enable MySQL Support in Qt SDK for Linux

Known to work with: Slackware v13.37 Qt SDK v1.1.5 (32 bit) Qt v4.8.0 MySQL v5.5.18

Reading Mifare 1K Card using Java in Linux

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).

Printing to PDF using CUPS

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…

Java Printing Fix for Linux

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 .

Auto Resize JTable Column Width

This will resize your JTable column width based on the contents of the header and data.

Printing to Zebra S4M Using Java

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…

Automatically Sign JARs Using Ant and Bash

This guide is more towards Netbeans project, but it can be used as a reference for you to customize the script to suit your needs.