So I had worked in a company that specialized in maintenance and service. During my time at this organization I started a career as a software developer. I dare say that it came naturally to me, being the lazy person that I am. At this organization there were 2 developers that were primarily Java developers. At the time, I was using .Net. Oddly enough, I learned most of what I know from those 2 developers in spite of writing in different languages and for this I am eternally grateful.
So one day I decided that I may have better opportunities somewhere else. So I got a new job at an insurance company and was now exposed to a very pure .Net atmosphere. The main role I would have would be developing and maintaining the portal that they used for their agents. Seems relatively simple. Certainly there would be some quirkiness to this portal but the whole thing would be able to reuse a few abstract patterns right?
No not right. The author of this application wouldn’t recognize a pattern even if it hit him in the jaw. Oddly enough he was a consultant making multiple hundreds of dollars per hour. What I learned about the .Net world is they encourage database heavy applications. You’re probably thinking, oh they must have had ten or twenty stored procedures in their database if that were the case. No, not 10 or 20, not even 100 or 200. This database had 551 stored procedures in it. In addition there are 172 tables and 104 functions. Now at the time I had used some SPs for some complex needs and what not but I hadn’t seen anything like this. I wondered if I was in over my head and wouldn’t understand the deep complexities of all of this data and perhaps I made a big mistake coming to this company. After working on this for 2 years I realized that the man who developed this portal was sent from satan to destroy my hopes and dreams. I will give you an example to help illustrate of 2 tables. One called DO_DOCUMENT and another called FS_DOCUMENTS:
DO_DOCUMENT
|
FS_DOCUMENTS
|
Look familiar? Well isn’t that special? Why use one table when you can use 2 that are almost identical? This must be some methodology that I am not familiar with. Maybe the were using one table to store inactive data to increase performance. Not likely, both tables had different types of documents in them based on business type. I looked in the table on one contained 20,000 rows the other 50. Seems like an opportunity for re-use to me. This is one of many scenarios where logic or data was duplicated. What is odd that in this dark place there were some point of brilliance. But the .Net world was a bit different than the Java world. The developers that I knew that were working in Java didn’t want anything in the database except data. So this gave me an opportunity to discover the pros and cons of both.
The truth is we all write bad code at some time or another. Somewhere out there someone is writing a message just like this about my code. But one thing I will say about myself is I work as hard as I can to write as little code as I can. Mainly because it is less work and more stable. But stored procedures seem like extra work to me and that isn’t what I am all about.
Comments