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 8519543
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T06:16:43+00:00 2026-06-11T06:16:43+00:00

once i setup a project ,i need set codes to describe the operations result

  • 0

once i setup a project ,i need set codes to describe the operations result which return to client.

so the code be like these:

100 'succeed 
200 'failed
201 'failed because the require object doesn't exist
...

or like these:

43100 'shop buy item succeed
43201 'shop buy item failed because user doesn't have enough money
43202 'shop buy item failed because the item sold out.
...

but in real development,the return code thing didn’t go well, teammates must use dictionary to look up what’s the meaning of a code.nobody remember any of them.

so i thought why must we use number as return code? only because in our experience many protocols return digital code ,like the most famous http protocol 404,403,500,etc..

so my question is why they use number?isn’t string is better for human reading?
like ‘FileNotFound’ replace 404. or ‘success.cart.order’ which means in module ‘cart’ sub function ‘order’ the operation is success.

  • 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-11T06:16:45+00:00Added an answer on June 11, 2026 at 6:16 am

    Well, I do not know the definitive answer. For software, however, numbers have a few advantages:

    • Integral number processing is faster than string processing and numbers need less storage for messages (both in memory or over a wire).
    • Numbers have allowed you to use switch / jump-tables for decades (faster processing too).
    • Typos are less subtile with numbers. You are less likely to make mistakes like using FileNotfound instead of FileNotFound.
    • In memory string tend to be stored in a lot of different ways. I guess numbers reduce interoperability issues, too.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to setup a CodeIgniter based project for local development (LAMP stack), and once
For a project of mine, I need two properties to be set at the
For a new project that I'm working on I need to set up a
I've been trying to set up a project using bitbucket which has project dependencies
I have a project that we need to set up a simple branching strategy
I have an array of checkboxes that I edit at once to set up
Once the structure of a repository is set up, i.e. trunk, branches, tags, is
I'm currently using the Visual Studio Installer (Setup Project) in Visual Studio 2010 as
I'm working on a project that is using code from an OpenSource project. One
I have a project hosted on GitHub and I would like to work locally

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.