Follow along with the slides or run the examples easily from here.
Follow along with the slides or run the examples easily from here.
This site documents an annual lecture that I deliver to the incoming class of freshers in the school of computing at Edinburgh Napier University.
This is probably the best place to start to get an overview of things. All of the examples are from the second part of the talk (although they’re now starting to take on a life of their own).
Start our web programming journey with a variation of the tradional “Hello World”.
Set the background of the screen to a new and pleasing colour.
Output some information from JS to the screen, i.e. generate some HTML.
Creating a simple HTML document from JS.
Set the colour of the background to a given colour.
Draw a circle on screen.
Generate a simple audio tone at a give freqency.
One way to play a simple melody…
An effort to make a Theremin that uses the cursor position on screen to control the volume and frequency of a generated sound.
A rudimentary Cellular Automata. It only generates a limited number of generations, but illustrates how you can use a couple of functions to interact with the screen and create dynamic output.
I mentioned the C64 as being my first real computer. For various reasons. the hardware is relatively rare these days (although still actually available to buy), but there are many really good emulators. For example, I’ve linked an online tutorial that will lead you through writing and running some simple programmes. Then I’ve embedded a copy of the WASM based C64 emulator from Tiny Emus and have provided a few one-liners to get you started.