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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T21:55:47+00:00 2026-06-01T21:55:47+00:00

At this moment, i am writing tests to handle comparisons between different KVPair classes,

  • 0

At this moment, i am writing tests to handle comparisons between different KVPair classes, where content differs by the amount of white space in either KVPair.

I am constructing objects as follows:

k = "remember";
v = "It's not a lie, if you believe it";
remember_SingleSpaceOnTargetNoSpaceOnSource = new KVPair(k, v); // notice var name
...

This quickly broke down when i had to create more complex tests.

How would you name a variable, key characteristic of which is space2Tabs3SpacesContent and still have an idea what this means a month from now?

Ultimately as part of my tests, i need to cover cases of:

{various spaces} content {various spaces}
content {various spaces}
{various spaces} content

Any suggestions on how to best structure this for ease of testing?

  • 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-01T21:55:49+00:00Added an answer on June 1, 2026 at 9:55 pm

    If this variable is local (used inside single sub or function), I would use comments, since it is really hard to put all the meaning into the name.
    For example

    // this var stores something .../indicates something .../just for lulz here :)
    var space2Tabs3SpacesContent 
    

    Using comments is the best way to remember something in two months 😉

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

Sidebar

Related Questions

At the moment I write stored procedures this way: create proc doStuff @amount int
I'm writing some unit tests for my View Model class. The constructor of this
At this moment I use this scenario to load OpenGL texture from PNG: load
Till this moment I used this method to invoke: public string AddText { set
Up to this moment I was using simple arrays to enter and get necessary
I have two nested loop in XSL like this, at this moment I use
This is how I do it at the moment. I try to open the
This is what I have at the moment. <h2>Information</h2>\n +<p>(.*)<br />|</p> ^ that is
This seems to be defeating me at the moment but I don't think I
At the moment my code looks like this: # Assign values for saving to

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.