A Long, Long Time Ago, in a Software Shop Far Away...
These are a few memories I have from a job I had about six years ago.
The company was seeking "enthusiastic college students" for internship. We would work with all the "latest technologies" (ASP.NET 1.1 - remember, it was 2004), "learning best practices and design patterns".
As it turned out, actually programming with .NET was reserved for the next version of their ERP platform. The next version was just "coming around the corner", and we would get to work on it as soon as the current version would be fixed. Nevermind it had more than a thousand unsolved bugs...
So instead of ASP.NET, we had to work with ASP 3.0. I was ok with that, for after all, .NET was still in its infancy - and as for all other web app technologies, I either didn't know they existed, was too inexperienced to fully understand and appreciate them, or they hadn't been invented yet.
In to the WTF's. The boss (let's call him Gary) told us we would be surprised to learn that even though it was coded in Legacy ASP, the system was object-oriented. By object-oriented, he meant it had a class. When I asked Gary about how that class fit into the architecture of the system and how it related to other classes, he said that a good practice in programming is the KISS way of thinking ("Keep It Simple, Stupid"). We don't need more than one class.
The class had more than two hundred methods. Another intern said something about strong and weak typing (but how do you measure typing strength when there are no types?). To which Gary responded: "what do you mean weak typing? Look, there is one method for each entity you wish to persist in the database!". By the way, since there were no classes for said entities, every method signature was a mess of integers, strings and doubles. Some had over fifty parameters.
One month of WTF'ery later, and Gary calls me to his office to talk about C#.
"Pretty cool stuff", he says. "I didn't know you could do these kinds of things, specially the part about throwing and catching errors. Did you know you always got to have a return statement inside a catch block?"
"Well, actually, Gary" I said, "not having a return statement there wouldn't keep it from working, and..."
Gary interrupted: "no, boy, watch and learn. See, I'm taking this line out of the code and it won't even build. Look."
The application he was working on was quickly built by Visual Studio.
"What the FUCK?", Gary exclaimed.
That was a blow to Gary's self steem. He is just that kind of guy who has to be always right and who only feels good when he feels he knows more than you in any given subject. The fact that he had, by that point, about two hours of experience with C# and .NET, when he was supposed to be teaching it to the interns, is just another side WTF.
One month later Gary was in awe when he found us using Visual Studio to edit stored procedures in the application's databases directly. Prior to that discovery, all stored procedures were maintained by being deleted from the database, then recreated, all through queries. In order to recreate a stored procedure that way, we would get its text from a .txt file. This file contained all of them, and just so that everybody had the latest copy, it was kept in a network share. Which made our job pretty frustrating when we had to make a change in their code. As for the reason why we didn't use any version control, Gary was in the process of writting his own version control software (in vbscript), and wouldn't let us use any other than his own. Did I mention that every single asp page in the system was kept in a similar manner?
One aspect of Gary's personality was a deep paranoia. Everyday, when we logged into our machines and started SQL Enterprise Manager, Gary would come to our machines and log us into the databases. He was deeply afraid that by having the password to the databases, we would be able to come up with hacking schemes from home, so that was one piece of info we weren't allowed to have. Which meant we couldn't do any database work on the days Gary couldn't make it to the office.
He did, however, replicate some of the ERP software functionality in C# at some point; that included a class that encapsulated .NET classes for SQL connections and commands (teaching Gary encapsulation was our greatest achievement). And through this class, I was able finally to read the forbidden connection string. That was when the interns were in the job for about four months. And that was also when things started going downhill.
One week later, the company webdesigner was fired. The next week, the only senior programmar (his niece) left. Add another week, and three of the four interns also quit. Which made the company a pretty lonely place, with only me, the tech support guy and Gary. Another week and I quit too - the only reason I hadn't quit with the other interns was that I wouldn't leave without getting myself another job first.
The tech support guy, though, lasted a couple years more in solitude with Gary.
[quote user="Renan "C#" Sousa"]One aspect of Gary's personality was a deep paranoia. Everyday, when we logged into our machines and started SQL Enterprise Manager, Gary would come to our machines and log us into the databases. He was deeply afraid that by having the password to the databases, we would be able to come up with hacking schemes from home, so that was one piece of info we weren't allowed to have. ... I was able finally to read the forbidden connection string ... And that was also when things started going downhill.[/quote]
Gary was probably right after all. You summarized it very clearly. The moment you knew the connection string, everything went downhill. I'm sure Gary learned his lesson and the tech guy never found out the password...
[quote user="Renan "C#" Sousa"]good practice in programming is the KISS way of thinking ("Keep It Simple, Stupid"). We don't need more than one class.[/quote]
I have often thought this. One class per application. Simplifies builds.