Information about cookies on this page

Our website uses cookies to ensure the functionality of the website, to collect and analyze information about the performance and usage of the website. Privacy Policy

  • Courses
    • Discord
    • Twitter
    • Linkedin
    • Facebook
    • Instagram
  • Pricing
  • English
  • Čeština
  • Deutsch
  • Русский
Sign inStart free
  • Courses
  • Pricing

Community

Sign in
  
  • Courses
    • Discord
    • Twitter
    • Linkedin
    • Facebook
    • Instagram
  • Pricing
  • English
  • Čeština
  • Deutsch
  • Русский
Sign inStart free
  • Courses
  • Pricing

Community

Sign in

Feedback, Not a Rewrite

A program that works can still be better: easier to read, shorter, harder to break when you change it. Feedback tells you how, and you learn most from feedback on code you wrote yourself, because you know why you wrote each line the way you did.

That's also when to write code yourself: whenever the code is what you're learning. Ask an AI for the program, and you have a program; write it yourself and get feedback, and you get better at writing programs. When the code isn't what you're learning, such as a part of a bigger program that you could write but don't need to practice, letting the AI write it saves time, as long as you can read it and check it by running it.

Ask for feedback as you'd ask a teacher: a few things, the most important first, and no new version. Asked only for feedback on the program in the editor, one answer listed five suggestions, most with code, and ended with Revised version, if you want one and the whole program rewritten. That's quicker to paste than to learn from.

The program in the editor is one you wrote: it adds up Mia's walks and finds the longest. It works, and it prints the right numbers.

Instructions

  1. 1

    Attach script.py and ask for feedback: three things you could do better, the most important first. Say that you don't want the program rewritten, because you'll make the changes yourself. Then send it.

  2. 2

    Make the first change yourself, and run the program: it still prints Total: 155 and Longest: 60. Then attach script.py again and ask whether you made the change well.

Back

4/7

  1. 1. Hints First
  2. 2. Explain It, Don't Fix It
  3. 3. Quiz: The Same Mistake
  4. 4. Feedback, Not a Rewrite
  5. 5. Let It Quiz You
  6. 6. Quiz: Who Writes It?
  7. 7. Summary
Next

Start programming for free

By signing up, you agree to the Terms of Service and Privacy Policy.

Or sign up with: