Repurposed Cat Feeder Provides Tasty Rewards for Productivity

John Partee reverse engineered a cat feeder machine to provide treats according to his progress at work.

Cameron Coward
3 years agoAnimals / Productivity

B. F. Skinner’s famous experiments in behavioral analysis proved that almost all animals could be trained through respondent conditioning—often using treats. Well, humans are animals too and we definitely respond to tasty incentives. Many of us naturally use caloric rewards as motivation to complete tasks, like eating a candy bar after cleaning up the house. To automate that reward-based conditioning, John Partee repurposed a cat feeder machine to provide treats according to his productivity.

Partee is a programmer and so he can quantify his productivity in a few different ways. He could, for example, track how many lines of code he writes. The method he chose for this project was to monitor Git commits. To keep their projects organized, programmers “commit” each version of their code to a repository. They typically only commit code when they’ve made substantial progress, so this is a good way for Partee to prove to his treat dispenser that he completed real work. Obviously he could fool the system by committing minor changes over and over again, but his coworkers and bosses would probably complain about that.

The hardware is an off-the-shelf food dispenser meant for cats. It has a hopper on top that can accommodate a lot of food. At specific times according to a schedule or in response to an API call, the machine will activate the dispensing mechanism to push a set amount of food down a chute and into a bowl. Cat food doesn’t motivate Partee, so he filled it with treats that he enjoys. Each individual morsel must conform to a particular size and shape to work well with the feeder, but there were still plenty of potential choices.

The cat feeder comes with an app that allows for control over a network. By using an Android packet sniffer while sending a manual feeding command in the app, Partee was able to find the REST API commands that the machine accepts. With that information, he was able to write his own script that sends a similar REST command whenever he commits code. All he needs to do is load the feeder up with the noms of his choice and he’ll get a nice little unit of positive reinforcement whenever he does his job.

Cameron Coward
Writer for Hackster News. Proud husband and dog dad. Maker and serial hobbyist. Check out my YouTube channel: Serial Hobbyism
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles