Posts in this blog can range from basic programming guides intended for those new to programming or related to subjects I have been working on through my day job to things that just spark my interests.

Optimising PHP: Class initialisation

In this article we discuss alternative methods for loading classes depending on how we intend to use the class and how many times we intend to use it.

Read more

AppCheck: Web Security Seminar – June 2023

My employer offered to send me to the 2023 AppCheck Web Security Seminar. I attended representing the software development side of Real Group, along with Lee (IT Systems Manager), who was representing the physical infrastructure side of the the company.

As such, this post will mostly cover the software side of the seminar.

Read more

Using computers to solve Sudoku

I have enjoyed Sudoku puzzles for a while now and had the idea of trying to teach a computer to play Sudoku. This first release is fairly basic and you won’t have problems finding puzzles that it can’t complete, improvements to the algorithm can be added over time.

Read more

PHP Loops

Loops are used in programming to iterate over an item, either for a known or unknown amount of times, until a certain criteria has been reached.

You have the choice of writing a single loop and specifying how it ends and writing the same code over and over again to satisfy every iteration of the loop (this will only work if you know the number of times the loop will run). The choice is yours.

Read more

AJAX basics – Switching static content

Traditional web applications reload the whole page when clicking a link, modern web applications only reload the content that has changed.

As the web has matured, web applications often have a large amount of overhead; reloading every aspect of the page on each click including JavaScript and CSS vastly increases the overheads.

Read more

Web accessibility: Improving the web for all

The internet is available for everyone to use, as such it can’t be assumed that a visitor has the same visual or motor skills of the designer or developer.

By following a set of rules when designing and developing anything from a static landing page to a full blown web application, users of all abilities will be able to interact with the content you have created.

Read more

Programming operations, using maths

An important part of computer programming is implementing mathematic operations. Maths can be used to implement many functions in an application; be it to include functionality that is obviously maths related, or to implement functions that may not immediately appear, to the user, as a maths problem; such as calculating the window size to maintain the correct aspect ratio, or to calculate the width of a field that is to be half the width of the window.

Read more

OOP: Instance variables, Class variables & Local variables

Variables form an essential part of every application for storing, retrieving and generating dynamic data. In OOP (Object-Oriented Programming) there are three main types of variables which provide slightly different functionality; Instance variables, Class variables and Local variables.

Read more

OOP: Writing a class and creating objects

Classes and objects are a key principal of OOP (Object-Oriented Programming). The idea behind OOP is that classes are created to represent a real world entity; this real world entity could be a tangible object, such as a person or a car, or an intangible object, such as a job position or a date.

Read more

Commenting code

Code comments offer a method of annotation for the code that makes up an application, a part of an application, or simply a single line of code. When source code is compiled, or executed comments are ignored; they have no affect on the final product, the output of a method, or what a line of code produces.

Read more