A look into Getters and Setters in JavaScript

There are always multiple ways of doing things. Programming is no different. For instance, in JavaScript, what would you do if you want to get the property of an object running some operation before returning it? Take this example.

» Read More

A deep dive into Generators in PHP

Have you ever stuck in a situation where the code that you’ve wrote uses foreach to iterate over a set of data into an array and which ultimately caused you to exceed a memory? Well, I’ve been to. Many times.

» Read More

Get grandparent instance of certain class in PHP

Recently, I stumbled upon a scenario where I had to extend a class. I'm going to explain what issue I had faced and what's the role of using the grandparent instance of the class to overcome that issue in this article.
Read More

Fetch and calculate tax details anywhere within Magento 2

Often times comes when you want details related to tax based on the products you currently have anywhere apart from Checkout/Cart page. I’m specifically talking about Magento 2 here. For instance, for one of my projects we’ve a projects page where we use catalog products differently than the Magento’s native way and we needed a way to fetch tax details based on the products we have on that page.

» Read More