For the final assignment task will require you to build an automated social software project such as a twitter bot or online experimental text based project. One very useful tool for exploring ways to do is the programming language Javascript. You probably know some javascript already, it is a commonly used language that is unusual as it can run both in the front end of a site and in the back end. The front end, where code is run in a browser is what we call client side. The back end is where your code runs on a server is what we call server side programming. Javascript is unusual as it can be used in both places.

Introducing syntax and functions
For a great overview of the javascript language, syntax and some important basic functions see here.

If you have had no experience with javacript and not much experience programming, please setup a code academy account and do the introductory modules. I recommend doing the first three sections to get the hang of some of the basic syntax.

Front end javascript:

If you have done any web development you have probably seen how javascript files can be called from html. They enable a website to become interactive and dynamic.

The front end javascript library that we will briefly look at in the coming weeks is very exciting as it is based on the Processing syntax, ethos and this makes it an easy way to transition from Processing to programming for the web. It is also brand new and still in development so we have to be a bit patient and understanding when we use it. It is called p5.js

Back end javascript:

Javascript can also be run on a server. To do this you will need to install and use the javascript platform called node.js. This is an environment written for javascript that enables you to script processes, munge text and data and interact with APIs such as the Twitter API. It is very useful for working with strings and text which is what we will be focusing on in this last the course. We are going to follow some fantastic tutorials developed by Daniel Shiffman to get started with dealing with text using node.

Step 1: Install node.js on your machine.

For macs and linux machines, use the installers here.

For windows, I recommend installing node as is outlined here in this  video tutorial. Here you will also download and use an environment called git bash. Its a good way for you to use the command line in windows. As is outlined, in git bash, you should be able to type the word node, and then write javascript straight into the command line.

 Once you have installed node you should be able to go to your terminal window and type:


And the following should appear:


Here you can type javascript commands and they will be executed.
To exit this press CTRL C twice.

If instead you get this:

-bash: node: command not found

You probably need to set your system path – follow this set of instructions to do this.