The shape of the lesson
By the end of the lesson, learners can
- What an IDE is for: Without an IDE a programmer would type code in one program, translate it in another and run it in a third.
- Seven functions: Learn each function with a one-line description of how it helps the programmer.
- Name the function: Questions often describe what an IDE does and ask you to name the function.
- Write: code editor, auto-completion, auto-correction, prettyprint.
- Translate: built-in compiler and/or interpreter.
- Test and debug: run-time environment, error diagnostics.
- For each: say what it does and how it helps the programmer.
One picture every idea returns to
An integrated development environment (IDE) is software that provides the tools a programmer needs to write, translate, test and debug program code in one place. Common functions are: a code editor, a run-time environment, translators (a compiler and/or interpreter), error diagnostics, auto-completion, auto-correction and prettyprint. Together they make programs quicker to write and errors quicker to find and fix.
Forty-five minutes, phase by phase
| Time | Phase | What happens in the room | Grouping |
|---|---|---|---|
| 0 to 5 min | Hook: predict | Open with the question in the title, Everything in one place.. Programmers rarely write code in a plain text editor. Put the figure on the board: it is the one picture every idea in the lesson returns to. | Whole class, then pairs |
| 5 to 13 min | Teach and check: What an IDE is for | Without an IDE a programmer would type code in one program, translate it in another and run it in a third. | Whole class, then pairs |
| 13 to 21 min | Teach and check: Seven functions | Learn each function with a one-line description of how it helps the programmer. | Pairs |
| 21 to 30 min | Teach and check: Name the function | Questions often describe what an IDE does and ask you to name the function. Model the worked example Match the function on the board, one line at a time. Your turn: A programmer types ENDIFF and the IDE changes it to ENDIF. Which function is this, and how does it help? | Mix-Pair-Share |
| 30 to 36 min | Check | The four Stage 1 questions from the student lesson, answered on mini whiteboards or by show of fingers. Re-teach the one most get wrong. | Individual, then whole class |
| 36 to 43 min | Plenary | The exam-style questions from Stage 2, one at a time: thirty seconds alone, then a random call. The feedback lines in the key give the examiner's wording. | Individual, random call |
| 43 to 45 min | Exit and homework | Set the worksheet below (6 questions, 15 marks). Learners self-assess against the objectives before they leave. | Individual |
Protect the parts that carry the learning
The sequence carries about fifty minutes of material, so the lab is driven by one student while the class predicts rather than explored freely. Times are a guide.
Protected: the check at 30 minutes. It is the only individual read on whether the key idea landed, and it is not cut.
Cut first if the build overruns: the last check in Name the function, never the check or the plenary.
In a 60 minute block: run worksheet questions 1 to 3 in class as a Rally Coach set and model both the hardest worked example and its check live.
Mix-Pair-Share
Students mix around the room until you call pair; they pair with the nearest classmate, discuss the prompt, then mix again. Three prompts of rising difficulty, three different partners.
The full structure, with its variations and the other twelve, is on the cooperative-learning page.
What to head off, and how
| Trap learners fall into | Teaching move that pre-empts it |
|---|---|
| Saying an IDE "helps you write code" earns little. | Name the function and explain how it helps, e.g. auto-completion suggests the rest of an identifier, so it is typed faster and without spelling mistakes. |
| Auto-completion and auto-correction are different. | Auto- completion finishes what you are typing; auto- correction fixes a mistake you have made. |
Integrated development environments (IDEs): worksheet
6 questions, 15 marks. Written in the style of the papers; no past paper question is reproduced.
Explain the role of an integrated development environment (IDE) when writing program code.
Identify four common functions of an IDE.
Describe how error diagnostics help a programmer.
Describe the difference between auto-completion and auto-correction.
A student's code has inconsistent indentation and is hard to read. Name the IDE function that would help, describe what it does, and explain why this helps.
An IDE contains both an interpreter and a compiler. Explain how a programmer might use each while developing and then releasing a program.
Answer key and marking notes
- An IDE is software that provides the tools a programmer needs in one place,
- to write, translate, run/test and debug program code.
- Code editor.
- Error diagnostics.
- Auto-completion.
- Prettyprint. (Also accept: run-time environment, translators, auto-correction; one mark each, up to four.)
- They detect errors and show where they are, e.g. highlighting the line number.
- They describe what the error is, so the programmer can find and fix it quickly.
- Auto-completion suggests how to finish a keyword or identifier while it is being typed.
- Auto-correction automatically fixes a mistake, such as a misspelt keyword, after it has been typed.
- Prettyprint.
- It displays the code with consistent indentation and colour-coded keywords.
- This makes the structure (e.g. which statements are inside a loop) easy to see, so errors are easier to spot.
- While developing, use the interpreter to run and test the code line by line, stopping at errors to debug them.
- When the program is finished, use the compiler to produce an executable file to release.
6 multiple-choice questions on this lesson
From the topic question bank. Assign them in the app for a marked score in your gradebook, or run the topic as a class game.
A programmer types Tot and the IDE shows a list containing Total and TotalCost. Which IDE function is this?
- AAuto-completion
- BAuto-correction
- CPrettyprint
- DError diagnostics
In an IDE, keywords such as WHILE appear in blue and every statement inside a loop is indented by the same amount. Which function is this?
- APrettyprint
- BRun-time environment
- CAuto-completion
- DTranslator
A programmer types ENDWHLIE and the IDE immediately changes it to ENDWHILE. Which function is this, and how does it help?
- AAuto-correction: it fixes a common typing mistake so fewer errors reach the translator
- BAuto-completion: it finishes the keyword so the programmer types less
- CError diagnostics: it reports the error so the programmer can fix it later
- DPrettyprint: it colours the keyword so the mistake is easy to see
What is the role of an integrated development environment (IDE)?
- ATo provide the tools to write, translate, test and debug program code in one place
- BTo manage the computer's memory, files and peripherals
- CTo load the operating system when the computer is switched on
- DTo translate assembly language mnemonics into machine code only
A programmer runs this code in an IDE. The IDE underlines line 05 in red and displays the message "ENDWHILE expected".
01 Count ← 0 02 WHILE Count < 5 DO 03 OUTPUT Count 04 Count ← Count + 1 05 ENDIFWhich function is being used, and how does it help?
- AError diagnostics: it shows where the error is and what is wrong, so it can be fixed quickly
- BPrettyprint: it re-indents the loop so the error disappears
- CRun-time environment: it runs the loop five times and ignores line 05
- DAuto-completion: it adds the missing ENDWHILE so the program compiles
Which pair correctly matches each IDE function to an example?
- AAuto-completion:
CouoffersCount. Auto-correction:OUPTUTbecomesOUTPUT - BAuto-completion:
OUPTUTbecomesOUTPUT. Auto-correction:CouoffersCount - CAuto-completion: the loop body is indented. Auto-correction: keywords are shown in blue
- DAuto-completion: the program's output appears in a window. Auto-correction: the error line is underlined
Quiz key
Auto-completion suggests how to finish a keyword or identifier while it is being typed. Auto-correction fixes a mistake that has already been made, prettyprint formats code with colours and indentation, and error diagnostics locate and describe errors.
Prettyprint displays code with colour-coded keywords and consistent indentation so its structure is easy to read. The run-time environment executes the program, auto-completion suggests the rest of a word, and a translator converts the code to machine code.
Auto-correction automatically fixes a misspelt keyword after it has been typed, saving time and avoiding a syntax error. Auto-completion suggests the end of a word before it is finished. Error diagnostics would report the error rather than change it, and prettyprint only formats code; it does not alter the text.
An IDE brings together a code editor, translators, a run-time environment and debugging tools such as error diagnostics. Managing memory, files and peripherals is the job of the operating system, loading the OS is done by the bootloader, and translating mnemonics is the job of an assembler.
Error diagnostics find errors and report their location and cause, here that line 05 should be ENDWHILE, so the programmer fixes it quickly. Prettyprint only changes the layout and cannot remove a wrong keyword. The run-time environment cannot run code that contains a syntax error. Auto-completion suggests how to finish what is being typed; it does not repair a finished line.
Auto-completion suggests the rest of an identifier as it is typed (Cou offers Count), and auto-correction fixes a mistake already typed (OUPTUT becomes OUTPUT). The second option swaps the two. Indentation and colour coding are prettyprint, showing output is the run-time environment, and underlining errors is error diagnostics.
Slides for this lesson
A projectable deck for every pack is on the way. Until then, present the student lesson full screen: its sections, figure and lab tabs follow the same order as the plan above.