- The Stack @ Speak Tech English
- Posts
- Could You Describe This Code In English?
Could You Describe This Code In English?
English for Coding #1: Verbs
π€ VERBS TO DESCRIBE CODE
How would you describe this out loud?
def count_even(nums):
count = 0
for num in nums:
if num % 2 == 0:
count += 1
return count
We initialise the counter at 0
Then we loop through the list of numbers
For each number, we check if itβs even
If it is, we increment the counter by 1
Finally, we return the total count
Why use βweβ? The inclusive 'we' creates collaboration, it's 'we as developers' working through the issue together - itβs common in tutorials or when giving instructions.
Why use active voice? Active voice makes it crystal clear WHO does WHAT. "We sort the array" is clearer than "the array is sorted", it shows the program is controlled by us, not mysterious magic.
When is passive voice okay? When the action matters more than the actor: "Data is encrypted" or "Errors are logged" for automatic processes.
π οΈ TOOLS WE RECOMMEND
Never lose another code snippet, query or link!
Copyber is a privacy-first desktop clipboard manager. Search your history, preview code or links, and organize everything into Spaces, with AI-powered workflows coming soon.
Want more interviews?
Reztune rewrites your resume for each job: fixing grammar, improving clarity, and making it sound native-level professional. ATS-optimized so you stand out and land more interviews.
π§ QUIZ: Do you know your coding verbs?
Question 1
What does increment mean?
Question 2
Fill in the gap: A loop is used to _____ over a collection of items.
Question 3
Put these words in the correct order to make a sentence: users / filter / we / out / inactive
β Show Answers
THANKS FOR READING π
π£ Refer our newsletter. If one person subscribes, you will receive the following:
| ![]() |
What did you think of today's email? π€ |
Quiz Answers: 1) To increase by an amount. 2) Iterate. 3) We filter out inactive users.
Reply