Posts

  • Getting started with Docker and Wordpress

  • I’ve been meaning to get started with Docker since hearing about it in 2014.

    Having really enjoyed working with Vagrant, I’ve struggled to make a leap into the Docker realm.

    However, after hearing about it some more at PHP UK I feel that now is a good time to consider it as a replacement for my Vagrant environments.

    My understanding at the moment is that docker takes up less resources, which for me is becoming more and more of an issue as I attempt to expand my development environments.

    Also, I’ve recently inherited a number of Vagrants that I discovered have varying operating systems and application versions, that vary from production.

    This has unravelled a dependency hell when I came to build a continuous integration process.

    In light of this, at this stage, a complete rewrite of the architecture seems to be emerging as the most sensible way to bring all the services in to line.

    I’ll be looking whether I can solve these problems (amongst others) with Docker.

    I’ve chosen to get started with Docker by picking up one Wordpress. Due to its popularity, it makes it a good candidate to get started with.

    Read More »

  • UX: Is hamburger menu a lazy solution?

  • A question raised at a recent Staffs Web Meetup was:

    "Is the hamburger menu a lazy solution?"
    

    On the face of it, the answer to this loaded question is yes, of course, but that’s not the end of it.

    Although the answer is yes, who says lazy is a bad thing?

    Read More »

  • Migrate from Wordpress to Github Pages using Jekyll

  • Why?

    • Wordpress is bloated. It won’t even run on a basic free DigitalOcean instance.
    • GitHub is free and has powerful version control built in.
    • Wordpress is unnecessary overhead. Github Pages are light weight.
    • Github Pages are portable. Everything you write is written in Markdown and is portable.
    • There’s no need to upgrade or install plugins. The output is static.
    • I love git and I love markdown.

    Overview

    Here’s what we need to do:

    • Migrate comments to Disqus
    • Export content
    • Using Jekyll
    • Publish to Github Pages
    Read More »

  • Why error suppression in PHP is bad

  • I appreciate that to most people, this is not a new topic and it almost goes without saying, however I can understand that not everybody knows this, especially when you're just starting out with PHP.

    Back in 2008, I wrote an article titled “50+ PHP optimisation tips revisited“. Although it was written for fun and to include citations for tips that had gone without any supporting evidence, the underlying issue with the article was that “premature optimization is the root of all evil”.

    At the time, I had no real argument for this witty retort, however in hindsight, my reason for this was to settle those arguments of best practice, no matter how trivial, the evidence is there in black and white.

    The same is true with error suppression, despite what the PHP manual does or does not say.

    Read More »

  • How To Install MongoDB on CentOS 6 with cPanel

  • First of all, what is MongoDB? Well if you're already here, you probably know, but if this is the first time you've heard of it, then you may want to know a bit more, so here's a brief description to help you along your way:

    MongoDB is a “document database” designed for performance and scalability while remaining easy for developers to use. It does not mean XLS or DOC files, instead it means storing arrays, therefore it is often grouped with other non-relational databases under the term “NoSQL”.

    The question is, why might you want to use this over traditional SQL databases such as MySQL, PostgreSQL or even SQLite?

    Well, there’s one fantastic reason: it works as if it is part of the language you’re coding in, rather than requiring you to learn a new one.

    The problem is that cPanel doesn’t have native support for MongoDB, but that won’t stop us installing it on CentOS 6, in fact, because there’s no interference from cPanel (yet), it makes it a little easier.

    Here’s how we get it installed:

    Read More »

subscribe via RSS