Send Close Add comments: (status displays here)
Got it!  This site "www.robinsnyder.com" uses cookies. You consent to this by clicking on "Got it!" or by continuing to use this website.  Note: This appears on each machine/browser from which this site is accessed.
Lorem Ipsum text
by RS  admin@robinsnyder.com : 1024 x 640


1. Lorem Ipsum text
Lorem Ipsum text consists of semi-randomly generated but otherwise nonsense Latin-looking words.
This allows one to concentrate on the form and layout of the text without getting distracted by what the text says.

It is used in the financial printing industry and whenever text is needed for appearance purposes. Here is the Python code [#1]

Here is the output of the Python code.


2. Notes
Note that the seed creates a pseudo-random number sequence that repeats when given the same seed.

Warning: The sequence repeats, but if any conditional statement execution causes a different sequence of calls to the random number generator where that value is used differently, then the program output is not repeatable.

In such cases, a random number generate is needed that is a class so that one can have different random number generators for each purpose.

3. Seeds
Note how the use of the same random seed results in the same random sequence.

This is useful for deterministic (non-random) testing and can be turned off for (random) production use.

4. rsLorem module
Here is a code module in Python [module rsLorem in rsLorem.py].


5. Abstracted module example
Here is the code using the rsLorem module.

Here is the Python code [#3]

Here is the output of the Python code.


6. Module abstraction
For more on module and class abstraction, see the following.

7. Common pattern
A common pattern is to count i from 1 to n but want a repeating sequence of 1 to d, starting at one (1), usually where d is less than n. In terms of i this is a three step process. Here is an example program to show the pattern. Here is the Python code [#4]

Here is the output of the Python code.


8. End of page

by RS  admin@robinsnyder.com : 1024 x 640