Category Archives: Programming

Exceptional Error Handling

When it comes to error handling, most developers either skim over it or forget about it all together. Error handling is a difficult thing to get right. In this article I’m going to show an effective way to add error handling to your business software by making use of exceptions. Why exceptions? Exceptions are very […]

Posted in Programming | Tagged | Comments closed

Symfony 2 for PHP developers – Part 3

So, now that we have spoken about the general direction in Part 1 and we talked about the Dependency Injection in Part 2, it’s now time to talk about “wiring”. I previously already mentioned wiring in Part 2 and we’re now going to look into what this actually means. The term “wiring” is actually very […]

Posted in Programming | Tagged , | Comments closed

Symfony 2 for PHP developers – Part 2

Dependency Injection is at the heart of Symfony 2. To understand Symfony 2 you need to understand Dependency Injection. Fortunately for us, the principle of Dependency Injection is very simple. Rather than hard coding instantiations of objects into our classes we’ll pass ‘m in, something like this: 1 2 3 4 5 6 7 8 […]

Posted in Programming | Tagged , | Comments closed

Symfony 2 for PHP developers – Part 1

So, you heard a lot about this web framework called Symfony 2 and everyone is banging on about how fantastic it is, but you don’t understand what the big deal is and now you’re reading this.. To be honest, my introduction to Symfony 2 wasn’t entirely voluntarily, it was forced upon me but I decided […]

Posted in Programming | Tagged , | Comments closed

Asynchronous Auto-Complete Input Fields with Bootstrap Typeahead – Update

A while ago I posted about implementing the Bootstrap Typeahead component using an async call. Since that post I have received various requests from people with questions about this approach so I have taken the liberty to make a slightly more complete example than the one shown in the original post. I have a ZIP […]

Posted in Programming | Comments closed

WordPress Security: First Line of Defence

When you have set up your WordPress website and published it on the web it has become vulnerable to attacks. Most people don’t realise that there are automated processes scanning the web for vulnerable WordPress websites. These scanning “robots” will try to get into your “admin” account by guessing the admin password. Most of these […]

Posted in Programming | Comments closed

Beware the favicon feedback loop

The other day I noticed something strange happening on one of my servers. I have munin set up to monitor memory, cpu and disk space usage etc. and I noticed that for some reason memory consumption was going through the roof. After checking the logs I noticed the following error: PHP Fatal error: Allowed memory […]

Posted in Programming | Tagged | Comments closed

Javascript Preloader

The year was 2006. I was knee deep building websites with Flash and when I say Flash, I actually mean ActionScript. Fast forward to 2013 and guess what? Javascript today is pretty much what ActionScript was in 2006, at least, from a language point of view. Anyway, I was working on this website recently and […]

Posted in Programming | Comments closed

Responsive YouTube Video Embeds

I was recently working on a responsive website where YouTube videos could be embedded in the content. Since the website was responsive the embedded video had to resize based on the width of the content are but since YouTube iframe embeds have a hard coded width and height, the size of the iframe was always […]

Posted in Programming | Comments closed

Custom Responsive Bootstrap Carousel

Some time ago I had to implement an image carousel and since I was using Bootstrap to build the website I thought I might as well use the built-in Bootstrap Carousel functionality. However, there was one little caveat. This carousel had to display a reflection overlay and on top of that, the carousel needed to […]

Posted in Programming | Comments closed

WordPress Database Connection Error

The other day I ran into a problem with one of my clients websites that was throwing the Nemesis error for all WordPress developers: Error establishing a database connection. Not a very nice error to present to your users. I was wondering if it was possible to change this message to something more meaningful, or […]

Posted in Programming | Comments closed

Asynchronous Auto-Complete Input Fields with Bootstrap

Bootstrap is a great HTML framework and I’ve been using it a lot lately for most of my projects. The other day I needed to add asynchronous auto-complete functionality to an input field and Bootstrap seems to offer type ahead functionality out of the box. However, from the documentation it wasn’t instantly clear on how […]

Posted in Programming | Comments closed