Back in 1988/89, while I was working for a small HW/SW company in Berlin, I inherited code from four different "groups" of people:
1. From one external developer who was supposed to write some embedded stuff in C:
He delivered the code and went on holidays to the caribbean (I am not exaggerating). Imagine, this was the time without email and mobile phones. Actually, I didn't inherit it directly but a colleague. And someone else had given the contract to that external person without asking us.
Anyway, we had to install it on a mission-critical power amplifying thingy (I don't know what it was, I'm a software guy). It just didn't work... Then my colleague, who didn't know C, asked me if I could have a look at the code because he didn't really understand it (he was an assembler coder only). The code looked like this: ...
#define BEGIN {
#define END }
#define THEN {
#define IF if
#define WHILE while
#define FOR for
#define FUNCTION
#define PROCEDURE void
#define REAL float ... (you get the picture here) ... ...
FUNCTION DOSOMETHING (REAL in, INT out)
BEGIN ...
FOR (...) BEGIN
END ...
IF (...) THEN
ELSE
END
END
--- I started crying
2. It was from a physicist who worked there as programmer for a while and left. He developed in Turbo Pascal.
The code was really nicely structured, he had written a really nice guide how to structure and write code. It was readably without any comment - perfect.
The one thing... it was the most inefficient code I had ever seen and it used some tricks of Turbo Pascal 3, which drove me really crazy when I tried to bring it forward to TP4/TP5 (was it OVLs? I dunno anymore)
3. Two external guys developed another piece of software as a new module for (2) above. They insisted that they should use Turbo-C. I don't know who said "yes", but after a while I received their code to integrate it as a separate module (actually separate exe) to our package.
Integration was no problem, it worked, everything was fine. Except when a client asked for some changes. I had to dive into the code and try doing some changes... Well, ... it was object-oriented C - no, it was NOT C++, it was their own flavour of object-oriented C they had developed...
--- I started crying again.
4. The last example was actually an operating system we developed for a small self-developed computer based on C-64 (it was for QS-systems for car manufacturers; this piece of hardware had built-in analogue and digital measurement-device inputs and so on). The code was beautiful, it was fast, efficient and ... readable. It did everything we wanted and I understood everything. It was faster than a C64 and so on...
I really loved that "OS"... the drawback?? He was such a genius that he became an alcoholic and had to leave the company and we couldn't continue developing the stuff anymore...
Throughout my 27 years of computing, the worst thing that happened to me was inheriting software from various different sources at the same time. But other than that, all the other stuff I can only say: "Been there, done that" (yes, even punch-cards, PDP/11s, Vixens... ahm, VAXens, etc. -- no, no magnetic cylinders)