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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T00:17:30+00:00 2026-05-12T00:17:30+00:00

I was just running style cop against some of my code and got a

  • 0

I was just running style cop against some of my code and got a few:

SA1600: The field must have a documentation header.

Now don’t get me wrong I like style cop, it’s great when you work on a project with more then one person but this rule seems a bit excessive to me. Why would you want to add:

    /// <summary>
    /// blah blah blah
    /// </summary>

to the top of every variable. I’m pretty sure that I remember someone saying(Martin Fowler, Kent Beck..can’t really remember ATM) that comment should say “why” not “what” and I really can’t see how you can explain why on a variable.

I also find code that has comments on every variable harder to read because all you see is fluff.

My thoughts are if you have to explain what every variable is then you are really failing in terms of naming.

Does anyone else find commenting variables a bit of a code smell or is it just me.

  • 1 1 Answer
  • 1 View
  • 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-05-12T00:17:31+00:00Added an answer on May 12, 2026 at 12:17 am

    I wouldn’t say that commenting a variable is always a code smell (and it doesn’t sound like that’s what you’re saying, either). I do agree that commenting every single variable, every single time is at the very least excessive, and possibly indicative of poor naming. In fact, some would argue that any comment is a code smell, and that descriptive names and short routines are more readable and prevent the situation where code has been changed, but the comments haven’t been updated (which has certainly bitten me in a few legacy code bases). I don’t think I’d take it quite that far, but if you can write code that is self-explanatory without extra explanation, that does seem preferable.

    So yeah, basically what you said.

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

Sidebar

Related Questions

Iam running WAMP server and just enabled php_memcache extension and have tried the code
I am running into a problem that just doesn't seem right. I've got a
I have just bought a VPS running Ubuntu and I need to install the
I've got a site that I just published and have just found a bunch
I have a rails app running on Heroku. I am using paperclip for some
I am using a WPF ribbon and I have just run into some strange
I have just discovered sylecop and am running it through my projects, I have
I prefer to have the rc error-code return style of error management. I agree
I'm new to CakePHP and am just running through the configuration process, but am
I am sure this is relatively simple, I just keep running into brick walls.

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.