Giter Site home page Giter Site logo

cs-1-programming-fundamentals's Introduction

CS1--Programming Fundamentals

Prerequisites

This course is designed to help equip students with the technical skills and foundational knowledge necessary to succeed at Make School. As such, there are no prerequisites for this course.

Course Overview

This course is designed to help students with beginner-level coding experience master the fundamentals of coding and Computer Science, so that they will be well-equipped to get the most out of all the other courses they'll take at Make School. This course will cover the foundations of Procedural and Object-Oriented Programming, functions and recursion, debugging, best practices for solving problems, and how to write clean, structured code.

Who should enroll (optional)

Students in the Product College come with varying levels of experience in coding and Computer Science.
Some students may have already gained the knowledge and skills found in this course in their studies prior to enrollment. As a result, we have created a diagnostic exam to help students determine if this course is right for them.

Learning Objectives

This course will be taught in Python, and will cover the following concepts:

  • Variables, assigment, operators, compound assignment operators, precedence
  • Data Types (Integers, Floating Point Numbers, Strings, Objects)
  • Collections (lists/arrays, tuples, dictionaries)
  • String Manipulation (splitting, concatenation, interpolation, special characters)
  • Boolean values, operators, expressions, short-circuit evaluation
  • Control flow structures and loops (if/elif/else, for, while, break, continue)
  • Functions (returning values, parameters, arguments, default values, scoping)
  • Object-Oriented Programming (classes, objects, self, inheritance, polymorphism, method overriding)
  • Importing libraries/modules/packages
  • Running python scripts
  • Command-Line arguments
  • User input, printing, string formatting
  • File I/O (reading from/writing to files)

This course will also cover the following general programming concepts, which can be applied to any language:

  • Semantic variable naming, code formatting, and Conventions
  • Breaking down large problems into incremental steps
  • Stubbing out functions and methods
  • Debugging, printouts, problem isolation
  • Purpose of abstractions such as functions, classes, modules
  • Thread blocking (function calls, user input, web requests)
  • Recursion, infinite loops, progress towards goal (base case)
  • Assert statements, basic unit testing
  • Error Handling, exceptions (try, catch/except, throw/raise)
  • Making HTTP requests to web APIs
  • Parsing JSON documents

Finally, this course will also cover the following high-level computer science concepts:

  • Pseudocode as an abstraction
  • Advantages/disadvantages of interpreted vs. compiled languages
  • Language abstraction (High-level vs. low-level vs. assembly vs. machine code)
  • Binary number representations
  • Persistence of memory (RAM vs. disk)

Learning Outcomes

Students that complete this course will be able to exhibit the following competencies in each area:

General Computer Science Knowledge

Student(s) will be able to:

  • Select appropriate data types to create, manipulate, and store data.
  • Explain the trade-offs between interpreted and compiled languages, and use this knowledge to select appropriate languages for the task at hand.
  • Convert numbers from Decimal to Binary, and from Binary to Decimal.
  • Explain the importance of binary numbers in modern computing, and connect this to higher-level concepts used in their code such as boolean logic and conditional statements.

Programming concepts

Student(s) will be able to:

  • Write clean, well-structured code with semantic naming conventions for variables, functions, and objects.
  • Identify patterns that can cause infinite loops, and avoid them as needed.
  • Demonstrate appropriate use of abstraction by refactoring code into modular functions, classes, and modules as necessary.
  • Revise and refactor monolithic code blocks using OOP concepts such as inheritance and polymorphism to make code more readable and reusable.
  • Investigate problems and debug code, including code that they didn't write.
  • Compare and contrast iterative and recursive solutions for coding problems, and explain the benefits and drawbacks of each.
  • Create basic unit tests and follow the "red-green-refactor" method for writing and improving code.
  • Write scripts that make use of 3rd party libraries, modules, frameworks, and/or APIs.
  • Assess the potential problems that can arise when making HTTP requests, and effectively deal with these problems using exceptions.

Programming in Python

Student(s) will be able to:

  • Write "clean, Pythonic" code that follows PEP8 conventions.
  • Apply their knowledge of Object-Oriented Programming to use inheritance to write "D.R.Y.", reusable code, including abstract superclasses.
  • Create, manipulate, and iterate on various collections, including lists, arrays, and tuples.
  • Use list comprehensions to programmatically create lists in Python.
  • Create python scripts that can accept arguments at the Command Line when the script is called.
  • Read, modify, and write to files (new or existing) using best practices in Python.
  • Explain what the self keyword means and how it is used in Python.
  • Compare and contrast procedural, Object-Oriented, and functional approaches to solving problems, and select the best approach for the problem at hand.
  • Create basic unit tests in python using the unittest module, Pytest, or other equivalent libraries.
  • Write conditional statements that use short-circuiting to improve runtime.
  • Demonstrate mastery over string concatenation and interpolation in Python.
  • Identify the recursive step and base case when shown recursive functions.
  • Refactor iterative approaches into recursive functions, and apply their knowledge of each approach to determine which approach has the best time and space complexity.
  • Call a web API and parse the JSON response.

Lessons

Class 1: --Prework-- N/A

--In Class-- Introductions Review Syllabus Set up git repo Install Ipython Python syntax Working in the terminal Control Flow/Loops/Functions PIP, packages, and import statements Benchmarking runtime

--After Class-- Complete the programming challenges given in class.

--Stretch Challenge-- Solve problem 1 on Projecteuler.net

Class 2:

--Prework-- None

--In Class-- Problem solving strategies Problem Solving methodologies Scripting in python String manipulation Collections in Python Using the random module

--After Class-- Complete the Roulette game programming challenge started in class.

--Stretch Challenge-- Complete problem 2 on projecteuler.net

Class 3: --Prework-- Complete Roulette mini-project Read through the project guidelines for Hangman.

--In Class-- Discussion: Pain points found during roulette project.

  • What was challenging about this project?
  • Why did students make the structural choices they did in writing this program?
  • What effect did vague instructions have on their process?
  • What did we learn from this experience? Helper functions Command Line Arguments

--After Class-- Complete the hangman project before the start of next class.

--Stretch Challenge-- See Project Guidelines for stretch challenge.

Class 4: --Prework-- Complete hangman project if you haven't already.

--In Class-- Peer Code review session: Hangman project.

  • Students will partner up with someone else and give a code review, following the best practices outlined in class. Introduction to unit testing: Red-Green-Refactor

--After Class-- Complete Hangman project and push to your git repo.

--Stretch Challenge-- See Project Guidelines for stretch challenge.

Class 5: --Prework-- Read this article on why Object-Oriented Programming is useful to developers.

--In Class-- Object-Oriented Programming in Python Classes, Initializers, attributes, and methods

--After Class-- Complete "Object-Oriented Programming in a Zoo" tutorial exercise

--Stretch Challenge-- Try to solve Project Euler problem 3 (hint: think about all the ways to generate prime numbers!)

Class 6:

--Prework-- Complete "Object-Oriented Programming in a Zoo" tutorial exercise. Read this article on the 4 benefits of OOP.

--In Class-- Subclasses Inheritance Abstract superclasses

--After Class-- Pick a team sport with different positions. Use Abstract Superclasses, Inheritance, and polymorphism to model this team in code.

--Stretch Challenge-- Attempt Project Euler Problem Problem 4.

Class 7: --Prework-- Finish OOP sports team assignment if you haven't already.

--In Class-- Working Session: OOP Gradebook project

--After Class-- Continue working on OOP Gradebook Project

--Stretch Challenge-- See Project Sheet for stretch challenge

Class 8: --Prework-- TBD --In Class-- Working Session: OOP Gradebook project --After Class--

Complete OOP Gradebook Project and push to git repo.
--Stretch Challenge-- Complete Project Euler Problem 5

Class 9: --Prework--

--In Class--

--After Class--

--Stretch Challenge--

Class 10: --Prework-- TBD --In Class-- TBD --After Class-- TBD --Stretch Challenge-- TBD

Class 11: --Prework--

--In Class-- Working Session: Herd Immunity Simulation --After Class-- Continue Working on Herd Immunity Simulation project. --Stretch Challenge-- See Project Guidelines for stretch challenge.

Class 12: --Prework--

--In Class-- Working Session: Herd Immunity Simulation

--After Class-- Finish Herd Immunity Simulation and push to git repo.

--Stretch Challenge-- See Project Guidelines for stretch challenge.

Projects

  1. Hangman --Students will gain experience with abstraction, helper functions, data types, string manipulation, collections, and other foundational concepts by coding up a version of the classic "Hangman" game that can be played in the terminal.

  2. Object-Oriented Programming Gradebook -- In this project, students will take advantage of Object-Oriented Programming to build a gradebook system to help a teacher keep track of their students. More details coming soon!

  3. Simulating Herd Immunity
    -- For their final project, students will design and build a simulation that models a the spread of a virus over a population to demonstrate the epidemiology concept of herd immunity. This project will require students to demonstrate mastery of all concepts covered in this course, and will stretch their programming skills with optional components including web servers and basic data visualization.

Vocabulary & Conventions

Throughout the course, we will learn and make use of technical vocabulary. Any technical words/topics/phrases worth remembering should be listed here. Here's the catch: they have to be added by you, the students. I strongly encourage you to make pull requests to this document and add new definitions of vocabulary, examples of coding conventions, and anything you find useful. This will give you a great cheat sheet to look back on as needed, while also strengthening your git skills!

Best Practices

Success in this course (and at Make School!) happens because of growth through deliberate practice. Coding is a muscle, and muscles only grow if you use them! Students in this course should find time to code every day. This does not necessarily have to be on a project, or even on work for this course! Some of your most productive days will be days where you don't have any work assigned, and some of your biggest breakthroughs will come while coding for fun!

For students seeking extra practice, I have included a list of my favorites in the Resources section.

Resources

Python 3 Documentation: For when you know what you want to say, but aren't sure of the correct syntax.

Project Euler: A website of math-flavored programming challenges, where solutions for a problem will often act as helper functions for subsequent problems. These are great for strengthening your problem solving and algorithmic skills--they're also very addicting!

Coding Bat: A great place to practice programming by completing challenges in python.

Think Like a Computer Scientist: A free, online text book in python that takes students from "Hello World" all the way to data structures and algorithms. Students may occasionally be assigned readings from this textbook before class.

Atom: A free, open-source text editor from Github. Although this is the recommended text editor for the course, students are free to use any text editor they feel comfortable with.

NOTE: This is a living document, so resources may be added to this list throughout the year.

Evaluation

In order to pass this course, students must successfully complete all three projects.
Each project will be evaluated according to a project-specific rubric, which can be found at the end of each project description.

Jump to:

Project 1: Hangman

Project 2: Object-Oriented Programming in a zoo

Project 3: Simulating Herd Immunity

cs-1-programming-fundamentals's People

Contributors

mike-kane avatar mikekane00 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.