back to article Debugging source is even harder when you can't stop laughing at it

Thank goodness for code reviews. However things weren't always so squeaky clean as one Register reader discovered while attempting to sort another's sweary source. Welcome to Who, Me? This morning's story comes from a reader we shall call "Philip" (for it is not his name) and takes us to the 1990s when he was working for a …

  1. Anonymous Coward
    Anonymous Coward

    Seen in some source code...

    "If we reach here then the ladies bits are pointing skyward"

    1. Joe W Silver badge

      I guess we all have done this and that I am not an outlier? Please? Or maybe at least 90% of commentards?

      Not in any project that others would see, thank the maker. I do have some expletives in my source code, but milder forms. Plus some court has actually declared that swearing in dialect is not deemed (too) offensive.

      1. Anonymous Coward
        Anonymous Coward

        Never did it - I got past finding offensive words "funny" before ten, I guess. Probably because I was exposed to good humor that doesn't need them.

        Writing software for me was and is also a show of skills and elegance - not a show of how much childish I could be. But maybe I'm the outlier.

        1. Pascal Monett Silver badge

          I outgrew potty humor as well.

          Given the amount of downvotes you already have, yeah, we're outliers.

        2. jake Silver badge

          Obviously never worked in a high-pressure job that used hospital humo(u)r as a pressure relief valve.

          Lucky you.

          1. richardcox13

            It does not mean that the stress relief becomes part of the code base (or anything else that will outlive the current state of affairs),

            Sorry, can't think of anything funny to say :-(.

            1. jake Silver badge

              "It does not mean that the stress relief becomes part of the code base"

              Except it does. Or rather, from my perspective it sure seems to. I've seen it in every single large coding project I've ever worked on.

              "(or anything else that will outlive the current state of affairs),"

              And again, but it does. A single word or phrase uttered at the (in)appropriate moment will often send the aware listener(s) into gales of (sometimes stifled) laughter. The more solemn the moment, the more pronounced the effect. I once watched two members of a C-suite almost lose it completely as the Boss was reading carefully worded excerpts from the annual report ...

            2. heyrick Silver badge

              "the stress relief becomes part of the code base"

              I don't swear in source code. But that sure as hell won't prevent me from dropping in comments to explain that something that was being done in an illogical manner was because following the spec was mandatory even when the spec was not only wrong but created by an entity best described as "something that tumbled from the cloaca of a kittiwake".

              Keep it classy and keep it interesting. No shit feck and arse.

              1. EVP

                I don't do that either. The reason being that I couldn't ever recall what **** is supposed to hold, or what ******(***, *******) is going to do. Respect to Brad that he could do it.

                Swearing at my sources... well, that's a whole other thing.

                1. Mark 85

                  I don't do that either. The reason being that I couldn't ever recall what **** is supposed to hold, or what ******(***, *******) is going to do. Respect to Brad that he could do it.

                  Swearing at my sources... well, that's a whole other thing.

                  One place I worked at early on insisted that we have a file of "names" and "functions". Usually written in Word or some such. You could call a function something mundane like "Bob" or whatever you wanted, Luckily, the cross-reference defined the more obscure/obscene names.

              2. Charlie Clark Silver badge
                Go

                Ah, Father Jack's Guide to Coding. You forgot: drink! and girrrls!

              3. Slef

                Surely Feck is a classy F*ck!

          2. Doctor Syntax Silver badge

            "Obviously never worked in a high-pressure job that used hospital humo(u)r as a pressure relief valve."

            Try a high pressure job where even notes could be read out in court. That will ensure things are kept at a formal level.

            1. Nick Ryan Silver badge

              That is also true, and worth keeping in mind. However it's also worth noting that some people may find it slightly amusing to have certain notes read out in as dead pan a voice as possible while absolutely everyone else is trying not to laugh. I know of judges who failed to keep their laughter in...

            2. Dazed and Confused

              Try a high pressure job where even notes could be read out in court. That will ensure things are kept at a formal level.

              Sadly this results in comments not being kept in the notes that it would have been better to have kept. Notes are so often censored (self-censored) and this results in their not being complete.

              I don't think I ever knew anyone who reached for the resus kit without swearing at least under their breath.

              1. Anonymous Coward
                Anonymous Coward

                Notes

                I've told this story before, but it's relevant..

                I used to keep a simple text file on my work laptop where I noted down what I was doing in site visits, so that on return to the office I could enter the relevant information into the timesheet database... (This was turn of the century, and we'd not yet got any dial-in or vpn to our own systems, though we'd dial out into clients if we could.) Because of the often whimsical nature of some of the tasks I was given, my notes often had some fairly fruity opinions of my boss included, or other non-work related comments. Obviously, when transferred to the timesheets, these thoughts were skipped.

                There came a time when I was out of the office for a good couple of weeks solid, and with month-end coming up, I was asked for the details of my time so someone else could enter it onto the system. Of course it was vitally urgent, so I quickly copied the relevant bits into an email to the office, but somehow missed sanitising one of my opinions of my boss for a particularly pointless task I'd been given. (It involved my wasting half a day and best part of a 150 mile round trip collecting about £5 worth of washing his son had left behind somewhere.) For this I got called into his office and was told "it's about time you started looking for another job." So, I went home, and did. After I'd spoken to a solicitor who jumped at the opportunity to discuss "wrongful dismissal" with them! (They caved, of course, and paid me the equivalent of several months wages in recompense.)

                Obviously he was a dick for both sending me out on such a job in the first place, and for reacting so badly afterwards. I was not sad to leave, but it's taught me that even in "private" notes, I should be a bit more diplomatic...

        3. Loyal Commenter Silver badge

          A quick look at your previous comments suggests that your superior and advanced sense of humour appears to consist of referring to the Irish as Leprechauns.

          I'm afraid I'm with Stephen Fry on the utility of having swear words in your vocabulary, and have come to the conclusion that you are a smug cunt.

          1. Anonymous Coward
            Anonymous Coward

            I never said I have a superior sense of humor. Just that I was exposed to good humor so I laugh for something more refined that swear words.

            If I were a great humorist I would have a different job which would not involve writing code.

            Anyway the Leprechauns were referring to Irish DPC - for obvious reasons, given that context - not the Irish people.

        4. Anonymous Coward
          Anonymous Coward

          Ever wondered why it goes quiet when you enter a room?

          1. Fr. Ted Crilly Silver badge

            One moment laughter and evident good cheer, door opens and the damping cloud enters, tumbleweed...

            1. short a sandwich
              Holmes

              Also known as a Nebbish, when one leaves the others look up to see who's just entered the room.

        5. John Doe 12

          I gave you an upvote as I can see exactly what you are referring to. But then again I KNOW that I am the "outlier" so not really suprised that I empathise with you. Over the years I have met some very petty and childish people in the working world. I freely admit to being a bit of a child trapped inside of an adult myself but there are times I see things that make me think WOW.

          "Writing software for me was and is also a show of skills and elegance - not a show of how much childish I could be. But maybe I'm the outlier." - this is EXACTLY the way it should be!!!

          1. FeepingCreature Bronze badge

            I didn't, but what tempted me to downvote most is precisely the "show of skills and elegance" bit. Lord please save us from all code written by people aiming to show off their skills and elegance. Code is not art, code is a blunt tool driven entirely by purpose. Sure, I like pretty code as much as the next person, but at the end of the day, there is only one arbiter of code quality, and that is the customer. And he doesn't - and shouldn't! - care how slick your abstraction layer is.

            All code bends to serve requirements, and code that cannot bend - because it's locked in place by excessive constraints, such as demonstrating the author's refined skill - will break, or be broken.

        6. NXM Silver badge

          Like a death at a birthday party

          You ruin all the fun

          Like a sucked and spat out smartie

          You're no use to anyone

          People mention murder the moment you arrive

          I'd consider killing you if I thought you were alive

          What kind of creature bore you

          Was it some king of bat?

          They can't find a good word for you

          But I can ...

          Twat

          John Cooper Clarke

        7. gotes

          I enjoy a bit of crass humour (Viz comic for example) and swearing, but I don't put it into my work.

          1. Nick Ryan Silver badge

            Nor me. Except my comments in code about the quality of Microsoft(*) developers.

            * other sources of existential ire are available. Not limited to just Microsoft. Or Adobe. Or IBM. Or...

        8. Anonymous Coward
          Anonymous Coward

          I wholeheartedly agree, LDS. I far prefer my humor to be non-scatological, and work with a team professional enough that I would be deeply shocked to find such language in source code.

          There’s nothing wrong with being in the minority, especially in regards to things like not having a pottymouth.

          (Anon to avoid long-term flamage full of such language…)

        9. bombastic bob Silver badge
          Coffee/keyboard

          I can't stop laughing after reading your post...

        10. FredBloggs61
          Trollface

          5318008

          Childish me?

    2. The Man Who Fell To Earth Silver badge
      Unhappy

      I missed a lot of fun.

      My first jobs were in aerospace in the late '70's. We didn't have code reviews, but once code was stable enough to be be released, the listing had to be published in a paper report that got filed away in documentation control. And each time it was revised and a new release went out. So you had to keep it clean because your name was on it and you didn't know who might glance through it.

      1. Anonymous Coward
        Anonymous Coward

        Re: I missed a lot of fun.

        I do know that in some of the physics code for the 'special spicy rocks' development - the physicists/programmers used the names of famous Russian theoretical physicists in the code. Then when nobody commented, branched out into using former soviet leaders and heroes of the revolution.

        LENIN and STALIN suited the 5 letter name rules of the Fortran system at the time.

        1. Anonymous Coward
          Anonymous Coward

          Re: I missed a lot of fun.

          surely 6 letter rule if STALIN fits....

          1. Nick Ryan Silver badge

            Re: I missed a lot of fun.

            From memory (damn, it's been a long time and I don't mind this), the five letter rule refers to the number of letters that are considered significant in a variable name and anything beyond this was ignored.

            Therefore STALIN and STALINGRAD and STALIA are all considered to be the same variable. Much fun can be had with such things if someone were evil enough to use words that sounded shorter than they were...

            1. bombastic bob Silver badge
              Devil

              Re: I missed a lot of fun.

              Regarding only n-characters of variable name uniqueness...

              I think they fixed that in FORTRAN 77 but in earlier FORTRAN 66 that was probably true for most compilers. 77 added other more structured syntaxes, like if/else and so forth [if i remember correctly]. i haven't worked with FORTRAN since the 90's but even then you had cases of older 66 code being used alongside 77 code simply because earlier machines only had 66 compilers... (and so the original code had been "maintained" for long enough it still had 66 syntax in a lot of places)

              [the code in question ran on VAX and HP3000 systems)

              I forget if Pascal and early MS C compilers did the same thing, but with more than 5 or 6 characters...

              1. that one in the corner Silver badge

                Re: I missed a lot of fun.

                IIRC there was a character limit for (at least one) MS-DOS linker (7 usable chars?), so the compiler could tell the difference between longer names within a compilation unit but more colourful words were spoken when we tried to link each others units into an exe.

        2. Danny 4

          Re: I missed a lot of fun.

          If I remember correctly, the Fortran compiler would stop with an error if it found swear words being used in the source.

          1. Yet Another Anonymous coward Silver badge

            Re: I missed a lot of fun.

            What's a swear word to a FORTRAN compiler?

            "object", "exception", or the worst 4 letter word - "auto"

            1. Nick Ryan Silver badge

              Re: I missed a lot of fun.

              Something in the wrong column was often all it took. For example the replacement of a tab with spaces of something equally non-obvious.

    3. admiraljkb

      > "If we reach here then the ladies bits are pointing skyward"

      Not confirming I've ever done this(cough), BUT if I were to put a comment like that in, it would look like this:

      "If we reach here then things have gone Tango Uniform"

      If the error is particularly bad:

      "If we reach here then things are Foxtrot Uniform"

      1. Anonymous Coward
        Anonymous Coward

        Ours would be "We appear to have undergone a Mammary Inversion Event."

      2. Swarthy

        "Charlie is dancing the Foxtrot"

    4. Michael H.F. Wilkinson Silver badge

      Juju-flop and turlingdrome I can countenance, but I draw the line at Belgium

      1. Yet Another Anonymous coward Silver badge

        El'reg is a family site

    5. Stuart Castle Silver badge

      An ex-colleague of mine wrote a small cgi app for a web page. It was just a perl script for an internal website that some users needed. Can't remember for the life of me what it did, but a user came to me one day massively offended and telling me that one of our website was giving him an offensive error message.

      I went with him, and luckily the error was still on screen. It just said "Get back, thickyhead". I recognised this as an in joke amongst the team. It was a jokey way of saying you are being stupid.

      I spoke to the app's author. He'd put the error in there for his own amusement as joke, along with a load of others, but had missed it when he changed the other errors to errors that were more meaningful, and less likely to cause offence.

      I was actually quite sad that he had to change that error as well.

  2. vogon00

    Trust but verify...

    If Brad is still writing code, and now understands logical operations, I bet he's implemented base36 just to give himself some more options and/or a better possible vocabulary..

    I run source code through something that checks for swearwords, licence keys etc before it's published...basically if I or a team member have made that mistake before, it's trapped here. The added benefit is that it keeps you up to date with current foul language:-)

    Hint: Do not tell the junior team members about Roger's Profanisaurus, unless you like playing sweary whack-a-mole!

    1. This post has been deleted by its author

    2. jake Silver badge

      Re: Trust but verify...

      "I run source code through something that checks for swearwords"

      I can assure you that the English language is quite flexible enough to get objectionable phrases past any rules that they choose to implement. That kind of filtering is worse than useless in that it takes time to implement, doesn't work, provides a false sense of security, and opens the company up to lawsuit should an employee accidentally see something that they think was missed by the filters.

      Student: "You wont find a single word in my paper that one couldn't say on Radio 4!"

      Master: "Yeah, but not in that particular order ..."

      1. Unoriginal Handle

        Re: Trust but verify...

        A slight aside...

        Colleague at a job a long time ago received a mistakenly addressed email from one brother to another, expressing in colourful terms the older brother's dismay at finding out his sibling had come out as gay.

        When he replied, to let the sender know the missive hadn't reached its intended recipient, their firm's email filter rejected it due to the level of profanity contained, none of which my colleague had added to...

        1. Anonymous Coward
          Anonymous Coward

          Re: Trust but verify...

          I have a recollection of a case where was no profanity involved but some expressions not normally used in business conversation.

          One of the users of a system had put an annotation on a transaction suggesting that the female representative of another firm they had spoken to had "been on the beer last night" and as a result had "engaged in consensual sexual relations" that had left her "more than normally insensible" that day. Imagine their surprise when they deleted their joke annotation only to find it appeared on the audit trail which was shown with the transaction. For surprise read stress, concern nay even outright panic.

      2. demon driver

        Re: Trust but verify...

        Moreover, it might downright encourage people to make a sport out of finding offensive phrases which do get around those rules....

        1. Arthur the cat Silver badge

          Re: Trust but verify...

          Might???

          1. vogon00

            Re: Trust but verify...

            Definitely! That's the 'whack-a-mole' game I was on about:-) Every so often, I find one of the little darlings has tried to be smart and use, for example, 'C0ckwomble'....but they have forgotten that to be old and wise one must first have been young and stupid...meaning I look for things like that. I only check for obvious single word 'nasties', recognising that filtering for everything offensive is impossible. Their latest attempt at obfuscation is to put URL-encoded links to foass.com in the comments:-)

      3. gnasher729 Silver badge

        Re: Trust but verify...

        Seen that in action. Anyone with ancient Mac programming experience has written something like

        #define appleMenu 1

        #define fileMenu 2

        #define editMenu 3

        And now imagine a tool that drops special characters, digits and line endings and complains about a lot of nudity! (It destroyed some files before we figured out what happened).

    3. Anonymous Coward
      Anonymous Coward

      "69 dudes!!!!"

      > I bet he's implemented base36 just to give himself some more options

      Brad sounds like the type of guy who'd implement it in base 69, tee hee.

      Either that or base 420 because it's a naughty reference to marijuana that'll never not be the funniest thing ever!!!!!!1111

      Well, not at least until you leave college.

    4. Arthur the cat Silver badge

      Re: Trust but verify...

      Hint: Do not tell the junior team members about Roger's Profanisaurus

      It was the junior programmers who told me about Roger's Profanisaurus.

      1. Loyal Commenter Silver badge

        Re: Trust but verify...

        We used to have a copy of the Profanisaurus on the office bookshelf, although to be fair, it did belong to the testing team, and not the devs.

        1. Yet Another Anonymous coward Silver badge

          Re: Trust but verify...

          >copy of the Profanisaurus .... it did belong to the testing team

          Bug report: Code = page 45 line 6

        2. ridley

          Re: Trust but verify...

          The app is long missed.

    5. Loyal Commenter Silver badge

      Re: Trust but verify...

      I hope you don't live in sc**thorpe.

      1. ricardian

        Re: Trust but verify...

        Or Pen*stone

        1. Anonymous Coward
          Anonymous Coward

          Re: Trust but verify...

          Or C0ckermouth.

    6. John Sager

      Re: Trust but verify...

      A friend had a copy of Roger's for project naming...

  3. Andy Miller

    Just another day

    Looping through ***** is standard operating procedure for most companies. Glad to hear of someone clearly labelling it

    1. jake Silver badge

      Re: Just another day

      From what I remember of the 9-5 grind, it was more loping through *****.

    2. b0llchit Silver badge
      Go

      Re: Just another day

      Yeah, just take a look at https://thedailywtf.com/ for inspiration.

      The appropriate words will pop into your mind. It is just that most never reach the vocal chord system or other's auditory system.

  4. Anonymous IV
    WTF?

    Customer management objection to offensive code comment...

    Some very-many years ago, when IBM used to release the source code of their various operating systems on microfiche, a customer hailing from the mid-West of the US (yes, yee-haw...) had complained to "IBM Management" that one comment in a 360-Assembler comms code module read:

    "Retry 10000 times, for the hell of it".

    The hapless originating IBM programmer was required to change the comment, so that next time round the source code line bore the revised text:

    "Retry 10000 times"...

    1. Pascal Monett Silver badge
      Trollface

      It should have read : "Retry 10000 times and let us not irritate the poor little Mid-West yokels by saying why"

      1. jake Silver badge

        One wonders what the mid-west yokel thought of the word EBCDIC ...

        1. Loyal Commenter Silver badge

          Probably the same thought that everyone has about EBCDIC, which is "why can't these bastards just use ASCII*," or possibly, "I wonder which mutually incompatible version of EBCDIC this is today".

          *Yes, I know, "historical reasons"...

    2. aerogems Silver badge

      Re: Customer management objection to offensive code comment...

      Very minor FYI, but "yee-haw" would be more appropriately associated with the American South. More the central part of the south to southwest. Texas, Oklahoma, Arizona, New Mexico, places that are generally sun-blasted deserts. The US mid-west is mostly farmland, and while you may find farms that have cattle, there's generally enough rain to produce ample grass for grazing that you don't need to herd the cattle long distances.

    3. Dazed and Confused

      Re: Customer management objection to offensive code comment...

      Be careful what you ask programmers to change

      Back when the original PA-Risc systems were get close to release some marketing zeeb complained that the status LEDs inside the 840 read 0000 when the machine was lightly loaded. Not sexy enough, sure said one of the engineers we'll just flip the status bits and leave the load counter as it is.

      The comment clearly when several miles over the head of the zeeb but happy he was being listened to the change was agreed.

      On the 840 this status panel was hidden away inside the machine.

      On the super duper 850 which followed it the status panel was proudly displayed on a thing which looks like a calculator on top of the system where everyone could read

      F0FF

  5. Anonymous South African Coward Bronze badge

    something like this?

    for (f@ck = 1; f@ck < 11; ++f@ck)

    {

    printf("%d ", f@ck);

    }

    return 0;

    I pity the poor sod who have to fix such code... especially if the end result of f@ck is used somewhere else too...

    1. Anonymous Custard
      Joke

      So does ++f@ck count as an in-built f@ck-up all by itself?

    2. Philip Stott
      Joke

      Recursive function called f@ck?

      Then it could go f@ck itself.

    3. heyrick Silver badge

      I'm rusty, but...

      DEFFNfark

      FOR f@ck = 1 TO 10

      MyWindow.Print STR$(f@ck)+" ";

      NEXT

      ENDFN

      Something like that (with interesting rendering by the site!). Yeah, it looks better in C...

      Protip - be sure to add some binary shifting next time. VB5 (and possibly VB6?) didn't have a binary shift operator, leading to some horrid code with divides and multiplies a plenty.

  6. Uncle Slacky Silver badge

    Window titles too

    A common window title in our department was "X blows goats" or similar. There were also conditionals or loop endings of the style "fat_lady = has_sung".

    1. Pascal Monett Silver badge
      Trollface

      I don't see how a reference to the opera is a bad thing.

      We all know that it ain't over 'til the fat lady has sung. It's tradition.

      1. jake Silver badge

        You obviously haven't met the head of Personnel HR ...

        1. Psmo
          Paris Hilton

          Is that the tone-deaf one?

    2. Doctor Syntax Silver badge

      Re: Window titles too

      I have been known to use repeat .... until the_cows_come_home

      1. Uncle Slacky Silver badge

        Re: Window titles too

        Yes, we had that one too!

  7. Anonymous Coward
    Anonymous Coward

    Been there, done that, tipped the swear jar

    And i'm not the only one ...

    There is some sense of relief when trying to debug someone else's code and come across a comment of

    // FFS

    or code that has been written by team A, then handed over to team B and has comments along the lines of

    // who in their right mind thought this was a good idea

    #ifdef BURN_IT_WITH_FIRE

    [.. lots of code ]

    #endif

    And I've seen similar comments around my own code, that was coded up ever so clever and making use of arcane template knowledge that meant my code was awesome, extremely succint, nicely formatted and impossible to modify without basically having to rewrite it from scratch

    1. A Non e-mouse Silver badge
      Joke

      Re: Been there, done that, tipped the swear jar

      And I've seen similar comments around my own code, that was coded up ever so clever and making use of arcane template knowledge that meant my code was awesome, extremely succint, nicely formatted and impossible to modify without basically having to rewrite it from scratch

      You wrote it in Perl?

      1. Doctor Syntax Silver badge

        Re: Been there, done that, tipped the swear jar

        APL?

      2. Yet Another Anonymous coward Silver badge

        Re: Been there, done that, tipped the swear jar

        >You wrote it in Perl?

        By accident ?

        The best Perl is the result of either line noise or somebody falling asleep on the keyboard - just don't try to understand or modify it.

    2. Woza

      Re: Been there, done that, tipped the swear jar

      Best one I saw in our code base was:

      #define GO_HOME_WINDOWS_YOU_ARE_DRUNK

      in code that was working around quirks of MSVC.

      A different part of our code base has a function that cleans up child processes, called grim_squeaker - long ago tribute to PTerry and Death of Rats, from my younger self.

      1. Gerhard den Hollander

        Re: Been there, done that, tipped the swear jar

        I just cleaned up a piece of code about to go commercial, that childishly I know, featured all kinds of punes (or play on words) around the fact that the description could be abbreviated to R.E.A.P and so had to remove the Non Timetus Messor window title, or the little scythe in the icon ... or ....

        1. jake Silver badge

          Re: Been there, done that, tipped the swear jar

          "and so had to remove the Non Timetus Messor window title"

          I should think so!

          Now granted, my last Latin class was a long time ago and in a place far, far away ... but shirley that should be noli timete messorem?

          1. Panicnow

            Re: Been there, done that, tipped the swear jar

            .,..and now write it out 100 times Brian!

          2. John PM Chappell
            Pint

            Re: Been there, done that, tipped the swear jar

            It should indeed.

    3. nintendoeats

      Re: Been there, done that, tipped the swear jar

      In the source code the the original System Shock, the Gravis Ultrasound is referred to as the Gravis Ultrastupid. Fun fact.

      1. Loyal Commenter Silver badge

        Re: Been there, done that, tipped the swear jar

        You may be interested to hear that the Kickstarter for a remake of System Shock is now very near to completion, at the point where they are getting the final confirmation of backers' delivery addresses.

        1. nintendoeats

          Re: Been there, done that, tipped the swear jar

          Oh I'm very interested...I have it pre-ordered, my GoG account is ready :p

        2. Jou (Mxyzptlk) Silver badge

          Re: Been there, done that, tipped the swear jar

          Oh THANK YOU!!! I've been ignoring their kickstarter updates for years... *checking* Yep, still all in order, I'm a 51$ pledger since they first appeared...

          GOG too...

        3. Loyal Commenter Silver badge

          Re: Been there, done that, tipped the swear jar

          ...and only a little over 4 years behind the target date, which is pretty good for both Kickstarter, and games development!

    4. Arthur the cat Silver badge
      Happy

      Re: Been there, done that, tipped the swear jar

      There is some sense of relief when trying to debug someone else's code and come across a comment of

      // FFS

      Aha, they're using the find first set function. Very useful that.

    5. Fred Daggy Silver badge
      Trollface

      Re: Been there, done that, tipped the swear jar

      In a previous life I was a Foxpro programmer. Ca 2.6. We did a lot of small custom databases and associated data entry screens with reports. We knew our clients well and often managed their micro LANs and computing needs at the time.

      Co-owner of the company used to put Easter Eggs in the code that would only appear very briefly when certain users were logged in. For example, in 1 in 100 or so +random offset, error messages would appear very briefly, "You've done it again big nose" and "Well, that was smart you waste of space". Then 2 or three seconds later, the regular error message would appear. No offensive language per se, but enough to make one say, What?

      Messages and variability changed with each upgrade too.

  8. Terje

    A long time ago while at university writing a program in a functional programming language with an interpreter that was slightly less robust then a tissue paper ocean liner I had to insert a comment line with the text (translated) "If this comment line is removed the fing interpreter throws a fit and crashes!"...

    1. Yet Another Anonymous coward Silver badge

      Doing a port of some apparently simple C from a now unobtainable microprocessor (thank you nxp)

      The code is full of (i++; i--;) and do_nothing loops, but removing some of them causes the original ancient system to fail

    2. doublelayer Silver badge

      In a probably different functional language, you could do comparisons with function pattern matching or a case statement. The pattern matching would only do exact values, so if you wanted to do something as complex as checking whether a number was even, your only choice was case. The problem was that you could only do a case statement in the return from a let statement, which when you wanted to look at the parameter you already had was not required. This led to code like this:

      let int WasteMemoryAllocation = 0

      in case [your real check]

      end

    3. Chris 239

      Hey, I had the exact same WTF moment on a multithreaded C compiler for DOS * in the 90s

      The compiler would bug out with an error along the lines "you shouldn't see this error message", add back exactly 1 comment line and it would compile fine.

      IIRC the compiler was from a one man band company, and yes up to a point did somehow give you multithreading on DOS but eventually enough unexplained crashes occurred that I refactored my code to be single threaded and then all was good.

  9. Anonymous Coward
    Anonymous Coward

    Customer Code Reviews

    I worked on a development whose customer was UK MoD. It was embedded code, so was never expected see the light of day. The contract allowed the customer the option of a code review as part of sign off. The MoD QA bloke, let's call him "Mike", was a pain in the arse* and, naturally, insisted on doing the code eview. There were many comments in the code along the lines of "..another error trap for a condition that can only happen in Mike's head...". No four-letter words or direct insults but he was very (and quite rightly, in hindsight) miffed by them and we missed delivery and incurred extra costs because of the work to take the comments out and repeat testing and, of course, code review.

    *He also insisted on a formal test to prove that the keyboard worked - every individual key, every allowable key combination plus hours' worth of random multiple key-presses all tested, witnessed and recorded. It took two days, plus the time to write the test procedure and report.

    1. An_Old_Dog Silver badge

      Re: Customer Code Reviews

      Though Mike was a PITA, he was doing his job well!

      How many programmers have thought, and said, "Oh, THAT will never happen!" ... and some time later, their code went 'boom'?

      1. Jellied Eel Silver badge

        Re: Customer Code Reviews

        I think that's one of those important life lessons.

        So at Uni, we were given the task of writing a traffic light control system in 68K assembly language. Simple enough, light sequence, timers, loop it and call it good.

        But then a whole lot more coding so it'd monitor failure conditions, and hopefully not end up with lights controlling a busy crossroad going all green. That bit did have an expletive.

        Then more expletives when the lecturer told us we needed Z. I'd have preferred to have >4KB RAM on the dev boards instead. It did teach me the importance of exception handling though.

        1. Benegesserict Cumbersomberbatch Silver badge

          Re: Customer Code Reviews

          obligatory xkcd

          1. My-Handle

            Re: Customer Code Reviews

            Wow, I didn't know I could hate something that much and still find it funny.

        2. Terje

          Re: Customer Code Reviews

          mmm, 68k assembly, I get warm and fluffy memories from 68k assembly, so many registers to work with without having to do loads and stores to memory all the time!

    2. Warm Braw

      Re: Customer Code Reviews

      I once worked with a group of naval architects who had developed some seemingly advanced FORTRAN programs for hull design. They were, however, not programmers and the variables were a combination of women's names and wishful thinking.

      The code was supposed to get ported to a new platform, but it never happened: the IT staff couldn't work out what the code was supposed to do and the original authors couldn't understand why the different word lengths on the new machine screwed up all their COMMON blocks and character manipulation.

      They stopped building ships soon after.

    3. MrBanana

      Keyboard test

      At one job the test for bad keyboard input to the application was for Jeff (name changed) to roll his head a couple of times across the keyboard, and look for any errors. Actually caught more out of bounds, or basic crash errors, than you might imagine.

      1. gnasher729 Silver badge

        Re: Keyboard test

        On a computer trade show in the last century my boss walked to a competitors booth. Then he came back and said “I just pressed Control-A and their machine crashed, so I left”. Two hours later he went around to check, and their demo machine was still down…

        1. Andy Landy

          Re: Keyboard test

          That wasn't L1-A on a piece of Sun kit was it? I'm having BootPROM flashbacks!

    4. Fred Daggy Silver badge

      Re: Customer Code Reviews

      Family name wasn't "Hunt" by any chance?

      Because he sounded like a right and proper.

    5. dvd

      Re: Customer Code Reviews

      One of our directors went to South America to demo a system that involved a custom keyboard and driver. A new keyboard driver was installed just before he left for the demo.

      One key on the keyboard didn't work for some reason.

      That key happened to be for a character that contrived to be used for either the userid or password of every single user set up on the demo system, including all the admins.

      Colourful language ensued...

      1. yetanotheraoc Silver badge

        Re: Customer Code Reviews

        "That key happened to be for a character that contrived to be used for either the userid or password of every single user set up on the demo system, including all the admins."

        Someone planned very far ahead!

  10. Evil Auditor Silver badge

    Self-taught coder

    The obligatory xkcd.

    1. nintendoeats

      Re: Self-taught coder

      I'll just say, I'm self-taught and my current project at work is refactoring code that was written by somebody with a proper degree. That code is so scary that nobody wants to even think about it (except me, because I'm stoopid and volunteered).

      Large sections of code, commented out with no explanation. Chains of three or four functions calling each-other, with names that only differ by one letter (so knowing which one you are actually supposed to call is Russian Roulette). An entire thread just for managing the window size. Completely pointless derived classes (because at some point 2 years ago they thought there MIGHT be two versions that differed in a particular way, which there won't ever be, as evidenced by the fact that one of the derived versions stopped working ages ago due to changes in the base).

      When I started my job a year ago, I was worried that my liberal arts background was going to be a problem. I no longer have that fear.

      1. Loyal Commenter Silver badge

        Re: Self-taught coder

        Being self-taught can mean a lot of things - for example, it can mean having learned enough to get the job done, once, messily, or it can mean having the drive and curiosity to learn every minute detail of a thing, alongside proper standards and processes, that your average "trained to degree level" person hasn't bothered with, because they never did a module on it.

        As it happens, I'm trained to degree standard in a completely unrelated field to the one in which I work, to the extent that I can tell you how the semiconductor junctions in the processor chips work as well as how to write maintainable and efficient software that runs on them. Some of the best developers I know (all of whom are hot on good coding standards) have degrees in the physical sciences and not in CS. Some of the worst ones I know are also self-taught, so the conclusion isn't whether someone is self-taught or not, it is whether they are any good at teaching themselves.

      2. Anonymous Coward
        Anonymous Coward

        Re: Self-taught coder

        "Large sections of code, commented out with no explanation. Chains of three or four functions calling each-other, with names that only differ by one letter (so knowing which one you are actually supposed to call is Russian Roulette). An entire thread just for managing the window size. Completely pointless derived classes (because at some point 2 years ago they thought there MIGHT be two versions that differed in a particular way, which there won't ever be, as evidenced by the fact that one of the derived versions stopped working ages ago due to changes in the base)."

        Looks like you're into some openssl code review, right ?

    2. My-Handle

      Re: Self-taught coder

      Oh god, that one's gold!

      I was crying by panel 3.

  11. Will Godfrey Silver badge
    Angel

    Nope

    Never done swear words, but have put in a few 'Oops' and 'Here be dragons' type comments here and there.

    I've pulled out a few I've seen, and don't usually bother to mention it. The commit message is usually something like 'Clarified XYZ labels / comments'.

    1. Anonymous Coward
      Anonymous Coward

      Re: Nope

      I fairly recently put in a “Deep wizardry here, only change this if you REALLY understand how it works.”, followed by a brief explanation. I hope I listen to my advice in a couple years when it’s time for editing…

    2. trindflo Bronze badge

      Re: Nope

      Needed to add delays for an undocumented flaw in a chip, and consequently needed to at least document what was going on in the code in comments. I made it a jeremiad starting with a quote from the walrus and the carpenter.

      Auditing code can be a tedious task and that section always broke up the day for the auditor such that they insisted it should never change.

  12. An_Old_Dog Silver badge
    Mushroom

    Swearing at the programmer, but not in the code

    During college, a CompSci friend and I were paid on a consulting basis to "take a look" at a malfunctioning program written in an old dialect of BASIC, which meant variable names were limited to two characters at most. This program was ~supposed to~ keep track of appointments in doctors' offices, but its ISAM-like data files were being corrupted, and data were being lost.

    We started by printing it out from my friend's IBM PC. We laid out his Citizen dot-matrix printer on his floor, hooked up a fresh box of fan-fold paper, and let 'er rip, thinking we'd read the source as it (slowly) printed.

    As we read, my friend began swearing, and I was pounding my fist on his carpeted floor.

    To save memory, or to obfuscate the souce, the guy who wrote this horror crammed as many statements on each line as he could. When it was fully printed out, the paper stack was four inches high.

    It contained ZERO comments, and the program came with ZERO code-relevant documentation.

    The programmer lived somewhere in California, USA, had quit providing bugfixes, and disclaimed any further responsibility for the thing. My friend and I made a pact to give that guy a mild(-ish) beating if we ever encountered him.

    1. rnturn

      Re: Swearing at the programmer, but not in the code

      > It contained ZERO comments, and the program came with ZERO code-relevant documentation.

      While it does contain /some/ comments, there's behemoth chunk of Perl that I've occasionally had to wade through at work. Around 8000 lines and most of the few-and-far-between comments are about as useful as:

      "# include_data method

      sub include_data ... "

      Gosh... thanks for that. And as mentioned, no documentation. Job security, I guess.

  13. MarkB
    Pirate

    Many years ago, when I was a young COBOL programmer, I occasionally had to maintain code written by a guy who had moved on to become an IT journalist - presumably because coding bored him.

    His code contained identifiers such as "mekon", "anastasia" and "creosote", while the variable declarations in one program spelled out this timeless message:

    the_queen_and_prince_phillip

    waved_and_smiled_today

    as_hordes_of_unemployed_miners

    hurled_pitprops_at_the_royal_yacht

    One of my colleagues got so fed up with this that they worked out what "mekon", "anastasia" and "creosote" were actually used for and did a bulk edit to provide more helpful names.

    In the same establishment, we maintained a transaction processing system, where each transaction had a 4-character identifier.

    The powers-that-be were disappointed (shall we say?) when the logs were examined, to see what the operators tended to enter into this field when they were bored. A colleague was tasked with writing a routine to check the id for rude words and display a "wash your mouth out with soap" message when they occurred, butI don't think that in the end we ever actually implemented it - he was looking forward to compiling the list, though.

    1. Loyal Commenter Silver badge

      Fortunately, modern IDEs have refactoring tools built in, so you can right-click-rename troublesome variables without having to manually go through the entire codebase and find all the references.

      Unfortunately, a good deal of our code-base is not written in a language that has a modern IDE.

      C'est la vie, n'est-ce-pas?

      1. My-Handle

        I inherited a project about five years or so in Visual Studio, which should by all accounts be able to do this kind of thing. For some reason, any function that attempts to search the entire code-base locks the machine up for two minutes and then crashes VS. I have no idea why.

    2. Anonymous Coward
      Anonymous Coward

      An IT journalist...... wonder if this bloke now works for el Reg?

      1. Anonymous Coward
        Anonymous Coward

        I am pretty sure he moved to France...

        1. Anonymous Coward
          Anonymous Coward

          Because he his a Leaver?

    3. Robert Carnegie Silver badge

      Key

      "The Mekon" from Venus is the arch enemy of space pilot Dan Dare, in "The Eagle" comic from the 1950s. "Anastasia" is Dan Dare's spaceship. "Creosote"... is that what the sled was painted with?

  14. Anonymous Coward
    Anonymous Coward

    I just used to occasionally put in a comment along the lines of

    # You need 5 beers to understand this code

    More often than not, it was copious comments about what the hell I was thinking when I wrote a particular piece of code. Very useful when you find out at 23:30 on New Year's Eve that someone changed an API and never bothered to tell anyone, let alone update any engineering specs (which I had to use originally to write the code). Did I swear a bit in my comments around my impromptu update? Of course, but as I was the only one who knew how to maintain the code and there was no-one else around to review, let alone understand it....

    1. Dan 4th

      I often leave comments along those lines in my code as well, usually when I was doing something stupid because the right thing meant a rewrite. For example, "I don't know who originally wrote this crap, but the newest pile is mine. {explain why}"

      In pre-covid days, I would often discover that someone was making an update when they started laughing.

  15. BeaucoupdeMalt
    Trollface

    I didn'azi it coming...

    ... when I was working as an intern refactoring some old code and found out someone was using some verses from Deutschland über alles to test UTF-8 encoding.

    I thought it wasn't explicit enough so I took the time to find and replace the string with some verses (I believe) from the north korean anthem. I commited the changes and patted myself for being a sneaky edgelord.

    I was disabused of that notion when my team leader called me the next morning to personally explain how git blame worked

    1. Ken Hagan Gold badge

      Re: I didn'azi it coming...

      I'm pretty sure korean uses more of a UTF8 implemention than german, but you probably need the pile of shit emoji and its friends to get out of the base plane and properly test things.

  16. DaveMcM

    Crap Credit?

    The software I work on every day still has a very old CrapCredit credit check function from before I started there over 16 years ago, so when attempting to place an order it will be rejected if CrapCredit() = true.

    A few other examples of inappropriate naming in the codebase have been cleaned up over the years, but CrapCredit() still endures.

    1. Ken Hagan Gold badge

      Re: Crap Credit?

      I'm assuming that it does a credit check. If so, I can't see the problem. If not, it needs a better name.

    2. Robert Carnegie Silver badge

      Re: Crap Credit?

      "Credit rating a problem" you can say, except then it should be if Crap() = true. But you can get around that.

  17. Caver_Dave Silver badge
    Happy

    English not their first language

    I employed a team that were about 50% UK citizens with the rest from all over the globe, (but currently resident in the UK). I am talking last century here, so a very uncommon team for a provincial town.

    Meetings were often "fruity" as people struggled to express themselves adequately.

    However, Max, a Ukranian who had been a conscript officer in the Russian Army (based on his ability to read and write), took the biscuit when Mr. Chen started. Unbeknownst to the rest of us, Max had given Mr. Chen a copy of Roger Mellies Profanisaurus to expand his vocabulary over the weekend.

    Thereafter, Mr. Chen greeted everyone (both sexes) with the phrase "you dirty git" and the insults he threw into general conversation were quite legendary.

    He went on to be quite successful, despite his language and the fact that European attempts to say his given name resulted in something very rude in Chinese, which always made him red with rage.

  18. Sam Therapy
    Happy

    Not in code - and I am self taught in V Basic but had already cut my teeth in other languages beforehand. My boss needed something putting together and gave me the spec, told me to use Visual Basic to do it. Spent a day or so trying stuff out, wrote the code, fully documented it and everyone was happy. No swears or dodgy comments.

    In graphics, however... Our publisher wanted us to write a game based on the fun fair thing called Kentucky Derby, where you throw a ball up a table to make a model horse run along a track. We thought it was a crap idea but he insisted, so we did it, and, within the limits of the actual gameplay, made a decent job. The throwing hand, though, I made it look like it was moving in a manner more reminiscent of a (ahem) Hand Shandy, which was picked up on in the reviews, and rightly so. It was our not so subtle way of commenting on the game concept.

    AFAIK, you can still find the game in various 8 bit archives. It was released for the Speccy, C64 and Amstrad 8 bits. The game's called Kentucky Racing.

    1. EVP
      Thumb Up

      Hahaa, well done! Especially the part where the reviewers noticed it, but you escaped scot free xD

  19. Anonymous Coward
    Anonymous Coward

    Hah.....I met Brad near La Guardia Airport in 1999....

    ....he was working on his own, writing an enterprise-level application for his employer. I was drafted in to review Brad's project, since the local management were interested in getting an independent view of the project (since around $200K had already gone, with no end in sight).

    Well......Brad was interesting to talk to:

    (1) No visible project plan

    (2) Not even rudimentary requirements

    (3) Not even a rudimentary test plan

    (4) A CV that said he'd never done anything remotely like this before....

    (5) ...and a pretty robust attitude to simple questions (you know....Who do think you are?)

    Sometimes you wonder what managers actually do!! It took them $200K down the drain before they started to wonder!! As for Brad.....who knows!

  20. Ross 12

    'self-taught Visual Basic programmer'

    When you hear those words you know you're in for a very bad time

    1. My-Handle

      Re: 'self-taught Visual Basic programmer'

      I feel targeted.

  21. Bobby Tables

    Richard Kiel memorial abend

    Ah, the days of putting humorous things into code... back in the day when I found myself running databases on Netware (don't ask, I still have nervous twitches) we occasionally saw the OS fall over reporting a "richard kiel memorial abend".

    https://eeggs.com/items/28509.html

    We reported it, and Netware fixed it.

    The abend still happened, but it produced a more straitlaced error message :)

  22. Pirate Dave Silver badge
    Pirate

    'self-taught Visual Basic programmer'

    I wasn't aware there was another way to learn VB in the mid-90's other than plowing through the two manuals that MS shipped with the disks, and maybe get a couple of VB books from the local bookstore. But then, I was in CompSci, and I recall the CompSci profs deriding it greatly. Maybe the InfoSys profs in the Business School taught classes in it. VB wasn't great, but it was a way to keep the kids fed and in clean diapers.

    Most of my swearing was in comments, and 90% of the time consisted of the phrase "...fucking Microsoft..."

    1. Anonymous Coward
      Anonymous Coward

      Re: 'self-taught Visual Basic programmer'

      "The primary purpose of the DATA statement is to give names to constants; instead of referring to pi as 3.141592653589793 at every appearance, the variable PI can be given that value with a DATA statement and used instead of the longer form of the constant. This also simplifies modifying the program, should the value of pi change." -- FORTRAN manual for Xerox Computers.

      1. rnturn

        Re: 'self-taught Visual Basic programmer'

        > should the value of pi change

        We were always told that the most accurate value of Pi you could use was "4.0*atan(1.0)" (yeah, FORTRAN). Then I started working on GPS applications in the 80s and the official ICDs mandated a very particular value of Pi that had to be used when dealing with GPS positioning. So, while it didn't necessarily change, a specific value might be mandated. (Though not as ham-handedly as the Indiana legislature tried one time.)

        1. Robert Carnegie Silver badge

          Re: 'self-taught Visual Basic programmer'

          The world isn't round, it is pear shaped (true) (a bit)

  23. aerogems Silver badge
    Mushroom

    Back in my college days

    I once ended up testing out of a class because we had an assignment. I forget what the assignment was, but I had a switch/case statement, and being a proper little coder, I had an "else" catch-all at the end which would error out saying something like, "I don't know what the fuck happened" because that condition should never be possible to meet. Professor gave me a zero on the assignment just because I used the word "fuck" and I went over their head to the dept. chair to arrange to test out of the class after that. There was also the fact that the professor would spend like half of any given lecture period talking about his time in the military, then the class was expected to just figure out how to complete assignments on their own time, and I didn't really feel like paying some obscene sum of money to listen to this guy reminisce.

    1. nintendoeats

      Re: Back in my college days

      I'm fairly confident that I would have gotten a 0 if I had included unnecessary obscenities in pretty much anything I ever submitted to a class. I'm thinking through all of my profs. I think their reactions would have ranged from " low-grade and a stern note in the edit" to "don't come back to my class".

      1. aerogems Silver badge

        Re: Back in my college days

        Not trying to claim I'm the hero of the story. Don't remember why I did that now, just that it seemed like a good idea at the time. Still, it did anger me enough to test out of the class and I could then put that time to better use. Also meant I didn't have to go into the CS building anymore. The smell of BO was like a solid fug in that building that would smack you in the face the moment you walked in and took your first breath, constantly being recirculated by the cooling fans on all the computer systems.

        Still, when the Microsoft source code leaked some years back, the whole argument that this sort of thing would get you fired in a professional setting kind of went out the window. As long as it wasn't in a customer-facing error prompt or something, no one would really care.

        1. nintendoeats

          Re: Back in my college days

          Oh yeah, you see this stuff in production code with some frequency. It's not a good idea, but at least (for better or worse) we know the compiler will always ignore the comments >_>

    2. The Oncoming Scorn Silver badge
      Pint

      Re: Back in my college days

      Had a tutor in Swindon, nicknamed after a certain reactor went into meltdown in the 80's, who loved any excuse to get into his favorite subject of Partial Address Decoding.

      We had him for about 90 mins in a Motorola 68000 environment, programming with a hex keyboard & little in the way of guidance as to what we were supposed to be doing.

      Then we had him for the whole Wednesday afternoon (Always chucking it down outside), trying to stay awake, many of us failed at that & then someone would trigger him.......

      Icon - Because the afternoon was going to be a write-off anyway!

  24. Paul Hovnanian Silver badge

    Not code, but ...

    ... in a company involved with engineering and drafting, it was common to find little Easter eggs in the drawings. One instance did go over the top though. When drawing very long objects, it is common practice to 'break' the object in some featureless region and to indicate the break with a squiggly line at both ends of the discontinuity. One drawing of a wing spar was found to have a couple of unusual break symbols that, when the drawing was folded to bring the symbols together (similar to the back page of a Mad Magazine), it resulted in an outline of a rather comely wench.

    Due to the lack of humor in management (and the risk of a possible harassment suit), the drawing was re-worked and re-released.

    1. Robert Carnegie Silver badge

      Re: Not code, but ...

      Now it's quite difficult not to visualise that.

      I suppose that most of the James Bond films titles, "Tales of the Unexpected" titles, and some "The Two Ronnies" episodes, possibly the one where Ronnie Barker is got up as eccentric television astronomer Patrick Moore for instance, prepared me to do so.

  25. Steve Hersey

    Not sure I'd recommend this practice today, but...

    On one memorably miserable project in the last century (single-handedly creating software support for a portable instrument; the full requirements list was: "We want it to talk to the flowmeter", and you can imagine how fast it went down hill from there), the Sales folks routinely gave out internal-use-only alpha test copies of the software to customers, in violation of explicit instructions to the contrary. Salesmen were always trying to steal a march on the others by showing off the newest (buggiest!) features.

    Until I added a profanity-laden startup splash screen stating that this test version was for <expletive> internal use only and NOT for <expletive> distribution to customers.

    And waited (not long) for the complaints to roll in from Sales. Which were then countered by a reminder that, as they had been repeatedly warned, they weren't supposed to be releasing alphaware to customers.

  26. Version 1.0 Silver badge
    Thumb Up

    I started writing assembler ... and remember this quote.

    "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are by definition not smart enough to debug it." - Brian Kernighan

    1. Robert Carnegie Silver badge

      Re: I started writing assembler ... and remember this quote.

      I think I learned by sad experience that doing the clever thing in program code now, would look not so clever when I reviewed the same program later - let alone anyone else wrestling with it.

  27. MrBanana

    Also seen in source code changes

    I can't remember what broken, although widely ingenious, code gymnastics had been previously performed, but the fix for it had the comments "We don't do that under Bozos Big Top".

  28. Boris the Cockroach Silver badge

    I tend to

    swear in the comments, or stick in things like "here be dragons" as a label for some calculation to map flat tool paths to rounds bits.

    A couple of previous programmers generally used swear words as lables and program names... along with opinions of the manglement/customers in the comments

    Thank gawd we keep all code internal only

    <<gibbers slightly at that suggestion by the deputy mangler about giving away source code to a sub contractor ....

    1. John Brown (no body) Silver badge

      Re: I tend to

      "A couple of previous programmers generally used swear words as lables and program names... along with opinions of the manglement/customers in the comments"

      Some years back, the suggestion was mooted that customers should have read-only access to their call-outs in our service and maintenance database. It was pointed out that those who came up with the idea should have a read through some of the fault resolutions entered by field engineers. IIRC, the eventual decision was that the time to sanitise the engineers comments would cost more than the projected customer benefits might be.

  29. wub

    No one else had this experience?

    Mostly self taught here (one quarter of Fortran in the 70's). Much later in life I entered a self-taught phase.

    I am a little surprised nobody else had a story like mine, though, self-taught or not.

    I still recall being righteously incensed the first time the language I was using (can't recall which) complained that I had named a routine with a reserved word. I believed I had found the perfect descriptive name - it really shouldn't have offended me so much that I was right, just not first. It did turn out that what my routine did was not closely related to what the reserved word referenced. So no, I wasn't reinventing a wheel here.

    The >second< time it happened in the same session I went to a place that I strongly suspect Brad reached and basically said, "OK, I bet THIS &*#^ word ain't reserved anywhere." But I wasn't able to hold on to the mood long enough to move all my names to the dark side. Although Brad's example doesn't make for a good role model, his dedication is impressive.

    1. the spectacularly refined chap

      Re: No one else had this experience?

      I still recall being righteously incensed the first time the language I was using (can't recall which) complained that I had named a routine with a reserved word. I believed I had found the perfect descriptive name - it really shouldn't have offended me so much that I was right, just not first.

      I've tripped on something similar in GCC several years ago, only in this case it was a poorly thought out extension that would conflict with a function called "index". Not a reserved word in C but that version of GCC didn't like it in default trim.

      I believe it's been fixed now but that kind of stunt instantly causes you to lose faith in a tool. If some numbskull with an ego thinks he can "improve" things by deliberately causing valid code to fail what else is lurking in there?

  30. GrahamRJ

    Warning names

    This is in our current code, and frankly I'm quite pleased with it.

    Our equipment uses plain-text commands to tell it to move things around and store settings. We needed to be able to erase settings as well though. At the time we had no protection against customers seeing our internal-use-only commands, and we weren't sure that production wouldn't do something silly either.

    The erase command is therefore called "stage.calibration.full-erase-of-entire-eeprom-with-no-undo-be-very-sure-before-doing-this".

    Our kit has been in production for 9 years now, and so far no-one has unintentionally erased settings. I'd say that's a win.

  31. matt38

    SET PASSWORD /GENERATE

    Back in the 80s, VMS had an optional security feature that could prevent users from choosing their own passwords, instead forcing them to choose one from a list of 5 random "generated" passwords. Of course, there was always the possibility the OS could generate a password with a naughty word in it, so there was allegedly a list of words which could not be used.

    Source code was on microfiche in those days, so sadly I never was able to add to my vocabulary by finding the de-facto list of forbidden words!

  32. innominatus

    Scunthorpe Sans

    Perhaps those who are more easily offended could use Scunthorpe Sans font in their IDE?

    1. the spectacularly refined chap

      Re: Scunthorpe Sans

      What an ⬛⬛⬛⬛, ⬛⬛⬛⬛⬛⬛⬛⬛, ⬛⬛⬛⬛ idea.

      I detest ⬛⬛⬛⬛ ⬛⬛⬛⬛ ⬛⬛ ⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛ ⬛⬛⬛⬛ ⬛ ⬛⬛⬛⬛⬛⬛⬛ that only ⬛⬛⬛⬛ ⬛⬛⬛ ⬛⬛⬛ ⬛⬛⬛⬛ with a large loaf and ⬛⬛⬛⬛ ⬛⬛⬛⬛⬛⬛⬛ ⬛⬛⬛⬛ ⬛⬛ ⬛ ⬛⬛⬛⬛⬛ perhaps a used typewriter ribbon.

      Fucking twat.

      1. JassMan

        Re: Scunthorpe Sans

        Reminds me of the old joke:

        If Typhoo put the T in Britain, who put the c*nt in Scunthorpe?

  33. TimMaher Silver badge
    Coat

    I have to admit...

    Many decades ago, I wrote a very rude warning in the comments surrounding some Informix 4gl that I had to work around to get a display/keyboard input to work despite their really crappy character management engine.

    Some years later, a team member working for my BH came across the code as their company had taken over my old mob.

    As I always sign off and date comments it was... embarrassing.

    1. Doctor Syntax Silver badge

      Re: I have to admit...

      Might this have involved some consultancy that decided it was a really good idea to create a lot of macros that expanded to provide ring menu text? And use them copiously? The macros that then clashed with built-ins in a later version of 4GL? I remember a long Sunday evening after an update with three of us going through a large suite to get it in working condition for the next day. Once we'd worked out what the mysterious problem was. At least there was no swearing in the non-existent comments.

  34. Anonymous Coward
    Anonymous Coward

    Worked on a system for a naval ship

    We had a programmer that who hopefully is still no longer a programmer.

    The variable names he used made derogatory comments about the customer.

    Comments in the code also made even more derogatory statements.

    It was before the days of being able to stop check-ins until they had been approved.

    I ended up having to review every single line of code and every document before we delivered the system to the customer.

    TBH this is the only time in 35years that I've had to deal with something like this.

    1. Loyal Commenter Silver badge

      Re: Worked on a system for a naval ship

      We've got some customers where this sort of thing doesn't go in the comments, it gets said out loud.

  35. Slipoch

    First few mistakes

    Major mistakes:

    1. using VB as a production ready language

    2. using Access for anything (remember the old 65k records then fall over issue?)

    This reminds me of VB code that had >5000 lines (this is one function) and > 40 paramaters because the object that containerised them only existed in the local namespace, then putting them all into the object, then using them all in another function call because it was external.

  36. Paul_Canada

    Profanity galore

    When I was a new developer, I used to leave rather rude excecutives in the git messages whenever I would get frustrated. I never considered that years later people might dig back into that history! It was pretty embarrassing because the recently new manager at the time didn’t like me, and was always bringing me up on it. Fortunately I quit not too longer after, but it makes me feel warm and fuzzy to know that my sweary messages have been immortalized.

    1. Robert Carnegie Silver badge

      Re: Profanity galore

      David Brent? Douglas Reynholm? Donald Trump? Or do you mean rather rude expletives...

  37. Anonymous Coward
    Anonymous Coward

    Seen in the wild (i.e. production code):

    * variables turd1, turd2, etc

    * variables alice, bob, charlie, etc (IIRC the authors children's names were used)

    Almost as annoying: error data collected, deleted and a one word expletive sent to the log file.

  38. Rolly_Poly
    Holmes

    Philip the Brit, spelt colour as 'color', humour as 'humor' and sympathise as 'sympathize'?

    Is this a story lifted from a US site and posted here, with a few tweaks?

    And Richard studied English Lit. too

    1. Anonymous Coward
      Anonymous Coward

      Working with Americans

      I've spend my whole life as an Engineer working with American & British engineers so my spelling tends to reflect who I think is the bigger audience, which is often Americans. Thing is I find myself using American spelling more and more, especially spelling that does away with a single letter. It's more efficient after all.

      I've not started calling a boot, a trunk though, at least not yet. A boot has one less letter than trunk so all you Americans out there should start calling your cars trunk, a boot for the sake of efficiency.

      I'm not sure about calling a British car's front a Bonnet though, hood is better. So from now on its hood and boot. OK.

      1. MJI Silver badge

        Re: Working with Americans

        Hood, isn't that the roof of a convertable?

        As to trunk, their cars can be elephantine, but wrong end.

  39. Wim Ton

    A colleague demonstrated a program inadvertently built with the debug warnings on. With a little-used menu, a warning "malloc first, you d*khead!" popped up. The customer (who was reasonably IT savvy) took it with a laugh.

  40. Anonymous Coward
    Anonymous Coward

    Swear like a trooper

    I never swear in code, but would still laugh at the odd word, but as I've got older I swear like a trooper in real life especially in our currently dis-functional world.

    Can't get a GP appointment for love nor money, yep **** that, lazy *******.

    Can't get a walk-in x-ray at the local hospital without making a appointment and waiting another two weeks. Holy ****. You know in the old days you could just walk in and get these tests same day ! Useless ****** NHS.

    And people put up with this ****. It doesn't need to be like this.

    Maybe it all went wrong with the smart phone. Too many hours wasted on forums/Facebook/YouTube rather than getting on with your job.

    ******* Smartphones.

    Or maybe it all went wrong when the NHS rolled out PCs. You won't believe how inefficient a PC can make you in the admin department. What's the solution? **** knows.

  41. My-Handle

    I used to work with a guy like Brad. Don't get me wrong, I don't particularly care about swears in comments etc. I tend to prefer snark and sarcasm myself. But our version of Brad just swore for everything. Every variable and function name a profanity, and not particularly inventive ones either (especially when it got to f@[#1, f@[#2 etc). Like Brad, it just got in the way of every other developer who worked on the project who now had no idea what his code did. He even authored it with made up names.

    As a newbie encountering his code for the first time, I turned to my mentor and indicated the name in the code. Who then turned and shouted the name across the room, and everyone turned to look at Brad, who was now turning bright red and trying to be as small as possible.

    He didn't stop doing it though.

  42. Stuart Castle Silver badge

    I used to do student tech support, so I've seen a *lot* of buggy source code.

    One website springs to mind.

    The students had been given a small project Basically, they needed to create a small webstore that offered the ability to save the user details (including any trolleys) into an account.

    One user reported that his site wasn't allowing any logins.

    I expected this to be an easy fix, as the other students doing the course had simple problems. In theory, his problem was simple. Unfortunately, it was complicated by the fact that he'd given the variables he was using reference codes (A1, A2, B1, B2 etc) with no apparent reference anywhere regarding what each variable was supposed to be storing. Not only that, but he had 52 of them.

    I think what had happened was he'd plagerised different bits of the code from different places, and they each had their own variables.

    Unfortunately, despite being a good coder myself, I really couldn't find my way through his source code, and as such, couldn't fix his problem.

    I had to advise him to talk to his lecturer. Bearing in mind nearly all his code was plagerised, I suspect he didn't.

  43. MJI Silver badge

    I work with a victim of this

    A previous job he had to maintain code where all the variables were girls names.

    A nightmare by all accounts.

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon

Other stories you might like