• Registered (unregistered)

    Le permier pattern I spot is that the original worksheet maker used the Excel learn mode to create the macro, thus the crazy selects and gotos.

  • 516052 (unregistered)

    There are only two kinds of code in real life. That which works and that which you really wish didn't. And our job is to turn the former into the later and than maintain and pass it on in perpetuity so that our successors can one day too bear our cross.

  • (nodebb)

    This sounds EXACTLY like a project i once 'inherited'. It was an excel sheet/macro pile of excrement which calculated certain values for sales reps at a beer brewing company and stored them in an Access database sigh. I first was called in to fix a bug (and remind you it was BUSINESS CRITICAL so hurry up). It finally took me and 2 colleagues of mine, a FULL WEEK to only find the bug. Fixing it, was another ahem challenge, so we first suggested to create a descent, maintainable app out of it within a couple of weeks or so. But no they didn't want that because you know too expensive. So we fixed the bug in the existing 'code' but took us a FULL MONTH. Since then when people ask me if i have Excel knowledge i instantaneously have a very specific kind of amnesia :D

  • COBOL Dilettante (unregistered)

    As a language graduate with all the VBA experience you would expect from working for a major high street bank, I was thinking: "At last! A code snippet I'll be able to understand!"

    I was disappointed.

  • Joe (unregistered) in reply to keigezellig

    This one reminds me of an Excel/VBA solution that I inherited and spent a few weeks fixing/enhancing about 4 years ago. The VBA was doing stuff like conditional formatting based on whether or not cells in one table were also populated in another table, and this resulted in some lines of code being over 300 characters in length. Trying to decipher that code had me feeling like a kid struggling to read a Dr. Seuss book. Like you, I cringe anytime anyone asks me if I can help with an Excel/VBA issue, definitely one of my least favorite things to take on.

  • (nodebb)

    My very first 'real job' was was in 1981 as an engineer in Atlanta for a Orsay-based company that made various medical electronics systems. One system was a hardware and associated firmware / software solution to take images from gamma cameras and data from ECGs to analyze and animate heart movements in cardiac patients. We'll set aside the fact that the hardware's computing core was based on a reworked, TTL jellybean variant of Varian 620i - it was ancient even in 1981and that was a real WTF.

    The relevant part was that I had to deal with a lot of assembly language and a tailor-made fortran variant where the mnemonics & keywords were either in French or used French-based abbreviations / acronyms. Of course so were all of the variable, function, and file names and the comments. The same was true of the hardware diagrams and documentation. So much fun for someone from the Atlanta, GA area with only a passing grasp of one additional language - Spanish.

    I somehow modified and/or wrote many thousands of lines of code and corrected, enhanced, and created hardware designs leveraging a quality of French-like dialect that made the other engineers scowl. I think they all hated me. That was the least fun I've had in my 45-year career.

  • r (unregistered)

    I think VBA has taken the top spot for "write only language" away from APL. And that's saying something!

  • MaxiTB (unregistered)

    The correct reply for a request like that is Pardon, je ne parle pas français. Personal French skill level doesnt change the response.

  • (nodebb) in reply to MaxiTB

    I don't think, in my current job, that I could convincingly pull that one off.

  • (nodebb)

    OTOH, you probably won't need to. All the other native French speakers surrounding you are also as qualified as you are to tackle the Excel / VBA hydra.

  • (nodebb) in reply to WTFGuy

    All the other native French speakers surrounding you

    Fussy : they aren't "other" native French speakers, because that implies that I'm one as well, which I'm not.

  • Officer Johnny Holzkopf (unregistered) in reply to MaxiTB

    Correct reply: I'm nöt ą mâdäm! I'm å cónciergè!

  • (nodebb) in reply to Steve_The_Cynic

    I don't think, in my current job, that I could convincingly pull that one off.

    Dun worry, the less convincing it is, the more effective it will be :-).

  • DrPepper (unregistered)

    I've had a lot of success copy/pasting code like this into copilot and asking it to refactor the code to make it human readable. I'm not going to try it with this code, but copilot should be able to wrangle it into something more straightforward.

  • Sardine (unregistered)

    When confronted with this sort of thing, it's often useful to ask the service-requestor, "What does this do?"

    If they say something like, "It produces a report telling us blah-blah-blah," you then ask, "What are the manual steps needed to do this?"

    If they CAN tell you the manual steps needed, you take those and maintainably-code a new app which produces the report, verify it works correctly, and burn the badly-written code from the face of the Earth.

    If instead, they look at you blankly, or say they don't know, or that the only person who knows is the departed mess-maker, then you tell them that without that info, nobody can tell whether the computer's output is right or wrong, and that you would have no way of verifying any changes you made were correct or not. Their only logical choice at that point is to quit using that software mess, and re-create a manual way of doing it, which you can take and maintainably-code a new app which does what is needed. Then you burn the badly-written code from the face of the Earth.

Leave a comment on “Good Etiquette”

Log In or post as a guest

Replying to comment #695911:

« Return to Article