If I were a car I guess people might say that I have been once around the clock. It seems quite a while since I wrote my first Fortran IV programs in the days when using paper tape was uber-cool and the VDU display had a dot persistence that could be measured in weeks and not milliseconds. Goodness, I even remember debugging 6502 machine code using an oscilloscope. For years I have programmed, and have had programmers working for me. So why is that when I see other people’s code I think “Oh dear!” I should have moved to the part of my life where I can smile benevolently and make helpful, mentoring suggestions, but that dose not happen.
Today, I looked at some code provided by a customer to produce a character separated (not comma!) flat file for FTP transfer to someone’s desktop PC for subsequent analysis in Access. There are so many things wrong with this whole approach: The best place to manipulate this data set is in the database. It is sitting on a box with shiploads of RAM, 12 of Sun’s nice Sparc III chips running at a decent speed, many terabytes of storage with industrial strength backup and recovery and of course an enterprise version of a database with indexes and even parallel query if you want it. So why put on a tiny platform with little inherent resilience? Why indeed create some convoluted query to generate a flatfile of over 65000 lines and the go through the pain of moving it across firewalls to another machine and then go through the process of reading into another application? And don’t get me started on the code that produces this output.