iT邦幫忙

2025 iThome 鐵人賽

DAY 7
0
佛心分享-IT 人的工作軟技能

English for Software Developers系列 第 7

Day 7 - Coding-related glossary / 寫程式相關術語

  • 分享至 

  • xImage
  •  

When you are in coding interviews, you often need to explain your code. This article will help you express your thoughts clearly and explain your code effectively in English.

Variables / 變數

  • declare a variable 宣告變數
  • redeclare a variable 重複宣告變數
  • initialize a variable 初始化變數
  • assign a value to a variable 賦予一個值給變數(第一次賦值)
  • reassign a variable 重新賦值給變數(已有值 → 改變值)
  • variable scope 變數作用域
  • global variable 全域變數
  • local variable 區域變數
  • naming convention 命名慣例、規則(如 camelCase)
  • type coercion 型別強制轉換
  • case sensitive 區分大小寫
  • data type 資料型別

Function / 函式

  • declare a function 宣告函式
  • call(invoke) a function 呼叫函式
  • constructor function 建構函式
  • anonymous function 匿名函式
  • callback function 回呼函式
  • recursive function 遞迴函式
  • pass arguments to a function 傳入參數給函式
  • return a value from a function 從函式回傳一個值
  • void / no return value 無回傳值
  • parameter 參數,函式定義中列出的輸入變數
  • argument 引數,呼叫函式時實際傳入的值(通常與參數對應)
  • set a default parameter 設定參數預設值

Loop / 迴圈

  • loop/iterate over an array 對陣列進行迴圈
  • break/jump out of the loop 跳出迴圈
  • skip the current iteration 略過目前這次執行
  • continue to the next iteration 執行下一次遍歷
  • nest loops 巢狀迴圈

Data manipulation / 資料操作

Number

  • floating-point number 浮點數
  • round a number 四捨五入數字
  • floor a number 無條件下取整數 (floor(3.6) = 3,floor(-2.2) = -3)
  • ceil a number 無條件上取整數 (ceil(3.6) = 4,ceil(-2.2) = -2)
  • convert string to number 字串轉數字

String

  • concatenate strings 連接字串
  • extract substrings 擷取部分字串
  • trim a string 去除字串空白
  • split a string 分割字串
  • search for a substring 搜尋子字串

Array

  • access an array element 取得陣列元素
  • append an element 新增元素
  • remove an element 移除元素
  • find the index of an element 查找元素索引
  • map over an array 映射陣列元素

Object / Key-value pair

  • insert key-value pair 插入鍵值對
  • get value by key 取值
  • update a value 更新值
  • delete a key 刪除鍵
  • check if a key exists 檢查鍵是否存在
  • iterate over keys/values 遍歷鍵/值

Others

  • data validation 資料驗證
  • data format conversion 資料轉換格式
  • data visualization 資料視覺化
  • convert to uppercase/lowercase 轉為大寫/小寫字母
  • check for equality/inequality 檢查相等/不相等
  • parse a JSON file 解析 JSON 檔案
  • convert data type 轉換資料型別
  • serialize data 將資料序列化
  • deserialize data 反序列化資料

Serialization means to convert an object into that string, and deserialization is its inverse operation (convert string -> object).

Error handling / 錯誤處理

  • throw an exception 拋出例外
  • catch an exception 捕捉例外
  • trigger an exception 觸發例外
  • breakpoint 中斷點
  • step through code 逐步執行程式碼
  • handle an error 處理錯誤
  • exception handling 例外處理
  • try block 嘗試區塊
  • catch block 捕捉區塊

Others / 其他

  • add comments 加上註解
  • fix / correct the code 修正程式
  • debug the code 除錯
  • check for edge cases 檢查特殊情況
  • optimize the code 優化程式碼

上一篇
Day 6 - Communication and Collaboration Phrases Part 3 / 溝通合作用語 Part 3
下一篇
Day 8 - English expressions for describing growth and reduction / 談論增加減少的英文句子和片語
系列文
English for Software Developers8
圖片
  熱門推薦
圖片
{{ item.channelVendor }} | {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言