Yesterday I talked about offering positive feedback in a code review.
After posting that, I realized it fit under an even broader principle which is worth mentioning: have fun with your work.
When you're slogging out a bunch of feature tests, throw in a funny name or reference in your test data.
It makes me smile when I'm doing it. It doesn't hurt the project in any way (obviously be respectful and know your team).
And here's where it ties into yesterday's tip: It makes it a bit more fun for the person reviewing the code.
Aaron and I do a lot of this, and it might seem silly (ok, it definitely is silly), but it's one of the things I really enjoy about working with him.
For example, Aaron has formed an alter ego for me, Cole Jermont, which shows up in various forms in test data.
Here's an example of a payload in a contact form test:
$params = [
'name' => 'Cole Clobbermont',
'email' => '[email protected]',
'phone' => '414-555-1212',
'location' => 'Nantucket, RI',
'nights_available' => ['Sun', 'Sat'],
'owns_laptop' => '0',
'message' => 'do you allow for clobbering?',
'g-recaptcha-response' => 'google-is-down',
];
We spend a lot of our waking hours at work. Why not make it a little bit fun?
Here to help,
Joel
P.S. Join us on one of our live monthly developer calls in the Mastering Laravel community and you can see just how much fun we are.