πΒ μλ° λ³μλ camelCaseλ‘ μμ±νλ€.
πΒ νμ΄μ¬ μΌλ° λ³μλ lower snake_caseλ‘ μμ±νλ€.
πΒ νμ΄μ¬ ν΄λμ€μμΒ privateμμ±μ κ°μ§ λ³μλ μ΄λ¦ μμ _(μΈλμ€μ½μ΄)λ₯Ό μ¬μ©νμ¬ νννλ€.
πΒ νμ΄μ¬μμ λΆνμν 곡백μ μ§μ. μΌν, μ½λ‘ , μΈλ―Έμ½λ‘ μ΄ λμ¨ νμλ§ κ³΅λ°±μ μ¬μ©νλ€.
πΒ νμ΄μ¬ import μ fromμ μ¬μ©νμ¬ μ°μμ μΌλ‘ λνλΈλ€.
πΒ μ¬μ©νμ§ μμ λ³μλ __(μΈλμ€μ½μ΄ 2κ°)λ‘ νννλ€.
πΒ final λ³μλ λλ¬Έμλ‘ μμ±νλ€.
πΒ DB ν
μ΄λΈ μμ±λͺ
μ snake_caseλ‘ νλ€.
πΒ ν΄λμ€μ 첫 μμ μ€ ν μ€μ λμ΄λ€.
πΒ νμ΄μ¬ μ£Όμμ λλΈμΏΌν°λ₯Ό 3κ° μ¬μ©νλ€
πΒ λ³μ μ€λͺ
μ£Όμμ λ³μ μμ μμ±νλ€.
πΒ λ©μλ μ€λͺ
μ£Όμμ ν΄λΉ λ©μλμ μ΄λ
Έν
μ΄μ
μμ μμ±νλ€.
μ΅μ’
μμ - Java
/**
* @author κΉνμ°½
*/
public class Main {
int p; // λ³μ p
int ti; // λ³μ ti
/**
* λ μλ₯Ό λ§€κ²λ³μλ‘ λ°μμ λν κ²°κ³Όλ₯Ό 리ν΄νλ λ©μλ
* @param a int, λν κ°
* @param b int, λν κ°
* @return int, aλ³μμ bλ³μλ₯Ό λν κ²°κ³Ό
*/
public int add(int a, int b) {
return a + b;
}
}
μ΅μ’
μμ - python
"""
@author κΉνμ°½
"""
class Main:
"""
λ μλ₯Ό λ§€κ²λ³μλ‘ λ°μμ λν κ²°κ³Όλ₯Ό 리ν΄νλ λ©μλ
:param: a int, λν κ°
:param: b int, λν κ°
:return: int, aλ³μμ bλ³μλ₯Ό λν κ²°κ³Ό
"""
def add(self, a, b):
return a+b