Skip to content

Commit 4b3b698

Browse files
committed
Merge remote-tracking branch 'upstream/main'
2 parents 3f429ab + 73e5c18 commit 4b3b698

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+22185
-1
lines changed

lesson_05/README.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,22 @@ Please review the following resources before lecture:
1313

1414
## Homework
1515

16-
- TODO(anthonydmays): Write details here.
16+
- [ ] Write [user stories](#writing-user-stories).
17+
- [ ] [Submit a new bug](#submitting-bugs) to the repository.
18+
- [ ] Do pre-work for [lesson 06](/lesson_06/).
19+
20+
### Writing user stories
21+
22+
Write three user stories for any software of your choosing, existing or totally made up. Provide your responses in a README file that you create within your own uniquely named directory.
23+
24+
### Submitting bugs
25+
26+
Find three bugs in the [UTasks online todo app][buggy-app] (need to create an account). Write up two GitHub issues in our Code Differently repository containing the following elements:
27+
28+
* A brief description of the problem.
29+
* Detailed steps to reproduce the issue in a numbered list.
30+
* The outcome you expected as a result of doing the steps.
31+
* The actual result you got that was unexpected.
32+
* At least one of your bugs must include a screenshot.
33+
34+
[buggy-app]: https://utasks-main.web.app/

lesson_06/README.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Lesson 06: Statements and Variables ([Slides](https://code-differently.github.io/code-differently-24-q4/slides/#/lesson_06))
2+
3+
## Pre-work
4+
5+
Please review the following resources before lecture:
6+
7+
* [Typescript for Beginners - Starter Lesson (Video)](https://www.youtube.com/watch?v=MOO5vrtTUTE&list=PL0Zuz27SZ-6NS8GXt5nPrcYpust89zq_b&index=1)
8+
9+
## Homework
10+
11+
- [ ] Complete the [Expression Calculator](#expression-calculator) exercise.
12+
- [ ] Read article entitled [3 Questions That Will Make You A Phenomenal Rubber Duck][article-link]
13+
- [ ] Do pre-work for [lesson 07](/lesson_07/).
14+
15+
### Expression Calculator
16+
17+
For this assignment, you will need to implement the functions and logic required to calculate a mathematical expression. After implementing the `add`, `divide`, and `multiply` functions, you will combine these functions to compute the final result.
18+
19+
1. Update the [.env.test][env-file] file to configure the correct homework version.
20+
```bash
21+
# Example config for students assigned to homework "D".
22+
HW_VERSION=D
23+
```
24+
2. Run the program to determine the expression you must implement.
25+
```bash
26+
npm run compile
27+
npm start
28+
```
29+
1. Update the code in the [expression_calculator.ts][calculator-file] file.
30+
2. To check your work, you can run the application using the first command below and run the tests using the second one.
31+
```bash
32+
npm start
33+
```
34+
1. As usual, make sure that you format your code and run the check command before creating your pull request.
35+
```bash
36+
npm run check
37+
```
38+
1. You must only submit changes to the `expression_calculator.ts` file to receive full credit.
39+
40+
[article-link]: https://blog.danslimmon.com/2024/01/18/3-questions-that-will-make-you-a-phenomenal-rubber-duck/
41+
[calculator-file]: ./expression/src/expression_calculator.ts
42+
[env-file]: ./expression/.env.test

lesson_06/expression/.editorconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 2
6+
end_of_line = lf
7+
charset = utf-8
8+
insert_final_newline = true

lesson_06/expression/.env.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
HW_VERSION=your assigned version here

lesson_06/expression/.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
build/

lesson_06/expression/.prettierignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Ignore artifacts:
2+
build
3+
coverage

lesson_06/expression/.prettierrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

lesson_06/expression/eslint.config.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// @ts-check
2+
3+
import eslint from "@eslint/js";
4+
import tseslint from "typescript-eslint";
5+
import eslintConfigPrettier from "eslint-config-prettier";
6+
7+
export default tseslint.config(
8+
eslint.configs.recommended,
9+
...tseslint.configs.strict,
10+
...tseslint.configs.stylistic,
11+
eslintConfigPrettier,
12+
{
13+
ignores: ["build"],
14+
},
15+
);

lesson_06/expression/jest.config.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/** @type {import('ts-jest').JestConfigWithTsJest} **/
2+
export default {
3+
testEnvironment: "node",
4+
transform: {
5+
"^.+.tsx?$": ["ts-jest", { useESM: true }],
6+
},
7+
moduleNameMapper: {
8+
"^(\\.\\.?\\/.+)\\.js$": "$1",
9+
},
10+
extensionsToTreatAsEsm: [".ts"],
11+
};

0 commit comments

Comments
 (0)