4 minutes
Contact me

Name: Factory

Type: Creational

Use when you want to:

  • Generate an instance for a client without exposing any instantiation logic to the client
  • Hide the dependencies of class instantiation from clients

Variants

Simple

From Wikipedia:

In object-oriented programming (OOP), a factory is...

2 minutes
Contact me

Starting 2019

It's that time of year when everyone starts to reflect on the previous year and set goals for the current one. In the spirit of jumping on bandwagons this is my note to self. I have been doing some thinking over the last few weeks and have tried to identify some things I would like t...

0 minutes
Contact me

The Sierpinski Triangle is rather beautiful. I thought might be interesting to try and create it in code. Luckily I was able to find many others who had attempted the same thing. I did a little reading on what was involved and the steps are pretty straight forward:

  1. Start with an equilateral triang...
3 minutes
Contact me
Gravitational Attraction

If you want to see the pull of gravity, drop whatever you're holding right now. If you had listened, you may have seen your phone drop to the ground and bounce.

It may even have a few scuffs, or that pen may have hit the desk. Whatever the scenario there is no denying gravity is something that we...

1 minute
Contact me
Recursion

Recursion

Recurions is one of those topics in programming that I have had an interest in. Partly because infinate recursion is well... so weird. It reminds of me of the Eternal Return Theory.

However in code we have control of the boundaries and can stop the recursive call at anypoint. This...

3 minutes
Contact me
Steering Behaviour

Autonomous Agents and Steering

The goal of this post is to examine simulations where the objects make decisions.

Previously I had looked at the way forces act on objects. In this post I wanted to explore objects that aren't inanimate and have some ability to make a choice about their behaviour.

...
0 minutes
Contact me

Back when I was a kid pig latin made no sense. I wanted to make a basic pig latin translator so if I ever come across it again I can at least hold a conversation....

I know this little script will be very handy.

It's pretty amazing that we can read stuff even though the letters are mixed, I'm...

4 minutes
Contact me
Maze Generation

Using a depth first search and a recursive back tracking algorithm

and this Wiki Page.

How?

First I have to think about how I am going to approach the maze.

I'm using an HTML5 canvas which I will divide into a grid with each cell being it's own object. The program will figure out which wal...

2 minutes
Contact me

Reactivity in JS

context: I have been using Vue.jsfor a number of side projects and really enjoy working with it, I also use Knockout.jsa lot in work which uses a similar approach. I wanted to dive into the abstracted functionality a little deeper to help me understand the libraries I work w...

4 minutes
Contact me

Saying Hello

0110100001100101011011000110110001101111,Even something as simple as hello can seem strange and alien in machine language. Yet our world today in 2018 is shaped by 1’s and 0’s. These 1’s and 0’s represent state at the hardware level. it could be the voltage of a pulse or the change...