Variable naming

Created
Created
2020 Jan 23 7:48
Editor
Creator
Creator
Seonglae ChoSeonglae Cho
Edited
Edited
2024 Aug 14 16:54
Refs
Refs

단어 개수 일관성

3단어 안되게 함수 단어
  • 적어도 해당 context에서는 겹치지 않게
  • method
    • 겹치지 않는다면 한 단어의 4~9스펠링이 적당하다
      • project
      • organizations → orgs
    • 두단어의 {global}{local} 형태
  • 적어도 같은 context에서는 1단어거나 2단어거나 통일!
  • data 가 바뀌면(처리 전후) 부르는 용어도 달라져야함
  • list나 set이 있다면 해당 용어들 있어야
  • list 를 부르는 용어는 보통 복수
  • set을 부르는 용어는 보통 일반화
 
 
 
 
 
On Importance of Naming in Programming | Wasp
In stories, you will often find the motif of a powerful demon that can be controlled only by knowing its true name. Once the hero finds out that name, through cunning dialogue or by investigating ancient tomes, they can turn things around and banish the demon!
On Importance of Naming in Programming | Wasp

Avoid jargon for API design

Common design patterns at Stripe
If you haven’t read the previous article on the importance of design patterns, I suggest you start...
Common design patterns at Stripe
Not naming things can improve some situations.
Against Names
There are only two hard things in Computer Science: cache invalidation and naming things.
 

Recommendations