You would expect someone who has a degree in Computer Science to know everything about computers, wouldn’t you?
Well, I have one, and the truth is I’ve learned 90% of my computer savvy from on-the-job-training (OJT). Trial & error and “the hard way” are also effective learning tools for me. However, utter panic really cements the knowledge into my head. Like this morning …
I was showing a co-worker how to do a simple file edit in the Unix editor, vi (pronounced vee-eye, not 6). I should clarify that the commands were simple, but the file was a critical system file so it had to be done precisely. No problem. I had my vi editor cheat-sheet and the list of commands at the ready. Co-worker (I don’t want to use her real name without permission, so she will be from here-on called Miss L ) had her notebook & pen ready.
Miss L looked on while I logged into the system and opened the file. The line we needed to edit was halfway down the file, so I used the down-arrow key and zoomed to it. According to the cheat-sheet, typing a lower-case “i” would let me insert the needed character. I typed “i”. Then I typed the character. WHAL-LA! To exit and save the file I typed “ZZ” (a.k.a. “:wq” for those that vi) which should have exited me from the file and closed it.
But no. A closer look at the cheat-sheet and I figured out that “i” put me in insert mode. I vaguely remember the mode thing, that you had to exit the mode, then save & close the file. OK then. Only the command to get me out of insert mode was not on the cheat-sheet. Note to self: update that damned thing!
So, now I was frustrated (and embarrassed that while training Miss L, I get stuck in insert mode like a freaking beginner). I cannot exit, save, or close the file. So I disconnected from the system. Things should be OK – the file didn’t get changed. I think. I log into the system and try to open the file and get this message: “root: file not found”.
OMG. I screamed – out loud. The file was gone. Every program AND when the system is supposed to run it had vanished. I felt the blood drain from my head and I just sat there numb. My mind raced to think of where I could get a back-up copy (surely somewhere, someone made a back-up!)
Miss L is frantically scribbling in her notebook now. I wondered what she could be taking notes about, but then my brain (finally) noticed I had logged in as root, but did not switch to the correct account. I prayed “please, God, please!” as I switched over to the admin account and again asked the file to open.
It opened! And it looked just like it did before we got stuck. Whew! I actually got out of my chair and did a happy dance, ask Miss L. Before we could edit it, we had to find out how to exit insert mode. I pour through my reference books. In the 2nd book I found an entire section on vi, and in the fine-print, the mystery was solved. It made me feel incredibly dumb. No, even dumber than that.
The small side note said: “to exit insert mode press the escape key”.
Who would have thought of that? Obviously not the chick with the computer science degree.
Later, when my blood pressure was normal again, I asked Miss L about the notes she was taking while I was freaking out. She laughed and told me she was writing notes to herself about her notes on editing. She wanted to remember how she learned first-hand to be very, very careful when it came to this file.
Well – I guess we both learned something after all 🙂