Clever Way of Extract URL Information in JS

Here’s a nice little way to extract URL information from a string. Rather than trying to parse/split the string into its parts (protocol, host, path, query) just use an a tag and access it’s properties to get the relative information you want.

var url    = ''
var anchor = document.createElement('a');

anchor.href = url;

var protocol = anchor.protocol; // 'https:'
var host     = anchor.hostname; // ''
var path     = anchor.pathname; // '/search'
var query    =;   // '?q=hello'


js, url

Top 10 Languages in 2014, So Lynda Says the online training site have published what they think are going be the top 10 languages to know this year. All your usual suspects are in there but what has suprised me is the order of the list. Is this is a list set by trends in 2013, if so it seems to be that Java is still considered cool.

Have a look and see what you think?

Top 10 Programming Languages to know in 2014


Goodbye Php, Hello Node.js!

Summer 2013

The start of summer ‘13 saw a shift in my career. Near twelve years in the making to become a Php developer, twelve years that started in my bedroom. From building bit torrent sites, practicing with the latest MVC frameworks, getting through several years of study and a few in the actual industry, I took a chance to become a ninja.

I’ve done a bit of JavaScript, obviously being a web developer, but never really understood the language and it’s nature. I never stopped to think about the simplicity of the prototypal inheritance it offers, or just how great closures are.

Read on →