0

I'm a software developer and I try to take naming variables, functions, classes etc. rather seriously. I'm looking for a single-word noun that describes the verbal display or representation of data. It will ultimately be written as a TimeSpanTo[Blank]Converter

For example, if I input "23" and output "twenty-three", I've converted from an integer to a(n) [Blank]

More specifically I'll be using this with time data, so a times stamp of "02:30:00" would display as "2 and a half hours"

If what I'm looking for doesn't exist, would lexicon or literal be appropriate? Any other suggestions?

  • You can use the word Pronunciation there. – Damkerng T. Apr 24 '14 at 13:21
  • Ones I use (in-house) are called NumberLexer & TimeLexer ; en.wikipedia.org/wiki/Lexer_(computer_science) – Alex K. Apr 24 '14 at 13:59
  • I do like "Lexer", however I typically think of a lexer when converting in the opposite direction, though I may be wrong. – plast1k Apr 24 '14 at 14:13
  • When you say 'if I input "23" and output "twenty-three", I've converted from an integer to a __ ', do you mean 'I input the numeral 23 and the output is the word "twenty-three"'? 23 and twenty-three are just ways of referring to the integer, which 'exists' even if no one has ever said or written its name (which is true for almost all integers). – Edwin Ashworth Apr 24 '14 at 14:39
2

I would suggest "Words". It's clear enough and short.

TimeSpanToWordsConverter
  • +1. Not only is it "clear enough", it is actually exactly right, because that's what he's in point of fact doing. – RegDwigнt Apr 24 '14 at 13:44
  • +1 And if precision is critical, perhaps TimeNumeralToWordsConverter (but that adds 3 characters). – bib Apr 24 '14 at 13:47
  • Words, hiding in simplicity I suppose - at first I didn't think it "sounded" right but really its what the goal is here so thank you. @bib TimeSpan is a predefined data type that doesnt actually have a format, so I may have been incorrect displaying the input as I did - however - I love "TimeNumeral" and will be using it the future when describing that format – plast1k Apr 24 '14 at 14:08
  • @bib: time and timespan are different things. If it converts a timespan, I would certainly not take that out of the name :) – oerkelens Apr 24 '14 at 14:09
  • "2 and a half hours" is not written purely in words. – Edwin Ashworth Apr 24 '14 at 14:14
0

In programming terms what you're talking about is called a formatter. TimeSpanFormatter makes sense to me.

  • I like this, though I was ultimately looking for something a bit more descriptive as to the output, as "format" could be anything. Thank you though – plast1k Apr 24 '14 at 14:07
  • This seems more like a name for an interface or base class. – ᴇʟᴇvᴀтᴇ Apr 24 '14 at 14:33
  • Sure, and what he's talking about is a base class. Sounds a lot like the SimpleDateFormat class in Java, actually: docs.oracle.com/javase/8/docs/api/java/text/… – Kevin Workman Apr 24 '14 at 14:39
0

The best word that I could come up with is "spoken-word"; your method/function/class name would then be TimeSpanToSpokenWordConverter.

  • 1
    Isn't "spoken" superfluous? Words are written and spoken; it's sort of implicit. – ᴇʟᴇvᴀтᴇ Apr 24 '14 at 13:39
  • @aetheria I don't see the need for any modification of 'word' in this case, but certainly 'the spoken word' is distinct from 'the written word'. – Edwin Ashworth Apr 24 '14 at 14:21
  • Right and there are even words that are never written or spoken, e.g. for the purposes of meditation. – ᴇʟᴇvᴀтᴇ Apr 24 '14 at 14:41
-1

Many years ago, we called writing numbers as words "Alpha Phrasing" when we used it in the computing context. Not sure if this term is outdated now, but it seems to fit fine for your situation: "If I input "23" and output "twenty-three", I've converted from an integer to a(n) Alpha Phrase.

You should be careful though, because in telephony, Alpha Phrasing means taking a phone number and making words out of it, like 1(800) CALL-NOW.

  • Because of its cross use with telephone numbers I wont be using this, but I'm always happy to learn something new so thank you :) – plast1k Apr 24 '14 at 14:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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