고객이 원하는 첨가물이란 뜻을 가진 변수를 어떻게 지을 수 있을까요?

thehjh93의 이미지

안녕하세요 ^^;

고객이 원하는 첨가물이란 뜻을 가진 변수명을 어떻게 지을 수 있을까요?

customer, want, condiment 이 3가지를 조합해야할 것 같은데..

condimentCustomerWants

이렇게 관계 대명사를 쓰자니 다른 코드에서 본 적이 없는 것 같아서..

어색해보이고...(제가 못본걸까요..;)

Head First Design Pattern에선 customerWantsCondiment라고 쓰긴 하던데..

변수 이름이 문장이면 뭔가 또 어색해보이는 것 같고...



으.. 다른 분들은 어떻게 지으실지 궁금해서 이렇게 글 올려봅니다

답변 부탁드리겠습니다

snowall의 이미지

cwc라고 짓고 주석을 붙입니다.

피할 수 있을때 즐겨라! http://melotopia.net/b

rookey94의 이미지

저라면 동일한 방법으로 사용할 것 같습니다.
왠만하면 변수의 그 사용 의도가 들어갈수 있도록...

고객은 원하는 첨가물들은 계속 추가될테니...ㅋㅋ
customer-> cus_ 로 축약하고...^^;;

cus_WantsCondiment
cus_WantsNeeds
cus_WantsMoney

익명 사용자의 이미지


condiment라는 단어는 잘 안쓰이는 (전문) 단어인데요..
양념, 향신료, 조미료 라는 뜻이네요..

관련도메인이라면 사용하셔도 되겠지만, 첨가물이라는 일반적인 뜻은 아니네요..

주로 리눅스 환경의 프로그램이라면,
added_by_customer 또는 cust_add

윈도우 프로그램이라면,
addedByCustomer

정도로 하겠네요..

익명 사용자의 이미지

만약에 "고객이 원하는 첨가물" 의 의미가, 그 application을 만들어 달라고 한 고객이 개발자에게 요구해서 첨가한 것이라면, 이름을 그렇게 짓는것 자체가 잘못된 일이고요 (실제 프로그램 상에서 하는 역할에 맞춰서 이름을 짓는게 낫다고 보고요...)

그게 아니라 실제로 개발하고 있는 application 내에 '고객' 이라는 객체가 있고 거기서 요청해서 추가된 것 이라면
optionsRequestedByCustomer 혹은 addendumByUser 등이 되겠지만 (위에서 말씀하신 addedByCustomer도 좋고요) 실제로 추가되는 "것" 이 뭔지를 잘 생각해서 좀 더 구체적으로 이름을 짓는게 좋겠습니다.

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.