SlideServe
Menu
Préférences
© SlideServe · v2026

Program Development Methodology: English-First, Then Python

iolani avatar
7 diapositives · 194 Views · Oct 08, 2014

Learn the systematic approach to developing a program from problem definition to coding, implementing in English followed by Python, with detailed steps and incremental learning techniques.

Program Development Methodology: English-First, Then Python - slide 1
01 / 7Program Development Methodology: English-First, Then Python
1 / 17

Télécharger la présentation

Program Development Methodology: English-First, Then Python
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation

Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement. Téléchargez la présentation en cliquant sur ce lien. Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.

F I N

Plus de contenu associé

Transcription de la présentation
  1. How to develop a program CSE 140 University of Washington

  2. Program development methodology:English first, then Python • Define the problem • Decide upon an algorithm • Translate it into code Try to do these steps in order

  3. Program development methodology:English first, then Python • Define the problem • Write an English description of the input and output. (Do not give details about how you will compute the output.) • Create test cases • Input and expected output • Decide upon an algorithm • Translate it into code Try to do these steps in order

  4. Program development methodology:English first, then Python • Define the problem • Decide upon an algorithm • Implement it in English • Write the recipe or step-by-step instructions • Test it using paper and pencil • Use small but not trivial test cases • Play computer, animating the algorithm • Be introspective • Notice what you really do • May be more or less than what you wrote down • Make the algorithm more precise • Translate it into code Try to do these steps in order

  5. Program development methodology:English first, then Python • Define the problem • Decide upon an algorithm • Translate it into code • Implement it in Python • Decompose it into logical units (functions) • For each function: • Name it (important and difficult!) • Write its documentation string (its specification) • Write tests • Write its code • Test it • Run the system test Try to do these steps in order

  6. Program development methodology:English first, then Python • Define the problem • Decide upon an algorithm • Translate it into code Try to do these steps in order • It’s OK (even common) to back up to a previous step when you notice a problem • You are incrementally learning about the problem, the algorithm, and the code • “Iterative development”

  7. The Wishful Thinking approachto implementing a function • If you are not sure how to implement one part of your function, define a helper function that does that task • “I wish I knew how to do task X” • Give it a name and assume that it works • Go ahead and complete the implementation of your function, using the helper function (and assuming it works) • Later, implement the helper function • The helper function should have a simpler/smaller task • Can you test the original function? • Yes, by using a stub for the helper function • Often a lookup table: works for only 5 inputs, crashes otherwise