Blog

Thoughts from my daily grind
Posted by Ziyan Junaideen 12 May 2022
Fix the error when bundle install of a Ruby on Rails project w.r.t. nio4r. The issue generally is the result of implicit function declaration causing errors compiling native C extensions.
Posted by Ziyan Junaideen 19 April 2022
gRPC, a remote-procedure-call framework by Google, is by far one of the preferred RPC frameworks in the wild. Here is a comparison between gRPC and JSON HTTP APIs for interconnecting services.
Posted by Ziyan Junaideen 18 April 2022
Five packages shipped with AliExpress Saver Shipping ended up in a "Delivery unsuccessful" state in the tracker. I tried to reach out with no success. I got two of the three packages today.
Posted by Ziyan Junaideen 14 April 2022
A Ruby developer will often require to work with different versions of a Ruby gem. This article discusses the installation and use of a ruby gem with a specific version in the terminal.
Posted by Ziyan Junaideen 13 April 2022
A little advice from my encounter with the LinkedIn Skill Assessment Test for Ruby on Rails. It is an easy test and any Rails developer could easily land on a new shiny badge.
Posted by Ziyan Junaideen 02 April 2022
Not every model/database table requires an auto-increment integer field as the primary key. Ruby on Rails allows us to specify the primary key in the migration field and configuration in the model.
Posted by Ziyan Junaideen 28 March 2022
Ruby on Rails doesn't add model field details to the model and related files such as specs and factories. The annotate library automatically adds field definitions to relevant files.
Posted by Ziyan Junaideen 28 March 2022
The popular Ruby on Rails library ActsAsTaggableOn wrongfully selects the parent class in STI resulting empty #tagged_with method output. The solution would be to use a custom query.
Posted by Ziyan Junaideen 24 March 2022
Every developer has his preference. I love recursion, many others love iterations. You could use either most of the time. But if your task's complexity is high, it might be better to use iteration.
Posted by Ziyan Junaideen 18 March 2022
In-page links known as anchors will cause content to hide under a floating element like a navigation bar. This article discusses CSS you could use to prevent content from hiding under floating elements on jump links.
Posted by Ziyan Junaideen 13 March 2022
UPS is a prominent logistics company providing fast shipping across the globe. I recently ordered some items through Banggood which in turn shipped through UPS. The experience was great but there is room for improvement.
Posted by Ziyan Junaideen 11 March 2022
Bring life to your Rails application by using Toastr alerts with Turbo and Stimulus JS. This blog post details the steps with code samples to show Toastr flash messages.
Posted by Ziyan Junaideen 09 March 2022
Tourism is a primary source of foreign exchange to Sri Lanka. Unfortunately, the industry is negatively affected by fuel, electricity and LPG shortages. These risk denting our reputation as a tourism destination.
Posted by Ziyan Junaideen 09 March 2022
I had a few clogged air stones from my aquarium. As I was too tired to shop, I decided to use H2O2 to clean clogged air stones in my fish tank. They are good as new.
Posted by Ziyan Junaideen 13 February 2022
Due to bottlenecks resulting from the COVID19 pandemic, the Government of Sri Lanka extended the validity of drivers licenses. However, some have been presented with fines renewing in this period.
Posted by Ziyan Junaideen 29 January 2022
Fix port 5432 connection refused error in macOS caused by Homebrew failure to start PostgreSQL database engine.
Posted by Ziyan Junaideen 27 January 2022
Instructions on how to uninstall applications installed through Homebrew, the popular package manager for macOS.
Posted by Ziyan Junaideen 16 January 2022
Understanding the technical specifications of a lead-acid battery is vital for your safety and battery longevity in any DIY project. This article discusses typical attributes of a technical specification sheet of a lead-acid battery.
Posted by Ziyan Junaideen 01 January 2022
Data is the basis of accurate predictions and good designs. I compiled a table of power readings for my iMac 2019 to make a battery backup that will last 6 hours. I hope this will be helpful for you too.
Posted by Ziyan Junaideen 26 December 2021
Metropolitan Engineering is the dealer of the Italian generator brand Pramac in Sri Lanka. This is my experience purchasing a Pramac WX6200 (5.3KW - 5.8KW max) petrol generator from them.
Posted by Ziyan Junaideen 25 December 2021
The software world evolves rapidly, and it is essential to track outdated libraries to update them. This blog post discusses identifying and listing libraries that could be updated using Bundler (Ruby) and Yarn (Node), as many web projects include Node dependencies.
Posted by Ziyan Junaideen 24 December 2021
Petrol-powered backup generators are my main source of backup power during prolonged power cuts. Today I replaced my 22-year-old Briggs & Stratton generator with a Pramac WX6200 from Metropolitan Engineering.
Posted by Ziyan Junaideen 08 December 2021
Opening a file to read its contents is common in any application. The introduction of the method "existence" enables us to use Ruby Safe Navigation Operator to check for existence and safely read file.
Posted by Ziyan Junaideen 06 December 2021
Religious extremism is one of the main destabilizing factors in the world. Letting it go rampant resulted in the brutal torture, murder and set alight of General Manager Eng Priyantha Kumara on fire.
Posted by Ziyan Junaideen 25 November 2021
The static declaration of width and height makes YouTube video embed links not mobile responsive. This blog post describes a JS solution to make videos mobile responsive.
Posted by Ziyan Junaideen 25 November 2021
Enable Tailwind CSS with JIT in your Ruby on Rails project using the new `cssbundling-rails` ruby gem. Includes advice for Trailblazer configuration.
Posted by Ziyan Junaideen 23 November 2021
A collection of test cards for the popular card processor USAePay as their official support page is out of date (expiring 0921). These cards and their details are valid through 2023.
Posted by Ziyan Junaideen 23 November 2021
Instructions to install Apache Solr, the popular search framework powering medium to large scale internet sites, in an Ubuntu 20.04 server. Includes helpful commands to manage the service.