Don't go nuclear01.07.16 · php
I once read a story about a fancy robotic parking garage. You’d drive in and it’d lift up your car, file it away, and wait for you to come back and punch in the right code. Then it’d spit your car back out on the street. At least, that’s how it was supposed to work.
After the city’s parking authority fell behind on their garage bills, the company shut they down the garage remotely, effectively ransoming the city’s cars 🙈 Nobody in. Nobody out 🙅
Did the garage company overreact? Perhaps. But developers, especially small contractors working on custom software projects, face this kind of dilemma all the freaking time. And sometimes, their only possible recourse is to shut it down.
For web apps, you can do this by building in a “kill switch,” which enables you to remotely shut down the app and inform users that your client owes you money.
There are lots of such repos on GitHub and I’m sad to report that most of them are written in PHP 😑 Apparently, nobody gets screwed harder than your friendly neighborhood PHP guy.
- Richard Bagshaw’s kill switch integrates with Laravel 5.
- Animesh Tripathi’s version uses a MySQL database to let you control a ton of kill switches at once. Personally, I’d be a little worried if you have so many deadbeat clients that you need to spin up a database to manage them.
- Andrew Champ’s kill switch uses a remote xml file to trigger his kill switch.
So look, instead of showing you how to use these, I want to stress the following:
You are a human being. You are the work you do are valuable. If clients, recruiters, or your boss can’t see that, you need to educate them or move on.
Killing a client’s site is a petty and largely short term solution. You’ll achieve a more collaborative outcome by thinking about tradable issues, your ZOPA, and other negotiation tactics. Hopefully, you’ll never have to go nuclear 💣