Test work
The test contains three kinds of tasks: a theory question (for example about the properties of Label, Edit and Button), code analysis (working out what result a given procedure gives) and creating a new application. In code analysis write the values of the variables step by step in a table: this prevents mistakes. When creating a new application plan first what will be on the window (how many Labels, Edits, Buttons), then their properties, then the button procedure. Where text and numbers are mixed, check whether StrToInt, IntToStr, StrToFloat or FloatToStr is needed. Test the application with F9 and also see how it behaves with at least one wrong entry.
In a volleyball game the scorer writes the score on paper after every rally. If the final score does not match, the scorer looks back through the sheet and finds the step where the mistake happened. With program code it is the same: writing the variable values step by step reveals the mistake.
Programmers, accountants and game referees note down the result of each step and search for mistakes that way.
In your next game (draughts, cards or any other) write the score on paper after every round and re-check one step at the end.
1var s, i: Integer; 2begin 3 s := 0; 4 for i := 1 to 4 do 5 s := s + i * 2; 6 Label1.Caption := IntToStr(s); 7end;
“Reading code”: a pair writes a short procedure for each other; the second finds the result with a table and checks it in the application.