Created
August 23, 2020 19:09
-
-
Save danielsgriffin/e3fb11c1039134716cded7964d978a88 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Here is the module docstring to explain what this file does. | |
Purpose: provide a syllabus of sorts with a light introduction to various | |
aspects of python. | |
""" | |
print("Hello Python Boot Camp Students") | |
def introduce_syllabus(): | |
"""This function introduces the syllabus (this script) for the Python Boot | |
Camp course.""" | |
lines = ["The course is 3 weeks long.\n", | |
" - 4 days a week\n", | |
" - 3 hours a day\n", | |
"The syllabus introduces the what, how, and why of the course.", | |
" The syllabus is written using aspects of Python structure.", | |
" The student is not expected to understand all the structure." | |
" The syllabus, in form and content, is intended as:\n", | |
" - initial introduction\n", | |
" - stable reference\n", | |
"\n" | |
"The syllabus content is to clarify student expectations of:\n", | |
" - the course\n", | |
" - the instructor\n", | |
" - the peers\n", | |
"And the instructors expections of students.\n" | |
"\n" | |
"Special terms introduced here will be marked with an asterisk*", | |
" __", | |
" * and defined"] | |
for line in lines: | |
print(line) | |
def introduce_instructor(): | |
name = "Daniel Griffin" | |
years_programming = 4 | |
def introduce_students(): | |
"""This function prints information from the Google Form pre-course survey | |
to demonstrate: | |
- the range of experience and backgrounds of the students. | |
This demonstration is an opportunity to discuss one of the greatest values | |
of this course and of the I School (and the cost of that value). (Note: for | |
more see 'why', defined below) | |
- value: the broad diversity of backgrounds and interests of the students | |
- cost: aspects of the course may seem at times too fast or too slow | |
""" | |
import csv # Python note: ideally include imports at the top of the script | |
... | |
# Here is the what, how, and why of the course: | |
# - Python note: This also provides examples of multi-line strings. | |
what = ("This course teaches: introductory Python as an introduction to coding" | |
" at the School of Information. See course_outcomes below for more.") | |
how = ("This course utilizes a variety of activities in addition to 'just'" | |
" coding. This includes extensive paired and collaborative work as well" | |
". At the core of the course -- what makes this course distinct and the" | |
" students successful -- are the CourseActivities, defined below.") | |
why = ("This course is structured and run as it is because of unique" | |
" opportunities and constraints presented.\n" | |
"- Widely varying backgrounds with computers, code, and systems of" | |
" computation or logic\n" | |
"- Varying aspirations and motivations to use and learn coding skills\n" | |
"- Varying amounts of time, energy, and attention to devote to learning" | |
" these things both in and outside of the class\n" | |
"- Many students are still working or navigating moving to a new" | |
" country or seeking housing\n" | |
"- Several students will find learning to code incredibly difficult" | |
" , particularly given the ease with which others may seem to grasp" | |
" the material, and so a positive learning environment must be" | |
" intentionally, explicitly, and carefully maintained.\n" | |
"- Very short timeframe.") | |
# Python note: This provides another example of multi-line strings. | |
Philosophy_of_Teaching_and_Learning = """ | |
The purpose of this course is to prepare all incoming graduate students for | |
coding and coding-related courses and activities at the School of Information. | |
The selection and delivery of CourseMaterials and the CourseActivities are | |
guided by well-documented principles of coding instruction and memory, | |
including: | |
- pair programming | |
- providing feedback and receiving on code | |
- bringing attention to the learning process | |
- recall | |
- repetition | |
- interleaving | |
- desirable difficulty | |
- elucidation | |
- asking questions | |
At the center is intentional inclusion, acknowledging the role of this course | |
in furthering the mission of the I School and the University of California. | |
The School of Information's Academic Mission: | |
The School of Information creates knowledge and advances practice | |
wherever people interact with information and technology. Our research | |
explores the implications for individuals and society as information and | |
digital technologies are increasingly embedded in all aspects of human | |
experience. Our professional master’s degrees prepare students to design | |
and build the systems that will shape the way humans live and interact in | |
the future. [ . . . ] | |
<https://www.ischool.berkeley.edu/about/mission> | |
UC's Mission: | |
We teach | |
[ . . . ] At the graduate level, students experience with their | |
instructors the processes of developing and testing new hypotheses and | |
fresh interpretations of knowledge. Education for professional careers, | |
grounded in understanding of relevant sciences, literature and research | |
methods, provides individuals with the tools to continue intellectual | |
development over a lifetime and to contribute to the needs of a changing | |
society. [ . . . ] | |
We do research [ . . . ] | |
We provide public service [ . . . ] | |
<https://www.ucop.edu/uc-mission/> | |
""" | |
class_schedule = ["Introduction",] | |
# TODO | |
class CourseMaterials(): | |
"""Course materials include: | |
- readings | |
- online textbook: Think Python | |
- slides | |
- Python documentation | |
- Python style guides | |
- "PEP 8 -- Style Guide for Python Code" | |
- "Google Python Style Guide" | |
- the latest version of Python | |
- git and GitHub | |
- Slack channel | |
- comments from prior students | |
- I School Pledge | |
""" | |
def course_slides(self, instructor): | |
"""Course slides are written in markdown* and will be shared with the class. | |
- slides will not be shared in advance of the lecture | |
- raw slide markdown outlines will be shared in advance | |
__ | |
* markdown is ___ | |
""" | |
def get_github(self, student): | |
"""TODO""" | |
def i_school_pledge(self, i_school, student, pledge): | |
"""The text of the I School pledge is included below. | |
The pledge will be used as an example text to run Python code on and | |
will be used as a light introduction to content of core I School | |
coursework (which itself will be used to explain the purpose behind | |
various CourseActivities) and the public service orientation of the | |
school. | |
The pledge was written by I School MIMS15 graduate Robyn Perry. | |
Pledge: | |
On my honor, I will try: | |
To serve people and society, | |
to create technology for important human needs, | |
and to abide by the I School pledge. | |
I am | |
responsible for what I design and code. | |
I will do my best to be | |
inquisitive and not condescending, | |
ever-mindful of privacy and security, | |
and | |
to combat technological determinism, | |
to remember that artifacts have politics, | |
to beware the power of defaults. | |
I will | |
use and abide by technical standards, | |
design with the tussle in mind, | |
and be accountable for the things I create in the world. | |
The I School Pledge's similarity to Python will be explored in class. | |
""" | |
class CourseActivities(): | |
"""This class contains that various methods to achieve the course outcomes. | |
""" | |
# Standards by which code will be evaluated: | |
code_rubric = {"function": ["does the code run", "semantic errors", | |
"test coverage"], | |
"form": ["cleanliness (ex. DRY)", | |
"style (PEP8; naming; pythonic)", "commenting"]} | |
# We will talk as much about participation (self- and shared participation) | |
# as code itself: | |
participation_rubric = ["pair-programming", | |
"asking questions", | |
"constructive feedback", | |
"learningful language"] | |
def code_writing(self): | |
""" One of the most visible activities (and outcomes) in the boot camp. | |
Purpose: To refine code-writing skill in Python to improve preparation | |
for coursework in grad school (in I School classes and ) | |
Description: | |
- Includes writing Python code in the "terminal" or in a .py | |
script or Jupyter Notebook. | |
- Includes writing from scratch, from a template, and modifying | |
existing code. | |
- Include test-driven development. | |
- Both similar and distinct from righting and writing English | |
prose. This will be discussed further during the course. | |
Outcome: Students will be able to write (and re-write) scripts of over | |
200 lines of Python code, including both classes and functions. | |
Examples: | |
- Students will use Python to read from files (ex. text files). | |
- Students will use Python to select a random item from a list. | |
[TODO: Expand here] | |
""" | |
def code_commenting(self): | |
"""Purpose: To improve one's ability to write readable reusable code for | |
other people (including your future self). | |
Description: | |
As an activity, code_commenting will be done sometimes before a student | |
starts to write the code itself, sometimes after writing their own code. | |
Sometimes it will be added after modifications to the code or feedback. | |
Note: This is not to be confused with code_reviewing, below. | |
""" | |
def code_reading(self): | |
""" Code reading is a distinct skill that will be practiced. | |
Purpose: Explicit attention to the activity of reading code, of others | |
and one's own, will improve one's ability in Python. Learning how to | |
read unfamiliar code will improve one's understanding of the language, | |
one's ability to produce Pythonic code, and one's ability to produce | |
code that is readable and usable by others. | |
Example: | |
Students will read code demonstrating new concepts, read code of their | |
peers in order to provide feedback (see code_reviewing below) or to | |
write test_code (see code_testing below), and read code in order to | |
debug. | |
""" | |
def debugging(self): | |
"""Debugging is a distinct activity and problem solving skill. | |
Purpose: Code a student writes or attempts to use will not be perfect. | |
Practicing fixing such code, learning approaches to improving one's | |
debugging practice, and code_writing and code_commenting in | |
anticipation of future debugging will improve one's experience with | |
Python. | |
Description: | |
- Debugging is an arena of problem solving that will serve the | |
students well beyond coding programs. | |
- During the course, students will | |
Includes: | |
- Learning to read error statements, search and navigate Google and | |
StackOverflow and Python documentation | |
""" | |
def round_robin_review(self, previous_material, students): | |
"""On the morning of days 1-13 there will be a collective review of | |
concepts covered in the previous days. These reviews will include | |
3-15 questions | |
These reviews will initially | |
have questions asked of students in order around the room and later | |
(after students can write a function selecting a name randomly from | |
a list) will have students randomly selected to answer questions. | |
These review questions are shared recall and elaboration exercises, | |
with the goal of improving students ability to talk and think about | |
code in addition to write or re-write code. | |
- recall: | |
- elaboration: | |
Example review question: | |
Why might you see code like the below? | |
> print "Hello Python" | |
Follow-up review questions/comments might ask what type of error it | |
is, or what other differences between Python2 and Python3 students | |
should be aware of. | |
- Reminder: This course uses the latest version of Python3. | |
""" | |
def code_reviewing(self, reviewee_code, reviewer): | |
"""Code review consists of written feedback. | |
- See 'code_rubric' for what to expect/provide | |
Parameters: | |
- reviewee_code: The code to be reviewed, including the structure, | |
style, and comments. | |
- reviewer: The reviewer is sometimes the instructor, sometimes the | |
student(s) who wrote the code, and sometimes a classmate. | |
Output: | |
- Improved feedback loop and ability to participate in feedback | |
loops. | |
""" | |
... | |
def code_testing(self, testee_code, goals, tester_code): | |
"""This method is formal testing of written code (here, testee_code). | |
Code testing uses tester_code (also written in Python) to compare the | |
performance of testee_code with the stated goals. | |
- Note: Sometimes the tester_code will be included in the | |
testee_code. | |
The ability to write successful tests is both an outcome of the course | |
(see: course_outcomes) and also a course activity to further other | |
course outcomes: improving the quality of the code and the students' | |
knowledge of the intracacies of Python and their coding practice and | |
processes. | |
Some tester_code will be written by the instructor, much will be | |
written by the students. | |
Some testee_code will be written by the instructor, with the students | |
writing the tester code. | |
Goals for code will variously by written by the instructor, student, or | |
both in collaboration. | |
""" | |
... | |
def paired_programming(self, student1, student2): | |
"""Paired programming is when two students together work through a | |
programming problem. They may work together on different computers or | |
on the same computer with only one typing (or "driving"). | |
- The students may have similar or wildly different experience but | |
either way, this method will allow both to teach and learn from | |
each other. | |
- Best practices for paired programming: [ . . . ] | |
""" | |
... | |
def using_github(self, git, GitHub, code): | |
""" | |
Outcome: | |
Ability to manage code through GitHub, including addressing | |
merge conflicts, submitting and accepting pull requests, opening and | |
closing issues, and commenting. | |
""" | |
class CourseExercises(): | |
"""CourseExercises come in various types: brief mid-lecture mini_exercises | |
to practice a concept as it is being learning, "homework" exercises to | |
practice the day's material and demonstrate mastery for feedback, and | |
A note on assessment: All exercises, in addition to being time to practice | |
and learn Python, are formative assessments -- used to inform and help | |
re-form instruction (for the class as a whole and for individual | |
students.) | |
""" | |
course_outcomes = ["ability to ", # Add: confidence | |
"recognize, produce, ability to explain Pythonic code"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment