Programming

Programming:

Section Vocab:

  • IDE: Integrated Development Environment.
  • Program: Code that is executed to perform tasks.
  • Coding: Writing the code to tell the computer which tasks to perform.
  • Source Code: Code that humans can read.
  • Machine Language: Converted code that computers understand.

In this section, you will be introduced to the concept of programming and the motivation for learning to program, along with some basic vocabulary in relation to programming and computers. A concise definition for programming, stated by Sangwin and O’Toole (2017), is “[c]omputer programming (programming) is a process that starts with a problem and ends in an executable computer program, also called software or code.”

Associated Learning Outcome:

At the end of this section, you should be able to define what a program is and identify key elements of a program.

Optional
Take a look at the following code and see if you can guess what it might be used for. Try it out by copying and pasting it into the box below:

Copy the code from here!

Press shift+enter or the little play button in the top left corner to run (execute) the program.

Paste it above (in the little grey box next to [ ]:)!

The code shown above is known as source code and is the main type of code that programmers work with. It has logic, variables, arithmetic and conditional statements, all of which you will learn about later on in this course.

When broken down into the basics, programs can be thought of as an input (code) into a computer in order to receive some output as a result. In order to make this happen, we need a way to communicate with the computer, turning something that is human readable (like the source code above), into machine code which the computer understands. This is where commands come in. Commands are the lines of code that bridge language as we know it and the language that computers know. We need to write commands in this specific way because computers run based on specific rules and logic, which must be conformed to for them to understand our input.

Check Your Understanding:

Readings + Viewings

Take a few minutes to go through the interactive activities (read the article and/or watch the video) and take the assessment when you are ready!


Interactive Activities:

Reading:
https://www.freecodecamp.org/news/what-is-programming/

Viewing:

Please Take the Assessment Below:

Sources:
Sangwin, C. J., & O’Toole, C. (2017). Computer programming in the UK undergraduate mathematics curriculum.