Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

There's a saying: "Don't post anything online you wouldn't want grandma to see." The developer equivalent is "Don't use test data you wouldn't want the client [or boss] to see." This also applies to variable names, function names, and comments in code.

For a project that involved creating fake companies and user records, I purposely choose to use characters from Star Trek, Star Wars, and the Simpsons for each of the different companies. They're whimsical, non-offensive, and as an added bonus, if I see Homer Simpson listed alongside James T. Kirk, I instantly know there's a data integrity problem.



That last bit is the main reason why I use odd or otherwise out of place test data[0]. Test data should never leak into production. Ideally there should be no means of that happening.

[0] Recent example: tissue sample, species: dog, tissue type: bone. Valid combination, just not present anywhere in prod.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: