Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. The Weird and The Wonderful
  4. Is this how we deprecate now?

Is this how we deprecate now?

Scheduled Pinned Locked Moved The Weird and The Wonderful
comquestion
5 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    TheyCallMeMrJames
    wrote on last edited by
    #1

    Yoy. At least they used camel casing ;)

    static void AddEquipment(object dontUseThisWeHaveToDeleteThisMethod)

    The parameter isn't used in the method...I think that the guy must've added the param to the method to make other code break (maybe using the compiler to find where it was called from) and then basically abandoned the code. Didn't comment anything or comment the code out or anything. I think I'm going to start using gems like this for NEW methods. Just sprinkle a couple of these across new APIs and let people wonder...

    They Call me Mister James

    O S P M 4 Replies Last reply
    0
    • T TheyCallMeMrJames

      Yoy. At least they used camel casing ;)

      static void AddEquipment(object dontUseThisWeHaveToDeleteThisMethod)

      The parameter isn't used in the method...I think that the guy must've added the param to the method to make other code break (maybe using the compiler to find where it was called from) and then basically abandoned the code. Didn't comment anything or comment the code out or anything. I think I'm going to start using gems like this for NEW methods. Just sprinkle a couple of these across new APIs and let people wonder...

      They Call me Mister James

      O Offline
      O Offline
      oggenok64
      wrote on last edited by
      #2

      I like that! A former collegue of mine had a tendency to use very long and elaborate variable/function/method/property names. One day i invented an unused property called __AVeryLongAndLargelyUnusedProperty_PKA. PKA being his initials. Need i say that i forgot all about it. The thing went into production, until years later PKA one day yelled at me: What the shikes is this?

      1 Reply Last reply
      0
      • T TheyCallMeMrJames

        Yoy. At least they used camel casing ;)

        static void AddEquipment(object dontUseThisWeHaveToDeleteThisMethod)

        The parameter isn't used in the method...I think that the guy must've added the param to the method to make other code break (maybe using the compiler to find where it was called from) and then basically abandoned the code. Didn't comment anything or comment the code out or anything. I think I'm going to start using gems like this for NEW methods. Just sprinkle a couple of these across new APIs and let people wonder...

        They Call me Mister James

        S Offline
        S Offline
        StM0n
        wrote on last edited by
        #3

        Looks very brownfield to me :-D

        (yes|no|maybe)*

        1 Reply Last reply
        0
        • T TheyCallMeMrJames

          Yoy. At least they used camel casing ;)

          static void AddEquipment(object dontUseThisWeHaveToDeleteThisMethod)

          The parameter isn't used in the method...I think that the guy must've added the param to the method to make other code break (maybe using the compiler to find where it was called from) and then basically abandoned the code. Didn't comment anything or comment the code out or anything. I think I'm going to start using gems like this for NEW methods. Just sprinkle a couple of these across new APIs and let people wonder...

          They Call me Mister James

          P Offline
          P Offline
          PIEBALDconsult
          wrote on last edited by
          #4

          public int F ( int Reserved ) ...

          1 Reply Last reply
          0
          • T TheyCallMeMrJames

            Yoy. At least they used camel casing ;)

            static void AddEquipment(object dontUseThisWeHaveToDeleteThisMethod)

            The parameter isn't used in the method...I think that the guy must've added the param to the method to make other code break (maybe using the compiler to find where it was called from) and then basically abandoned the code. Didn't comment anything or comment the code out or anything. I think I'm going to start using gems like this for NEW methods. Just sprinkle a couple of these across new APIs and let people wonder...

            They Call me Mister James

            M Offline
            M Offline
            Mario Majcica
            wrote on last edited by
            #5

            Hmmm, let's improve it!

            static void AddEquipment(object dontUseThisWeHaveToDeleteThisMethod)
            {
            if (dontUseThisWeHaveToDeleteThisMethod is bool && (bool)dontUseThisWeHaveToDeleteThisMethod) return;
            }

            Seems better?

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups