Monthly Archives: August 2016

The Basics of JavaScript

For the past month or so I have become somewhat immersed in JavaScript. As I already knew the basics of HTML and CSS through using WordPress and other CMS tools, I took the plunge and started to learn JavaScript, the other core web development language, using Codecademy and

What is JavaScript?

JavaScript is an object-orientated programming language that is derived from C + +. It is a scripting language normally used to create interactive effects within web browsers. JavaScript’s dynamic capabilities include run-time object construction, variable parameter lists, function variables and event loops, some of which I will discuss below.

JavaScript Syntax & Operators

Variables are containers for storing data values. These are declared by the var keyword:


Functions are used to perform defined tasks. These are declared by the function keyword.

2016-08-25 14_30_35-Introduction to Functions in JS _ Codecademy

A function will only be executed when it is called/invoked. e.g. In this case the function is called “greeting” so the input below will return “Great to see you Dave”.

greeting ("Dave")

Return is a statement used to stop the execution of a function. It will also return the value of a function.

var x = myFunction(2, 4);        

function myFunction(a, b) {
    return a * b;                

In the example above, x will be returned as ‘8’.

Console.log commands are used to display data . Console.log() will take whatever is inside the parentheses and log it to the console.

2016-08-25 16_27_53-Getting Started with Programming _ Codecademy

In this case, the information logged to the console will appear as:

2016-08-25 16_29_59-Getting Started with Programming _ Codecademy

If/else statements are used to make decisions in the code. An if/else statement will execute one block of code if a specified condition is true, if the condition is false, another block of code can be executed.


Loops are used to execute a block of code a number of times. Loops are useful if you want to run the same code repeatedly with different values. It’s all about getting the computer to do the legwork for you, as opposed to typing out numerous lines of code.

Here is an example of a for loop. This will run 5 times, with values of ‘step’ 0 to 4.

var step;
for (step = 0; step < 5; step++) {
  console.log('Walking east one step');

Different loop types include:

for – this will loop through a block of code a number of times.
while – this will loop through a block of code while a specified condition is true.
for/in – this will loop through the properties of an object.
do/while – this will also loop through a block of code while a specified condition is true.

Arrays are special types of variable that can used to hold multiple values at one time.

For example, if you wanted to list a number of values from one array you could use a block of code like this:

var beers = ["Heineken", "Amstel", "Carling", "Fosters"];
for (var i = 0; i < beers.length; i++) {
console.log (beers [i]) ;

This would return:


Funny Typos & Spelling Mistakes

We all make mistakes every now and then. Sometimes they are made by the developers, sometimes they are made by the technical authors or content writers. Here are a few examples of unfortunate typos which serve as a funny reminder to always double-check your copy before it is released!

1. The existential crisis. Are you sure you want to exist?
Credit to Reddit user /u/psychob

2. Shit happens. A really unfortunate misspelling of shoot by Pentax.


3. Beyond parody. British Government announces new language test for migrants with an embarrassing misspelling.


One of the first people to spot the mistake was Nick Wallis from BBC’s The One Show:

4. Child’s Play: It’s important to know the difference between “they’re” and “their”.


5. Regsiter? Nah, I think I’ll register with a company which doesn’t make spelling mistakes.


6. Reeding between the lines: I don’t think this Yellow Pages advert was proofread.


As the examples above show, we’re all human and mistakes do happen but they may cost your website, business or documentation their credibility and sometimes money. Always double-check your copy before publishing it.

Snapchat’s UX: A Confusing Mess?

Snapchat might be the image messaging app of choice for today’s teenagers, with 10 billion daily users, but in my opinion the UX and interface design is a confusing mess and others seems to agree (‘Why is Snapchat’s UI so bad?’, ‘The Generation Gap of Snapchat’, and ‘Snapchat Built to Be Bad‘ are just some of the top hits when you search “Snapchat UX” in Google).

It’s frustrating but even as a fairly technical 31-year-old who has mastered the likes of WordPress and Twitter, I don’t think I’ve ever found  an app that is so un-intuitive. It seems the only way to learn how it works are by reading the various on-board prompts or through trial and error.


Take the home screen for example, my biggest issue for new users is that the majority of the icons are not universal. I’ve circled the icons I believe are fairly universal in green and highlighted uncommon/unknown icons in red:


So of the seven icons/functions, only three (camera rotation, messages and take a photo) are obvious, the others are all ambiguous. Snapchat actually tells me that the ghost icon is where my contacts and settings ‘live’ through a bit of on-boarding but as for the small circle at the bottom and the dots in the bottom right, I’d have no idea unless I clicked them. Even the ‘flash’ icon in the top right isn’t the standard lightning bolt flash that you would expect to see on most cameras. Why make it ambiguous? It seems totally illogical but is it intentional?

The "stories" screen gave me a headache but that's another story...
The “stories” screen gave me a headache but that’s another story…

There are several theories to why it has been so successful despite having this seemingly un-user friendly design. One theory is the bad UX is intentional. By making it difficult for new or older users, its difficult for parents to look up posts by their children and their teenage friends without knowing their screen name. As a result posts remain personal. This theory was in part confirmed by CEO Evan Spiegel: “We’ve made it very hard for parents to embarrass their children. It’s much more for sharing personal moments than it is about this public display.” Similarly Amin Todai from Canadian creative design agency One Method wrote a blog post likening it to creating a new language that only under 30s could hear: “By virtue of it having an incomprehensible user interface, Snapchat has essentially created a new language that only people under the age of thirty can hear. Like a dog whistle for teens, except with more pictures of dicks and boobs.”

“Snapchat has essentially created a new language that only people under the age of thirty can hear. Like a dog whistle for teens, except with more pictures of dicks and boobs” – Admin Todai

That last comment brings me to the other reason that teenagers and others have flocked to Snapchat despite the poor UX/UI: dicks and boobs – the pornography aspect. It became an instant guarantee of seeing up to 10 seconds of nudity, whether it be horny teenagers wanting to see their love interests naked or glamour models sharing their goods, ultimately sex sells and Snapchat was offering it up , whether intentionally or not, to millions for free. In the same way that pornography is addictive, so is celebrity and there are a huge number of celebrities on the site, all offering instant snippets of their lives for all to see. The Kardashians, the Jenners, Justin Bieber, the Jonas brothers, are just some of the celebrity users who appeal to the teenage  and young adult Snapchat audience.

Talking of dicks: Here is popular Snapchat user Justin Bieber posing in a topless selfie.

The other theory is that Snapchat is basically more about fun than function and that is what gets people using it. Irrespective of how awful the UX is, youngsters will keep coming back because they find it fun to use, to share moments and stories, and to mess about with the different effects, filters and lenses to make funny photos and videos. Ultimately, I think all three of these theories have had some part to play in Snapchat’s success and there is clearly a generation gap in play here but maybe that’s the point, its popularity is down to it not being popular with my generation because we were never its target audience, it was always intended to be more fun for the younger generation it resonates with.