Author Archives

cover article node

File watcher with Node.js

In this article I am going to explain how to create a file watcher in Node.js that constantly check a source folder content file and moves the content in a destination folder lowering case the name. It is a great way to understand how listeners and callbacks interact to each other and how to work with ...
hash table

Hash tables

An hash table is a data structure that maps keys to values for highly efficient lookup. There are a number of ways of implementing this. Here, I will describe a simple but common implementation. I use an array of linked lists and a hash code function. To insert a key and value, we do the following: First, compute ...
Factory pattern

What is the Factory Method Pattern? Let’s implement it in Php!

Factory Method pattern is part of creational category of design patterns. It is involved in creating something. This something is a product that is loose coupled with the class that creates it (we can call it client). The Client holds a reference to the Creator (factory interface) for requesting a graphic or text product. The client ...