Go - constant variables and const keyword

Brief Programming languages have the notion of constants which means “variables that can not be mutated once declared and initialized”. Go also has almost the same meaning, but in a different context. To initialize a variable as a constant with a value of 10, we can do something like this: 1 const DISCOUNT = 10 In Go, constants mean “storing a literal to a variable”, this can be seen as a version of pattern matching in Erlang. ...

May 12, 2024 · 2 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

Ruby - if statement?

If statement the ruby way.

January 15, 2024 · 1 min · Aleem Isiaka