Binary Search Tree

This post will cover some learnings from the algorithms & data structures module (COM00141M) during my MSc studies with the University of York.

What is a binary search Tree?

A binary search tree (BST) is a rooted binary tree data structure. It consists of a root at the top of the tree with accompanying child nodes. The root and nodes have either zero, one or two child nodes that form left and right subtrees.

Binary search trees have to satisfy the binary search property, meaning values in the left subtree must always be less than the parent and values in the right subtree must always be greater than the parent.

Example binary search tree
Read More

UML State Machine Diagram

State machine diagrams were covered as part of the Software Engineering module (COM00144M) during my MSc studies with the University of York. This post will detail my findings and provide information and examples on how to create state machine diagrams.

What is a state machine diagram?

State machine diagrams are used to model the events an object can go through. They visualise the steps of a process and show the different paths that can be taken from one state to another during its lifetime.

States

Each state is shown by a single rounded rectangle, the name of the state is written inside.

State machine state example

States can contain further optional detail in the form of these additional properties:

  1. Entry – An action that is performed on entry to the state
  2. Do – An action that is performed while in the state
  3. Exit – An action that is performed on exit of the state
  4. Defer – An action that occurs when the current state is exited and triggered from another state
State machine expanded state example
Read More

UML Sequence Diagram

Sequence diagrams were covered as part of the Software Engineering module (COM00144M) during my MSc studies with the University of York. This post will detail my findings and provide information and examples on how to create sequence diagrams.

What is a sequence diagram?

A sequence diagram is a type of interaction diagram that shows interactions via time sequence. Each object has a vertically descending lifeline with operation arrows from the source to target lifeline.

Read More

UML Use Case Diagrams

Use case diagrams were covered as part of the Software Engineering module (COM00144M) during my MSc studies with the University of York. This post will detail my findings and provide information and examples on how to create use case diagrams.

What is a Use Case Diagram?

A use case diagram is part of the unified modelling language (UML). They are responsible for detailing high-level functionality and system scope by showing user interactions.

The diagrams consist of four main components:

  • Actors
  • Use Cases
  • Relationships
  • System Boundaries
Read More

UML Class Diagrams

As part of the MSc degree with the University of York, I have studied the Unified Modelling Language (UML) during the Software Engineering module (COM00144M). A section of this work has been related to class diagrams.

What is a Class Diagram?

A class diagram is a way to statically represent the structure of a system. This is achieved by modelling the systems classes, attributes, operations and relationships between objects involved.

Class diagrams come in different perspectives, this depends upon the stage of design.

  • Conceptual: represents the early stage concepts in the domain
  • Specification: focuses on the interfaces of abstract data types
  • Implementation: describes how classes will implement interfaces
Read More

Object Constraint Language

The object constraint language was covered as part of the Software Engineering module (COM00144M) during my MSc studies with the University of York. This post will provide information on why OCL is used and examples of how you can implement OCL.

What is OCL?

The object constraint language (OCL) is a declarative ISO standard language created by IBM. OCL was developed to help relieve limitations with UML modelling and to allow the specification of more precise aspects of a system design. OCL is a part of the Unified Modelling Language (UML) set by the Object Management Group (OMG) as a standard for object-oriented design.

OCL is a declarative and side-effect free language which means the constraints only enforce rules, they do not assign values or modify the system.

Some usages of OCL include:

  • Invariants specify constraints that have to equal true during the instance of an objects lifetime
  • Preconditions specify constraints that have to equal true before a method is run
  • Postconditions specify constraints that have to equal true after a method is run
  • Initialisation specify default property values
Read More

My Home Brew Setup

Around ten years ago I gave home brewing a try in my parents garage, the setup was very simple and consisted of the basics such as plastic buckets, syphons, tap water, etc. The beer produced was of a poor quality but the process was fun. Now that I have my own place with a bit of space I decided to give it another go, however this time with a slightly better setup.

Fermenter

The fermenter I’m using is the “Grainfather Stainless Steel Fermenter”. It has a 25 litre capacity, is made from scratch resistant stainless steel, has handles for easy movement and pre cut holes in the sealable lid for an airlock. On the inside it has litre measurements stamped so you can easily tell how much water you have added.

The stainless steel makes it easy to clean and sterilise between uses which is a bonus. This bit of kit should last a few years with good care and cleaning.

Read More

Our Covid baby journey

I think everyone can agree life has been challenging in many ways since the Coronavirus pandemic began. The disruption caused by multiple lockdowns and the inability to go about our normal lives. Not being able to visit family or spend time with friends. It has been a very unique and tough time for all in many ways so I wanted to describe how it affected our journey through multiple pregnancies and our first born son.

It was the first week of March 2020, just as the pandemic was beginning to intensify across the world. I had been away for a few days on a work trip to Amsterdam and it was becoming noticeable that concerns were rising. People had not started wearing masks but I had been unable to buy any anti bacterial hand sanitizer in all of London, Brussels and Amsterdam, the panic buying had begun!

I returned home and over the next few days myself and partner received the joyous news that she had become pregnant, we were over the moon to say the least. Due to the rising news stories and talk of what could be to come, the happiness was mixed with a degree of anxiety as to how we may fair in this situation. At this point both of us were still commuting into London on multiple forms of public transport so we felt susceptible to the risk of infection. There had been very little studies on the virus or the long term effects so the possible risk to a pregnant woman and baby were concerning. Thankfully my office closed that week and hers shortly after, just in time for the first national lockdown.

Read More

The infrastructure behind SmiteStats.com

This project is now deprecated, consider this archived.

I built SmiteStats.com as I regularly play Smite game with friends. The initial aim was to create a clan based smite stats site just for fun. However it has evolved into quite the project and stores around 4GB of player data including over 5,400,000 match records.

Smite stats relies on the official Hi-Rez Smite, Paladins and Realm Developer API (more details can be found here). The API provides a source for all player and match data. Consequently if the API became unavailable then the site would cease to provide real time data. In that case it would be more of an archive of smite stats data.

Read More

Arduino RC Tamiya – Part 3 – Adding Wifi Control

Last time we replaced the standard receiver with a custom coded Arduino. This allowed us to program the car ourselves and run simple automated scripts to turn around in a circle. In this post we’ll enhance our remote control car so it can be driven over WiFi.

The Arduino board we have been using is WiFi ready, due to its secure ECC608 crypto chip accelerator. This is perfect as we can use the readily available Arduino WiFi library in our code.

Read More