views:

38

answers:

4

I need to name this structure:

struct NameNeeded
{
    DateTime timestamp;
    float value;
}

I will have arrays of this struct (a time-series). I'd like a short and suggestive name. The data is financial (and Tick is not a good name).

The best one I can think of is DataPoint, but I feel that a better one exists :)

How would you name it?

A: 

Given that we can't associate a specific concept with the float value structure member, only vague names such as "Value", "Number", "Float" or "Data" come to mind.

The DateTime timestamp member suggests to me that the name should have a time related suffix such as "When", "AtTime", "Instant" or "Moment"

So, combining these name fragments and you could have

  • ValueWhen
  • ValueAtInstant
  • NumberWhen
  • DataAtTime
  • etc.

When stuck on a naming problem, consulting a dictionary or thesaurus can sometimes help. It's pleasing to see well chosen type names, and gratifying to come up with them - good luck with your quest.

Dan Blanchard
A: 

I would personally include "Float" in the name, to leave open the possibility of providing other time-stamped types. For example, you could provide a timestamped int or enum for analyst recommendation.

If you want the time-stamping to be implicit, consider "FloatValue." Making it implicit might be desirable if other attributes might someday join the timestamp (e.g., source of data, confidence level, or uncertainty).

If you want to be explicit, one possibility would be "RecordedFloat."

Andy Thomas-Cramer
A: 

My old scientist neurons are telling me that this is a Measurement. A measurement is an instrument reading associated with some context - time, position, experimental conditions, and so on.

The other metaphor that springs to mind is a Snapshot, or a moment in an evolving scene illuminated by a strobe light - an Instant, perhaps.

Tom Anderson
+1  A: 

Since you have a data value and an associated timestamp, the first thing that popped into my head was DataSample. I pictured a series of these, as if you were taking a digital sampling of an analog signal (the two values were like x- and y-coordinates on a graph).

bta