Blog
-
Web Accessibility in Detail
The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect. Tim Berners-Lee When Tim Berners-Lee opened the WWW to the general public in 1991 (previously it was internal to the CERN network) he had a vision that it would be of use by all, and that tenet is as true today as it was nearly 3 decades ago. Back in the 90's, we had little…
-
Updating Angular from 2 to 4
I recently needed to upgrade an Angular project from 2.4.1 to the latest (at the time of writing) version of 4.2. All the typical guides detail how to update the core @angular packages in the package.json, but stop there, omitting the other things that also need to be done to ensure the project/application still works as intended. This is what I found as I was performing my update: Updating the…
-
Imogen – An Open Source Image Generator For Emails
A couple of years ago I was working closely with some email developers to develop a system that could generate images on the fly. This was born of the need for emails to have content that could change after the moment it was sent, and be fresh at the point a recipient opened it. The end result of this system was a rudimentary system written in PHP that could generate such images, and it was used…
-
Accessible Styled Form Elements
Since the inception of CSS, there's been one area of styling that has been a constant issue; forms. Simple elements, like <input type="text"> and <textarea> and buttons, have generally been ok, as borders, colours and fonts could all be set with standard styles that behaved as expected. Beyond that though, other elements were impossible to style consistently without either compromising…
-
Practical Regular Expressions
I often quote Jamie Zawinski for his brilliant line on usage of regular expressions: Some people, when confronted with a problem, think “I know, I'll use regular expressions.” Now they have two problems. Despite this, I still use them to within an inch of their life because, when used correctly, they are incredibly useful; across everything from find/replace in a document or IDE, form…
-
Speed Testing the SPL Iterators for Fetching Files
In the world of PHP some techniques never really go away, despite there being better alternatives added to the core functionality. One of these areas is file iteration, particularly recursively through directories and their contents. It's fairly typical to see some code use a recursive function to: Scan a directory Loop through the scanned list Add entry to a list Check if an entry is a…
-
Blind to Accessibility
When I first started learning about accessibility, I figured it was just enough to use alt attribute text on images, and use semantic tags. Like the Greek philosopher Socrates once said though: The only true wisdom is in knowing you know nothing My folly, shared by many developers, was to simply assume that accessibility was just something that applied to blind people, but don’t we all start…
-
CSS Zoo
I enjoy playing around with CSS and using it for more than just styling traditional web pages. It lead me to experiment by making a few animals using no more than a handful of HTML tags. At the core of each is the main containing <div> tag, this operates as the face and the container for the other elements. They generally have the same kind of round shape, which is all just achieved with border-radius…
-
A Formatting Class For PHP Command Line Scripts
Just over a year ago when I moved into my flat, I found myself at a loose end in that time between moving in and the Internet connection being set up. Having exhausted all my films, and played my fill of Red Alert, I was in desperate need for something to do. This PHP script is the culmination of that free time; a command line script that can turn basic HTML strings into something that can be displayed…
-
Manual Vs Automated Testing
Testing is an essential part of any software development, ranging all the way from basic testing of some code to make sure it performs the task at hand with the perfect inputs, right up to the rigorous regression tests performed by software houses working on enterprise level applications. Testing usually comes down to two types: manual and automated. But what type of testing is better, and what are…
-
A Better Radial Menu With Pure CSS
I recently saw a Pen on CodePen with an animated menu using blend modes. The overall effect was quite nice, but I noticed it was relying on JavaScript to toggle the animation, and as an example it wasn't particularly flexible, as those values were tied into the 5 items shown. I set about recreating the effect but with pure CSS, and took it a little further using some SASS to allow it to a varying…
-
Why CodeIgniter Is Not Recommended Over Other PHP Frameworks
I recently saw an article recommending the use of the CodeIgniter framework. While the article is mostly accurate (with some glaring exceptions) the problem is that the advice is so out of date, it's essentially useless. PHP has a bad reputation in the web development world as being a terrible language. I admit, its greatest strenght is also its biggest weakness: it allows anyone to easily create something…
-
Testing Private Member Classes with Jasmine in Angular2 Template Tests
A little while ago I came across an issue when trying to implement template testing with Jasmine on an Angular2 project that was using private member classes. If you try this yourself, you'll get plenty of errors and warnings about various things that either can't be found, used, or can't be spied on. There's not a lot online about this, as it seems that private anything within Angular2 projects is…