Articles

July 10, 2016

Javascript best practices

🕑 2 minute read

Where to put the javascript? Unless it’s essential for it to be in the head of the HTML document, place all javascript just before the closing body tag of a page. What’s essential for the head? That can vary from project to project but a rule of thumb would be: A minimal amount of inlined javascript Any javascript that can be loaded async. What should do in the footer jQuery. Nothing essential…

Keep Reading →

June 14, 2016

A Project code guideline

🕑 5 minute read

This is my documentation for a new project. I’m writing it here rather than inside a repository so that it can exist across multiple projects. This will eventually be duplicated on to a markdown document for posterity! Project structure As the project is Django based, the front end files (CSS, Javascript and Media) can live in a few places — The Project folder, the static folder and every app’s…

Keep Reading →

February 19, 2016

Lessons learnt from my first iOS Game

🕑 4 minute read

A few weeks ago I decided to make an iOS game. I’ve toyed with the idea for a long time, and tried a few times, but never actually made something that was fun enough and worked properly — consequently, I’ve never actually made a game from start to finish. Previously I only got so far, then got stuck, got disheartened and gave up. This time it’s different… What did I want to achieve? Make a fun…

Keep Reading →

February 09, 2016

Start using Git

🕑 6 minute read

Turning any project in to a Version controlled project is really simple and should be one of the first steps in any project workflow. By the time you realise that you need a version controlled file, it’s usually too late – whether you have accidentally overwritten a days worth of work on a file, or you deleted the wrong thing. Since it’s so easy to setup, there’s really no excuse not to. There are…

Keep Reading →

December 16, 2015

CSS best practices

🕑 3 minute read

There are a few ways of writing css. For consistency we will adopt only one naming convention. This is lowercase and hyphen separated. It is the most readable and fits well with other CSS methodologies that are covered below. Yes No Specificity Keep your selectors short and with as low a specificity as possible. A maximum of three classes in your selectors is recommended. Why? Two reasons…

Keep Reading →

May 02, 2015

WordPress localhost redirects to live site

🕑 1 minute read

When you are developing on WordPress sites it's always quicker to work on a local machine/development server. It's essential to work from the same data as the live site so you can work effectively as possible so taking a copy of the live database and installing it locally is the best and quickest option... but there is one potential pitfall. Because WordPress store site settings in the database…

Keep Reading →

November 03, 2013

The joy of calc()

🕑 1 minute read

calc() is a modern css function that allows you to do basic maths in a css file. You can use it to make semi fluid layouts with great ease. This means that you can have layouts with 1 fixed width column (or more) and the rest fluid. It doesn't just stop at columns, but that is the easiest and quickest example to discuss. The setup of calc is very simple. If we take a 2 column layout as an…

Keep Reading →

June 07, 2013

Creating a chrome extension - an update

🕑 1 minute read

Since I wrote my last post on creating a chrome extension , there have been a few changes to how the extensions are built - mainly that the manifest version has changed to version 2. The original post is still fine, but there are a few tweaks needed. This post is mean mainly as an update to the original, so rather than rehash the old content too much I will skim over the basics quickly…

Keep Reading →

November 16, 2012

Arabic web fonts

🕑 1 minute read

I've been looking for a good solution for Arabic web fonts for while now and have been hitting my head against the wall with the lack of options available to me or the cost of buying a font and hosting it myself. Just as I was contemplating making my own arabic font (no easy feat) it would seam that some of web services are beginning to add some decent options. Since I use Typekit I would prefer…

Keep Reading →

July 09, 2012

Changing the version of SASS in LiveReload

🕑 1 minute read

LiveReload is great a great tool for any web developer. One of the most useful of it's features is the ability to compile SASS on save. Unfortunately the version of SASS that is included in LiveReload isn't the latest one and it just so happened that was the version I needed (3.2 alpha). Long story short, I updated the version of SASS that LiveReload uses on my machine. I'm not sure if it will…

Keep Reading →

May 15, 2012

A Responsive Image jQuery Plugin

🕑 1 minute read

There are a whole variety of ways that responsive images can be accomplished, but as of yet there is no perfect way of doing it without using a combination of .htaccess, javascript and css. My solution is no different and uses JavaScript (in the form of jQuery) as the coordinator of the images. responsiveBreakpointJQ works by specifying the images that will show if the screen of the device is big…

Keep Reading →