Lecture 19: Your Professor is a [fan of] Git
Watch on YouTube →
Overview
Andrew Rosen reviews exam preparation and the final-project schedule, then teaches Git as a practical system for tracking changes, collaborating, and backing up code through GitHub. He demonstrates GitHub Desktop, commits, pushes, pulls, automatic merges, conflict resolution, Markdown submissions, and a Python dice-roll function, while explaining that the final project is due December 7 and proposals are checked on November 5.
Key takeaways
- Git commits preserve project history as snapshots, allowing programmers to identify changes and return to a previous working state.
- Git can automatically merge edits to separate parts of a file, but collaborators must manually resolve conflicts when they change the same lines.
- Keeping a public GitHub repository provides both a remote backup and a programming portfolio, while commit history can document how a project developed.
- For the final project, students need one public repository per group, a progress report by November 30, and a complete submission by December 7 at 11:59 p.m.
- A project proposal should define good, better, and best outcomes so its scope accounts for the common risk that software work takes longer than expected.
- Python's random.randint(1, 6) models a six-sided die for Monte Carlo simulations, with inclusive bounds that can be adjusted for other dice.
Chapters
- The upcoming exam is scheduled for the week 11 lab, beginning Tuesday, and Rosen plans to review selected practice questions on Thursday.
- Practice problems include analyzing a CSV of temperatures, simulating Monopoly dice rolls, finding the most common letter with a dictionary, and selecting even numbers.
- Method-writing questions make up about half the exam points; the file-reading question comes later to reduce the effect of getting stuck early.
- The final project is due December 7 by 11:59 p.m.; late work loses 0.1 point per minute, or six points per hour.
- Students submit a GitHub repository link and a short demonstration video, ideally three minutes or less, focused on software features rather than code.
- The project is worth 100 points, with a 20-point progress report due November 30; students who have not proposed by the end of November receive zero for the project.
- Rosen uses a 100 in the gradebook to indicate exemption from the final exam for selected best projects.
- Proposal day is planned for November 5 over Zoom, where Rosen will review projects one group at a time and approve or adjust their scope.
- Students should attend even if they have no project idea yet, so Rosen can help them choose a feasible direction.
- Students can leave after their check-in; those who miss proposal day must email Rosen promptly with their project plan.
- The pre-proposal worksheet asks for project ideas, collaborator names, and questions for the course staff.
- Each collaborator submits a pre-proposal, even when the group shares identical content or one GitHub repository.
- Git is required, but students with concerns about GitHub may use GitLab or another Git-compatible service.
- Linus Torvalds created Git, a version-control system for tracking code changes and combining work from multiple programmers.
- GitHub hosts Git repositories online, while Git itself records snapshots called commits and helps merge changes.
- Rosen uses the RimWorld Combat Extended project, with more than 19,500 commits, to illustrate how a large community contributes through pull requests.
- The command-line workflow uses commands such as git clone, git commit, and git push, but GitHub Desktop provides a more approachable interface.
- A commit records a local snapshot with a message; pushing sends the commit to the online repository.
- Rosen demonstrates how a change to an exam practice file appears on GitHub after pushing, and how commit history can restore an earlier working state.
- Each project group needs one repository, and it should be public so Rosen can access and grade it.
- A README.md introduces the project, while a .gitignore excludes files that should not be uploaded.
- Rosen recommends the permissive MIT license for student projects and contrasts it with GPL-3, which requires derivative distributions to retain the license and share source code.
- GitHub Desktop can clone a repository onto a computer so students can edit and run files locally.
- After a local README edit, Git detects modified lines; committing and pushing publishes the change to GitHub.
- Rosen adds a hello.py example and demonstrates that Git can track new files as well as edits.
- Two collaborators can work on separate functions, commit their changes, and pull one another's updates; Git can automatically merge changes to different parts of a file.
- If Alice and Bob change the same line, Git marks a conflict and displays the competing versions between conflict markers.
- The collaborator resolves the conflict by editing the file to the desired result, removing the markers, testing the code, and completing the merge before pushing.
- Rosen recommends keeping work on GitHub to create a programming portfolio and recover code from another computer if a device fails.
- A public repository also lets Rosen inspect commits and verify work history, making lost-device excuses less likely to prevent a project submission.
- Students upload the preposal.md file, confirm it renders correctly on GitHub, and submit the repository URL through Canvas.
- The proposal asks for a likely title, a short summary, a detailed description of software features, and how the program will run.
- Students define good, better, and best outcomes to distinguish a guaranteed minimum from more ambitious goals.
- The plan should identify skills and topics to research, next steps, and each collaborator's responsibilities; groups may have up to three people or work alone.
- Combining a project with another course requires approval from both instructors, especially to avoid unapproved reuse of work.
- A six-sided die function can return random.randint(1, 6), which includes both endpoints.
- Rosen runs dice.py in a terminal and prints repeated roll_d6 results to demonstrate random outcomes.
- A ten-sided die only requires changing the upper bound from 6 to 10.
- The Hawaiian pronunciation exercise is the last lab assignment before students shift their focus to the GitHub final project.
- Rosen expects to introduce regular expressions after the exam and proposal day, possibly with an extra-credit assignment.
Transcript excerpt
0:00 And the segue is well like who could we consider a programmer? And the answer is you all. Congratulations. By hitting this point in the semester, you can say with confidence that you are a programmer. Yes, you might want to attach the word novice to that or just learning. But you are programmers. I have hit, believe it or not. Um and you and we have hit the point where basically you have done the majority of what would normally be in an intruder programming course. There are some topics that would be that that would be preferred to be grabbed and like like talking about runtime efficiency and bigo notation but those typically require like mathematics that again I don't expect from a lot of you and I
0:47 prefer programming and again a lot of you I want to make sure that you know you stay interested in this stuff. Okay. Um so congratulations on making it to the semester. Um, we will be focusing on the uh on a hodgepodge of things today and tomorrow and on next Tuesday. I will be sending a number of announcements and and reminders or maybe one big one about stuff including the exact days for your exams. So, let's just kind of start with the most pending kind of things of Doom first. Okay. So, I've sent out your practice exam for the upcoming exam um which will be in your week 11 lab. So, starting Tuesday next week, right? Um the practice exam I because of the that timing, I will be
1:35 going over it on Thursday. So, um that being said, I won't be going over all the questions because as usual, I am going to include more questions in there than I actually will be going um than I
This is the start of the transcript. Save this video free for the whole transcript, searchable and time-coded.
Related notes
Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, Professor Rosen.