Welcome to my coding blog!

  • Install Ruby on MacOS

    MacOS comes with already pre-installed system Ruby. However this Ruby, most likely, will be outdated for Shopify development. You don’t want to mess with the pre-installed system Ruby. What you want to do is to install another Ruby using Homebrew and set the $PATH so the Homebrew-installed Ruby takes priority over the macOS system Ruby. https://mac.install.guide/ruby/13

  • Install MSSQL Server Locally

    In this post we will take a look at how to install MSSQL server for local development using Docker.

  • Configure Remix JS with MySQL

    It looks like Remix team not only likes music, but also has a great sense of humor. Production ready SQLite database. Well, I don’t know about that. Let’s go ahead and swap SQLite database for MySQL in Remix JS project. And If you don’t know what I’m talking about, let me quickly explain. Remix is…

  • Database Indexes With Sequelize

    In this article we will look at how to create database indexes with Sequelize. In posts Sorting REST API Results and Advanced Filtering in REST API we used allowedSortBy and allowFilterBy fields to make sure users don’t tank the database. However, if you have a lot of rows in your table, and we are talking…

  • Observer Pattern in JavaScript

    In this article we will explore the Observer Pattern in JavaScript. We will look at a real world example that involves processing order shipment and how to implement observer pattern in that context. In object oriented programming the Observer Pattern defines a one-to-many dependency between objects, where one object (the subject or observable) maintains a…

  • Strategy Pattern in JavaScript

    In this article we will describe the Strategy Pattern. We will define a real world scenario and explain how to solve it using the Strategy Design Pattern approach. According to Wikipedia: in computer programming, the strategy pattern (also known as the policy pattern) is a behavioral software design pattern that enables selecting an algorithm at runtime. Instead of implementing a single algorithm directly, code…

  • Correctly Handle JavaScript Error Messages

    In the post about REST API Filtering we have getFilterBy method in BaseRepository that calls getSequelizeWhereClause function and returns result. The call is wrapped up in try…catch block, so when an error is thrown, it gets transformed into an API error and get re-thrown. The message from the original error is assigned to the API…

  • Advanced Filtering in REST API

    In this article we will look at how to implement advanced filtering in REST API when a GET request a list of results. In our API project that will be GET /v1/travels and GET /v1/tours endpoints. Although setup for filtering is similar to sorting, the implementation is a bit more complex. First we are going…

  • Sorting REST API Results

    In this article we will look at how to sort results when using a GET request that returns a list. Implementing sorting functionality in a RESTful API is a crucial aspect of designing a robust and user-friendly web service. Sorting REST API results empowers developers and end-users alike by providing a systematic and organized way…

  • Sequelize Seeders: Generating Test Data

    In this article we will look at how to use Sequelize seeders to seed the database with test data and use Faker library to generate the test data. We will continue working in the project travel-api-db-migration-service we created in the video Sequelize Migrations. Please, watch that video if you would like to see how the…