Forked this code in Year 1 of my University course and added face dectection and ran it on a Rasperberry Pi cannot find source code anymore but will archive for the memories
Lava Lamps are for pussies! Retaliate to a broken build with a barrage of foam missiles.
Retaliation is a Jenkins CI build monitor that automatically coordinates a foam missile counter-attack against the developer who "breaks the build". It does this by playing a pre-programmed control sequence to a USB Foam Missile Launcher to target the offending code monkey.
At a deeper level Retaliation is more than just a "simple python script". It's a radical rethink into how to manage software development teams and the software development life cycle. It works on a deep psychological level to offer productivity improvements unseen in all those other "extreme programming" things external consultants speak about. The primal threat of mutually assured destruction lurking in every coder's psyche ensures that even your sloppiest developers will never forget to "checkin that missing file" again!
Retaliation brought us the productivity improvement pair-programming promised but could never deliver! We've seen a 13.37% decrease in build breakage since its implementation.
Will, Chief Code Hacker
Honestly, would you work in a dev team with a Lava Lamp build notifier? What next? Nyan Cat mouse mats? Real coders work under the threat of Retaliation!
Matt, Coding Machine
Does what it says on the box. I've seen improvements in my team and we haven't even installed it yet! Just the sheer threat has kicked my team's coding into line.
Tom, Head Code Captain
You can see Retaliation in action in this video.
-
Mount your Dream Cheeky Thunder USB Missile Launcher in a central and fixed location.
-
Download the retaliation.py script onto the system connected to your missile launcher.
-
Modify your
COMMAND_SETS
in theretaliation.py
script to define your targeting commands for each one of your build-braking coders (their user ID as listed in Jenkins). A command set is an array of move and fire commands. It is recommend to start each command set with a "zero" command. This parks the launcher in a known position (bottom-left). You can then use "up" and "right" followed by a time (in milliseconds) to position your fire.You can test a set by calling retaliation.py with the target name. e.g.:
python retaliation.py "[developer's user name]"
Trial and error is the best approach. Consider doing this secretly after hours for best results!
-
Setup the Jenkins notification plugin. Define a
UDP
endpoint on port22222
pointing to the system hostingretaliation.py
. Tip: Make sure your firewall is not blocking UDP on this port. -
Start listening for failed build events by running the command:
python retaliation.py stalk
(Consider setting this up as a boot/startup script. On Windows start with
pythonw.exe
to keep it running hidden in the background.) -
Wait for DEFCON 1 - Let the war games begin!
- A Dream Cheeky Thunder USB Missile Launcher. It may work with other models but I've only tested with this one.
- Python 2.6+
- Python PyUSB Support (on Mac use brew to "brew install libusb")
- Should work on Windows, Mac and Linux
Thanks to the dev team at PaperCut (working on print management software) for "coping a few in the head" during testing!
-
Carefully select the mounting location. Pick a central location in your office space. Endeavor to maximize angular separation between targets. This will reduce the likelihood of friendly fire incidents... but then again this is comes with the territory and is all part of the fun!
-
Consider sticking down the launcher using double-sided tape to lock its position. This reduces the chance of someone using a "physical hack" to disrupt the coordinate targeting system.
-
If your build breaking perpetrator is at point-blank range, for health and safety reasons we suggest targeting their keyboard or monitor rather than their head.
-
If you have a wide area to cover, consider multiple missile launches (e.g. cluster support!). Set the script up on multiple machines and configure multiple endpoint notifications in Jenkins.
-
To get this working on Windows, you'll need to install PyUSB and libusb-win32. This can be a little tricky but if you've mastered CI build scripts then this should be easy!
-
If your dev team is Down Under and you're finding Retaliation is loosing its effect, try dipping each missile in some Vegemite for some added punch :-)
- Great to see Retaliation mashed up with the Raspberry Pi. It's also got a metion in the Guardian as the 4th best thing to do with the Pi!
- Should we also make a version compatible with Hudson? :-)
retaliation.py
also doubles as a command-line scripting API for the Dream Cheeky
USB Missile Launcher. You can invoke it to control the device from a script or
command-line as follows:
retaliation.py reset
retaliation.py right 3000
retaliation.py up 700
retaliation.py fire 1
If you do come up with some other cool uses or ideas for retaliation, please share your story!