Open Source Society University Computer Science Curriculum

repository·master·Indexed 11 days ago

https://github.com/ossu/computer-science

A structured, free, self-taught curriculum for a complete education in Computer Science using high-quality online courses. The program includes modules on Introduction to Computer Science and Programming using Python (MIT), Class-Based Program Design using Java 11 (Northeastern University), Operating Systems: Three Easy Pieces (OSTEP), and introductory options like Harvard's CS50P and Python for Everybody.

Tokens
20.1K
Snippets
19
Records
81
Agent score
99%

What's inside OSSU

  1. Overview of the OSSU Computer Science Curriculum

    master

    The Open Source Society University (OSSU) provides a complete, free, self-taught education in Computer Science using high-quality online materials from institutions like Harvard, Princeton, and MIT. The curriculum is designed to match the requirements of an undergraduate CS major (excluding general education).

    Curriculum Structure

    • Intro CS: An introductory phase to explore if Computer Science is right for you.
    • Core CS: Covers the fundamental requirements of a CS degree (roughly the first three years).
    • Advanced CS: Elective-based phase for specialization (roughly the final year).
    • Final Project: A capstone project to validate and display your knowledge.

    Study Guidelines

    • Duration: Can be completed in approximately 2 years with ~20 hours/week of study.
    • Order: It is recommended to follow the Core CS courses in order from top to bottom. You may take math courses in parallel with introductory courses.
    • Prerequisites: Core CS assumes knowledge of high school math (algebra, geometry, pre-calculus). Advanced CS assumes completion of all Core CS. Advanced Systems assumes basic physics knowledge.
  2. Overview of Class-Based Program Design course

    master

    The Class-Based Program Design course transitions students from the functional programming paradigm (using Racket) to the class-based paradigm (using Java). It serves as a bridge to Object-Oriented Design. The course materials are based on a Northeastern University course (CS2510) from Spring 2022.

    Prerequisites:

    Environment Setup:

    • Required Java Version: You must use Java 11. Using other versions may cause compatibility issues with the course's required libraries.
  3. Choose an Introduction to Programming course

    master

    If you find the Intro CS course difficult, you can start with one of these two self-paced introductory programming courses. You only need to complete ONE of them to progress in the curriculum.

    1. CS50P: Introduction to Programming with Python (Harvard University): Focuses on Python fundamentals, testing, debugging, regular expressions, and object-oriented programming. Best for those who want a structured approach with hands-on exercises.
    2. Python for Everybody (University of Michigan): Focuses on using Python to gather, clean, analyze, and visualize data. Best for those interested in data analysis. Note: You only need to complete up to the 'Regular Expressions' lesson for the OSSU curriculum requirements.
  4. Complete the Core CS Curriculum

    master

    The Core CS curriculum is a required set of coursework designed to provide a comprehensive computer science education. It is divided into several specialized tracks:

    • Core programming: Focuses on design patterns, testing, and various language paradigms (Functional, OO, etc.).
    • Core math: Covers discrete mathematics, proofs, and calculus to build mathematical maturity.
    • CS Tools: Essential practical skills like shell scripting, Vim, and version control.
    • Core systems: Low-level concepts including computer architecture, assembly, operating systems, and networking.
    • Core theory: Algorithmic design and analysis (sorting, searching, graph algorithms, etc.).
    • Core security: Fundamentals of cybersecurity, secure coding, and vulnerability identification.
    • Core applications: Practical implementations in databases, machine learning, computer graphics, and software engineering.
    • Core ethics: Social context, professional ethics, and intellectual property.
  5. Choose an approach for the Operating Systems: Three Easy Pieces course

    master

    The OSTEP course offers two paths depending on your goals:

    1. Base Approach: Suitable for most students. It covers all curriculum requirements and takes approximately 80 hours (estimated 8 weeks at 10 hours/week). Focuses on reading the textbook and completing homework questions.
    2. Extended Approach: Designed for students specializing in systems programming. It includes the base approach plus deep dives into kernel programming, serious C, and x86 assembly. This takes over 200 hours and is significantly more challenging.
  6. Understand the cost and accessibility of resources

    master

    A core goal of OSSU is to ensure that the learning materials are free. However, some platforms use a business model where the content is free but paid add-ons exist:

    • edX: You do not need to purchase a 'Verified Upgrade' if you only want to watch the videos. Note that audit access may be limited to the estimated number of weeks required to complete the course; do not start a course unless you can commit to its duration.
    • Coursera: As of July 2025, Coursera has removed audit access for most courses. OSSU is currently working to replace these with free alternatives.
    • Alt Links: If a course provides 'alt links', these are alternative platforms offering similar content. Use whichever is more convenient or available.
  7. Memory Management Best Practices in C

    master

    To avoid segmentation faults and memory corruption during shell implementation, follow these rules:

    String and Pointer Safety

    • Avoid Stack Pointers: Do not point to stack variables that will go out of scope. Always allocate strings intended for long-term use on the heap.
    • Heap Allocation: If you must use a stack string, copy it to the heap using strcpy(), strncpy(), strcat(), or strncat().
    • Buffer Safety:
      • For strcpy() and strcat(), ensure the destination buffer has enough space for the string plus the \0 terminator.
      • For strncpy() and strncat(), ensure n is large enough to include the \0 terminator, or add it manually.
    • Use calloc: Use calloc instead of malloc when creating arrays of pointers to prevent them from containing garbage values.
    • Check Allocations: Always check if the result of malloc, calloc, or realloc is NULL.

    String Parsing with strsep

    Avoid strtok() as it is not thread-safe. Use strsep() instead, but follow these precautions:

    • Preserve Original Pointer: strsep() modifies the pointer passed to it. Keep a copy of the original pointer so you can free() the entire allocated block later.
    • Null Check: After calling strsep(&buf, delim), check if buf is NULL before dereferencing it.

    Lifecycle Management

    • Freeing Memory: Always free() strings returned by getline() and strdup().
    • Avoid Double-Frees: Do not attempt to free a substring of a string that has already been freed.
    • Allocation Symmetry: A general rule is to free memory in the same function where it was allocated. If using a pattern like create_xxx(), ensure there is a corresponding destroy_xxx() function.
  8. How the xv6 Context Switch works

    master

    In xv6, the scheduler switches between the kernel and a process using a context switch mechanism. The core of this operation is the swtch function, which swaps the current CPU's register contents with the saved register contents of the target process.

    A typical context switch sequence in the scheduler looks like this:

    1. Acquire the process lock.
    2. Set the current CPU's process pointer: c->proc = p;.
    3. Set up the process's virtual memory: switchuvm(p);.
    4. Set the process state to RUNNING.
    5. Perform the switch: swtch(&(c->scheduler), p->context);.
    6. Once the process is switched back out, restore the kernel's virtual memory: switchkvm();.
    7. Release the lock.
    c->proc = p;
    switchuvm(p);
    p->state = RUNNING;
    
    swtch(&(c->scheduler), p->context);
    switchkvm();
  9. Determine the order of courses

    master

    The curriculum is designed to be flexible. You can follow it using one of three progression styles:

    • Linear (Top-to-Bottom): Progress through the entire curriculum in the order presented on the main page.
    • Sectional Parallelism: Progress linearly through individual sections, but study different sections simultaneously.
    • Custom Progression: Design your own path by using the listed pre-requisites to guide your study order.
  10. Understand the curricular guidelines for the Computer Science curriculum

    master

    The OSSU Computer Science curriculum is based on the Curriculum Guidelines for Undergraduate Programs in Computer Science published by the Association for Computing Machinery (ACM) and the Institute of Electrical and Electronics Engineers (IEEE).

    These guidelines define:

    • Knowledge Areas: High-level domains of computer science.
    • Learning Goals: Specific topics within those areas.
    • Competency Levels: Distinctions between concepts a student must be able to explain versus concepts they must be able to demonstrate in practice.

    Note: The successor to these guidelines, CS2023, is currently under development.

  11. Prerequisites and alternatives for Intro to CS

    master

    Difficulty Adjustment

    If you find this course too difficult, it is recommended to complete the Intro to Programming courses before returning.

    Certification

    This OSSU version does not provide a certificate. If you require a certificate, you can take the instructor-paced 6.00.1x course on EdX.

    Alternative Course Versions

    If you prefer the faster-paced 6.0001 course version, it is available on OCW here: https://ocw.mit.edu/courses/6-0001-introduction-to-computer-science-and-programming-in-python-fall-2016/

    Required Reading

    The course references the textbook Introduction to Computation and Programming Using Python, third edition. While the book and lectures parallel each other, the textbook is considered an optional paid addition.