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.

PHP Loops

Introduction 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 […]

AJAX basics – Switching static content

Introduction 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. Using AJAX […]

Web accessibility: Improving the web for all

Introduction Web accessibility is making the web available for all to use, everybody is different. Tools Before getting into some of the features available for improving accessibility, it will be useful to list some tools that can aid in finding errors and warnings on your page. Although useful these are not be thought of as […]

Programming operations, using maths

Introduction 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 […]

OOP: Instance variables, Class variables & Local variables

Introduction 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. Instance variables An instance variable is a variable associated with an instance of a class, known […]

OOP: Writing a class and creating objects

Introduction 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. The […]

Commenting code

Introduction What is a code comment? 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 […]