At my first real technology job I worked at an early web hosting company. Cutting edge stuff in 1996. We hosted full domains for $60/mo and tilde domains (e.g.; domain.tld/~myname) for $25 or $30 per month.
We hosted on BSDi, a proprietary BSD and every domain customer had their own sub-directory with user and group ownership.
As an aside, BSDi would happily let you run `rm -rf .` and would walk up to root and back down through every sub-directory deleting everything on its way.
One day, probably a month or two into working at what was my dream job, I accidentally ran `chown -r zelphyr .` in the parent directory where we had all our domain customers instead of my personal domain directory. (I can’t remember why I was doing that.)
Instant panic. I just knew I was going to be fired. I sheepishly went to my boss, Todd, and told him what happened. He grinned and exclaimed, “Cool! A challenge!” and had me sit next to him while we wrote a Perl script to look at the paths in /etc/passwd and chown that directory back to its original user.
I’m eternally grateful to Todd for being such a great boss.
Edit to add: in reality, my biggest mistake early on was not learning fundamentals. How binary and processors work, how machine language works and how higher level languages compile down to machine language. I would be a much better programmer had I done so sooner.
Was working for a brokerage as an intern, IT gopher stuff, pretty much my first office job.
A month in, I’m told by my boss to delete a directory on the file server. Which I do. I scurry off and rm -rf it, think it’s taking a while, so saunter out for lunch.
Turns out that that directory was an active mount point for the root of the filestore on which they kept all of their user drives, legal documentation, everything. rm had got about halfway through wiping it before they pulled the plug on the machine.
Turned out they didn’t do backups, because “nothing like this ever happens”.
My boss’s boss flipped his desk over the incident, hurled a monitor tree at me like a battleaxe while purple and screaming, incandescent with rage. My direct boss of course fired me. I was literally booed out of the office by the traders, who chucked cups and bottles and crap at me as I did the walk of shame. Grown-ass men. I was 18.
I learned then that most people everywhere just want someone to blame for their own shortcomings, and being that person can be a valuable service if correctly structured.
Edit: I lie. I learned no such thing at the time. It dented my confidence and gained me a reputation in the city - and not a good one. It was however one of the formative experiences that led to me starting my own business, and never, ever treating anyone (or allowing anyone in my business to be treated by anyone else) in the fashion I was treated.
2. Check your backups regularly. Make sure you can restore from them if needed.
3. Don't ask Interns to run delete commands casually. Heck, don't run deletes casually at all.
4. See #1.
5. Don't be a dick. This was really bad for the firm but having worked at investment banks myself, people can be dicks especially in high pressure environments like that.
I did something just like that early in my career, working too long hours with little sleep. Someone was fired... the head of IT who was responsible for backups and didn't have one. Felt really bad about that. I was dressed down in front of the company like a scene from full metal jacket. I wasn't let go, but I took a hit which from which I never recovered and I left eventually a couple years later.
In that type of company, shit flows downhill - very alpha male chest thumping workplace, lots of cocaine floating around. The IT guy was a buddy of the owner, and was clearly ashamed of the situation but wasn’t about to stick his neck out for the PFY, and I was basically there to run trunk cabling in plenum spaces and get some real world Linux sysadmin experience. Someone’s head had to roll, and it was mine, as it was a very cheap and disposable head to lop off.
I was one of the beta testers for BSDI, in 1990 (long before Linux or FreeBSD). They sent me QIC-40 tapes that I used on my fancy new 386/33 with a SCSI tape system that I bought just for this purpose. The problem was, I kept getting weird data corruption - compiling anything would spit out random errors that obviously weren't in the source files.
After a few months of this, I gave up and installed OS/2 instead (from floppy!). It failed on install with a cryptic error message. I called OS/2 support, gave them the error code, and they asked "Do you have different speed memory modules installed?" Bingo, that was it. I never did install OS/2, but the install process was invaluable.
I didn't end up using BSDI much. Most of my work was on the CSC department's Pyramid timesharing system, so I just used a terminal on Windows (3.x). RIP polyslo.calpoly.edu.
Check out the online course Nand2Tetris. I took it my senior year of college as a business major (but had a SWE internship/full-time offer). It was an interesting course and definitely filled the gaps in my knowledge OP describes, but didn’t really make a difference for me as a SWE.
“ Code: The Hidden Language of Computer Hardware and Software” by Charles Petzold and “The Elements of Computing Systems” by Noam Nisan and Shimon Shocken are both a great introduction.
I've read both books and done the Nand2Tetris course.
I think Code by Petzold is decent in that it's a book you can read in bed etc. but it spends a long time discussing mechanical relays as an analogue and later discusses various processors in depth.
I think Nand2Tetris is slightly better in that it focuses on what I'd consider to be the most important stuff, but it's an actual course and requires significantly more effort.
Nand2Tetris is probably the best course I've ever done though, including my university studies in Physics and ML. It's fun and you learn loads.
I agree somewhat with your assessment of “Code”. I read it first and then “Elements of Computing Systems” and I found reading them in that order was great because the latter puts into practice what the former simply describes.
While you should definitely check the links from other commenters, and targeted resources like that are great, what has worked wonders for me is to just apply a general curiosity. Any time you get a chance to dive into a fundamental topic, do so. Start at wikipedia pages, and before you know it you'll have your bases covered.
We hosted on BSDi, a proprietary BSD and every domain customer had their own sub-directory with user and group ownership.
As an aside, BSDi would happily let you run `rm -rf .` and would walk up to root and back down through every sub-directory deleting everything on its way.
One day, probably a month or two into working at what was my dream job, I accidentally ran `chown -r zelphyr .` in the parent directory where we had all our domain customers instead of my personal domain directory. (I can’t remember why I was doing that.)
Instant panic. I just knew I was going to be fired. I sheepishly went to my boss, Todd, and told him what happened. He grinned and exclaimed, “Cool! A challenge!” and had me sit next to him while we wrote a Perl script to look at the paths in /etc/passwd and chown that directory back to its original user.
I’m eternally grateful to Todd for being such a great boss.
Edit to add: in reality, my biggest mistake early on was not learning fundamentals. How binary and processors work, how machine language works and how higher level languages compile down to machine language. I would be a much better programmer had I done so sooner.