On reviewing a colleagues’ code recently I suggested he might want to change the name of his SortAndDelete sub to something that more accurately described what it did.

My proposal was FuckEverythingRightUp!

His response? That was meant to be a one time use system, the user had reloaded it with data of a very different structure.

My reply? if it was one time use then he should have run it and given the user the results only. Sods Law dictates that everything you give to your users(/customers) will be brutally abused and destroyed with no mercy.

He then pointed out he was trying to fix something I wrote a while ago that was initially quick and dirty fix, but was at that moment just dirty, and broken.

I asked what the comments said (comments are vital to quality code). He confirmed there was a

‘// sm 2010 quick and dirty bodge

comment, which I believe is better than a get out of gaol (jail) free card.

He also pointed out another of my comments from a while ago on a different system, he was now handholding:

‘// sm 2009 please god don’t let this bag of shite still be live in 2011.

Like I said comments are vital to back covering.

What’s the funniest, most inappropriate comment you have seen/written?

(I’m not sure if I should mention the dictionary object one of my colleagues used, using correct reddick tlp:

Dim dicHead as Scripting.Dictionary)



10 Responses to “SortAndDelete”

  1. kalx Says:

    People writing the checks don’t care about this. It sounds like the guy is tyring to gainsay your work for his immediate masters. I don’t know your world, but you should not let a mental midget like this get the better of you.

  2. Stephen Allen Says:

    I also have an AutoDeleteRows sub within my list of scripts for general use. Our attempt at limiting its potential misuse was to ensure that the database started in cell $A$1.

    The script is 7 years old but I think the original concept was that (within Excel) a managed database would probably start outside the first cell in order to offer a separate title of heading.

    This is not realy secure. I’ve often thought that the function should automatically take a copy of the datalist and work on that.

    As regards code comments. I almost never use them in my own code. If I can’t read and understand it (7 years later) then it was no good in the first place.

  3. chip Says:

    Stephen you are a smarter man than I if you can recall your own code that quickly. I’m a “casual coder” and I comment extensively.

    My favorite comment I found in some SQL code was something like:

    –WTF?! Why do my customer counts not match? Who are these extra people?

    and then later in the code:

    –Oh, I see. They are from the future. Let’s kill them, shall we?

    (A few bad dates crept into the DB from client at some point, so we had a small number of customers whose first purchase was in 2020.)

  4. Patrick Says:

    “(comments are vital to quality code).”

    :Thank you :-)

  5. Paul Christie Says:

    I once saw an error routine that consisted of a comment line that read
    ‘ This is a really good routine
    and had three blank lines and no code.

    As a factual statement the comment wasn’t wrong but I’ll leave my real thoughts on this for you all to imagine.

  6. Marcus from London Says:

    A colleague showed me a comment at the end of several pages of dynamic SQL construction Access VBA code he was maintaining.

    ‘ If you got this far, it must have worked

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your 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

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: