Live data from Hacker News

Times I've Messed Up as a Developer

medium.com

1–10 of 137 posts

Re: Times I've Messed Up as a Developer

#2
Back in the early 90's I had 2 terminals up on my X windows console.

One for local dev and another for a production server running a trading system for around 50 users. Naturally for production I was logged in as root.

I typed rm -rf to clear out my dev folder only to figure out I just deleted the root folder and all sub folders on a production machine.

I recalled a piece of advice a university friend had given me. "Never admit to anything."

I walked into the server room, switched off the PC and restored it from a backup tape that was a day old. 2 Hours later the machine was back on.

No one ever noticed, and I never mentioned it either.

Moral of the story - Don't let anyone give you access to production servers.

Re: Times I've Messed Up as a Developer

#3
I've seen a DBA drop a production table as well, fortunately it was a small in memory table for non persisting data that could be quickly repopulated. Still lead to about 5 mins of downtime.

I always have two terminals open, both running tmux. One is white text on black for dev work, the other is white text on red. I only ever ssh into production servers on the white on red terminal so there's a strong visual signal that I absolutely shouldn't be running drop, delete, truncate, rm, dd, whatever commands on them and if I do then I am extremely careful.

Re: Times I've Messed Up as a Developer

#4
post #3

I've seen a DBA drop a production table as well, fortunately it was a small in memory table for non persisting data that could be quickly repopulated. Still lead to about 5 mins of downtime. I always have two terminals open, both running tmux. One is white text on black for dev work, the other is white text on red. I only ever ssh into production servers on the white on red terminal so there's a strong visual signal…

> I only ever ssh into production servers on the white on red terminal so there's a strong visual signal

This is a great idea.

Re: Times I've Messed Up as a Developer

#5
post #3

I've seen a DBA drop a production table as well, fortunately it was a small in memory table for non persisting data that could be quickly repopulated. Still lead to about 5 mins of downtime. I always have two terminals open, both running tmux. One is white text on black for dev work, the other is white text on red. I only ever ssh into production servers on the white on red terminal so there's a strong visual signal…

"One is white text on black for dev work, the other is white text on red."

Cool. Sorry, but I'm going to steal this idea from now on.

Re: Times I've Messed Up as a Developer

#6
post #3

I've seen a DBA drop a production table as well, fortunately it was a small in memory table for non persisting data that could be quickly repopulated. Still lead to about 5 mins of downtime. I always have two terminals open, both running tmux. One is white text on black for dev work, the other is white text on red. I only ever ssh into production servers on the white on red terminal so there's a strong visual signal…

I used to do the same thing with RDPs to windows production servers. I'd set up a different colored color scheme on each computer, with prod being bright red :)

Re: Times I've Messed Up as a Developer

#7
I was on my way out the door at my first job, and an SEO person stopped me and asked me if I could fix something. I just needed to delete a single row from a database. Easy enough. I get as far as “DELETE FROM table_name” and for some unknown reason run the damn thing without a WHERE. All the rows, gone!

We did have nightly backups but the guy with access to them was notoriously hard to get the attention of and lived in a different state. I was on my way out the door, and now I ended up being stuck there for another few hours trying to get ahold of devops.

At the company I am at now, we had a devops person whipe our multi TB CDN on their first day trying to make an improvement to our asset sync script. It took probably 2 days to get the whole thing reuploaded.

Re: Times I've Messed Up as a Developer

#8

Back in the early 90's I had 2 terminals up on my X windows console. One for local dev and another for a production server running a trading system for around 50 users. Naturally for production I was logged in as root. I typed rm -rf to clear out my dev folder only to figure out I just deleted the root folder and all sub folders on a production machine. I recalled a piece of advice a university friend had given me. "…

Did anyone ever notice that it happened?

Re: Times I've Messed Up as a Developer

#9
post #3

I've seen a DBA drop a production table as well, fortunately it was a small in memory table for non persisting data that could be quickly repopulated. Still lead to about 5 mins of downtime. I always have two terminals open, both running tmux. One is white text on black for dev work, the other is white text on red. I only ever ssh into production servers on the white on red terminal so there's a strong visual signal…

> I only ever ssh into production servers on the white on red terminal so there's a strong visual signal This is a great idea.

I've found that quickly changing the color of Terminal windows is pretty much the only useful application for the MacBook Pro Touch Bar.

Re: Times I've Messed Up as a Developer

#10
post #3

I've seen a DBA drop a production table as well, fortunately it was a small in memory table for non persisting data that could be quickly repopulated. Still lead to about 5 mins of downtime. I always have two terminals open, both running tmux. One is white text on black for dev work, the other is white text on red. I only ever ssh into production servers on the white on red terminal so there's a strong visual signal…

Thanks for sharing , I setup now a production profile for Konsole with red on black for the tab I use for ssh into servers
Post reply on HN