|
1 | 1 | +++ |
2 | 2 | date = '2025-09-12T8:00:00+08:00' |
3 | | -draft = true |
| 3 | +draft = false |
4 | 4 | title = 'English for Programmers - 02' |
5 | 5 | tags = ['English'] |
6 | 6 | +++ |
7 | 7 |
|
| 8 | +# Unit2: Code Review & Testing |
| 9 | +this unit will cover: |
| 10 | +- Differentiate between various **testing strategies** |
| 11 | +- Write **professional guidelines** |
| 12 | +- Sound more natural and smooth when **asking questions** |
| 13 | +- Use colloquial language in speaking to **give and accept feedback** |
| 14 | + |
| 15 | +## vocabulary - None Pharses 词汇: 名词短语 |
| 16 | +Testing 测试是软件开发中的重要短语, 用于检查软件是否达到特定的标准和用户需求. |
| 17 | + |
| 18 | +使用这些名词语句来证明英语名词的专业性: |
| 19 | + |
| 20 | +| None | Desciption | Example | |
| 21 | +| :- | :- | :- | |
| 22 | +| time box | an allocated period of time for completing a task | - allcate a 2-hour time box for regression testing | |
| 23 | +| stress test | a method to assess a system's performance under heavy loads | - simulate 1000 users accessing the login page at the same time | |
| 24 | +| sanity check 健全性测试 | a quick check to verify that something is as expected | - are the units of the output value correct? | |
| 25 | +| ad hoc test 临时测试 | a test performed without predefined test cases or plans | - input unexpected characters into a search bar | |
| 26 | +| edge case | a problem that only happens in extreme situations | upload an empty, 0-byte file | |
| 27 | + |
| 28 | +一些名词短语也可以当作动词使用: |
| 29 | +- Can you *sanity check* my email before I send it? I want to make sure there aren't any errors. |
| 30 | +- We have a lot to do today. Let's *time box* this meeting so we stay on sechedule. |
| 31 | + |
| 32 | +> BE CAREFUL: sanity check vs ad hoc test |
| 33 | +> *sanity check*: similar to performing a review |
| 34 | +> *ad hoc test*: exploring issues using the tester's knowledge |
| 35 | +
|
| 36 | +- Yesterday, while doing **ad hoc test**, I came across some unexpected behaviour when I was randomly interacting with the system. |
| 37 | +- Hey, I made a few changes to the codebase. Can you do a quick **sanity check** before I start testing? |
| 38 | + |
| 39 | +## Parallel Structure 平行结构 |
| 40 | +Parallel structure: Using the same grammatical structure for two or more clauses in a sentence. |
| 41 | + |
| 42 | +Example: |
| 43 | +"In our coding guidelines, we emphasise **writing** clear comments, **to follow** naming conventions, and **maintain** consistent indentation." |
| 44 | + |
| 45 | +注意到上面的动词了吗? (mixed verb forms) |
| 46 | +**writing** = gerund form 动名词形式 |
| 47 | +**to follow** = infinitive form 不定式形式 |
| 48 | +**maintain** = base form |
| 49 | + |
| 50 | +为了达到平行结构, 将动词修改为相同形式. 由于上面例子由 'emphasise' 开始, 将其改成 **-ing** 形式: |
| 51 | +In our coding guidelines, we emphasise **writing** clear comments, **following** naming conventions, and **maintaining** consistent indentation. |
| 52 | + |
| 53 | +平行结构的好处: |
| 54 | +- more professional |
| 55 | +- more effective |
| 56 | +- easier to read and follow |
| 57 | + |
| 58 | +You can apply this technique when writing: |
| 59 | +- documentation |
| 60 | +- code comments |
| 61 | +- best practices guidelines |
| 62 | + |
| 63 | + |
| 64 | +## Connected Speech 连贯的语言 |
| 65 | +When we talk in everyday conversations, our words shouln't stand alone. |
| 66 | + |
| 67 | +Instead, some sound, words and phrases are merged together in what's called connected speech. |
| 68 | +It's a natural *rhythm* and *flow* taht make conversations sound more smooth. |
| 69 | + |
| 70 | +Let's take a closer look at three different techniques that your can use while asking questions: |
| 71 | + |
| 72 | +- 同化 Assimilation |
| 73 | + 将两个音素融合形成新音素. |
| 74 | + 如"could you"中/d/与/j/融合发成/dʒ/, 形成"coujoo"的流畅发音. /d/ + /y/ = /dʒ/ |
| 75 | + |
| 76 | +- 省略 Reduction |
| 77 | + 缩短或省略特定音素. |
| 78 | + 如"who is"中/oʊ/和/ɪ/压缩为长元音/uː/, 读作"hooz" |
| 79 | + |
| 80 | +- 连读 Linking |
| 81 | + 将前词尾音与后词首音无缝连接,无停顿. |
| 82 | + 如"how about"中/w/与/ə/自然衔接, 形成连贯语流. |
| 83 | + |
| 84 | + |
| 85 | + |
| 86 | +## Code Review |
| 87 | +Tom: Hey Sophie! |
| 88 | + |
| 89 | +Sophie: Hi! How are you? |
| 90 | + |
| 91 | +Tom: All good, all good. So I've reviewed the changes that you made to the ETL pipeline. Overall, it looks great, but I've got a few points I'd like to **go over**. |
| 92 | + |
| 93 | +Sophie: Sure ok, let me **pull it up**. Ok I'm ready, go ahead. |
| 94 | + |
| 95 | +Tom: Fristly, in the data transformation phase, I noticed a nested loop structure that might impact performance when we go handle large datasets. Have you thought about optimising this bit? |
| 96 | + |
| 97 | +Sophie: Yeah, I see what you mean. So, instead of a loop, what are you thinking? |
| 98 | + |
| 99 | +Tom: I was thinking you could use a list comperhension for that part. |
| 100 | + |
| 101 | +Sophie: Ok sure, let me go back and review it and I'll **give that a go**. |
| 102 | + |
| 103 | +Tom: In terms of error handing, I noticed some areas where execptions aren't being caught properly. These are crucial since it means it's not going to crash the entire system. |
| 104 | + |
| 105 | +Sophie: Ok good point. I'll **have a go at** adding some try-except blocks here and then I'll go over the error logging to make sure we've got details if there are any exceptions. |
| 106 | + |
| 107 | +Tom: Sound good. On a positive note, I really like **how you refactored** the data loading module. It's much cleaner and easier to follow now. |
| 108 | + |
| 109 | +Sophie: Oh yeah it was a bit of a mess to be honest so it did need a good **tidy up**. Any other points? |
| 110 | + |
| 111 | +Tom: Nope I think that's everything, overall, it's **looking really solid**. I'll leave some comments on the code with everything that I've mentioned for improvement, but great work overall. Well done. |
| 112 | + |
| 113 | +Sophie: Perfect. Thank you. Thanks for the feedback. I'll get started on those and then I'll let you know when it's good to go. |
| 114 | + |
| 115 | +Tom: Alright. Thanks! Have a great day. Bye. |
| 116 | + |
| 117 | +Sophie: Yep and you! Bye. |
| 118 | + |
| 119 | +词汇解释 |
| 120 | +- **go over**: discuss |
| 121 | +- **pull it up**: open the code on my scream |
| 122 | +- **have/give a go**: try |
| 123 | +- **how you reafactored**: the changes you made |
| 124 | +- **tidy up**: reorganizing |
| 125 | +- **looking really solid**: very well structured |
0 commit comments