Actually gamers and authors are sometimes interested in such code, although less often involving Hungarian names!
True laziness is hard work
| [reply] |
I use things like this quite a lot, but I'm not allowed to publish the code. The project I use it for involves "anonymizing" databases, so I can create reproducible customer situations.
In that process, I first collect all surnames and given names from several databases, split them on whitespace grouped by gender. Then I shuffle the list of names and create new names from the existing list by randomly picking 2 to 5 names from the correct gender list and put them in a random order and assign the new name to the anonymized victim.
The problem that is faced here, is that I have to go through all related databases too, to change the name of the parents and children so the the relations still match.
I do the same for date of birth and place of birth. And for ZIP codes.
The best part however is the addresses. First I collect all the street names from all the databases I have access to, then I split the street names on known extensions: "street", "alley", "boulevard", "road", "way", "path", etc etc. Then I take the first part of those, shuffle them and generate new street names based on the prefix + any of the known extensions. "Bondstreet" thus creates "Bondstreet", "Bondalley", "Bondroad", etc etc. I then shuffle the new list and replace all the original street names with a random pick from the new list.
Together with some other changes, someone with knowledge of the original database said he was unable to "see" what persons were involved in the new data set. This way we can mimic problems at any size of customer database, as we now generate a new one from an existing one with the same size and relations and the "anonymize" the complete set.
This has proven to be a very useful approach. All done in perl of course and nothing to do with spam or hackers.
Enjoy, Have FUN! H.Merijn
| [reply] |
I used similar code for stress testing of multiuser web-based application. And as we also were in need to demonstrate reporting system to management, and user_0001, user_0002 etc in Full Name column didn't look especially impressive, so I used Data::RandomPerson (BTW, why don't you submit your addition ;) to generate a lot of users with nice names.
| [reply] |
Then perhaps Perl, our beloved language, should be put on the black list as well?Or even better, perhaps restrict access to computers all together to people who have a proven track-record of playing "nice" (for whatever definition of "nice" you or any dictatorship might fancy). Please try to be more responsible in what you post here Why are you saying that to yourself?
CountZero A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James
| [reply] |