• NULLPTR (unregistered)

    try{throw new nullptr;} catch(Null){};

  • bvs23bkv33 (unregistered)

    error: expected type-specifier before 'nullptr'

  • LCrawford (unregistered)

    Then there are the wags who leave a misspelling because they think it's funny, and everyone else has to stare at the misspelled code forever. I don't think that's the case here because the string identifier

    $logger = LoggerProvider::get('frist');

    causes a fatal error

  • (nodebb) in reply to LCrawford

    Then there are the wags who leave a misspelling because they think it's funny, and everyone else has to stare at the misspelled code forever.

    There are worse things than that, like a guy I inherited code from one time. He thought it would be amusing to name a key core variable of a primitive embedded multithreading system after the new car he bought. Neither I nor my colleague (not the originator of this particular thing) dared change the name of golf_gti, which makes us part of the WTF, I guess.

  • (nodebb)

    It's sad really. That exception couldn't even find anybody willing to log it, and it had to log itself.

  • NULLPTR (unregistered) in reply to LCrawford

    Depends on where the misspelling lies. If its at some API function name and managed to slip into production fixing it without a major version is hard.

  • Scott (unregistered)

    Sometimes, exception handling is tough. Your initial reaction is, "I should do something", but sometimes it's appropriate to do nothing but let the next layer up know.

    Of course, you have to actually understand what is an exceptional condition. Just earlier this week, we came across a service call that did an inquiry and returned results. Unless nothing was found, in which case it threw an exception.

    Sigh. Not finding results is not an exceptional case. We fixed it to just return an empty collection, the system got happier.

  • Mika (unregistered)

    At first I read "exceptoin" as "exceptcoin", and was already fully expecting some blockchain-driven eventually-consistent, cryptographically secure logging framework. The actual story turned out to be much saner.

  • PWolff (unregistered) in reply to Mr. TA

    Sadly enough, this is probably really the reason of this WTF.

  • PWolff (unregistered) in reply to Scott

    Not finding results is not an exceptional case.

    Depends on the context.

    Good Ol' MS-DOS' (and hence today's Windows console's) DIR command returns an ERRORLEVEL of 1 if no file fitting the pattern is found.

    And Oracle thinks it would be a great idea to replace all empty strings by NULL.

  • PWolff (unregistered)

    $logger = LoggerProvider::get('exceptoin');

    Who in their right mind would ever evaluate a string for accessing an object, except in the obvious case of parsing/deserialization?

    Alas, there are way too many development systems on the loose that encourage or even enforce this insanity (and others).

  • 🤷 (unregistered) in reply to LCrawford

    Then there are the wags who leave a misspelling because they think it's funny, and everyone else has to stare at the misspelled code forever.

    At my new job I have to deal with an "ApplicationCashe", instead of an "ApplicationCache". But this misspelling is so deeply rooted into the code base it's really not that easy to change it.

    Also, there's a database field with a misspelling. Translated into english it means "goosedays" instead of "full-time" as it was intended to. Again, it's used in various places, so changing it might have some very unpleasant side effects. It's easier to just accept the misspelled name and move on.

  • Cidolfas (unregistered)

    At my company one of the earliest devs thought the word "dimension" was spelled "dimention" - it was EVERYWHERE. -_-

  • (nodebb)

    At least they didn't do this: https://en.wikipedia.org/wiki/HTTP_referer ... 28 years ago.

  • Anonymous') OR 1=1; DROP TABLE wtf; -- (unregistered)

    Brillant

  • akozakie (unregistered)

    That's not "fixed". With a permanent bug like that it's clear that this class is not currently in use in live code. Fixing the spelling will change that soon (very soon, as the fact that the bug appeared means that someone's trying to use it right now). This was the perfect moment to really fix it - WONTFIX, deprecated, do not use! The part which tried to use it should be fixed, not this... this... thing.

  • Appalled (unregistered) in reply to Jaime

    That misspelling of referrer irked me every time I needed to type it into some code, or search for it in a dump. I'd only occasionally get it wrong, but wrong or right, I'd always think to myself "Who were these lame brains that couldn't spell"

  • Muriel (unregistered) in reply to akozakie

    The exception was in use, that's why it was "fixed".

    Prior to being fixed any time it was used the page would fatal and the original developer responsible for the original code didn't really handle exceptions so the page 503ing when it was thrown was their expected behaviour and as they were the only developer no one questioned the bizarre practices.

    The self logging exception is still used in a few places because not everywhere has yet been updated to actually handle exceptions appropriately and at least until said change is made having the exception record it's usage gives us reminders of what issues are most commonly encountered giving us a useful running update on what bits of code using it need to be fixed/replaced most urgently. Every usage will eventually be replaced, but it's unfortunately something that will take time to review if each usage is even required and/or handle appropriately, meanwhile the person paying my wages has their own list of things they want that don't involve just cleaning up previous developers mistakes.

  • Hal (unregistered) in reply to NULLPTR

    I am sure some would disagree with me but what I would say in that instance is do a point release. In that point release rename the function to fix the typo and create an alias with the old name/signature. Mark thee old name/signature as deprecated immediately; so everyone has a warning its going away in the next major version.

  • Jaloopa (unregistered)

    I see misspellings of all sorts of commonly used words even in big libraries from well known companies like Microsoft. Almost every instance you see of Colour, Serialise etc. is wrong. I don't understand how such blatant errors slipped through

  • Jonathan (unregistered)

    I'm excessively proud for having figured out that the 'goosedays' programmer spoke German.

  • ガ_ガ (unregistered) in reply to Cidolfas

    Lucky... One of our "SW supplier" believed in "principle stress" (actually "principal"), "Romberg-Osgood equation" (actually "Ramberg"), and a lot of common misspellings like "Celcius deegrees". Of course they were also "keywords" to be recognized in some input files, so (in the rewrite from scratch)I had to check also for the misspelled versions, to keep compatibility. Very sad.

  • rsk (unregistered)

    And another WTF is get_root_cause neither doesn't return a value (nor does it do anything with root) so it's useless.

  • sizer99 (google) in reply to Mika

    Hodl! Hodl!

  • sizer99 (google)

    Ha, and what code did I just run into immediately after reading this article?

    | var messageLenght = Mathf.Min(23, message.Length); | texCords[texCords.Length - 1] = new Vector2(0, messageLenght); | for (int i = 0; i < texCords.Length; i++)| | { | if (i >= messageLenght) break; | ... | }

    In this case it's local and would be trivial to refactor, they just didn't care.

  • eric bloedow (unregistered)

    reminds me of one of my old PCs: it developed some sort of problem in Windows itself, specifically the routine that handles improper shutdowns! so when ANY program shut down improperly, Windows would glitch and keep trying to shutdown the shutdown program itself, causing the same glitch again and again! it took a full re-install of Windows to fix that!

  • Zero (unregistered) in reply to Jaloopa

    Nice troll. Let's see who falls for it.

  • jd (unregistered) in reply to Cidolfas

    Did they have dimentia then?

  • Anon (unregistered) in reply to Appalled

    On the subject of misspelling: I once had to write a module that exported data in XML that was sent to an official UK government system for processing/reporting.

    The technical documentation for the XML format was full of typos and misspelled words in the tag names and I, naively, thought the misspellings were just bad documentation and unthinkingly ensured the tags in my XML were spelled correctly.

    On my first tests, sending the XML data to the government project, it was all automatically rejected. The misspellings were obviously in the validation schema the government was using in their own import software etc.

    I had to go back to my export software and put all the spelling mistakes back. It really bugged me!

  • NULLPTR (unregistered) in reply to Jaloopa

    Depends on which language header the developers have included. American english is different than british english.

  • Jaloopa (unregistered) in reply to NULLPTR

    Nice try. Next you'll be telling me that the person I saw write today's date as 1/30/2020 didn't think there are 30 months in a year but is using some sort of "date format" to confuse people

  • Sam (unregistered) in reply to NULLPTR

    Seems American humour is different to British humour too.

  • (nodebb) in reply to PWolff

    I expect the only way this string is 'evaluated' is by hashing it. I wouldn't say it makes sense exactly, an enum would be better (and not allow you to misspell it), but I've seen worse stringly typed code.

  • MiserableOldGit (unregistered) in reply to 🤷

    I remember a rather surreal code review with one particularly dimwitted development manager. He kept asking me where the substance of my code was, after a few confused minutes he clarified by saying "Look, when i click here your program is supposed to substantiate a new substance and i can't see it anywhere!!!".

    The reason he couldn't see the instance when I thought he had instantiated? the program was supposed to pop an icon into the systray when it started and he was simply running individual functions in any old order from the debug window, skipping all the startup and initialisation routines. He didn't understand why the behaviour was a bit unexpected. His coding tended to consist of one public function containing a massive do - select (or while - switch) construct so I realised the poor incompetent fool was out of his depth.

    I had been wondering about some of the odd language in the code base, I turned my attention to working on the language in my CV after that.

  • 🤷 (unregistered) in reply to Jaloopa

    We all know the only correct date format is dd.ff.hh.HH.mm.MM.ss.yy. It's sorted alphabetically. And yes, the current date time is 30.42.02.14.02.01.25.20. Everyone should be able to understand that!

  • 🤷 (unregistered) in reply to MiserableOldGit

    Well, serves you right for writing code without substance! ;P

    I mean, I am bad at remembering the name of things I work with on a daily basis (ask me about inheritance and I would start to stammer and give incoherent answers, but I'm pretty sure I have used inheritance a lot during the past few years...), but this is a WTF of it's own.

  • Dave Hemming (unregistered)

    As time working in IT increases, the chances of working on a system where an exception logger calls itself in the event of a logging exception approaches 1.

  • K (unregistered) in reply to Sulis

    I wish Fortan HAD type checked enums... Instead it has a declaration syntax for intgers acting as an enum.

  • doubting_poster (unregistered)

    There's an endless loop as well: call get_root_cause on an exception that lists itself as its cause. You'd think that's dumb, but there are more libraries that do this then you'd believe -_-

  • WTFguy (unregistered) in reply to PWolff

    @PWolff ref "Good Ol' MS-DOS' (and hence today's Windows console's) DIR command returns an ERRORLEVEL of 1 if no file fitting the pattern is found."

    Going waaay back to MS-DOS v1.0 IF EXISTS didn't exist yet. So DIR's errorlevel was originally the only way to check for file/folder existence. Some Googling suggests IF EXISTS was added in v3.0 or 3.x.

    DIR's behavior also has the convenient result that it checks for existence of both files and folders. Which was an issue with IF EXISTS all the way from when it was introduced until WinME. Prior to NT it was only a file check, not a folder check. Though well-known work-arounds existed.

    IF EXISTS was improved in NT to be able to properly detect files or folders if you used the correct syntax; no work-arounds necessary.

    All this is ancient history, but maintaining absolute backcompat is a bitch.

  • WTFguy (unregistered)

    I should've mentioned that folders (aka directories) were added in MS-DOS 2.0, so of course DIR from MS-DOS v1.0 up to today must still return errorlevel 1 when the specified item(s) aren't found regardless of their type(s).

  • Officer Johnny Holzkopf (unregistered) in reply to MiserableOldGit

    More substance (and maybe even more substinance) can be found in a medical billing program that lets you pay for "standardized intelegense test"...

  • GalacticCowboy (unregistered)

    At one of my former companies, one of the developers used "copy/paste inheritance" to spread a certain string-manipulation method around the codebase. His implementation contained a bug, which we fixed by just using the standard library method that did the same thing. Oh, and his implementation contained a misspelled word, which made the search/delete much simpler.

  • MiserableOldGit (unregistered) in reply to Officer Johnny Holzkopf

    I don't think even medical substances could explain the guy's tangled while switch constructs. Although maintaining that crap has probably driven several coders down that path. His other favourite was that he believed you should never ever exit out of a function except at the bottom, went meant even more gotos sprinkled around. Quite a few of these functions never exited at all, they just went roundandroundandround so we even had timers and callbacks to get past this crap.

  • PMF1 (unregistered)

    Pebkac is not an exception, it's the rule.

Leave a comment on “Exceptoinal Spelling”

Log In or post as a guest

Replying to comment #:

« Return to Article