CodeFaster

CodeFaster

Share this post

CodeFaster
CodeFaster
Pick straightforward test data

Pick straightforward test data

Pick straightforward. Pick fast.

Tyler Adams's avatar
Tyler Adams
May 19, 2020
∙ Paid

Share this post

CodeFaster
CodeFaster
Pick straightforward test data
Share

Code faster by picking straightforward test data. Straightforward data is fast to write, fast to read, and fast to debug.

Let’s say we’re working in a private testing environment. We need to create a user with a username and password. What else could be more straight forward than this:

username: username
password: password

If we’re making multiple accounts:

username: username[0]
password: password

username: username[1]
password: password

The programmatic notation for the ith username is username[i], therefore as programmers it’s the straightforward choice. If only alphanumeric characters are allowed, then the brackets must be dropped:

username: username0
password: password

username: username1
password: password

If we’re making accounts in a shared environment, we’ll prefix accounts with our username and - to create an adhoc namespace:

username: tadams-username[0]
password: password

username: tadams-username[1]
password: password

If we’re making objects with nested properties, we’ll pick str…

This post is for paid subscribers

Already a paid subscriber? Sign in
© 2025 Tyler Adams
Privacy ∙ Terms ∙ Collection notice
Start writingGet the app
Substack is the home for great culture

Share