I have written about Psalm here. Here, I share my workflow for running Psalm in Github Actions:

Let’s Discuss What’s Happening Above

I start by specifying a…


A typo is never that serious unless it's in a software code base. A tiny mistake such as an omission of a comma can cause companies billions of dollars, destroy a NASA rocket or even interrupt service for users of a SaaS product.

Over the years there has been tremendous efforts towards development of automated tools and processes to prevent such catastrophic typos from finding their way into or making a home of our software code bases. Extensions of compiler technologies have been built to help us with automated reviews.

In this post, I write about Psalm — a PHP…


Null-coalescing Operator (??)

PHP7 came with syntactic flavourings we all have been savouring ever since its release — One of which is the null-coalescing operator. If you have ever had to use the ternary operator together with isset() method, then this was tailor-made for you!

It returns the first operand if true, otherwise returns the second. It is also chainable:

Null-safe Operator (?->)

The null-safe is a PHP8 feature that, instead of throwing an exception, short-circuits to null when a chained property or…


The talking stage for me is all about getting to know the person. I always find myself eager to ask the following questions:

"Do you have brothers?"

"How many are older than you?"

"Does your father wear uniform to work?"

Yes — I am trying to accurately profile the risks in case I end up breaking a heart. And, it’s not just me. I reckon it’s the same with a lot of men around the world. Even the ones that don’t ask, think it.

A few minutes ago, I was sipping half-iced monster energy drink to counter the heat my…


It is good practice to check for every possible errors — especially, the unexpected ones. This can push us to write code that is hard to read. The logic of your program can end up being totally obscured by error handling, particularly, if you subscribe to, "a function must have a single return statement" school of thought.

Let’s examine the code snippet below:

Personally, I am not aware of any limitation to if-else nesting but, deep nestings could be an indication of terrible design. …


Premise

Have you ever come across a situation while programming in JavaScript where you are passing a function as an argument to another function and you can’t get the this to work as you want it to because the outside function has a this different from the inner one?

Yeah, me too.

function countup() {

this.x = 0;

setInterval(function() {

console.log(this.x++); // this prints ‘NaN’ to the console

}, 1000);

}

If you run the above snippet, NaN will continuously be printed on the console. Why is that?

In the countup function, we initialized the this.x to 0. And in…


the other beloved

Zaria.

She is, as much, a home as you are to me.

I take you in my mouth and I taste love; I get in her, and I feel love.

I lust and desire you; I pine and ache for her.

All touches, kisses and hugs; No touches, kisses or hugs.

I find god in your breathing; I am god in her environs.


In the beginning it was just text and then, a genie said, “let there be image”.

Imagine how boring the web would have been if it was impossible to embed images to a web page. Well, that’s how it was in the beginning. But fortunately, not for too long.

Coming across a web page that does not have at least a single embedded image these days is increasingly difficult.

So, how is an image embedded in a web page?

Okay. Slow down. Before we get to that, and rest assured we’ll get to that, let’s talk about how images are…


HTML Links are Hyper-links. They allow you to move from one web page to another.

Writing Links

Links are created using the <a> element. Anything within <a> and </a> is click-able unless otherwise defined. The href attribute holds information that helps the browser know where a link is linked to.


Lists are a part of our daily activities. List of text books for school, list of ingredients for that new recipe we found on the Internet, list of students that are absent, list of students that are present etc…

In web development, there are many scenarios where we need to use lists. HTML provides us with 3 different types of lists:

1. Ordered Lists

This is a type of list where each item in the list is numbered. For example, a list of tasks ordered according to how important they are.

2. Unordered Lists

In this type of list, the…

Faruk Nasir

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store