What Does “Branch by Abstraction” Entail?

Problem scenario
You have read about “branching by abstraction,” but you do not know what it means. You read that it is ideal when the coding you are doing cannot be done incrementally. How do you “branch by abstraction”?

Solution
It is a method of trunk-based development; instead of using a branch, you commit to the trunk (or main) branch of your repository.

Is It a Best/Recommended Practice to Use Log4j?

Problem scenario
You are not sure if Log4j is acceptable to use. It is a best/recommended practice to use Log4j?

Answer
Maybe.

Log4j has been well-adopted by many of the most trusted companies in the I.T. industry. According to cybersecuritydive.com “Fortinet, IBM, Microsoft, Red Hat, Salesforce, and Siemens” use(d) Log4j. Log4j has been vulnerable since 2013 (according to this external website).

Is It a Best Practice to Normalize a SQL Database?

Problem scenario
There are sources that recommend database normalization as a best practice for relational databases. Is it always a best practice to normalize databases?

Answer
There is no clear answer as the sources vary.

A heavily voted-up answer on StackOverflow says that denormalization for OLAP performance is something to be avoided. We find recognition of this “best practice” on a venerated engineering blog:

Keeping data normalized is considered a best practice in MySQL.

What is the Difference between Yarn, the Package Manager, and YARN, the Hadoop Framework Tool?

Problem scenario
You are familiar with two different software tools called Yarn. You are not sure what they do or how they are different.

Solution / Yarn Disambiguation
There is a package manager that has some project manager functionalities called yarn. It often works with JavaScript.

This tool has an icon of a one-line drawing of a cat; the original Yarn website had other cat imagery,

Is It a Recommended Practice to Use Production Data when Testing Software?

Problem scenario
You want to test your application. You are considering using mock/fake data. But you are concerned that the tests will be insufficient. Is it a best practice to test with production data?

Answer
It depends. We prefer the term “recommended practice” because of questions like these.

Some sources recommend using production data:

…many production issues are due the lack of real(istic) test data…
To ensure software of the highest quality possible,

How Do You Install and Configure Terragrunt on a Linux Machine?

Prerequisite
Install make. If you need assistance, see this posting.

Procedures
Run these three commands:

curl https://github.com/gruntwork-io/terragrunt/releases/download/v0.35.18/terragrunt_linux_arm64 –output /tmp/terragrunt_linux_arm64

sudo mv -i /tmp/terragrunt_linux_arm64 /bin/terragrunt

sudo chmod u+x /bin/terragrunt …

How Do You Troubleshoot the Kubernetes Error “cluster unreachable”?

Problem scenario
You get a message “kubernetes cluster unreachable” when running a helm, kubectl, az, or eks command. What should you do?

Possible solution #1
Has a router been reconfigured? Has a new firewall rule been imposed? Has a data center gone down that housed the cluster? Did you receive an email about a maintenance window or a configuration change?

Possible solution #2
What are the permissions of the relevant .yaml file?

How Do You Troubleshoot String Manipulation with List Slicing Not Working as You Expect?

Problem scenario
You are taking a slice of a Python string. You know that syntax like var_x[-2:] signifies the penultimate character and the last character of a string (called var_x). But you are only seeing one character — not two. You expect to see two (or a different number of characters than what you are seeing). Why is the snippet printing out fewer characters than you expect?

Possible Solution #1
There could be an invisible “\n” attached to the string (e.g.,