CSC 226 – Intermediate Rust Programming

Slides

Instructor: Adam Hartley

Email: hartlead@mountunion.edu

Office: KHIC 041

Office Hours: 2:00-3:00 MWF; 12:30-1:30 TR; by appointment; or whenever my door is open!

Textbooks:

The Rust Programming Language by Steve Klabnik and Carol Nichols

Course Objectives:

“It wasn’t always so clear, but the Rust programming language is fundamentally about empowerment: no matter what kind of code you are writing now, Rust empowers you to reach farther, to program with confidence in a wider variety of domains than you did before.” – Nicholas Matsakis and Aaron Turon

Upon completion of the course, students should be able to:

  • Create, compile, and execute Rust programs

  • Understand the history and significance of Rust in modern software

  • Develop an intuition for how memory behaves in Rust programs

  • Understand the basic types and data structures in Rust, such as arrays, structs, collections, etc. in addition to generic types and be able to apply them to new problems

  • Understand the purpose and behavior of Rust’s borrow checking and lifetime semantics

  • Be able to fluently handle run-time and compile-time errors to work with the compiler to build robust programs

Course Outline

A rough outline of the pace of the course and topics covered is below.

Tentative Schedule
Date Tuesday Reading Date Thursday Reading
3/18

Getting Started

Programming Demo

Rust 1,2 3/20

Common Programming Concepts

Understanding Ownership

Rust 3,4
3/25

Using Structs

Enums and Pattern Matching

Rust 5,6 3/27

Managing Projects

Common Collection

Rust 7,8
4/1

Error Handling

Generic Types

Rust 9,10 4/3

Writing Tests

I/O Lab

Rust 11,12
4/8

Functional Features

Cargo

Rust 13,14 4/10 Smart Pointers Rust 15,16
4/15

Object Orientation

Patterns and Matching

Rust 17,18 4/17 Advanced Features Rust 19
4/22 Advanced Features 4/24 Standard Library
4/29 Standard Library 5/1 Lab
5/6 Lab

Assignments and Grading

Assignment Type Total Percentage
Programs 30%
In-Class Quizzes 30%
Lab Exam 15%
In-Class Labs 25%
Grade Range Letter Grade
100%-94% A
93.9%-90% A-
89.9%-87% B+
86.9%-84% B
83.9%-80% B-
79.9%-77% C+
76.9%-74% C
73.9%-70% C-
69.9%-67% D+
66.9%-64% D
63.9%-60% D-
<60% F

The assignments for the course are divided into a few categories:

  • Programs:

    • Each program assignment will include one or more bite-sized projects designed to showcase the implementation process of topics from the class.
  • Quizzes:

    • Quizzes will be given periodically in-class and will be on paper.
  • Lab Exam:

    • The capstone assignment for the class will be an extended version of labs seen earlier in the semester and will contain both written elements and implementation work.
  • Labs:

    • There will be lab work most days. On occasion, lab work is substantial enough to count for a grade.

Assignments may occasionally include optional extensions that will be graded for extra credit. These will generally require additional discussion with the instructor. Come to office hours or schedule an individual time!

In general, no other extra credit work will be assigned.

Collaboration Policy

The field of science is almost entirely collaborative. If students wish to collaborate on solving exercises or activities outside of class, this is allowed and encouraged under the condition that you explicitly note with whom you collaborated. Each student must turn in their own copy of the work, each copy listing the collaborators. Please limit group work to two or three students. Each student is individually responsible for the course information. Collaboration is not allowed during exams.

Late Policy

Each 24 hours, an assignment is past due, it is worth 10% fewer points. After 72 hours, the assignment is worth zero points. Extra credit work, if applicable, isn’t accepted past-due. The exams and final project will generally not be accepted late. In the case of an emergency or extended complications that would prevent exam attendance or inability to participate in the class, contact the instructor as early as possible so that other arrangements may be made.

Technology Requirements

College coursework requires students to be responsible with reading and assignments, checking email and D2L frequently, and staying in regular communication with instructors. Technology access will be important for success. To participate in learning activities and complete assignments, you will need:

  • Access to a working computer that has a current operating system with updates installed

  • Reliable Internet access and a Mount Union email account

  • A current Internet browser that is compatible with D2L

Please contact the IT Help Desk at 330.829.8726 or helpdesk@mountunion.edu if you need assistance with obtaining or using a device, any necessary software, or internet access at any time during this semester.

Please bring your laptop to class, we will make extensive use of in-class time for lab work.

AI Policy

Artificial intelligence is a rapidly evolving field and there are now multiple programs (e.g., ChatGPT and Bard) that can interact with users via “natural” conversations and rapidly generate output including art, essays, and computer code. Programs such as these will continue to evolve and be utilized in professional settings, and you can and should become familiar with them in the course of your undergraduate studies. At the same time, in-demand employees are those who have skills (to not use an AI when doing so would expose proprietary information to the creator of the AI, to debug AI-generated code when it doesn’t get it quite right, to modify output from AI for subtly different use cases, to perform tasks independent of AI when appropriate…) and the clarity of thought and ability to communicate effectively and effortlessly. Your college education is a time to develop these abilities and using AI as a crutch can hinder that process. So, in this course, you should not use AI in any of your work. Doing so without the express permission of the instructor will be considered a breach of academic honesty. Any submitted work may be subject to an oral examination.

Accessibility

The University of Mount Union values disability as an important aspect of diversity and is committed to providing equitable access to learning opportunities for all students. Student Accessibility Services (SAS) is the campus office that collaborates with students who have disabilities to provide and/or arrange reasonable accommodations based upon appropriate documentation, nature of the request, and feasibility. If you have, or think you have, a temporary or permanent disability and/or medical diagnosis in any area such as, physical or mental health, attention, learning, chronic health, or sensory, please contact SAS. The SAS office will confidentially discuss your needs, review your documentation, and determine your eligibility for reasonable accommodations. Accommodations are not retroactive, and the instructor is under no obligation to provide accommodations if a student does not request accommodation or provide documentation. Students should contact SAS to request accommodations and should discuss their accommodations with their instructor as early as possible in the semester. You may contact the SAS office by phone at (330) 823-7372; or via e-mail at studentaccessibility@mountunion.edu.

Additional University Policies

See https://www.mountunion.edu/syllabus for policies and information that are universally applicable to all courses at the University of Mount Union.