ALEX Classroom Resource

  

Programming Languages

  Classroom Resource Information  

Title:

Programming Languages

URL:

https://csfieldguide.org.nz/en/chapters/programming-languages/

Content Source:

Other
CS Field Guide
Type: Lesson/Unit Plan

Overview:

Programming--sometimes referred to as coding--is a nuts and bolts activity for computer scientists. While this chapter won't teach you how to program (we've given some links to sites that can do this in the introduction), we are going to look at what a programming language is, and how computer scientists breathe life into a language. From a programmer's point of view, they type some instructions, and the computer follows them. But how does the computer know what to do? Bear in mind that you might be using one of the many languages such as Python, Java, Scratch, Basic or C#, yet computers only have the hardware to follow instructions in one language: a very simple "machine code" that is difficult for humans to read and write. Then if you invent a new programming language, how do you tell the computer how to use it?

In this chapter, we'll look at what happens when you write and run a program, and how this affects the way that you distribute the program for others to use.

Content Standard(s):
Digital Literacy and Computer Science
DLIT (2018)
Grade: 9-12
3) Differentiate between a generalized expression of an algorithm in pseudocode and its concrete implementation in a programming language.

a. Explain that some algorithms do not lead to exact solutions in a reasonable amount of time and thus approximations are acceptable.

b. Compare and contrast the difference between specific control structures such as sequential statements, conditional, iteration, and explain the benefits and drawbacks of choices made.

Examples: Tradeoffs involving implementation, readability, and program performance.

c. Distinguish when a problem solution requires decisions to be made among alternatives, such as selection constructs, or when a solution needs to be iteratively processed to arrive at a result, such as iterative 'loop' constructs or recursion.

d. Evaluate and select algorithms based on performance, reusability, and ease of implementation.

e. Explain how more than one algorithm may solve the same problem and yet be characterized with different priorities.

Examples: All self-driving cars have a common goal of taking a passenger to a designation but may have different priorities such as safety, speed, or conservation; web search engines have their own algorithms for search with their own priorities.

Insight Unpacked Content
Evidence Of Student Attainment:
Students will:
  • compare and contrast pseudocode and programming language.
  • be given pseudocode and code in a programming language to differentiate between the two processes.
a.
  • explain that some solutions cannot be reached in an acceptable timeframe, and therefore solutions must be approximated.
b.
  • identify sequential statements in code.
  • identify conditional statements in code.
  • identify iterations in code.
  • compare and contrast the difference between these types of control structures: sequential statements, conditional statements, and iteration.
  • identify trade-offs associated with using one control structure over another.
c.
  • identify when an iterative loop is needed in a program.
  • identify when selection constructs are needed in a program.
  • identify when recursion is needed in a program.
  • distinguish when a solution requires decisions to be made among alternatives such as an iterative loop, selection constructs, or recursion.
d.
  • evaluate algorithms based on performance.
  • evaluate algorithms based on reusability.
  • evaluate algorithms based on ease of implementation.
  • select the best algorithm based on desired strength: performance, reusability, or ease of implementation.
  • e.
    • explain that algorithms can be designed to operate for a specific priority.
Teacher Vocabulary:
  • pseudocode
  • programming language
a.
  • approximated
b.
  • iteration
  • conditional statements
  • control structures
c.
  • iterative loop
  • selection constructs
  • recursion
Knowledge:
Students know:
  • that differences exist in pseudocode and a programming language.
  • that programming languages have certain requirements for language and syntax.
a.
  • that some programs cannot return a result in a reasonable time frame, therefore approximations must be allowed in those cases.
b.
  • how to identify sequential statements, conditional statements, and/or iterations in code.
  • the differences between sequential statements, conditional statements, and/or iterations.
  • trade-offs exist with using one control structure over another.
c.
  • some decisions in a program will require the use of iterative loops, selection constructs, or recursion.
d.
  • programs can be written to satisfy a number of needs such as performance, reusability, and ease of implementation.
  • that most times, algorithms will differ based on the need of the program; performance, reusability, or ease of implementation.
e.
  • that programs can be written with specific priorities in mind.
  • that there are multiple correct ways to write a program.
  • that solutions are often chosen to meet the priority need of the program.
Skills:
Students are able to:
  • distinguish between a generalized expression of an algorithm in pseudocode and its concrete implementation in a programming language.
  • point out similarities in vocabulary and syntax between pseudocode and an algorithm.
  • point out differences in vocabulary and syntax between pseudocode and an algorithm.
a.
  • explain that some algorithms do not lead to exact solutions in a reasonable amount of time and thus approximations are acceptable.
b.
  • identify sequential statements, conditional statements, and/or iterations in code.
  • identify tradeoffs associated with using one control structure over another.
c.
  • distinguish when a problem solution requires decisions to be made among alternatives or when a solution needs to be iteratively processed to arrive at a result.
d.
  • evaluate and select algorithms based on performance, reusability, and ease of implementation.
e.
  • explain how more than one algorithm may solve the same problem and yet be characterized with different priorities.
Understanding:
Students understand that:
  • similarities and differences exist in pseudocode and programming code.
  • some programming languages more closely resemble pseudocode than do other programming languages.
a.
  • due to time or financial constraints, some programs may return an approximation of a solution.
b.
  • both benefits and drawbacks exist when selecting one control structure over another in a code.
c.
  • programs can use multiple methods to arrive at a solution.
d.
  • there are times when a program needs to be selected for a specific purpose, such as performance, reusability, and/or ease of implementation.
e.
  • multiple algorithms can solve the same problem.
  • algorithms can operate with a specific priority in mind, such as speed, simplicity, and/or safety.
Digital Literacy and Computer Science
DLIT (2018)
Grade: 9-12
4) Use and adapt classic algorithms to solve computational problems.

Examples: Sorting, searching, shortest path, and data compression.

Insight Unpacked Content
Evidence Of Student Attainment:
Students will:
  • use classic algorithms to solve computational problems.
  • adapt classic algorithms to solve computational problems.
Knowledge:
Students know:
  • classic algorithms exist that can be used and adapted to meet one's needs.
  • that it can be easier to alter code than to create it from scratch.
Skills:
Students are able to:
  • use and adapt classic algorithms to solve computational problems.
Understanding:
Students understand that:
  • algorithms can be altered to fit another use than originally designed for.
Digital Literacy and Computer Science
DLIT (2018)
Grade: 9-12
8) Demonstrate code reuse by creating programming solutions using libraries and Application Programming Interfaces.

Insight Unpacked Content
Evidence Of Student Attainment:
Students will:
  • create code that includes commands and programs found in coding libraries or APIs.
Teacher Vocabulary:
  • code
  • programming languages
  • Application Programming Interfaces
Knowledge:
Students know:
  • how to design a programming application that reuses code from programming libraries and code created in previous applications.
Skills:
Students are able to:
  • reuse code from previous applications, code libraries, or APIs to reduce coding workload.
Understanding:
Students understand that:
  • reuse of code can be time
  • saving.
  • code may be written and shared in code libraries or may be accessible as an API.
Digital Literacy and Computer Science
DLIT (2018)
Grade: 9-12
9) Demonstrate the ability to verify the correctness of a program.

a. Develop and use a series of test cases to verify that a program performs according to its design specifications.

b. Collaborate in a code review process to identify correctness, efficiency, scalability and readability of program code.

Insight Unpacked Content
Evidence Of Student Attainment:
Students will:
  • apply the problem
  • solving process to a program to verify the correctness of the program.
a.
  • develop test cases to verify the performance of a program.
  • apply test cases to verify the performance of a program.
b.
  • identify correctness of program code while collaborating in a code review process.
  • identify efficiency of program code while collaborating in a code review process.
  • identify scalability of program code while collaborating in a code review process.
  • identify readability of program code while collaborating in a code review process.
Teacher Vocabulary:
  • compile
  • program
  • syntax
Knowledge:
Students know:
  • proper syntax and formatting for a coding language.
  • how to identify coding errors in a programming language.
a.
  • programs must be tested to verify that the desired task is executed properly.
  • testing a program requires a scenario where you can easily verify that the result of the program is correct/accurate.
b.
  • a program can contain one of the following properties, but not be an appropriate program: correctness, efficiency, scalability and readability
  • it is important to have others review your code.
  • that to be a quality program, code must be correct, efficient, scalable and readable.
Skills:
Students are able to:
  • analyze code for proper syntax and formatting.
a.
  • create a test case with verifiable results.
  • execute a program with the created test case to verify program performance.
  • locate errors in programming by executing test cases.
b.
  • work with others to review their code for correctness, efficiency, scalability and readability.
Understanding:
Students understand that:
  • programming languages each have their own required formatting which must be adhered to for a program to run correctly.
  • errors in programming languages prevent the program from executing its task.
  • each language has its own syntax and method for identifying potential errors.
a.
  • code can be formatted correctly and a program can still produce unintended results.
  • a test case is vital to verifying that a program is executing a task as intended.
b.
  • to be a quality program, code must be correct, efficient, scalable and readable.
  • it is important to have others proofread your code.
Digital Literacy and Computer Science
DLIT (2018)
Grade: 9-12
10) Resolve or debug errors encountered during testing using iterative design process.

Examples: Test for infinite loops, check for bad input, check edge-cases.

Insight Unpacked Content
Evidence Of Student Attainment:
Students will:
  • troubleshoot errors encountered during testing using an iterative design process.
  • resolve or debug errors encountered during testing using an iterative design process.
Teacher Vocabulary:
  • debug
Knowledge:
Students know:
  • steps of the problem solving process.
  • how to identify errors in an iterative design process.
Skills:
Students are able to:
  • review a process and identify errors in procedure.
  • rectify errors found in a process.
  • test resolution to verify that the process now runs as intended.
Understanding:
Students understand that:
  • errors in a process can prevent a solution.
  • resolving an error will allow the process to function as intended.
Tags: binary, coding, comment, compiler, programming, syntax, user interface
License Type: Attribution Non-Commercial Share Alike
For full descriptions of license types and a guide to usage, visit :
https://creativecommons.org/licenses
Accessibility
Comments
  This resource provided by:  
Author: Aimee Bates