PHP: Getters and Setters are not dead!

Reading Time: 2 minutes Getters and Setters are not limited to provide access to the class’s attributes(variables) rather it is one way of encapsulating the data. Getters and Setters are not the PHP thing which will be dead rather it is an approach to …

Null Object Pattern In Php

Reading Time: < 1 minute The null object pattern aims to replace null with actual objects, objects that behave differently because they represent the “absence” of the real object. Another benefit of using this pattern is that classes become more representative of the real world. …

Run multiple shell commands using Node.js

Reading Time: < 1 minute When you write a Node script to run generic shell commands it is worth knowing how to run multiple shell commands. child_process.exec(): spawns a shell and runs a command within that shell, passing the stdout and stderr to a callback function when complete. Please …