Week 6 brief · Coder · Software Development Concepts
Coder Week 1: Languages and Plans
Mon, Nov 16 – Tue, Nov 17 · 2:30–4:00 PM · Room 105 or live on Zoom
This week
Tell programming languages apart, learn the building blocks of every program, and plan code with flowcharts and pseudocode before writing it.
Heads up
- Crew Challenge checkpoint this week: crew fundraiser progress gets posted.
- No coding experience needed. Planning comes first this week.
Read-aheads
- Read the Kinds of languages and Building blocks notes below.
- Find one line of code anywhere (a game mod, a website's page source, a calculator formula). Guess what kind of language it is.
- Do 15 Coder study cards.
- Read the Flowcharts and pseudocode notes below.
- Draw a flowchart for something you do every morning that has one decision in it (Is it raining? Yes: take an umbrella).
- Try the Check yourself questions.
The missions
Monday, Nov 16 · Day 11
7A · GameLanguage Sort
Not every language is a programming language. Your crew sorts code samples into compiled, interpreted, scripting, markup, and query, and learns what a variable, a constant, and an array actually are. By the end you can read a line of code and say what kind it is.
- Sort 15 code snippets into the five language categories and defend two of your choices.
- Identify every variable, constant, and array in a short sample program.
- Write your own three-line snippet that uses one variable, one constant, and one array.
Turn in: Sorted snippet chart and the crew's original three-line snippet.
Tuesday, Nov 17 · Day 12
7B · LabFlowchart to Code, Part 1
Before you write code, you draw the plan. Your crew turns a real-world decision, like whether a student can check out a laptop, into a flowchart with decisions and loops, then writes it as pseudocode. Shapes first, syntax later.
- Draw a flowchart for the laptop-checkout rules using start, process, decision, and end shapes.
- Convert the flowchart into pseudocode using IF, ELSE, and WHILE.
- Trade pseudocode with another crew and find one step that is unclear.
Turn in: Flowchart image and matching pseudocode with the peer feedback note attached.
Notes
Kinds of languages
- Compiled (C, C++): translated into machine code before it runs. Usually very fast.
- Interpreted (Python, JavaScript): translated line by line while it runs.
- Scripting: interpreted languages used to automate tasks, like renaming 500 files with Python or Bash.
- Markup (HTML): describes the structure of content. It has tags, not program logic.
- Query (SQL): asks a database for data and changes it.
- Assembly: a low-level language very close to machine code.
Building blocks
- Variable: a named value that can change (score).
- Constant: a named value that never changes while the program runs (PI = 3.14159).
- Array (or list): many values under one name. Most languages count from 0, so the first item is item [0].
- Data types: integer, float, string, char, Boolean.
- Comment: a note for humans that the computer ignores.
Flowcharts and pseudocode
- Oval: start or end. Rectangle: a step (process). Diamond: a yes/no decision. Parallelogram: input or output. Arrows show the order.
- Pseudocode writes the plan in plain words: IF the student has a signed slip THEN lend the laptop ELSE send them to the office.
- Branching (IF/ELSE) picks one path. A loop (WHILE, FOR) repeats steps until a condition changes.
- An algorithm is a clear, step-by-step set of instructions that solves a problem, like a recipe.
Vocabulary
| Compiler | Turns source code into machine code before it runs |
| Interpreter | Runs source code line by line |
| Variable | A named value that can change |
| Constant | A named value that stays the same |
| Array | A list of values under one name |
| Pseudocode | A plain-language plan for code |
Check yourself
- Which flowchart shape asks a yes/no question?
- HTML: compiled, scripting, markup or query?
- In the list [5, 8, 13, 21], what is item [1]?
Show answers
- The diamond
- Markup
- 8 (counting starts at 0)
Bring
- A charged device
- Your student ID card
- Your morning flowchart