Last Updated: January 28, 2019
· jacaetevha

Random Encouragement

Are you a remote developer, shut up in your hole 8+ hours a day without much interaction? I play music for part of the day to drown out the silence (or the farmer's loud machinery outside my window), but every now and again it would be nice to hear a word of encouragement or someone cheering me on.

I've set up a git hook that will cheer me on after every commit (thanks to David Hilowitz):


# Play a sound after committing
afplay -v 0.03 /Library/Application\ Support/GarageBand/Instrument\ Library/Sampler/Sampler\ Files/Applause\ and\ Laugher/Kids\ Cheering.aif > /dev/null 2>&1 &

Save that file into your repo's hooks directory as post-commit and make it executable.

Of course, if you aren't running a Mac you'll need to change the afplay command to something else (eg. mplayer, play, mpg123, mpg321). Also if you don't have the GarageBand files, you'll need to change the sound that it plays.

How about a random word of encouragement? Add this line to your crontab:

30 8-18 * * 1-5 sleep ${RANDOM:0:2}m ; say -v Victoria 'Nice work. Keep going!'

Between 0830 and 1800 you'll get a nice message at random times. All you Linux users should use this trick or something like it for the say command.


If you find yourself in need of these types of feedback just to get through your day, you might think about getting out more, or think about changing jobs. I really posted them here just for fun. (Actually, I do use the kids' cheering on commit, but I don't need it... really... I can stop at anytime.)


3 Responses
Add your response

Thanks for sharing, and keep up the good work!

over 1 year ago ·

On Linux you can use "play" command.

over 1 year ago ·

play was included in my list of Linux alternatives. However, I'm not sure that it's available on all distributions, by default. What distro are you running?

over 1 year ago ·