Actually even senior developers or architects make mistakes. Philosophy grad or not, it doesn't matter. That's to be expected.
What's more questionable is:
* Developers have access to the production database from their machine, while it should only be accessible to the front machines within the datacenter.
* Junior developers don't need an access to production machine, only sysops and maybe the technical PM.
* No backup of the production database. WTF???
If they had a hardware failure they would have been in the same shit.
I'll add another one:
* No Foreign Keys
Attempting to clear the table should have just thrown a constraint violation error.
Well, depending how you configure your cascade clearing the user table could have cleared all the other tables also :)
"on delete cascade"!
True on MySql with InnoDB, wouldn't be true with postgres.
You'd have to use TRUNCATE CASCADE on postgres to avoid the foreign key error.
Re:How I Fired Myself
by jasonswett on Wednesday February 27, 2013 @04:57PM
(#5295244)
Exactly!!!!
Re:How I Fired Myself
by fusiongyro on Wednesday February 27, 2013 @11:06AM
(#5293009)
It's a nice theory, but not everybody has that much staff. You can get by with proper backups and running against local copies of production.
Re:How I Fired Myself
by Qantourisc on Wednesday February 27, 2013 @03:40PM
(#5294744)
Constrains also act like bug protections. If you screw up your database tells you right away, and not a beta tester much later.
Re:How I Fired Myself
by fusiongyro on Wednesday February 27, 2013 @04:04PM
(#5294902)
You're preaching to the choir. :)
You don't expect a junior to make mistakes, you expect everyone AND everything to make mistakes/fail. Backups and separated environments is the least you could expect from a company earning millions.
Re:How I Fired Myself
by ErikAugust on Wednesday February 27, 2013 @11:23AM
(#5293127)
Well - to be fair - if the company's practices include developing on the production database and not doing daily/weekly backups, then hiring an inexperienced Philosophy major is the least of their problems.
Also, someone who actually had the development experience and knowledge of better-practice would not have taken that position.
Though I would look askance at whoever hired a philosophy grad as well, to be perfectly honest. The author admits he didn't have the experience to spot bad practice at the time.