Giter Site home page Giter Site logo

snowbug's Introduction

Snowbug

Goal

There are 5 bugs in this implementation of snowman. Practice using your debugging skills to locate, diagnose, and fix the bugs. For each bug note:

  1. In which function it was found
  2. The line (or lines) causing the problem
  3. What about the line was causing the problem
  4. What needed to be done to fix the problem
  5. How you located the bug

Activity Setup

Follow these directions once, at the beginning of the activity:

  1. Navigate to your projects folder named projects

    $ cd ~/Developer/projects
  2. If you would like to be able to keep your work in GitHub, click on the "Fork" button on the GitHub to fork the repository to your GitHub account.

  3. "Clone" (download a copy of this project) into your projects folder. This command makes a new folder called snowbug, and then puts the activity into this new folder. If you forked the activity, be sure to clone from your forked copy.

    $ git clone ...

    Use ls to confirm there's a new activity folder

  4. Move your location into this activity folder

    $ cd snowbug
  5. Create a virtual environment named venv for this activity:

    $ python3 -m venv venv
  6. Activate this environment:

    $ source venv/bin/activate

    Verify that you're in a python3 virtual environment by running:

    • $ python --version should output a Python 3 version
    • $ pip --version should output that it is working with Python 3
  7. Install dependencies once at the beginning of this project with

    # Must be in activated virtual environment
    $ pip install -r requirements.txt

Summary of one-time project setup:

  • cd into your projects folder
  • Clone the activity onto your machine
  • cd into the snowbug folder
  • Create the virtual environment venv
  • Activate the virtual environment venv
  • Install the dependencies with pip

Getting Started

  1. While in the activity directory, launch VS Code.

    $ code .
  2. Perform test configuration by going to the Testing panel (shaped like a beaker) and clicking Configure Python Tests. Select pytest as the framework and tests as the location of the tests.

  3. Run the tests using the VS Code testing tools.

  4. Focus on the top test failure. Read through the test failure, and understand why the failure is happening.

  5. Make a plan to fix the test failure.

  6. Write code to fix the test failure.

  7. Re-run the tests.

  8. Continue running tests until all bugs have been fixed.

Activity Completion

Make note of your investigation, especially the 5 questions in the goal, and be prepared to share your findings with your classmates!

snowbug's People

Contributors

anselrognlie avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.