CSS Grid and grid areas

CSS Grid example

Having played around with CSS Grid for a while, I had been very impressed with it. But having watched this excellent video on the use of grid areas, I realise that I have been holding the hammer by the head.

Despite reading about grid areas, it hadn’t sunk in just how easily they can be used to solve basic layout requirements – especially when handling responsive layouts.

(more…)

A tale of planning and pitstops

Why do we need to plan? Why can’t we just get on with doing?

The Mercedes Formula 1 team gave us an extreme example of the impact of planning on pitstops at yesterday’s race in Germany.

(more…)

Archiving 500k records (500GB) in one flat folder

I recently had to archive an old website which contain around 500k user uploaded files, totalling around 500GB. Due to the design of the application, the files were all in one folder with no subfolders.

I had assumed I would just take a backup, stick it on an external drive and provide it to the archiver.

Oh ye of little learning.

(more…)

The Holy Grail: Cypress.io, Browsersync automatically rerun tests

Cypress is an amazing front-end JavaScript test runner and framework. It simultaneously simplifies the set-up and test creation whilst providing a more useful features than most alternatives.

(more…)

How to lazy load custom field images in wordpress

Lazy load text

WP Rocket is a great, paid-for module for improving the performance of WordPress. Their Lazy Load module improves perfomance further by online preloading images above the page fold.

(more…)

How to share contacts between Current RMS and Pipedrive

Current RMS is a great Rental Management System (RMS) providing all the tools needed to run a product rental business, including inventory management, invoicing, reporting and Customer Relationship Management (CRM). It also has an awesome API for building integrations with other systems.

Current RMS screenshot

Whilst it is a one-stop shop for rental management, features such as the CRM don’t provide the breadth of functional as dedicated systems. Eventually, you may find yourself wanting to use a separate CRM such as Pipedrive.

(more…)

BDD with Visual Studio – part 2: First scenario and first test

In this second part of this series, we look at creating a first scenario and step definitions.

BDD in Visual Studio – part 1: introduction

As a natural extension of Test Driven Development (TDD), BDD takes things a stage further.

TDD focuses on the use of Unit Tests to drive out a specification for your code and to guide your development. The nature of unit tests means that they are mainly practical for use by developers and, as the name suggests, only for unit testing.

(more…)

A guide to SRP, Open/Closed, Dependency Injection, Interfaces, Unit Testing and Mocks

This video is a guide for developers to help them understand what changes need to be made to code to make it testable and sustainable. It uses parts of the SOLID principles to refine an example class.

Topics covered:

  • Single Responsibility Principle (SRP)
  • Open/Closed principle
  • Dependency Injection
  • Interfaces
  • Unit Testing
  • Mocks

Geospatial search using MongoDB and PHP

A short tutorial showing how to use MongoDB to create a geospatial index.