Blog
-
System Overload
Every developer will have spent some of their time maintaining systems, whether that be a few small websites they've lovingly crafted, a deployment tool that pushes code to servers, or monitoring applications that can analyse and report on issues. Looking after and using a few of these is easily manageable, but the more you inherit, the more difficult this task becomes as you have to split your time…
-
Creating your own classes that use the PSR-4 autoloader
The PSR-4 standard has been around for quite a while now, building on and adding to the PSR-0 standard, allowing PHP to autoload classes using a cleaner and better organised file tree. One thing I did notice is that not all the documentation on the autoloader is as clear as it could be with regards to how you would actually use it for your own new classes. The first thing would be to get a PSR-4…
-
Form Validation And Why You Are Probably Doing It Wrong - Part 2
In the previous part of the article I outlined how a lot of developers are validating their forms badly, letting assumptions blinker their otherwise decent logical skills. There I used names as an example; an easy shot with obvious issues. But what about something more specific in its structure, something that has a well-defined pattern, like a domain name? The Domain Domain names are integral…
-
Form Validation And Why You Are Probably Doing It Wrong - Part 1
Forms are an integral part of websites, whether it be a simple contact form on your personal blog, an address form for a shopping delivery, or a complex tax return form. If you're the one in charge of that form, you will be validating the user input (if you're not, you're an idiot), but have you ever stopped to think about exactly what it is you're validating? Validate Twice, Process Once There's…
-
Pure CSS Star Wars BB8
Star Wars is as popular today as it ever was, and the new android BB8 has found many new fans. I thought it would be a perfect object to recreate in pure CSS. The HTML for this is very simple, a single tag for the head, one for the body, and another to wrap them both and make the CSS more specific when the HTML is placed within another document: <div class="bb8"> <div class="head"><…
-
Programming by Coincidence
(or why copy-and-paste development is a bad idea) This past year, working with CodeSniffer and more recently SonarQube, I'm acutely more aware of the quality and consistency of the code that I write. SonarQube has really been great for this, because of the way the deployment procedures operate at TMW; it integrates extremely well with TeamCity and helps the whole team with all the languages we develop…
-
The Types Of People You Encounter As A Developer
If you've ever worked in the tech industry for any length of time, you'll have encountered most of these (or if you're really lucky, a blend of a few of them). Some of these may be your fellow developers, while others may be your project manager, or one of the many designers you have to deal with on a daily basis. (Note, I'm not a psychologist, and this is about as scientific as a childs mud pie…
-
Code-Free Views
I've recently been embarking on a mission to completely eliminate PHP code from my view files, here is why. What are Views? Often when you're building a website or application, if you build from scratch you end up doing a lot of the same kinds of things, like turning requests into specific pages, handling form validation, caching, etc. A long while ago (in the 70's according to http://c2.com/cgi/wiki?ModelViewControllerHistory)…