Archived

The Euclidean algorithm

 

Have you ever heard of the Euclidean algorithm (also known as Euclid’s algorithm)? I bet that the majority of the population believes they have not. However, we all (or at least the majority) have heard of the Euclidean algorithm just not by this name unless you have a degree in mathematics, computer science, computer engineering, [...]

→   Continue Reading

Archived

The what and whys of namespaces

 

Over the past few months I have been raving about namespaces being introduced in PHP before the official PHP 5.3 release occurred. A friend of mine who is a freelance web developer Ryan Maffit could not understand why I consistently raved about this but started to when he attended his first .NET development course at [...]

→   Continue Reading

Archived

How to handle class constructors that fail

 

Recently I was asked what the most appropriate way would be to handle errors within class constructors that fail. Well, my answer to this is simple – with the use of an Exception. Later on that day I realized that using Exceptions within class constructors is not always the answer and I failed to explain [...]

→   Continue Reading

Archived

Object Serialization in PHP

 

What is this business about serialization of objects? Well, it is quite simple. The definition of Serialization according to Google is: Serialization in the context of storage and transmitting is the process of converting an object into a sequence of bits so that it can persist in a storage medium and or transmitted across a [...]

→   Continue Reading