Live data from Hacker News

The day I locked everyone out of the company intranet

dancowell.com

71–80 of 130 posts

Re: The day I locked everyone out of the company intranet

#71
post #12

I was working on an old old old "ERP" system written in D3 PICK. It's a database, programming language and OS all in one with roots in tracking military helicopter parts in the 1960's. I was working on it in the mid-2000s. It had SQL like syntax for manipulating data, but it was interactive. So you would SELECT the rows from the table that you wanted, then those rows would be part of your state. You would then do UPD…

> if your SELECT matched no rows, the state would be empty

> UPDATE and DELETE are perfectly valid actions even without a state

Some may call this a fun quirk :) but I'd call it a horrible mistake in the design of the system! It should have been conceptually obvious to the designer that an empty set of rows is a perfectly valid state and is fundamentally different from "no state".

Re: The day I locked everyone out of the company intranet

#72
post #26

Earlier quoted context omitted.

he only recreated the ones not saved by the nightly backup, meaning he used the previous nightly backup and recreated from invoices the last ~23 hours.

No, I did the entire table. That helped me find corner cases and errors in my logic having such a bigger range of source data.

Where did you get the 20 year old data from in that case? Actual paper in drawers, a directory of all invoices on disk, or some other database?

Re: The day I locked everyone out of the company intranet

#73
post #29

Back in the 90s I remember a work colleague asking 'can you rollback a drop table?', to which I replied 'no', and all the blood drained from his face in seconds. It's one of those things you've heard happens to people, but until you see it, you can't quite believe it.

> can you rollback a drop table >_ The first thing I did after the recovery marathon was to alias rm so that it instead works by moving stuff to /tmp

inb4: /tmp partition gets full. Causing things to brake. :-)

Re: The day I locked everyone out of the company intranet

#74
"All of your colleagues have done something dumb. Don't be afraid to tell us when you make a mistake. We all remember our first screw up and will be happy to help."

Never have truer words been spoken.

As I tell all the new juniors at work doing sysadmin type tasks, everyone has deleted the production database at least once. Mistakes will always happen, it's how you deal with them that defines how good you are at the end of the day.

Re: The day I locked everyone out of the company intranet

#75
post #60

My chooosen database explorer is Dbeaver. Horrible name but great app. You can set colours for local/test/prod servers and a red colored tab will scream at you to be cautious. And with red color every edit will pop up an "are you sure?" question. And autocommit is off. I sorta stopped making unrecoverable mistakes.

My chooosen database explorer is Dbeaver

I just checked it out, and it looks promising.

Con: There are too many licensing options. I'm not even sure which one I would need.

Pro: They'll send out an invoice, like a real company. I work for a billion-dollar healthcare company, and if your company only takes PayPal, or Venmo, or something else that makes it look like two guys in a basement, it'll never get through our purchase approval process. Big companies do business with other big companies. Startups have to learn to interface with businesses on a business level if they ever want to grow out of being a startup.

Re: The day I locked everyone out of the company intranet

#76
post #46

Earlier quoted context omitted.

Gone are the days of hard deletes in my approach; it's exclusively soft deletes now!

In the EU soft deletes can violate GDPR, so not always an available strategy.

Soft delete items immediately, purge the soft deleted rows automatically after 30 days or so.

Re: The day I locked everyone out of the company intranet

#77
post #60

My chooosen database explorer is Dbeaver. Horrible name but great app. You can set colours for local/test/prod servers and a red colored tab will scream at you to be cautious. And with red color every edit will pop up an "are you sure?" question. And autocommit is off. I sorta stopped making unrecoverable mistakes.

My only complaint about DBeaver is how powerful it is -I feel like I have only ever scratched 1% of the functionality it offers. I need a tutorial class on all of the goodies the platform can do.

All of the tutorials I seem to find online are basic level and/or mixed with introducing SQL.

Re: The day I locked everyone out of the company intranet

#78
post #60

My chooosen database explorer is Dbeaver. Horrible name but great app. You can set colours for local/test/prod servers and a red colored tab will scream at you to be cautious. And with red color every edit will pop up an "are you sure?" question. And autocommit is off. I sorta stopped making unrecoverable mistakes.

My chooosen database explorer is Dbeaver I just checked it out, and it looks promising. Con: There are too many licensing options. I'm not even sure which one I would need. Pro: They'll send out an invoice, like a real company. I work for a billion-dollar healthcare company, and if your company only takes PayPal, or Venmo, or something else that makes it look like two guys in a basement, it'll never get through our p…

Start with the Community Edition and see where it takes you.

Re: The day I locked everyone out of the company intranet

#79

"All of your colleagues have done something dumb. Don't be afraid to tell us when you make a mistake. We all remember our first screw up and will be happy to help." Never have truer words been spoken. As I tell all the new juniors at work doing sysadmin type tasks, everyone has deleted the production database at least once. Mistakes will always happen, it's how you deal with them that defines how good you are at the…

It’s also a measure of how well management does in response. We were transferring a software production repository from one machine to another, Lord knows why, when a junior admin I was supposed to supervise had arrived a half hour early and started the operation without me. He got the source and destination arguments reversed in the file transfer; we were using DD for this one part of it.

Management reacted pretty well. They assured both of us that while we made the mistake, it was not our fault that data was lost: the problem was that backups were not being checked, which caused us to lose the resulting three days (120 developer days) of work. The manager in charge of the folks doing the backup got taken to task - but nobody else did.

Re: The day I locked everyone out of the company intranet

#80
post #60

My chooosen database explorer is Dbeaver. Horrible name but great app. You can set colours for local/test/prod servers and a red colored tab will scream at you to be cautious. And with red color every edit will pop up an "are you sure?" question. And autocommit is off. I sorta stopped making unrecoverable mistakes.

I love DBeaver too.
Post reply on HN