Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to use a long text as sample. Afterwards with an algorithm I will take a substring of it whose length is fixed (passed as parameter), but the startIndex is random, therefore each time it should take a different portion of that text.

However I would take, if possible, a standard text as sample for my application. Looking in internet it is almost always used the Lorem Ipsum text.

Can this be considered "standard" or is there a rela standard one? Thanks

share|improve this question
I don't quite get it - is it for production code or are looking for test data and test cases? – Andreas_D Jul 4 '11 at 9:25
It will be used in a development environment, where, by the way, no client data can be hosted. Therefore my anonymisation algorithm would "mask" all sensible data in the DB that will be later moved to such environment. My goal was to find a standard text/solution for that. – Luca Jul 4 '11 at 9:37
up vote 4 down vote accepted

Lorem Ipsum is normally used for dummy text when typesetting because it contains words but do not as such have any meaning. If it will do for you, then great.

I do not believe there is a standard text for sample text. I suggest you consider downloading a tome in plain text format from Project Gutenberg - - and use it instead. Shakespearean plays might be good candidates.

share|improve this answer
Thanks Thorbjorn for the hint. The text will be used to anonymised sensible data fields (e.g. customer's background description). The goal of my algorithm would be to take a random portion of the sample text with the same length of the target field. It has no need to have any meaning. My only concern was to take a standard solution, of course if existing. – Luca Jul 4 '11 at 9:20

There's no standard text that can be used to as a proxy for all kind of textual input or output data.

You should look at your requirements and use cases and analyze the type of text that is displayed. Look at the language, is it formatted (bold, italics, different fonts - you didn't tell about that), do you expect numbers or formulas, is it one or multiple paragraphs. Then find or write a sample text that is as close as possible to the expected input.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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