Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8328961
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T01:36:40+00:00 2026-06-09T01:36:40+00:00

I want to make a variable that is condiments that the customer wants. I

  • 0

I want to make a variable that is condiments that the customer wants.

I thought ‘condimentCustomerWants’ is okay

But I would never see variable name that contains relative pronouns in other’s codes.

So I asked to my friends, and he recommended ‘customerWantsCondiment’, which is sentence.

Hmm.. which name is proper, good, and readable?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T01:36:41+00:00Added an answer on June 9, 2026 at 1:36 am

    HOW you name your variables is entirely up to you, however they should always reflect what the variable is actually supposed to do.

    If it is: ‘Does the customer want a condiment’, you’d want:
    CustomerWantsCondiment (true/false value, probably a boolean)

    If it is: ‘Which condiment does the customer want?’, you’d want:
    CondimentCustomerWants (for example an int value)

    They sound similar, but both have different meanings.
    Whatever works best for you, really.

    You may also want to adhere to a variable name convention, starting your variable name with a letter, that indicates the type of the variable. That way, you will know the type of a variable at a glance, without having to look for the actual definition.
    Please note, that the introducing letter(s) are always lower case.

    For example:
    bool bCustomerWantsCondiment;
    int iCustomerWantsCondiment;
    char *sCustomerWantsCondiment;
    etc.

    For more information regarding the hungarian notation, please look here for example:
    http://en.wikipedia.org/wiki/Hungarian_notation

    Also, for readability, you should use the ‘CamelCase’ convention. That means, each time you begin a new word in the variable name, start it with a capital letter.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a member variable that in a class that I want to make
I have variable that store data datetime UTC from database. I want to make
I want to make an instance variable that can't be accessed from outside. Is
I have this variable: var _inputs = document.getElementsByTagName('input'); But I want to make a
I want to make a variable global to more than 2 files so that
I want to make a variable length array in Javascript. Is this possible. A
I want to make a points plot with ggplot2 geom_point where a continuous variable
I want to pass a variable as text or somehow to make above function
I have style sheet with a class name changebackgroundcolor i want make change in
I have the following code that I want to return to a variable t

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.