编程常用英语

好的命名能使代码逻辑一目了然、心情舒畅。日常在命名变量上花费了大量精力。本文记录常用的命名单词,以备查阅:

名词
  • count (用于表示集合中元素的个数)
  • size
  • length (文件的长度等)
  • capacity
  • info
  • element, item
  • position
  • helper
  • utils
  • duration
辅助词
  • previous, next (空间上)
  • last, next (时间上)
  • first, last,current
  • before, after
  • item, element,
  • old, new (oldChar, newChar)
状态
  • IsBusy,
  • IsEmpty,
  • HasValue,
  • CanRead, CanWrite
  • Exists,
  • Invalid
  • Contains
  • Available
  • buffer
词根
  • Uni-  (UniCode)
  • En- (Enqueue)
  • De- (Dequeue)
  • Dis-
  • -wise (--层面, memberwise, bitwise)
  • free- (免费,不限)freeSpeed
配对动作
  • Get,Set,
  • Read,Write,
  • Send, Receive,
  • Add, Delete,
  • Start,Stop,Cancel,
  • Begin,End,带begin和end的多为异步操作。
动作
  • Create 创建,
  • Delete 删除,
  • Load 加载
  • Clear
  • GetType 获取类型。
  • DoWork,
  • ProgressChanged,
  • RunWorkerCompleted, 运行、执行用Run
  • ReportProgress,
  • RunWorkerAsync,开始执行后台操作。
  • CancellationPending,
  • CancelAsync,取消挂起的后台操作。
  • WorkerSupportsCancellation,
  • InitializeBackgroundWorker, 初始化
  • StartAsyncButton,
  • GetLastAccessTime,
  • Operation
  • earlier than, the same time, later than, less than,
  • validity check,
应用
  • display data
  • shape data (sort, filter, group,summary,calculation, cell merging ,etc)
  • edit data
  • traditional
  • original
  • mono 单声道
  • recent time
  • engine, model, handle

 

 
 

转载于:https://my.oschina.net/u/3799206/blog/1647409

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值