SMoL Tutor is a web app that corrects common misconceptions about basic concepts in modern programming languages. Specifically, the tutor teaches you, for example, how to answer the following questions:
- Why does the following program produce an
error
rather than 2
or 3
?
let x = 2;
function main() {
function getX() {
return x;
}
let y = getX();
let x = 3;
return y;
}
console.log(main());
- Why is
v
evaluated to [1,2,[4]]
rather than to [1,2,[3]]
?
let x = [ 3 ];
let v = [ 1, 2, x ];
x[0] = 4;
console.log(v);
Tutorials
These tutorials are hosted with Google Apps Script. We do record your work in the tutorials, but we do no record your identity.
Each tutorial typically takes 10-20 min (rarely exceeding 30 min). You can save the finished tutorials to PDF once you finish.
However, you will lose your work if you close a tutorial in the middle.
Here are all tutorials.
Change since 2022
- Added buttons for each code block to see JavaScript/Python translation.
- Replaced the copy-program-with-lang-line buttons with run buttons for running in the new web-based stacker. These buttons interact with the syntax-choosing buttons mentioned above.
- Added a summary of goal sentences at the end of each tutorial.
- Added a “print” button at the end of each tutorial. The buttons save the finished tutorials to a PDF.
- Ensured that all number literals have only two digits to avoid confusion with heap addresses.
- Replaced post-test questions such that their programs are isomorphic to the programs in their corresponding pre-tests.
- “In-lined” the previously external Google forms.
- Added some questions that ask for an explanation on why a program doesn’t produce an expected result.
- Improved README on how to customize the logging system.