Skip to content

Commit 7085208

Browse files
author
Aditya Shrivastava
committed
2 parents b9fd880 + 5311a4c commit 7085208

File tree

11 files changed

+564
-96
lines changed

11 files changed

+564
-96
lines changed

docs/_data/schedule.yaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -289,11 +289,11 @@
289289
- date: Tue Feb 04
290290
homework:
291291
deadline: 'February 11, 2025'
292-
link: ''
293-
name: 'HW3: Working with GitHub'
292+
link: 'assignments/hw3-25'
293+
name: 'HW3: GitHub Basics'
294294
numDays: 5
295295
lecture:
296-
link: ''
296+
link: 'https://github.com/CMU-17-356/cmu-17-356.github.io/raw/refs/heads/main/docs/assets/pdfs/Lecture7.pdf'
297297
name: 'Coding as a Team Part 1'
298298
reading:
299299
link: ''
@@ -325,11 +325,11 @@
325325
- date: Thu Feb 06
326326
homework:
327327
deadline: 'February 27, 2025'
328-
link: ''
328+
link: 'project/p1'
329329
name: 'P1: Project Specification'
330330
numDays: 15
331331
lecture:
332-
link: ''
332+
link: 'https://github.com/CMU-17-356/cmu-17-356.github.io/raw/refs/heads/main/docs/assets/pdfs/Lecture8.pdf'
333333
name: 'Coding as a Team Part 2'
334334
reading:
335335
link: ''
@@ -371,20 +371,20 @@
371371
link: ''
372372
name: ''
373373
recitation:
374-
handout: ''
374+
handout: 'recitations/reci5-testing'
375375
name: 'Unit testing'
376376
quiz: ''
377377
slides: ''
378378

379379
- date: Tue Feb 11
380380
homework:
381381
deadline: 'February 18, 2025'
382-
link: ''
382+
link: 'assignments/hw4-25'
383383
name: 'HW4: Testing'
384384
numDays: 5
385385
lecture:
386-
link: ''
387-
name: 'Testing'
386+
link: 'https://github.com/CMU-17-356/cmu-17-356.github.io/raw/refs/heads/main/docs/assets/pdfs/Lecture9.pdf'
387+
name: 'Code Review'
388388
reading:
389389
link: ''
390390
name: ''
@@ -420,7 +420,7 @@
420420
numDays: 0
421421
lecture:
422422
link: ''
423-
name: 'Test Automation and CI/CD'
423+
name: 'Testing'
424424
reading:
425425
link: ''
426426
name: ''

docs/_data/this_week.yaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
last_homework:
22
date: ""
3-
deadline: "Tues Feb 4 @ 11:59pm"
3+
deadline: "Tues Feb 11 @ 11:59pm"
44
link: ""
5-
name: "P0: Team Contracts"
5+
name: "HW3: Working with Github"
66
numDays: 1
77

88
lectures:
9-
- date: Tue Feb 4
9+
- date: Tue Feb 11
1010
link: ""
11-
name: "Coding as a Team Part 1"
12-
- date: Thu Feb 6
11+
name: "Testing"
12+
- date: Thu Feb 13
1313
link: ""
14-
name: "Coding as a Team Part 2"
14+
name: "Test Automation and CI/CD"
1515

1616
next_homework:
1717
date: ""
18-
deadline: "Tue Feb 11 @ 11:59pm"
18+
deadline: "Tue Feb 18 @ 11:59pm"
1919
link: ""
20-
name: "HW3: Working with Github"
20+
name: "HW4: Testing"
2121
numDays: 5
2222

2323
recitation:
24-
date: Fri Feb 7
24+
date: Fri Feb 14
2525
handout: ""
26-
name: "Github Basics"
26+
name: "Unit Testing"
2727
quiz: ""
2828
slides: ""

docs/assets/pdfs/Lecture7.pdf

132 Bytes
Binary file not shown.

docs/assets/pdfs/Lecture8.pdf

2.42 MB
Binary file not shown.

docs/assets/pdfs/Lecture9.pdf

2.1 MB
Binary file not shown.

docs/assignments/hw3-25.md

Lines changed: 37 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,40 @@
1-
# Homework 3: Github basics
1+
# Homework 3: GitHub Basics
22

33
## Learning goals
44

5-
- Get comfortable with Github if you aren't already
5+
- Get comfortable with GitHub if you aren't already
66
- Think about secure development practices
77
- Practice simple code review
88

99
## Project context
1010

11-
You and your team have access to a basic calculator app through Github classroom. Over the next three assignments, you'll (1) set up the repo and merge a few simple PRs (2) deploy the application and set up automated deployments and (3) write tests and create a continuous integration (CI) pipeline. **You should apply the development processes you learn here to your prototype product.**
11+
You and your team have access to a basic calculator app through GitHub classroom. Over the next three assignments, you'll (1) set up the repo and merge a few simple PRs (2) deploy the application and set up automated deployments and (3) write tests and create a continuous integration (CI) pipeline. **You should apply the development processes you learn here to your prototype product.**
1212

1313
## Assignment instructions
1414

1515
In this assignment, you'll set up your local development environment, securely configure your repo, make a PR, and review your teammates' PRs.
1616

1717
You'll notice that a number of these steps address *security operations*. Why bother with a secure setup? Well, if you actually build a successful company, you (and your software!) become a target. If an attacker can gain write access to your source code, for example, they can insert backdoors that let them hold services ransom, steal user data, or even steal money. This opens you up to a world of legal and financial pain---but luckily, there are really simple things you can do that significantly raise the barrier for attackers. This assignment touches on several of them.
1818

19-
### 1. Configure Github with (non-SMS) 2FA
19+
### 1. Configure GitHub with (non-SMS) 2FA
2020

21-
Having a 2FA method makes it vastly harder for attackers to compromise your Github account and impersonate you.
21+
Having a 2FA method makes it vastly harder for attackers to compromise your GitHub account and impersonate you.
2222

23-
Follow [these instructions](https://docs.github.com/en/authentication/securing-your-account-with-two-factor-authentication-2fa/configuring-two-factor-authentication) to set up two-factor authentication for your Github account. **This 2FA method must not be text message/SMS**. We reccomend [FIDO](https://fidoalliance.org/specs/u2f-specs-master/fido-u2f-overview.html) if possible, and [TOTP](https://datatracker.ietf.org/doc/html/rfc6238) as a backup option.
23+
Follow [these instructions](https://docs.github.com/en/authentication/securing-your-account-with-two-factor-authentication-2fa/configuring-two-factor-authentication) to set up two-factor authentication for your GitHub account. **This 2FA method must not be text message/SMS**. We reccomend [FIDO](https://fidoalliance.org/specs/u2f-specs-master/fido-u2f-overview.html) if possible, and [TOTP](https://datatracker.ietf.org/doc/html/rfc6238) as a backup option.
2424

2525
#### Turn in instructions
2626

27-
When you have done so, navigate to your Github profile; under Settings and Authentication, take a screenshot of the Preferred 2FA Method box that includes both the 2FA method and your username. Do not include anything else in the screenshot (this is possible due to the layout of the page).
27+
When you have done so, navigate to your GitHub profile; under Settings and Authentication, take a screenshot of the Preferred 2FA Method box that includes both the 2FA method and your username. Do not include anything else in the screenshot (this is possible due to the layout of the page).
2828

29-
### 2. Configure Github with SSH
29+
### 2. Configure GitHub with SSH
3030

31-
Using SSH for Github authentication is both more secure and more convenient than using password authentication.
31+
Using SSH for GitHub authentication is both more secure and more convenient than using password authentication.
3232

33-
Follow [these instructions](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/about-ssh) to set up a new SSH key with Github if you haven't already. Specifically, you will:
34-
- [Generate a new SSH key](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent). Make sure to [use a passphrase](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/working-with-ssh-key-passphrases).
35-
- [Add the SSH key to your account](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account).
36-
- [Test that everything worked](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/testing-your-ssh-connection).
33+
Follow [these instructions](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/about-ssh) to set up a new SSH key with GitHub if you haven't already. Specifically, you will:
34+
35+
1. [Generate a new SSH key](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent). Make sure to [use a passphrase](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/working-with-ssh-key-passphrases).
36+
2. [Add the SSH key to your account](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account).
37+
3. [Test that everything worked](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/testing-your-ssh-connection).
3738

3839
#### Turn in instructions
3940

@@ -47,13 +48,21 @@ To get ten bonus points, [configure commit signing](https://docs.github.com/en/a
4748

4849
Submit a screenshot of your signed commits and your description.
4950

50-
### 3. Clone the calculator repo onto your local machine
51+
### 3. Create your GitHub classroom team.
52+
53+
One person on your team should go to this [GitHub Classroom](https://classroom.github.com/a/2g4EHsgQ) link to create your team. Be sure to select all of your team's members. Check to see if your team name already exists in the Software Engineering for Startups organization before creating a new one.
5154

52-
When you navigate to the Code tabe, make sure you use the SSH tab, not the HTTPS tab. This will clone the repo using the SSH authentication flow.
55+
This will create a shared repository for all members of your team. All of the instructors will have admin access to your new repository.
5356

5457
**There is no deliverable for this step.**
5558

56-
### 4. Configure branch protection
59+
### 4. Clone the calculator repo onto your local machine
60+
61+
When you navigate to the Code tab, make sure you use the SSH tab, not the HTTPS tab. This will clone the repo using the SSH authentication flow.
62+
63+
**There is no deliverable for this step.**
64+
65+
### 5. Configure branch protection
5766

5867
As it stands, anyone with access to your repo can push whatever garbage they want to the main branch. That's not good! It's important to make sure code that actually gets deployed has been thoroughly tested and reviewed (to catch everything from mistakes to intentional back doors!). In this assignment, you'll focus on code review; in a future assignment, you'll block merges to main until your code passes CI.
5968

@@ -63,7 +72,7 @@ To protect your main branch, navigate to the Settings tab in the calculator repo
6372

6473
Take a screenshot of your branch protection rules; we'll also check the repository directly.
6574

66-
### 5. Configure pull requests
75+
### 6. Configure pull requests
6776

6877
Your main history is much easier to track if all commits to main are uniform. Different teams have different preferences for this configuration, but in this class, we'll require [squash merging](https://learn.microsoft.com/en-us/azure/devops/repos/git/merging-with-squash?view=azure-devops) for a clean history; this is a very common configuration.
6978

@@ -73,37 +82,38 @@ Navigate to the General settings. Under Pull requests, uncheck merge commits and
7382

7483
Take a screenshot of your repo's PR settings.
7584

76-
### 6. Run the calculator app locally
85+
### 7. Run the calculator app locally
7786
Follow the instructions in the **README** to set up and run the calculator on your machine. You can choose to deploy the app locally using either Docker or npm, depending on your preference. Ensure everything is working before proceeding with any modifications.
7887

7988
**There is no deliverable for this step.**
8089

81-
### 7. Add a piece of functionality to the calculator
90+
### 8. Add a piece of functionality to the calculator
8291

8392
You will add a new piece of calculator functionality [*in a new branch*](https://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging). Then, you will [open a pull request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request?tool=webui) (PR) so that your teammates can review and approve your changes.
8493

85-
Choose one of the following functionality: (Coordinate with your teammates to ensure no two members implement the same functionality.)
86-
1. **Backward Button**: Add a button that allows users to remove the last entered character in the calculator input field.
87-
2. **Custom Pop-up for Invalid Expressions**: Display a pop-up window when the user enters an invalid expression.
88-
3. **Brackets Support**: Add "(" and ")" buttons and ensure expressions with brackets are correctly handled.
89-
4. **Expression History Display**: Show a list of previously calculated expressions in the frontend. The list should reset when the browser is refreshed.
90-
5. **Backend Logging**: Log all expressions sent to the backend into a local file. The log should persist even after the browser is refreshed.
94+
Each team member should choose one of the following features. Coordinate with your teammates to ensure no two members implement the same functionality.
95+
96+
1. **Backward Button**: Add a button that allows users to remove the last entered character in the calculator input field.
97+
1. **Custom Pop-up for Invalid Expressions**: Display a pop-up window when the user enters an invalid expression.
98+
1. **Brackets Support**: Add "(" and ")" buttons and ensure expressions with brackets are correctly handled.
99+
1. **Expression History Display**: Show a list of previously calculated expressions in the frontend. The list should reset when the browser is refreshed.
100+
1. **Backend Logging**: Log all expressions sent to the backend into a local file. The log should persist even after the browser is refreshed.
91101

92102
Use your PR message to clearly describe the changes you've made to the calculator app.
93103

94104
#### Turn in instructions
95105

96106
Please provide us a link to your PR.
97107

98-
### 8. Review at least two PRs
108+
### 9. Review at least two PRs
99109

100110
Following the best practices we discussed in class, leave two reviews on your teammates' PRs. If there issues, continue to discuss in the comments until you're satisfied with the changes and able to approve the pull requests.
101111

102112
#### Turn in instructions
103113

104114
Please provide two or more links to your reviews.
105115

106-
### 9. Merge your reviewed PR
116+
### 10. Merge your reviewed PR
107117

108118
Finally, once your PR has been approved, [merge it](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/merging-a-pull-request).
109119

0 commit comments

Comments
 (0)