Well, the case is closed: Emacs is better than vi. Today Tumblr decided to release their database username and password along with other oauth-y credentials to the world. How did they manage such an impressive feat? Examining the code that was exposed shows:
i?php require_once('chorus/Utils.php');
i?php
? Yes, that's supposed to be <?php
. Here's how the scenario went:
- Manger: "You can't go home for the weekend until that patch is pushed all the way to production."
- Coder: "But... but... It's 6PM on a friday and I've already had 2 beers! It'll take hours to go through Q&A and staging!"
- Manager: "Ok cool... see you on Monday!"
- Coder: "Hmmm, bugger this... I'll just pop this fix straight up on live!"
- Coder runs command
vi index.php
and pressesi
to paste in the patch... accidentally hittingi
once for each beer consumed, followed by:wq
. - Coder goes to the pub
Pffft... Insert mode. Yet another reason to switch to Emacs.
4 Comments
Had he been using Emacs, it would probably just have had some value starting with ^ instead of i ;)
Oh by the way, after posting a comment the page just keeps jumping to the comment when trying to scroll. This is on iOS safari
Thanks for heads up! I’ll check that out.
Ouch. I got in trouble last week for committing vi commands in code. At least I didn’t do this!:wq