ConfigMaps in K8s

Creating and using config maps in Kubernetes

February 6, 2024 · 3 min · Aleem Isiaka

Dynamically lookup a property in deeply nested object

I was solving a challenge and got to a point where I had to implement a store that could hold arbitrarily deeply nested objects. The new me, I need to see what others have done. I found dot-prop npm package, which solves it quite well. But going through this gist, I found this answer. The author said a “functional way to solve it”… And this right here, is an example of declarative programming. ...

January 23, 2024 · 1 min · Aleem Isiaka

Imparative and Declarative coding?

Choose to be clearity over ambiguity

January 20, 2024 · 4 min · Aleem Isiaka

Byte Masking the ins and out

The idea of byte masking helps us achieve abstractions from the binary concept of computers to usable technology. This post helps to solidify byte masking using operators and gives examples of why we must be aware of this concept in our everyday software engineering craft.

January 17, 2024 · 4 min · Aleem Isiaka

Ruby - if statement?

If statement the ruby way.

January 15, 2024 · 1 min · Aleem Isiaka

What is Byte Masking and how useful is it?

Part of the operators we get introduced to when learning to program is Bitwise Operators, examples are: The Bitwise OR | (a single pipe character) The Bitwise AND & (a single ampersand character) The Bitwise XOR ^ (a single caret character) Each of these has its usage, a refresher can be demonstrated considering these two variables foo=1 and bar=0 For the bitwise OR(|) operator 1 2 3 const foo = 1, bar = 0 console.log(foo | bar) -> 1 For the bitwise AND(&) operator 1 2 3 const foo = 1, bar = 0 console.log(foo & bar) -> 0 For the bitwise XOR(^) operator 1 2 3 const foo = 1, bar = 0 console.log(foo & bar) -> 0 This seems pretty basic until you understand it is not. ...

September 18, 2023 · 9 min · Aleem Isiaka

Creating multiple copies of objects in Ruby

Since everything is an object in Ruby having a functionality that can duplicate objects is not a bad idea. Ruby ships with two methods for making copies of an object: the dup method and the clone method. In Ruby, all variables hold a reference to an object. In a case where a section of a code modifies an object that is not meant to be modified, it is ideal to make a copy of that object to be used in that section of the code, protecting the integrity of the copied object. ...

September 7, 2023 · 3 min · Aleem Isiaka

When to use puts, print, and p in Ruby

Usually, programming languages have methods for printing out variables. Ruby is not an exception. We will explore the 3 popular methods for printing variables in the Ruby Programming language. The print method The way print(var) works is basically converting its value to a string by calling the to_s method on the object(everything is an object in Ruby) before printing the value and returning nil to its caller. 1 2 num = 123 print(num) # -> 123 => nil The print method can be easily used for concatenating strings ...

September 5, 2023 · 3 min · Aleem Isiaka

tar (child) xz Cannot exec No such file or directory

The error: 1 tar (child): xz: Cannot exec: No such file or directory Is majorly an issue with the xz command not found on the host machine. To verify, run: 1 whereis xz Fix To fix, use the installation command for your Linux distribution: 1 2 3 4 sudo apt-get install xz-utils # Debian / Ubuntu sudo yum install xz # RHEL / CentOS sudo zypper in xz # OpenSuSE sudo pacman -S xz # Arch Linux Then untar again with: ...

July 10, 2023 · 1 min · Aleem Isiaka

Change files extension in a directory

A onliner 1 for f in *.old; do mv "$f" "${f%.old}.new"; done How??? To change the name of a file on Linux/Unix use the mv command 1 mv currentfilename newfilename If there is a file named aleemisiaka.old and want to rename to aleemisiaka.new We can store the filename to a variable with export FILENAME=aleemisiaka And use the variable name in the mv command 1 mv "$FILENAME"$ "$FILENAME.new" This renames the file from aleem-isiaka.old to aleemisiaka.old.new ...

June 22, 2023 · 1 min · Aleem Isiaka