How Do You Install opencv / cv2 without pip3 so The -DWITH_FFMPEG=ON is Set On?

Problem scenario
You do not want to use pip or pip3 to install opencv. How do you install opencv (with the -DWITH_FFMPEG=ON flag)?

Solution
Prerequisite
This assumes that cmake has been installed. If you are running Ubuntu/Debian, run this: sudo apt -y install cmake
If you are running CentOS/RHEL/Fedora (some RedHat derivative), run this: sudo yum -y install cmake
If you are running SUSE,

How Do You Install and Create a Virtual Environment?

Problem scenario
You want to use a virtual environment to install pip packages. You want to run a Python program with a module that will require a pip installation. What should you do to install and configure the environment and then enter it using Ubuntu/Debian Linux?

Solution

sudo apt -y install python3-virtualenv
sudo apt -y install python3.*-venv
python3 -m venv cont_int #replace “cont_int” with the name of the directory you want to create
cd cont_int
source bin/activate

How Do You Make Your Laptop Have Two Different OSes?

Problem scenario
You have a Windows laptop with a DVD player. You want to boot to a Linux hard drive from time-to-time. But you do not want to dual boot the same hard drive (where one hard drive supports two different bootable OSes). What should you do?

Solution
You should purchase a hard drive adapter (aka a caddy) made to interface with the internal DVD player connection.

How Do You Change the Orientation of Google Maps?

Problem scenario
You want Google maps to rotate rectangularly when you use your Android device as a GPS in your car. You want to view the map so the width of the screen and height change 90 degrees based on the way you hold the phone (so it responds to gravity). How do you get the screen to adjust to have a layout that is appropriate for holding the smart phone sideways?

A Day That Will Live in Infamy!

FDR proclaimed that December 7th would be a day that would live in infamy. Pearl Harbor was attacked in 1941. 80 years later to the day AWS had a major outage (for the us-east-1 region): https://www.theverge.com/2021/12/7/22822332/amazon-server-aws-down-disney-plus-ring-outage

It is an interesting coincidence.

Many people think that the us-east-1 region is the least reliable of Amazon’s regional offerings. Amazon said their “Support Contact Center also relies on the internal AWS network,

What Are Reliability, Scalability and Maintainability?

Question
You want definitions of some I.T. terms. In the context of application/system design, what are reliability, scalability and maintainability?

Answer

Reliability: Dependability or suitable for production; the property of performing consistently over time; worthy of being trusted at all times due to fault tolerance. A system that can perform despite hardware failures or regional data center failures is said to have reliability.

What is Cyclomatic Complexity?

Question
What is cyclomatic complexity or McCabe’s complexity?

Answer
It refers to the number of times a line of source code is entered in its execution.

Number of executionsLevel of complexity1 to 10 Not complex11 to 20Moderately complex21 to 50Really complexMore than 50Too complex

It is advisable to endeavor to keep the cyclomatic complexity as low as possible (according to this external site);

How Do You Do a Code Review?

Question
How do you do a code review?

Answer
Look for consistency in style (adherence to a style guide), functionality, and ensure unit tests and end-to-end tests were performed. Keep an eye out for security issues or maintainability issues. Deploying the code should be straightforward or well documented.

Page 307 of Terraform: Up & Running, 2nd Edition by Yevgeniy Brikman (O’Reilly),