Tell me more ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I'm working with grids and I have several variables that relate to elements that can be either rows or columns. I'm growing tired of naming those variables rowOrColumn_something.. Any ideas?

UPDATE:

Thinking about it, is Vector the word I'm looking form?

share|improve this question
1  
CellCollection? – Dan Pichelman Mar 13 at 21:17

closed as not constructive by gnat, Martijn Pieters, MichaelT, Bill, ChrisF Mar 14 at 8:48

As it currently stands, this question is not a good fit for our Q&A; format. We expect answers to be supported by facts, references, or specific expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, see the FAQ for guidance.

5 Answers

up vote 4 down vote accepted

I suggest any of the following:

  • Slice
  • Band
  • Strip

All represent the concept of a 'cut' through a table, while not specifying the dimension.

My thoughts on the other suggestions:

  • Vector - works, but in my opinion, it doesn't imply a relationship to a larger object.
  • CellCollection - does not imply that there is any logical relationship between the cells.
share|improve this answer
+1 i thought slice – Michael Durrant Mar 13 at 22:43

I would call it a line, because it's either a horizontal line of cells or a vertical one.

share|improve this answer

What about:

  • Cell
  • GridItem
  • GridElement
share|improve this answer

How about matrix, or matrixCell?

(That idea is "borrowed" from Cocoa's NSMatrix class, which is a grid of NSCell objects).

Otherwise, can you give a few specific examples of current variable names so we can get a better idea of what they represent?

share|improve this answer

My ingrown naming routine produced this: *RO*ws or *C*onversely *CO*loumns == ROCCO

share|improve this answer
1  
Really unclear... – assylias Mar 14 at 7:17

Not the answer you're looking for? Browse other questions tagged or ask your own question.