::: {#navbar .navbar .navbar-default .navbar-fixed-top role="navigation"}
::: {.container}
::: {.navbar-header}
[]{.icon-bar} []{.icon-bar} []{.icon-bar}

<div>

[![](../_static/img/RAIcon.png)](/runestone/default/user/login){.brand-logo}
[fopp](../index.html){#rs-book-toc-link .navbar-brand}

</div>
:::

::: {.navbar-collapse .collapse .navbar-ex1-collapse}
-   
-   []{#ad_warning}
-   []{#browsing_warning}
-   
-   [*[Search]{.visuallyhidden
    aria-label="Search"}*](#){.dropdown-toggle}
    -   [Table of Contents](../index.html)

    -   [Book Index](../genindex.html)

    -   

    -   ::: {.input-group}
        :::
-   
-   [*[User]{.visuallyhidden aria-label="User"}*](#){.dropdown-toggle}
    -   []{.loggedinuser}

    -   

    -   [Course Home](/ns/course/index)

    -   [Assignments](/assignment/student/chooseAssignment)

    -   [Practice](/runestone/assignments/practice)

    -   [[Peer Instruction
        (Instructor)](/runestone/peer/instructor.html)]{#inst_peer_link}

    -   [Peer Instruction (Student)](/runestone/peer/student.html)

    -   

    -   [Change Course](/runestone/default/courses)

    -   

    -   [[Instructor\'s
        Page](/runestone/admin/index)]{#ip_dropdown_link}

    -   [Progress Page](/runestone/dashboard/studentreport)

    -   

    -   [Edit Profile](/runestone/default/user/profile){#profilelink}

    -   [Change
        Password](/runestone/default/user/change_password){#passwordlink}

    -   [Register](/runestone/default/user/register){#registerlink}

    -   [Login](#)

    -   ::: {.slider .round}
        :::

        Dark Mode
-   
-   [[*[Scratch Activecode]{.visuallyhidden
    aria-label="Scratch Activecode"}*](javascript:runestoneComponents.popupScratchAC())]{#scratch_ac_link}
-   
-   [*[Help]{.visuallyhidden aria-label="Help"}*](#){.dropdown-toggle}
    -   [FAQ](http://runestoneinteractive.org/pages/faq.html)
    -   [Instructors Guide](https://guide.runestone.academy)
    -   
    -   [About Runestone](http://runestoneinteractive.org)
    -   [Report A
        Problem](/runestone/default/reportabug?course=fopp&page=WPIncrementalProgramming)
-   

```{=html}
<!-- -->
```
-   
-   [This Chapter](../index.html){.dropdown-toggle}
    -   [5.1 Hello Little
        Turtles!](intro-HelloLittleTurtles.html){.reference .internal}
    -   [5.2 Our First Turtle
        Program](OurFirstTurtleProgram.html){.reference .internal}
    -   [5.3 Instances: A Herd of
        Turtles](InstancesAHerdofTurtles.html){.reference .internal}
    -   [5.4 Object Oriented Concepts](ObjectInstances.html){.reference
        .internal}
    -   [5.5 Repetition with a For
        Loop](RepetitionwithaForLoop.html){.reference .internal}
    -   [5.6 A Few More turtle Methods and
        Observations](AFewMoreturtleMethodsandObservations.html){.reference
        .internal}
    -   [5.7 Summary of Turtle
        Methods](SummaryOfTurtleMethods.html){.reference .internal}
    -   [5.8 👩‍💻 Incremental
        Programming](WPIncrementalProgramming.html){.reference
        .internal}
    -   [5.9 👩‍💻 Common turtle
        Errors](WPCommonTurtleErrors.html){.reference .internal}
    -   [5.10 Exercises](Exercises.html){.reference .internal}
    -   [5.11 Chapter Assessment - Turtle and Object
        Mechanics](week1a3.html){.reference .internal}
-   
-   
:::
:::
:::

::: {#continue-reading .container}
:::

::: {#main-content .container role="main"}
::: {#incremental-programming .section}
[5.8. ]{.section-number}👩‍💻 Incremental Programming[¶](#incremental-programming "Permalink to this heading"){.headerlink}
=========================================================================================================================

By now you've likely come across occasions where your code will be long
or complex. If you approach problems like this by writing out all the
code and *then* running it, you'll likely find yourself frustrated by
the debugging process. There are ways to make programming easier though!

1\. **Start Small** This is probably the single biggest piece of advice
for programmers at every level. Of course it's tempting to sit down and
crank out an entire program at once. But, when the program -- inevitably
-- does not work then you have a myriad of options for things that might
be wrong. Where to start? Where to look first? How to figure out what
went wrong? I'll get to that in the next section. So, start with
something really small. Maybe just two lines and then make sure that
runs ok. Hitting the run button is quick and easy, and gives you
immediate feedback about whether what you have just done is ok or not.
Another immediate benefit of having something small working is that you
have something to turn in. Turning in a small, incomplete program, is
almost always better than nothing.

2\. **Keep it working** Once you have a small part of your program
working the next step is to figure out something small to add to it. If
you keep adding small pieces of the program one at a time, it is much
easier to figure out what went wrong, as it is most likely that the
problem is going to be in the new code you have just added. Less new
code means its easier to figure out where the problem is.

This notion of **Get something working and keep it working** is a mantra
that you can repeat throughout your career as a programmer. It's a great
way to avoid the frustrations mentioned above. Think of it this way.
Every time you have a little success, your brain releases a tiny bit of
chemical that makes you happy. So, you can keep yourself happy and make
programming more enjoyable by creating lots of small victories for
yourself.

Below we have already started to build a house. To practice incremental
programming, try drawing the rest of the house. Each time you draw
something new on the screen, run the program to see if it executed in
the way that you expected!

::: {.runestone .explainer .ac_section}
::: {#ac3_100_1 component="activecode" question_label="5.8.1"}
::: {#ac3_100_1_question .ac_question}
:::
:::
:::
:::

::: {style="width: 100%"}
::: {ea-publisher="runestoneacademy" ea-type="image" style="display: flex; justify-content: center"}
:::
:::

::: {#scprogresscontainer}
You have attempted []{#scprogresstotal} of []{#scprogressposs}
activities on this page

::: {#subchapterprogress aria-label="Page progress"}
:::
:::

-   [[](SummaryOfTurtleMethods.html)]{#relations-prev}
-   [[](WPCommonTurtleErrors.html)]{#relations-next}
:::

::: {.container}
[]{#numuserspan}[]{.loggedinuser} \| [Back to top](#)

© Copyright 2017 bradleymiller. Created using
[Runestone](http://runestoneinteractive.org/) 7.2.10.
:::
