Scripting

It should be acknowledged that one of the primary goals that one hopes to achieve as a programmer is to automate things that can be done manually, but would take much longer if they were. A script is a type of computer program that’s (usually) so simple that if you read it out loud line-by-line (like you would the script of a play), a person listening could probably follow your instructions as well as the computer could, except with all the limitations of being human. Scripting is the art and science of creating scripts that are as simple as possible, using scripting languages, programming languages whose intended purpose is the creation of scripts.

Writing scripts will feel significantly different than writing websites with HTML and CSS, and that’s because it is significantly different. When you were writing HTML and CSS, you were engaged in a relatively simple task: telling the computer what you want to see on a webpage, in a language the computer could understand. Scripting, and programming in general, is a little more complex. Describing the difference can be a little difficult, but one way to think about it is as such: when we wrote HTML and CSS to describe how a website should look, we were just expressing our ideas in a way that could be understood by the computer. When we write scripts and programs, we’re not just expressing ideas, we’re giving the computer a step-by-step procedure detailing how it should make those ideas a reality, and we’re exploiting the computer’s decision making ability in order to achieve complex functionalities.

How to Learn

In this section, you’ll be learning two scripting languages. First, you’ll learn JavaScript (JS for short), which is often used to add complex and interactive functionality to websites, but in recent years has been adapted for use in all kinds of situations, and has quickly grown to be one of the most popular and widely-used general purpose programming languages. After learning JS, you’ll learn Python. Python was never intended to be used in websites like JavaScript is. It’s a more traditional programming language that was designed to be as simple and human-readable as possible, and its primary purpose is the automation of simple computer tasks. However, it too has grown incredibly popular and has become a powerful general purpose language.

To get an idea of just how popular and powerful these languages are, take a look at this list of Programming languages used in most popular websites and look for JavaScript and Python. They’re almost everywhere!

Resources

  • Codecademy: Introduction to JavaScript
    • An interactive and explanatory course in JavaScript that holds your hand as it guides you through your first time programming
  • Automate the Boring Stuff with Python
    • An online book written for new programmers to learn Python and how to use it to automate all kinds of tasks
  • Glitch
    • An online development environment for building applications in HTML, CSS, and JavaScript