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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T14:46:37+00:00 2026-05-11T14:46:37+00:00

Jeff finished his post talking about this, but I don’t catch the idea. So,

  • 0

Jeff finished his post talking about this, but I don’t catch the idea.

So, why do you think this is a bad coding style?

EDIT:

I, as a lot of you, don’t think that it is a bad coding style. But Jeff is far better programmer than me, and his point of view turned on lights on my head to get answering if I was wrong. I was a Delphi developer for some few years and am becoming a C# developer now, and in Delphi it was a common practice.

  • 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. 2026-05-11T14:46:37+00:00Added an answer on May 11, 2026 at 2:46 pm

    All caps is the traditional C designation of a preprocessor macro constant. It’s very useful to have these in a different namespace from anything else, since the preprocessor will substitute wherever it finds the name, regardless of things like scope.

    A constant in the sense that Jeff was using is, semantically, a variable that can’t be changed. It obeys all scoping principles and everything, and is semantically identical to a non-const variable with the same value.

    To put this another way,

    #define max_length 5 

    is a problem because somebody might use max_length as a variable in a different context, where it would normally be safe, while

    const int max_length = 5; 

    is simply a variable declaration. Therefore, there’s an advantage in using

    #define MAX_LENGTH 5 

    because the convention is that only preprocessor constants are all-caps, so it will not interfere with any other use.

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

Sidebar

Related Questions

Jeff actually posted about this in Sanitize HTML . But his example is in
Jeff mentioned the concept of 'Progressive Enhancement' when talking about using JQuery to write
Jeff Atwood wrote about this here , and while I understand the theoretical performance
Jeff has previously blogged about using the cache to perform "out of band" processing
Jeff wrote about getting a file version/datestamp a while back. Visual studio doesn't increment
Recently Jeff has posted regarding his trouble with database deadlocks related to reading. Multiversion
I recently printed out Jeff Atwood's Understanding The Hardware blog post and plan on
I really enjoyed Jeff's post on Spartan Programming . I agree that code like
Let me apologize in advance for the simplicity of this question (I heard Jeff's
Suppose I have this data: Employee Task IsCurrent -------- ---- --------- Jeff 1 Yes

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.