Bubbling UP Error details in Node.js

Bubbling UP Error details in Node.js
The problem: We want to propagate some error details from the internal modules to the front end or to the API exposed to our code’s users. One common method of propagating the error is passing it as the second parameter of the error constructor. However, obtaining the error details requires specific syntax. The solution: In Node.js, the Error object can propagate the cause property inside the options argument. As an example, let’s say we have the function getUsers that fetches a list of users, and another module consumes that function to generate the list of elements on the UI. [Read More]

Remove Expo Router from Expo App

Remove Expo Router from Expo App
The problem: The issue originates from a discrepancy in the Coursera Capstone project for the React Native Specialisation course: In Module One, the lesson “Recap: React Native Project Set Up” instructs the students to create a React Expo app using the command Expo CLI command: npx create-expo-app MyProject This command creates a new app with the latest version of Expo. However, recent versions of Expo include the new navigation system with expo-router by default. [Read More]

Optimal NodeJS DevContainer Package Management

Optimal NodeJS DevContainer Package Management
The problem: Each dev container that uses Npm or Yarn as package managers has to download all the “node_modules”, plus some transient ones, for each container where those files take quite a lot of disk space and time to download. The Solution: Set up a dev container with Pnpm and a global shared packages store with the host system. This approach eliminates the need to duplicate files. It saves significant network resources and time by reusing all the files that other dev containers or the host machine have already downloaded into the global store. [Read More]

DevContainer with host Git credentials

DevContainer with host Git credentials
Overcoming Git Credential Issues in VSCode Dev Containers We developers should work in isolated environments to maintain consistency across different machines and team members. Visual Studio Code’s dev containers are a fantastic tool, providing an automated method to consistently spin up a development environment regardless of the host machine. However, when working with private repositories, you might encounter a common hurdle: accessing your Git credentials within the dev container. The Problem: Missing Git Credentials in Dev Containers Picture this scenario: You’re diligently coding away in your VSCode dev container, feeling productive and in the zone. [Read More]

How to configure Cloudflare DNS for a GitLab page (Solved)

How to configure Cloudflare DNS for a GitLab page (Solved)
Setting up a custom domain for a GitLab Pages site using Cloudflare can be challenging due to unclear or outdated documentation. This blog post clarifies the process by providing a step-by-step guide. Following this post, you can configure your Cloudflare domain for GitLab Pages, ensuring that both the apex and www domains work seamlessly with SSL certificates. Official Documentation Cloudflare: Connect Your Domain GitLab: Set Up a Custom Domain The Problem Cloudflare and GitLab provide documentation on configuring custom domains and SSL certificates, but those docs need to be more explicit, complete and current. [Read More]

The basics of Software Quality

The basics of Software Quality
The “Who should do QA” podcast is one of the best podcasts about Software Quality I have found so far. I became a regular listener to the Test & Code show by Brian Okken. Episode 175 is one of the finest synopses about the quality practices to perform as a top software development team. Brian presents the ideas from a reflective style as a practical developer, making the concepts more engaging than QA biased content. [Read More]

Virtual safe box

Virtual safe box
How to keep important documents and confidential data safe at runtime? Running the operating system on an encrypted disk only protects my data when the computer is at rest, but what happens while I am using the system? Why all my essential documents should always be available? I want to have my essential data encrypted most of the time, in the same way, that I would have my safe box closed at home. [Read More]