All Tracks/learn about speculation and requests/
Đang tải...
Hướng dẫn thử thách
1 / 160

Dialogue 1: Should Have Noticed That

Watch the video below to understand the context of the upcoming lessons.
Nhiệm vụ của bạn
Watch the video. # --scene-- ```json { "setup": { "background": "company2-center.png", "characters": [ { "character": "Sophie", "position": { "x": -25, "y": 0, "z": 1 } }, { "character": "Mark", "position": { "x": 125, "y": 0, "z": 1 } } ], "audio": { "filename": "B1_17-1.mp3", "startTime": 1 }, "alwaysShowDialogue": true }, "commands": [ { "character": "Sophie", "position": { "x": 25, "y": 0, "z": 1 }, "startTime": 0 }, { "character": "Mark", "position": { "x": 70, "y": 0, "z": 1 }, "startTime": 0.5 }, { "character": "Sophie", "startTime": 1, "finishTime": 6.36, "dialogue": { "text": "Hey Mark, I was reviewing your latest code submission, and I noticed a small error in the loop structure.", "align": "left" } }, { "character": "Sophie", "startTime": 6.72, "finishTime": 10.64, "dialogue": { "text": "It's not a big deal, but we should fix it before it causes problems. Can we talk about it?", "align": "left" } }, { "character": "Mark", "startTime": 10.9, "finishTime": 12.54, "dialogue": { "text": "Sure, Sophie. What did I do wrong?", "align": "right" } }, { "character": "Sophie", "startTime": 13.1, "finishTime": 17.36, "dialogue": { "text": "You used a simple for loop, but given our use case, you should have used a while loop instead.", "align": "left" } }, { "character": "Sophie", "startTime": 17.76, "finishTime": 21.72, "dialogue": { "text": "The for loop might not account for all the edge cases, which could lead to unexpected behavior.", "align": "left" } }, { "character": "Mark", "startTime": 22.08, "finishTime": 26.18, "dialogue": { "text": "Oh, I see. I should have checked the requirements more carefully. Thanks for pointing that out.", "align": "right" } }, { "character": "Sophie", "startTime": 26.54, "finishTime": 32.22, "dialogue": { "text": "No problem. You should also remember to use comments in your code. It makes it easier for others to understand what you're doing.", "align": "left" } }, { "character": "Sophie", "startTime": 32.84, "finishTime": 36.12, "dialogue": { "text": "You could have added a comment explaining why you chose a particular loop structure.", "align": "left" } }, { "character": "Mark", "startTime": 36.86, "finishTime": 42.94, "dialogue": { "text": "Got it. I should have been more thorough in my comments. I'll fix that and make sure that I use a while loop next time.", "align": "right" } }, { "character": "Sophie", "startTime": 43.62, "finishTime": 51.42, "dialogue": { "text": "Great. Also, you should have run the test suite before submitting your code. It would have caught the error early on and saved you some time. Did you run the tests?", "align": "left" } }, { "character": "Mark", "startTime": 52.06, "finishTime": 58.64, "dialogue": { "text": "No, I didn't. I should have, but I was in a hurry. I guess I should make it a habit to run the tests every time.", "align": "right" } }, { "character": "Sophie", "startTime": 59.32, "finishTime": 65.8, "dialogue": { "text": "Absolutely. It's a good practice and it helps avoid mistakes. Don't worry though. We all mess up sometimes. We all learn from our mistakes.", "align": "left" } }, { "character": "Mark", "startTime": 66.18, "finishTime": 72.62, "dialogue": { "text": "Thanks, Sophie. I appreciate your feedback. I'll correct the code and run the tests. If there's anything else I should do, let me know.", "align": "right" } }, { "character": "Sophie", "startTime": 73.12, "finishTime": 78.44, "dialogue": { "text": "Will do. Just remember to take your time and double check your work. It's better to be thorough than to rush and miss something.", "align": "left" } }, { "character": "Mark", "position": { "x": 125, "y": 0, "z": 1 }, "startTime": 78.94 }, { "character": "Sophie", "position": { "x": -25, "y": 0, "z": 1 }, "startTime": 79.44 } ] } ```
Vượt qua bài kiểm tra hiện tại để mở khóa bài tiếp theo.
main.js
UTF-8 • Tab Size: 2Kiểm tra bài:⌘↵
Test Output
Thử thách này không có bài test tự động. Hãy quan sát kết quả trực tiếp ở khung Preview.