Edd Mann Developer

Implementing and Using Memoization in PHP

Memoization is a simple optimisation technique to understand and, in most cases, implement. The base idea is to speed up function calls by avoiding the re-calculation of previously processed input results (very cache-like). Storing these results in a key-value lookup store can result in major speed increases when repetitive function calls occur.

How Static Facades and IoC are used in Laravel

When you first take a look at Laravel you may ask yourself, what is with all the static? It is a valid question, as on the surface it can seem like the framework is heavily static method based. However, this could be no further from the truth. A deeper exploration reveals that the static calls we make really mask a great number of instance objects. In this post I hope to provide a simple explanation as to what is really going on, and along the way build a basic implementation to practise these newfound findings.

Using Python's Pygments Syntax Highlighter in PHP

Having a website that is heavily software-development based, one important aspect that can not be overlooked is well presented code examples. Speaking on the importance of editor syntax highlighting in the previous episode of our podcast, this attribute transcends to aid in the readability of code online. Fortunately, there are many options to choose from. You can either store the code snippets in an embedded Gists or use the front-end based highlight.js or Google Code Prettify. One benefit that greatly simplified the publishing process when using a front-end based solution was that you could simply parse the Markdown file (perhaps with a class language type-hint) and leave all the hard work to the client’s browser. As we all know, we have very little control over the viewing experience for each user. And as I started to post more frequently, cracks began to appear in the syntax highlighters I had been using. However, when looking for a solution, one had been staring me straight in the face all this time, and that was Pygments.

Implementing Heapsort in Java and C

In this post, we will delve into the mechanics of heapsort by building a tree-based heap data structure and then methodically extracting a sorted array. We will then implement said algorithm in both Java and C to get a feel for how the process is modelled in code.

Implementing a XOR Doubly Linked-List in C

This post examines the implementation of a XOR doubly linked-list in C. It provides a detailed explanation of how pointer arithmetic combined with the XOR operation can reduce memory usage in a linked list. The discussion covers both the benefits and the challenges of managing memory at a low level in C.