You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
222 lines
7.4 KiB
222 lines
7.4 KiB
<!--
|
|
title: Python Programming
|
|
type: lesson
|
|
duration: "01:30"
|
|
creator: Joseph Nelson
|
|
-->
|
|
|
|
##  Project Time!
|
|
|
|
<!--
|
|
|
|
## Overview
|
|
This introduces the unit project, which spans either a few hours or a few days (depending on the delivery mode of this class). Go through these short slides, then pull up the project prompts with students and make sure each student has an idea. Walk around the room and offer help and suggestions. After this project, there is only the project presentations (optional) and the overall course summary (about an hour) left.
|
|
|
|
### Notes:
|
|
|
|
- The project prompt is identical to this presentation. Feel free to jump right to the project prompt overview.
|
|
|
|
|
|
|
|
## Learning Objectives
|
|
In this lesson, students will:
|
|
- Apply what they've learned in the course to create a working Python program from scratch.
|
|
|
|
|
|
## Duration
|
|
Depends on delivery method (5 day accelerated course delivery or 10 week part time delivery)- a few hours or a few days.
|
|
|
|
## Suggested Agenda
|
|
|
|
| Time | Activity |
|
|
| --- | --- |
|
|
| 0:00 - 0:05 | Welcome / Set up |
|
|
| 0:05 + | Introduce project and work! |
|
|
|
|
## Before Class: Preparation
|
|
- Before class, review the prompt and brainstorm ideas of directions to point students to if they're at a loss.
|
|
|
|
## In Class: Materials
|
|
- Projector
|
|
- Internet connection
|
|
- Python 3.0
|
|
- Project prompt
|
|
|
|
-->
|
|
|
|
---
|
|
|
|
## You've Made It!
|
|
|
|
Congratulations on making it this far!
|
|
|
|

|
|
|
|
|
|
<aside class="notes">
|
|
**Talking Points**:
|
|
|
|
- Congratulate them on finishing the course!
|
|
|
|
</aside>
|
|
|
|
---
|
|
|
|
## You Do: Project
|
|
|
|
For the final project, you're making a new app of your choosing from scratch.
|
|
|
|
If you're having trouble coming up with a topic, consider:
|
|
|
|
* Find a fun API and base it on that.
|
|
* Make an "About Me" site that's all about you.
|
|
* Make a portfolio website for one of your hobbies.
|
|
* Make a blog about a topic you find interesting.
|
|
* Make something you think would improve your life in some way.
|
|
* Feel free to share resources and inspiration with your classmates!
|
|
|
|
<aside class="notes">
|
|
**Teaching Tips**:
|
|
|
|
- Stress that they're building this from scratch, individually. There are no prompts - they can do anything they want.
|
|
- Get them excited!
|
|
|
|
</aside>
|
|
|
|
---
|
|
|
|
## Deliverables
|
|
|
|
You must have a Flask site running locally on your own machine.
|
|
|
|
You will work individually on this project, but feel free to share inspiration, resources, or cool datasets that you find with your classmates!
|
|
|
|
|
|
<aside class="notes">
|
|
**Teaching Tips**:
|
|
|
|
- Stress that just because they have to work individually doesn't mean they can't share cool things they find or brainstorm with each other - or ask for help!
|
|
|
|
</aside>
|
|
|
|
---
|
|
|
|
### Requirements
|
|
|
|
Your assignment **must** include:
|
|
|
|
1. At least 3 working routes with associated views
|
|
- Including at least one `GET` and one `POST` route
|
|
2. Data pulled from at least one API
|
|
- Get creative! Tons of free APIs exist! Ask your instructor or classmates for ideas!
|
|
3. Have semantically clean HTML and CSS applied to a template - at least a small amount of styling.
|
|
- Try to spend a little time styling your pages and making them look nice!
|
|
4. Core Python topics. At minimum:
|
|
- Dictionaries *or* sets, *or* tuples.
|
|
- `**args` *or* `kwargs` *or* `*kwargs`.
|
|
- Basic debugging, such as a `try/except` block, *(only if necessary)*.
|
|
- A class.
|
|
- User input *or* reading from a file.
|
|
5. Comments, so another developer can easily see what your app does.
|
|
|
|
**Bonus:** Have extra time? Ask how to deploy a Flask site to a cloud service like [Heroku](https://heroku.com/)! Or, try to follow the directions on this [medium article](https://medium.com/the-andela-way/deploying-a-python-flask-app-to-heroku-41250bda27d0).
|
|
|
|
<aside class="notes">
|
|
**Teaching Tips**:
|
|
|
|
- Walk down this list and be sure students understand what each item means.
|
|
|
|
</aside>
|
|
|
|
---
|
|
|
|
## Suggested Ways to Get Started
|
|
|
|
* **Begin with the end in mind.** Know where you want to go by planning ahead, so you don't waste time building things you don't need.
|
|
* **Read the docs** for whatever technologies or APIs you use. Most of the time, there is a tutorial that you can follow! This isn't always the case, though, learning to read documentation is crucial to your success as a developer.
|
|
* **Write pseudocode before you write actual code.** Thinking through the logic of something helps.
|
|
|
|
<aside class="notes">
|
|
**Teaching Tips**:
|
|
|
|
- Encourage them to get a really solid idea fleshed out before they start the execution.
|
|
|
|
</aside>
|
|
|
|
|
|
---
|
|
|
|
|
|
## Useful Resources
|
|
|
|
- **[A list of free APIs](http://www.programmableweb.com/apis/directory)**
|
|
- An [extremely helpful debugging flowchart](https://www.dropbox.com/s/cqsxfws52gulkyx/drawing.pdf)
|
|
- The [Python Docs](https://docs.python.org)
|
|
- [Keyword Args](http://treyhunner.com/2018/04/keyword-arguments-in-python/)
|
|
- [Args and Kwargs](https://www.digitalocean.com/community/tutorials/how-to-use-args-and-kwargs-in-python-3)
|
|
- [Chain and Other Itertools](http://programeveryday.com/post/using-python-itertools-to-save-memory/)
|
|
- [Sets, on a Python tutorial website](https://www.learnpython.org/en/Sets))
|
|
- [Tuples](http://openbookproject.net/thinkcs/python/english3e/tuples.html)
|
|
- Writing Good [User Stories](http://www.mariaemerson.com/user-stories/) (for a few user story tips)
|
|
- [Presenting Information Architecture](http://webstyleguide.com/wsg3/3-information-architecture/4-presenting-information.html) (for more insight into wireframing)
|
|
- [Heroku](https://heroku.com/) (for hosting your back-end)
|
|
|
|
|
|
<aside class="notes">
|
|
**Teaching Tips**:
|
|
|
|
- These are helpful if they need a quick refresher or have extra time.
|
|
|
|
</aside>
|
|
|
|
---
|
|
|
|
|
|
## Evaluation
|
|
|
|
Your project will be evaluated based on the rubric below.
|
|
|
|
| Score | Expectations |
|
|
| ----- | ---------------------------------------------------- |
|
|
| 0 | No credit - Incomplete |
|
|
| 1 | Half credit - Working app without all requirements |
|
|
| 2 | Full credit - Working app with all requirements |
|
|
| 3 | Extra credit - Working app with bonus enhancements |
|
|
|
|
|
|
<aside class="notes">
|
|
**Talking Points**:
|
|
|
|
- A 0 to 3 grade may not intuitively make sense, so here is an example using the criteria as if your assignment were to cook a pizza:
|
|
|
|
Criteria | **0** Incomplete. | **1** Does not meet expectations. | **2** Meets expectations | **3** Exceeds expectations |
|
|
:--- | :--- | :--- | :--- | :---
|
|
Crust | No crust present. Submission is just cheese and sauce on a plate. | Pizza has a crust, but it is raw. | Crust is cooked thoroughly.| Crust is golden brown and just thin enough without being too thick.
|
|
Cheese | No cheese present. | Cheese is made of cardboard. | Cheese covers the pizza from edge to edge. | Cheese is delicious, plentiful, and melted to perfection.
|
|
|
|
</aside>
|
|
|
|
|
|
---
|
|
|
|
## Let's Get Started!
|
|
|
|
**Open the Final Project Prompt {`final-project-prompt`} to see the project and its instructions. Follow the instructions there.**
|
|
|
|
Remember:
|
|
|
|
- You're making any app you'd like! Find something that interests you.
|
|
- You must have a website with at least 3 working routes with associated views.
|
|
- Don't be afraid to ask for help!
|
|
|
|
<aside class="notes">
|
|
|
|
**Teaching Tips**:
|
|
|
|
- Make sure you change the link or point out what PDF to look at, and check the starter code location.
|
|
- Make sure all students start with working code - they can get it from the starter code file.
|
|
- Note that the Final Project Prompt is all this information in PDF form instead of slide form, so it's easier for them to refer to.
|
|
- Stay on this slide!
|
|
|
|
</aside>
|