This kinda should “work” its someone written it in scala, so it’s probably a bit tricky to host your own copy, but possible to prevent load abuse. #AutomateAllOfTheThings
/edit It suddenly struck me how I approached this as a “portable” question, but not “scaleable” , I also did not include a loop to call this method 100 times, since that may get me rate-limited, and I was actually writing this code with google open on one side trying to not make any mistakes as a went along (which is totally rare for me.) The tester in me also has to remind people, these will be engleesh-US spellings. Using this as a reminder to look at the test-data generator problem that I want to get time to implement as well.
Simplest is probably just to rip 100 words out of the dictionary file on linux filesystems.
with open("/usr/share/dict/words", "r") as f:
words = f.readlines()
for _ in range(100):
print(random.choice(words))
Most creative? I’d look at the stock markets, take the top 100 companies in a market, read their deltas for the last 24 hours, use a conversion to make that into a letter, then choose a word starting in that letter based off their deltas in the last week and a position in the dictionary file from before. (though now I wonder if Benford’s law would make it less random than it could otherwise be)
The demo is above already in the rathe simple Python shown.
It provided the option to select a specific data set, quantity of words and decide if you want duplicate words or not. You then click the 'rerun' button, and a set of random words are generated for you.
What’s the simplest option you could implement?
Use a free online dictionary, loop trough it and randomize the output.
How creative – and perhaps unnecessary – could you get? (Internet of things, anyone? )
There are a ton of existing random text generators to use, I’d probably re-invent the wheel and scrape together some coded solution (preferably in C# or Java)
Demo your solutions/ideas in whatever way works for you
Some years ago I developed native iOS and Android keyboards called TesterKey which one was able to use to generate different kinds of test data directly when testing on mobile devices without having to leave the app or website you were testing to go to another website or a different app for getting the data. Besides different string and number generation I thought to include support for generating test images in different resolutions, videos etc.
Boring answer, but I would almost certainly just use faker.js
var faker = require('faker');
for(i=0;i<100;i++){
console.log(faker.random.word());
}
For fun, I’d probably start stringing things together to try and make something comprehensible, e.g.
var faker = require('faker');
for(i=0;i<100;i++){
console.log(faker.fake("{{name.firstName}} is {{hacker.ingverb}} the {{hacker.adjective}} {{animal.type}}")
);
}
Will give you results like:
Dereck is compressing the back-end horse
Sadie is synthesizing the primary insect
Freeman is transmitting the 1080p cetacean
Stacy is backing up the haptic rabbit
Kevin is quantifying the mobile cow
Dedric is indexing the neural insect
Bianka is quantifying the 1080p bear
Stan is backing up the cross-platform snake
My own code that picks words at random from a list of thousands. This has most likely been done already, so I’d look for a random word API and utilize that. It would be a fun exercise.
Create a weird one like Star Wars ipsum if it doesn’t already exist!