Posted by: Peter Scott | February 27, 2007

Other people’s code

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.



  1. So, why? There must be some sort of logic behind doing it, however convoluted it may be. I’d be curious as to what was behind the decision.

  2. fortran iV? wot you got against fortran III?

    as to why:
    because they can?
    seems to be reason enough in most places I’ve been.
    it’s “kewl”, therefore that’s reason enough…

  3. Get over the hangover of the old times.
    Care to share when the Access code was written. Probably that time asktom did not exist. 😉
    so you had hard time re-engineering the VB macro? 😉

    okay, just quickly re-engineer the code and put it in the database.


  4. Noons – Why not Fortran iii – because I still have my hair and teeth 😉

    Anthony, Anon
    The Access DB is less than a year old – the only reason they put it there was the rowset was too big for Excel – all the user the user does is sort the stuff and to look-up against a couple of ‘private, own-truth’ tables. We have even offered to publish these data sources for the guy…

  5. Oh, yes! When I read the code produce a 65000 lines flat file I knew the reason to use an Access DB to analyze it was because Excel couldn’t manage it… Users will use the DB only if they can export their tables to a flat file and compare them with their own Excel files…

  6. “Why not Fortran iii – because I still have my hair and teeth ”

    Cheeky! So do I. Oh hang on, that tooth ovr there sounds a bit like plastic!
    Ah well, no one is perfect…

    you’d be surprised at the amount of disk space required in our shop for non-Oracle data. suffice to say it greatly exceeds the requirements of all our databases, including the DW!

    Kevin Closson and the guys from storagemojo are spot-on in classing the split between structured and unstructured data the way they did: how incredibly true. The more I see out there in customer land, the more I agree with it.

    Good? No. But then again, if it keeps the IT departments happy and the users under the illusion they are getting “great data”, who cares?

  7. “So why put on a tiny platform with little inherent resilience?”

    Because otherwise you’d let the person with no training in relational concepts go wild with 12 sparc chips?

    I say, let ’em have their puny dataset and their own processor and memory to churn. Only allow properly designed access to the database!

    I started on Watfor, and don’t remember a thing about it.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s


%d bloggers like this: