• Say what (unregistered)

    "So the original developer solved a problem they'll never have, by re-implementing built-in methods."

    My guess is that at some point in the development, there was one powerful stakeholder who had heard that Oracle Was The Best and was determined that nothing else would do. And so these methods were created to ensure that when the "inevitable" change happened, everything would be fine. Then that one powerful stakeholder got hit by a bus or, perhaps, their own ego, and disappeared from the pages of history, leaving only this method behind to mark their passing.

    Who was that stakeholder? Why did they want Oracle uber alles? What happened to them? This is a mystery, but not a WTF. At most, it's a "didn't know there was a builtin that did this" ... really, really minor WTF.

  • (nodebb)

    You cannot use Oracle without Oracle abusing you.

  • P (unregistered)

    So "abstractions that eventually didn't happen" is a WTF now? This sounds like TRWTF.

    Also, the article is written very confusingly with who did what in the codebase. You're making me think that he has split personality disorder or something.

  • Michael (unregistered)

    TRWTF is to have log as optional but then use it for log.Debug() and log.Error()

  • Brian (unregistered)

    In these days where every project uses half a dozen in-house NuGet packages (and a few dozen third-party ones), you can't just delete a bad utility function. Sometimes deprecation is the only option, and you've gotta hope that the other devs are responsible enough to heed the warnings and fix the code that calls it.

  • 🤷 (unregistered)

    While Remy isn't a german expert, I sure am (not really, it just happens to be my native language).

    So yeah, the comments read:

        // Convertion of a VARCHAR(32) saved Guid (for example in Oracle-Server)
        // into a data type that's valid for System.Guid.
        // Example:
    

    And the second one:

        // Convertion of the System.Guid data type (for example in SQL-Server)
        // into a (for example usable in Oracle-Server) String with 
        // a fixed length of 32 chars, for example as (VARCHAR2(32)
        // Example:
    

    And, if you paid attention, you'd noticed that "example" means "Beispiel" (/ˈbaɪ̯ʃpiːl/) in German. Now you learned something! (And yes, the capitalization is important, in German ALL nouns are capitalized, which of course is the real WTF.)

    Also, I am by no means an English expert and I paraphrased the comments. So please excuse any crudeness or butchering of the English language. I did mean no harm!

  • MiserableOldGit (unregistered)

    I wonder if at one time somebody cut and pasted in some functions nicked from an Oracle implementation and couldn't be bothered to convert them properly?

    Could also have been an upstream or downstream partner they were exchanging data with.

    Still a WTF either way. Classic case of thinking you must be the first ever dev to encounter an obvious problem.

  • (nodebb)

    I'm confused by the line of code where they assign the formatted GUID: string newId = $"{... What's the dollar sign doing there? This is Java, right? Is that a typo or some weird operator I'm not aware of?

  • (nodebb) in reply to bdoserror

    Also, apparently I'm confused about how to format my comment, the line I'm asking about is:

    string newId = $"{...

  • (nodebb) in reply to bdoserror

    No this is C# string interpolation, search for it, you'll see the syntax documentation.

  • (nodebb) in reply to Mr. TA

    Ah, thanks. Such similar looking code, it was hard to tell.

  • mihi (unregistered) in reply to bdoserror

    In Java, you would have @Deprecated instead of [Obsolete].

  • mihi (unregistered)

    Also, when you (initially) import others' code into source control, you should always set an author name that is not you. In git this is very easy (as it distinguishes between --author and --committer), for SVN you probably either really need a dummy user or you'd have to use some post-revprop-change hooks. But it's doable and definitely helps blaming later.

  • George (unregistered) in reply to Michael

    Will it still work if the logger is set to the default value of null that’s declared in the method signature?

    NTRWTF, but a nice pseudo-WTF.

  • (nodebb)

    An even bigger WTF is that in Oracle a GUID is not even stored as a VARCHAR2(32). It can be represented as a VARCHAR2(32), but it is stored as a 16-byte RAW type.

    This code looks like stack-overflow-copy-paste style of programming.

Leave a comment on “GUID Enough, I Guess”

Log In or post as a guest

Replying to comment #:

« Return to Article