Michael Lee https://www.csteachingtips.org/ en Misconception: Students think that arrays start at 1 instead of 0. https://www.csteachingtips.org/tip/misconception-students-think-arrays-start-1-instead-0 <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--title--tip.html.twig x field--node--title.html.twig * field--node--tip.html.twig * field--title.html.twig * field--string.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--title.html.twig' --> <span class="field field--name-title field--type-string field--label-hidden">Misconception: Students think that arrays start at 1 instead of 0.</span> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--title.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--uid--tip.html.twig x field--node--uid.html.twig * field--node--tip.html.twig * field--uid.html.twig * field--entity-reference.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--uid.html.twig' --> <span class="field field--name-uid field--type-entity-reference field--label-hidden"> <!-- THEME DEBUG --> <!-- THEME HOOK: 'username' --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/user/username.html.twig' --> <span>cstt</span> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/user/username.html.twig' --> </span> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--uid.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--created--tip.html.twig x field--node--created.html.twig * field--node--tip.html.twig * field--created.html.twig * field--created.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--created.html.twig' --> <span class="field field--name-created field--type-created field--label-hidden"> <!-- THEME DEBUG --> <!-- THEME HOOK: 'time' --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/time.html.twig' --> <time datetime="2015-07-21T13:40:23-07:00" title="Tuesday, July 21, 2015 - 13:40" class="datetime">Tue, 07/21/2015 - 13:40</time> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/time.html.twig' --> </span> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--created.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'links__node' --> <!-- FILE NAME SUGGESTIONS: * links--node.html.twig x links--inline.html.twig * links--node.html.twig * links.html.twig --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/navigation/links--inline.html.twig' --> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/navigation/links--inline.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'addtoany_standard' --> <!-- FILE NAME SUGGESTIONS: * addtoany-standard--node--tip.html.twig * addtoany-standard--node.html.twig x addtoany-standard.html.twig --> <!-- BEGIN OUTPUT from 'modules/contrib/addtoany/templates/addtoany-standard.html.twig' --> <span class="a2a_kit a2a_kit_size_32 addtoany_list" data-a2a-url="https://www.csteachingtips.org/tip/misconception-students-think-arrays-start-1-instead-0" data-a2a-title="Misconception: Students think that arrays start at 1 instead of 0."><a class="a2a_button_facebook"><span class="a2a_label">Share Misconception: Students think that arrays start at 1 instead of 0. with Facebook</span></a><a class="a2a_button_twitter"><span class="a2a_label">Share Misconception: Students think that arrays start at 1 instead of 0. with Twitter</span></a></span> <!-- END OUTPUT from 'modules/contrib/addtoany/templates/addtoany-standard.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--body--tip.html.twig * field--node--body.html.twig * field--node--tip.html.twig * field--body.html.twig x field--text-with-summary.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--text-with-summary.html.twig' --> <div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item"><p><strong>Goal:</strong></p> <ul><li>Have students understand that array indices start at 0.</li> </ul><p><strong>Reason:</strong></p> <ul><li>Students are often accustomed to counting from 1, and need to be reminded to count from 0 when finding an array element's index.</li> </ul><p><strong>Action:</strong></p> <ul><li>Specifically point out this difference to students. <ul><li>In the array <code>[1, 5, 10, 7, 9]</code>, the 3rd element is 10 but the element at index 3 is 7.</li> </ul></li> </ul><ul><li>Walk through figuring out an element's index (counting up from the very first element, at index 0) every time you refer to an element.</li> </ul><ul><li>Consistently refer to array elements by their index, rather than switching between using "the element at index 3" and "the fourth element."</li> </ul><ul><li>Remind students that the array's last index will be one less than its length.</li> </ul></div> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--text-with-summary.html.twig' --> Tue, 21 Jul 2015 20:40:23 +0000 cstt 1223 at https://www.csteachingtips.org Misconception: Students often have off by 1 errors when working with loops, which can result from mixing up > and >= as well as forgetting that arrays start at index 0. https://www.csteachingtips.org/tip/misconception-students-often-have-1-errors-when-working-loops-which-can-result-mixing-and-well <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--title--tip.html.twig x field--node--title.html.twig * field--node--tip.html.twig * field--title.html.twig * field--string.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--title.html.twig' --> <span class="field field--name-title field--type-string field--label-hidden">Misconception: Students often have off by 1 errors when working with loops, which can result from mixing up &gt; and &gt;= as well as forgetting that arrays start at index 0.</span> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--title.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--uid--tip.html.twig x field--node--uid.html.twig * field--node--tip.html.twig * field--uid.html.twig * field--entity-reference.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--uid.html.twig' --> <span class="field field--name-uid field--type-entity-reference field--label-hidden"> <!-- THEME DEBUG --> <!-- THEME HOOK: 'username' --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/user/username.html.twig' --> <span>cstt</span> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/user/username.html.twig' --> </span> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--uid.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--created--tip.html.twig x field--node--created.html.twig * field--node--tip.html.twig * field--created.html.twig * field--created.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--created.html.twig' --> <span class="field field--name-created field--type-created field--label-hidden"> <!-- THEME DEBUG --> <!-- THEME HOOK: 'time' --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/time.html.twig' --> <time datetime="2015-07-08T14:48:46-07:00" title="Wednesday, July 8, 2015 - 14:48" class="datetime">Wed, 07/08/2015 - 14:48</time> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/time.html.twig' --> </span> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--created.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'links__node' --> <!-- FILE NAME SUGGESTIONS: * links--node.html.twig x links--inline.html.twig * links--node.html.twig * links.html.twig --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/navigation/links--inline.html.twig' --> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/navigation/links--inline.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'addtoany_standard' --> <!-- FILE NAME SUGGESTIONS: * addtoany-standard--node--tip.html.twig * addtoany-standard--node.html.twig x addtoany-standard.html.twig --> <!-- BEGIN OUTPUT from 'modules/contrib/addtoany/templates/addtoany-standard.html.twig' --> <span class="a2a_kit a2a_kit_size_32 addtoany_list" data-a2a-url="https://www.csteachingtips.org/tip/misconception-students-often-have-1-errors-when-working-loops-which-can-result-mixing-and-well" data-a2a-title="Misconception: Students often have off by 1 errors when working with loops, which can result from mixing up &gt; and &gt;= as well as forgetting that arrays start at index 0."><a class="a2a_button_facebook"><span class="a2a_label">Share Misconception: Students often have off by 1 errors when working with loops, which can result from mixing up &gt; and &gt;= as well as forgetting that arrays start at index 0. with Facebook</span></a><a class="a2a_button_twitter"><span class="a2a_label">Share Misconception: Students often have off by 1 errors when working with loops, which can result from mixing up &gt; and &gt;= as well as forgetting that arrays start at index 0. with Twitter</span></a></span> <!-- END OUTPUT from 'modules/contrib/addtoany/templates/addtoany-standard.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--body--tip.html.twig * field--node--body.html.twig * field--node--tip.html.twig * field--body.html.twig x field--text-with-summary.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--text-with-summary.html.twig' --> <div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item"><ul><li>If students are repeatedly encountering off-by-1 errors, it may be the result of difficulty understanding either of this concepts. </li> </ul></div> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--text-with-summary.html.twig' --> Wed, 08 Jul 2015 21:48:46 +0000 cstt 1042 at https://www.csteachingtips.org Misconception: Students have trouble understanding that when the value of a variable is reassigned its previous value is irrelevant. https://www.csteachingtips.org/tip/misconception-students-have-trouble-understanding-when-value-variable-reassigned-its-previous <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--title--tip.html.twig x field--node--title.html.twig * field--node--tip.html.twig * field--title.html.twig * field--string.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--title.html.twig' --> <span class="field field--name-title field--type-string field--label-hidden">Misconception: Students have trouble understanding that when the value of a variable is reassigned its previous value is irrelevant.</span> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--title.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--uid--tip.html.twig x field--node--uid.html.twig * field--node--tip.html.twig * field--uid.html.twig * field--entity-reference.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--uid.html.twig' --> <span class="field field--name-uid field--type-entity-reference field--label-hidden"> <!-- THEME DEBUG --> <!-- THEME HOOK: 'username' --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/user/username.html.twig' --> <span>cstt</span> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/user/username.html.twig' --> </span> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--uid.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--created--tip.html.twig x field--node--created.html.twig * field--node--tip.html.twig * field--created.html.twig * field--created.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--created.html.twig' --> <span class="field field--name-created field--type-created field--label-hidden"> <!-- THEME DEBUG --> <!-- THEME HOOK: 'time' --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/time.html.twig' --> <time datetime="2015-07-08T14:43:22-07:00" title="Wednesday, July 8, 2015 - 14:43" class="datetime">Wed, 07/08/2015 - 14:43</time> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/time.html.twig' --> </span> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--created.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'links__node' --> <!-- FILE NAME SUGGESTIONS: * links--node.html.twig x links--inline.html.twig * links--node.html.twig * links.html.twig --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/navigation/links--inline.html.twig' --> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/navigation/links--inline.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'addtoany_standard' --> <!-- FILE NAME SUGGESTIONS: * addtoany-standard--node--tip.html.twig * addtoany-standard--node.html.twig x addtoany-standard.html.twig --> <!-- BEGIN OUTPUT from 'modules/contrib/addtoany/templates/addtoany-standard.html.twig' --> <span class="a2a_kit a2a_kit_size_32 addtoany_list" data-a2a-url="https://www.csteachingtips.org/tip/misconception-students-have-trouble-understanding-when-value-variable-reassigned-its-previous" data-a2a-title="Misconception: Students have trouble understanding that when the value of a variable is reassigned its previous value is irrelevant."><a class="a2a_button_facebook"><span class="a2a_label">Share Misconception: Students have trouble understanding that when the value of a variable is reassigned its previous value is irrelevant. with Facebook</span></a><a class="a2a_button_twitter"><span class="a2a_label">Share Misconception: Students have trouble understanding that when the value of a variable is reassigned its previous value is irrelevant. with Twitter</span></a></span> <!-- END OUTPUT from 'modules/contrib/addtoany/templates/addtoany-standard.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--body--tip.html.twig * field--node--body.html.twig * field--node--tip.html.twig * field--body.html.twig x field--text-with-summary.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--text-with-summary.html.twig' --> <div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item"><ul><li>Students struggle to understand that the prior value of a variable essentially disappears because it is written over.</li> <li>Consider the following code: <ul><code>X=1<br /> X=10</code><br /> Students are confused about the value of X after this code has run. They’re not sure whether X is 1 or 10, and sometimes even think that the two numbers are added and X is now 11.</ul></li> </ul></div> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--text-with-summary.html.twig' --> Wed, 08 Jul 2015 21:43:22 +0000 cstt 1036 at https://www.csteachingtips.org Have students play the Gidget debugging game for practice debugging in an engaging environment. https://www.csteachingtips.org/tip/have-students-play-gidget-debugging-game-practice-debugging-engaging-environment <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--title--tip.html.twig x field--node--title.html.twig * field--node--tip.html.twig * field--title.html.twig * field--string.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--title.html.twig' --> <span class="field field--name-title field--type-string field--label-hidden">Have students play the Gidget debugging game for practice debugging in an engaging environment.</span> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--title.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--uid--tip.html.twig x field--node--uid.html.twig * field--node--tip.html.twig * field--uid.html.twig * field--entity-reference.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--uid.html.twig' --> <span class="field field--name-uid field--type-entity-reference field--label-hidden"> <!-- THEME DEBUG --> <!-- THEME HOOK: 'username' --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/user/username.html.twig' --> <span>cstt</span> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/user/username.html.twig' --> </span> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--uid.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--created--tip.html.twig x field--node--created.html.twig * field--node--tip.html.twig * field--created.html.twig * field--created.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--created.html.twig' --> <span class="field field--name-created field--type-created field--label-hidden"> <!-- THEME DEBUG --> <!-- THEME HOOK: 'time' --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/time.html.twig' --> <time datetime="2015-07-08T14:38:47-07:00" title="Wednesday, July 8, 2015 - 14:38" class="datetime">Wed, 07/08/2015 - 14:38</time> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/time.html.twig' --> </span> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--created.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'links__node' --> <!-- FILE NAME SUGGESTIONS: * links--node.html.twig x links--inline.html.twig * links--node.html.twig * links.html.twig --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/navigation/links--inline.html.twig' --> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/navigation/links--inline.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'addtoany_standard' --> <!-- FILE NAME SUGGESTIONS: * addtoany-standard--node--tip.html.twig * addtoany-standard--node.html.twig x addtoany-standard.html.twig --> <!-- BEGIN OUTPUT from 'modules/contrib/addtoany/templates/addtoany-standard.html.twig' --> <span class="a2a_kit a2a_kit_size_32 addtoany_list" data-a2a-url="https://www.csteachingtips.org/tip/have-students-play-gidget-debugging-game-practice-debugging-engaging-environment" data-a2a-title="Have students play the Gidget debugging game for practice debugging in an engaging environment."><a class="a2a_button_facebook"><span class="a2a_label">Share Have students play the Gidget debugging game for practice debugging in an engaging environment. with Facebook</span></a><a class="a2a_button_twitter"><span class="a2a_label">Share Have students play the Gidget debugging game for practice debugging in an engaging environment. with Twitter</span></a></span> <!-- END OUTPUT from 'modules/contrib/addtoany/templates/addtoany-standard.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--body--tip.html.twig * field--node--body.html.twig * field--node--tip.html.twig * field--body.html.twig x field--text-with-summary.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--text-with-summary.html.twig' --> <div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item"><ul><li>The premise of the game is that "Gidget the robot was damaged on its way to clean up a chemical spill and save the animals, so it is the player's job to fix Gidget's problematic code to complete all the missions."</li> <li>The game has over 30 levels that lead the player through learning important introductory computer science topics including variables, types, lists, arrays, loops, and conditionals. <ul><li>Every few levels the user answers multiple choice questions that reinforce the previous content. <ul><li>Each question provides immediate feedback, explaining why the right answer is correct.</li> </ul></li> </ul></li> <li>The game uses its own imperative programming language.</li> <li>Check out the game at the <a href="http://www.helpgidget.org/">Gidget website</a>.</li> </ul></div> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--text-with-summary.html.twig' --> Wed, 08 Jul 2015 21:38:47 +0000 cstt 1033 at https://www.csteachingtips.org