NYU Prison Education Program πŸ–₯️ πŸ‘Ύ πŸ’Ύ ⏏️ πŸ’½ πŸ–²οΈ πŸ–¨οΈ ⌨️ Introduction to Computer Science

Summer 2024
Prof. Ar Ducao, arlduc [at] nyu.edu
Tuesdays, 12:15-3:15 PM
Wallkill State Correctional Facility 

Overview πŸ–₯️ πŸ‘Ύ

This course will prepare students to write basic software and web pages, and it will introduce a full foundation of computer science and design coding concepts that can be applied to many kinds of technical projects. Students will be exposed to Python, HTML, CSS, and the Unix operating system. This course will take place in the computer lab, so concepts will be demonstrated and discussed through hands-on computer exercises and assignments. Concepts include data types, data structures, syntax, tags, elements, attributes, functions, variables, expressions, inheritance, statements, and version control. 

Learning Goals πŸ’Ύ ⏏️

  1. Learn basic computer science concepts, including data types, non-decimal numeric systems, data structures, input and output, conditions, and iteration.
  2. Work with an IDE (integrated development environment).
  3. Write basic back-end functionality with Python.
  4. Write basic front-end styles with HTML and CSS.
  5. Learn best practices for writing code that other people can read. 

Schedule πŸ’½ πŸ–²οΈ

This is an approximate schedule. It is subject to change based on the general work pace of the computers and the students.
πŸ–₯️

For each week, the assignment will be the exercises at the end of the chapters we studied. For example: Week 1’s assignment will be the exercises at the end of Chapter 1 in both the Python book and the HTML/CSS book.

Starting around Week 5, I’ll reserve the last 20-ish minutes of class for 1-on-1 meetings to check in with each of you!

  1. Introduction and Best Practices (Chapter 1)
    • Python: The Way of the Program
    • HTML/CSS: Structure
    • Other: Python IDLE, Notepad, Explorer. Non-decimal numerical systems (binary and hex), Boolean logic, data types. 
    • Additional assignment: Please write me a letter introducing your past experience with any computer or digital technologies, as well as what you’d like to learn in this class. Thanks!
  2. Introduction Continued (Chapter 2)
    • Python: Variables, Expressions, Statements
    • HTML/CSS: Text
  3. Writing Programs and Building Structure (Chapter 3)
    • Python: Functions
    • HTML/CSS: Lists
  4. Case Studies: Designs (Chapter 4)
    • Python: Case Study: Interface Design
    • HTML/CSS: Links
  5. More Structure (Chapter 5)
    • Python: Conditionals and Recursion
    • HTML/CSS: Images
  6. Input and Output (Chapter 6)
    • Python: Fruitful Functions
    • HTML/CSS: Tables
  7. Looping Forward (Chapter 7)
    • Python: Iteration
    • HTML/CSS: Forms
  8. Strings and Styles (Chapter 8)
    • Python: Strings
    • HTML/CSS: Extra Markup
  9. Case Study and Cascading Styles (Chapter 9)
    • Python: Case Study: Word Play
    • HTML/CSS: Introducing CSS
  10. More Structure and Style (Chapter 10)
    • Python: Lists
    • HTML/CSS: Color
  11. Data Relationships (Chapter 11)
    • Python: Dictionaries
    • HTML/CSS: Text
  12. Wrap Up (Chapter 12)
    • Python: Tuples and Beyond
    • HTML/CSS: Boxes and Beyond

Course Books πŸ–¨οΈ ⌨️

GradingΒ πŸ–₯️ πŸ‘Ύ

Grades will be based on weekly programming assignments in the course textbooks, which can be started in class. Grades are calculated as follows:

  • 30% Structure: Are all the parts of the program set up?
  • 30% Implementation:  Are all the parts of the program completed?
  • 20% Style: Have you thoughtfully used comments, variable naming, and function naming so as to help make the code understandable? Is your code organized and well indented? Is your code authored by you?
  • 20% Function: Does the program run on the computer properly? NOTE: This part can take the longest, so for the short assignments in this class, I recommend that you draft out the structure, basic implementation, and style first.

Extra credit can be earned in a few different ways:

  1. Participate extensively in class discussions by sharing an answer or informed, respectful opinion. 
  2. Help another student with their assignments. If you write (in your assignment) you helped them that week and they verify it in writing, you’ll receive a few extra credit points for that week.
    • If someone helps you, please give them credit by writing an acknowledgment in your assignment submission!
  3. Work ahead in the Python text book. If all goes smoothly with the computer lab, we will probably reach Chapter 12 in class, so completing Chapters 13 and beyond will count as extra credit.
  4. Creative modifications to the Free Python Games modules installed on some computers. If you’re interested in this, please discuss with me in advance!

Helpful Notes As You Begin: How to Make Your Code Readable, Not Just Functional!

BASED ONΒ GOOGLE STYLE GUIDES

πŸ–₯️

Optimize for the reader, not the writer
Codebases often have extended lifetimes and more time is spent reading the code than writing it. Choose to optimize for the experience of the average software engineer reading, maintaining, and debugging code rather than the ease of writing said code. For example, when something surprising or unusual is happening in a snippet of code, leaving textual hints for the reader is valuable.

  • PROGRAM STYLE
    • Import all external packages at the beginning of your program, just after any module comments and docstrings and before module globals and constants. 
    • Indentations: Be consistent in your indentations. Python IDLE should auto-format your code, but I recommend indenting your code blocks with 4 spaces or 1 tab. Never use tabs or mix tabs and spaces, because this will cause an error when you run your code.
    • Maximum line length should generally be 80 characters. Exceptions:
      • Long import statements.
      • URLs, pathnames, or long flags in comments.
    • Generally place only one statement (conditionals and iterations) per line. However, you may put the result of a test on the same line as the test only if the entire statement fits on one line. 
    • Functions: Try to keep them short. Long functions are sometimes appropriate, so no hard limit is placed on function length. If a function exceeds about 40 lines, think about whether it can be broken up without harming the structure of the program.
  • NAMING STYLE
    • Function names, variable names, and file names should be descriptive; avoid abbreviation. In particular, do not use abbreviations that are ambiguous or unfamiliar to readers outside your project, and do not abbreviate by deleting letters within a word.
    • Always use a .py filename extension. Never use dashes or hyphens.
    • Do not use single character names except for counters or iterators.
    • Guidelines derived from Google’s Python Recommendations:
TypeStyle
Functionslower_with_under()
Global ConstantsCAPS_WITH_UNDER
Global Variableslower_with_under
Local Variableslower_with_under
  • COMMENTING STYLE
    • Add an explanatory comment above every conditional and iterative statement. Example:
      # Iterate through each person in class
      for y in our_cs_class
    • Add short inline comments to help explain potential surprises. Example:
      print(eggs + chocolate + plantain_chips) #not printing cheese yet

Thanks for taking this class!
πŸ–₯️ πŸ‘Ύ πŸ’Ύ ⏏️ πŸ’½ πŸ–²οΈ πŸ–¨οΈ ⌨️