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. The Lounge
  3. A programming question!

A programming question!

Scheduled Pinned Locked Moved The Lounge
question
24 Posts 18 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.
  • P Offline
    P Offline
    PIEBALDconsult
    wrote on last edited by
    #1

    (I broach this subject here because I don't think there's an answer. Note the "rant" icon.) Consider: ObsoleteAttribute -- Marks the program elements that are no longer in use. What would be the opposite/complement? A way to mark some code as not-yet-ready-for-primetime? Not to the extent of throwing a NotImplementedException, because the code exists and works (mostly). Not a todo either; that's too passive. But, if I have a kludgey Method I intend to rework at some convenient future time, I want to be reminded about it every time I compile code which calls it. Even if the Method has been compiled into a DLL. An ObsoleteAttribute will do this -- but I expect that it would be confusing to my colleagues. Even a UseAtYourOwnRiskAttribute would be better.

    M M L C D 10 Replies Last reply
    0
    • P PIEBALDconsult

      (I broach this subject here because I don't think there's an answer. Note the "rant" icon.) Consider: ObsoleteAttribute -- Marks the program elements that are no longer in use. What would be the opposite/complement? A way to mark some code as not-yet-ready-for-primetime? Not to the extent of throwing a NotImplementedException, because the code exists and works (mostly). Not a todo either; that's too passive. But, if I have a kludgey Method I intend to rework at some convenient future time, I want to be reminded about it every time I compile code which calls it. Even if the Method has been compiled into a DLL. An ObsoleteAttribute will do this -- but I expect that it would be confusing to my colleagues. Even a UseAtYourOwnRiskAttribute would be better.

      M Offline
      M Offline
      Marc Clifton
      wrote on last edited by
      #2

      PIEBALDconsult wrote:

      A way to mark some code as not-yet-ready-for-primetime?

      [UnderDevelopment] [Future] [ComingSoon]

      PIEBALDconsult wrote:

      But, if I have a kludgey Method I intend to rework at some convenient future time, I want to be reminded about it every time I compile code which calls it.

      [Sh*ttyCodeAhead] (self-sensored that, lol) [KludgeyCode]

      Latest Articles:
      Client-Side Type-Based Publisher/Subscriber, Exploring Synchronous, "Event-ed", and Worker Thread Subscriptions

      K 1 Reply Last reply
      0
      • M Marc Clifton

        PIEBALDconsult wrote:

        A way to mark some code as not-yet-ready-for-primetime?

        [UnderDevelopment] [Future] [ComingSoon]

        PIEBALDconsult wrote:

        But, if I have a kludgey Method I intend to rework at some convenient future time, I want to be reminded about it every time I compile code which calls it.

        [Sh*ttyCodeAhead] (self-sensored that, lol) [KludgeyCode]

        Latest Articles:
        Client-Side Type-Based Publisher/Subscriber, Exploring Synchronous, "Event-ed", and Worker Thread Subscriptions

        K Offline
        K Offline
        k5054
        wrote on last edited by
        #3

        Marc Clifton wrote:

        [UnderDevelopment] [Future] [ComingSoon]

        [BetaQuality], and presumably [AlphaQuality]. Not a .Net developer, but it looks like you can create your own Attributes: [Writing Custom Attributes | Microsoft Docs](https://docs.microsoft.com/en-us/dotnet/standard/attributes/writing-custom-attributes), so maybe actually doable?

        Keep Calm and Carry On

        P 1 Reply Last reply
        0
        • K k5054

          Marc Clifton wrote:

          [UnderDevelopment] [Future] [ComingSoon]

          [BetaQuality], and presumably [AlphaQuality]. Not a .Net developer, but it looks like you can create your own Attributes: [Writing Custom Attributes | Microsoft Docs](https://docs.microsoft.com/en-us/dotnet/standard/attributes/writing-custom-attributes), so maybe actually doable?

          Keep Calm and Carry On

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

          Could work if they allowed deriving from ObsoleteAttribute. But. They. Don't. :mad:

          J V 2 Replies Last reply
          0
          • P PIEBALDconsult

            Could work if they allowed deriving from ObsoleteAttribute. But. They. Don't. :mad:

            J Offline
            J Offline
            Jon McKee
            wrote on last edited by
            #5

            For probably good reason. [[^]](https://www.codeproject.com/Articles/5277368/A-Walkthrough-Csharp-Attributes?msg=5745078#xx5745078xx) Also that article is a solid introduction :thumbsup:

            1 Reply Last reply
            0
            • P PIEBALDconsult

              (I broach this subject here because I don't think there's an answer. Note the "rant" icon.) Consider: ObsoleteAttribute -- Marks the program elements that are no longer in use. What would be the opposite/complement? A way to mark some code as not-yet-ready-for-primetime? Not to the extent of throwing a NotImplementedException, because the code exists and works (mostly). Not a todo either; that's too passive. But, if I have a kludgey Method I intend to rework at some convenient future time, I want to be reminded about it every time I compile code which calls it. Even if the Method has been compiled into a DLL. An ObsoleteAttribute will do this -- but I expect that it would be confusing to my colleagues. Even a UseAtYourOwnRiskAttribute would be better.

              M Offline
              M Offline
              Mike Hankey
              wrote on last edited by
              #6

              [Incomplete] [LitelyTested] [CutAndPasteAtYourOwnRisk] [CodeProjectQAQuality] [hmmmmNotSureAboutThis] [YouFeelLucky]

              The less you need, the more you have. JaxCoder.com

              C J 2 Replies Last reply
              0
              • P PIEBALDconsult

                (I broach this subject here because I don't think there's an answer. Note the "rant" icon.) Consider: ObsoleteAttribute -- Marks the program elements that are no longer in use. What would be the opposite/complement? A way to mark some code as not-yet-ready-for-primetime? Not to the extent of throwing a NotImplementedException, because the code exists and works (mostly). Not a todo either; that's too passive. But, if I have a kludgey Method I intend to rework at some convenient future time, I want to be reminded about it every time I compile code which calls it. Even if the Method has been compiled into a DLL. An ObsoleteAttribute will do this -- but I expect that it would be confusing to my colleagues. Even a UseAtYourOwnRiskAttribute would be better.

                L Offline
                L Offline
                Lost User
                wrote on last edited by
                #7

                #define, #if

                and some imagination.

                It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it. ― Confucian Analects: Rules of Confucius about his food

                1 Reply Last reply
                0
                • P PIEBALDconsult

                  (I broach this subject here because I don't think there's an answer. Note the "rant" icon.) Consider: ObsoleteAttribute -- Marks the program elements that are no longer in use. What would be the opposite/complement? A way to mark some code as not-yet-ready-for-primetime? Not to the extent of throwing a NotImplementedException, because the code exists and works (mostly). Not a todo either; that's too passive. But, if I have a kludgey Method I intend to rework at some convenient future time, I want to be reminded about it every time I compile code which calls it. Even if the Method has been compiled into a DLL. An ObsoleteAttribute will do this -- but I expect that it would be confusing to my colleagues. Even a UseAtYourOwnRiskAttribute would be better.

                  C Offline
                  C Offline
                  CodeWraith
                  wrote on last edited by
                  #8

                  How about a SinisterHackAttribute for makeshift code that still needs attention? Don't beat around the bush and use a name that says exactly what's going on. And you might also need the TheBossWillKillYouIfYouMessWithThisCodeAttribute.

                  I have lived with several Zen masters - all of them were cats. His last invention was an evil Lasagna. It didn't kill anyone, and it actually tasted pretty good.

                  1 Reply Last reply
                  0
                  • P PIEBALDconsult

                    (I broach this subject here because I don't think there's an answer. Note the "rant" icon.) Consider: ObsoleteAttribute -- Marks the program elements that are no longer in use. What would be the opposite/complement? A way to mark some code as not-yet-ready-for-primetime? Not to the extent of throwing a NotImplementedException, because the code exists and works (mostly). Not a todo either; that's too passive. But, if I have a kludgey Method I intend to rework at some convenient future time, I want to be reminded about it every time I compile code which calls it. Even if the Method has been compiled into a DLL. An ObsoleteAttribute will do this -- but I expect that it would be confusing to my colleagues. Even a UseAtYourOwnRiskAttribute would be better.

                    D Offline
                    D Offline
                    Daniel Pfeffer
                    wrote on last edited by
                    #9

                    I'm going to be the heretic here, and claim the "kludgey" code should not be in the public repository of your library. It should either work properly, or be kept in your private repository until it can be fixed. To give examples from other engineering fields, would you tolerate a building code which deems it acceptable that a building will collapse approximately 1 in a million times that you lock the front door? would you tolerate electronics that burst into flame approximately 1 in a billion times you switch them on? So why should your clients be expected to tolerate "kludgey" code?

                    Freedom is the freedom to say that two plus two make four. If that is granted, all else follows. -- 6079 Smith W.

                    D 1 Reply Last reply
                    0
                    • M Mike Hankey

                      [Incomplete] [LitelyTested] [CutAndPasteAtYourOwnRisk] [CodeProjectQAQuality] [hmmmmNotSureAboutThis] [YouFeelLucky]

                      The less you need, the more you have. JaxCoder.com

                      C Offline
                      C Offline
                      CodeWraith
                      wrote on last edited by
                      #10

                      You forgot some important things. [DontTouchOrTheBossWillRipYourHeadOff] [UnmaintainableButLightningFast] or simply [ThisIsDeliberate]

                      I have lived with several Zen masters - all of them were cats. His last invention was an evil Lasagna. It didn't kill anyone, and it actually tasted pretty good.

                      D 1 Reply Last reply
                      0
                      • P PIEBALDconsult

                        (I broach this subject here because I don't think there's an answer. Note the "rant" icon.) Consider: ObsoleteAttribute -- Marks the program elements that are no longer in use. What would be the opposite/complement? A way to mark some code as not-yet-ready-for-primetime? Not to the extent of throwing a NotImplementedException, because the code exists and works (mostly). Not a todo either; that's too passive. But, if I have a kludgey Method I intend to rework at some convenient future time, I want to be reminded about it every time I compile code which calls it. Even if the Method has been compiled into a DLL. An ObsoleteAttribute will do this -- but I expect that it would be confusing to my colleagues. Even a UseAtYourOwnRiskAttribute would be better.

                        N Offline
                        N Offline
                        Nelek
                        wrote on last edited by
                        #11

                        MarkedForImprovement ToBeReworked NotFinalYet FutureOptimization IncomingChanges ...

                        M.D.V. ;) If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about? Help me to understand what I'm saying, and I'll explain it better to you Rating helpful answers is nice, but saying thanks can be even nicer.

                        1 Reply Last reply
                        0
                        • P PIEBALDconsult

                          Could work if they allowed deriving from ObsoleteAttribute. But. They. Don't. :mad:

                          V Offline
                          V Offline
                          vKaras
                          wrote on last edited by
                          #12

                          Idea: what about a Custom Codeanalyser NuGet-Packet, witch contains the Attributes and does the Messages for them. but might be a little overkill X|

                          1 Reply Last reply
                          0
                          • P PIEBALDconsult

                            (I broach this subject here because I don't think there's an answer. Note the "rant" icon.) Consider: ObsoleteAttribute -- Marks the program elements that are no longer in use. What would be the opposite/complement? A way to mark some code as not-yet-ready-for-primetime? Not to the extent of throwing a NotImplementedException, because the code exists and works (mostly). Not a todo either; that's too passive. But, if I have a kludgey Method I intend to rework at some convenient future time, I want to be reminded about it every time I compile code which calls it. Even if the Method has been compiled into a DLL. An ObsoleteAttribute will do this -- but I expect that it would be confusing to my colleagues. Even a UseAtYourOwnRiskAttribute would be better.

                            N Offline
                            N Offline
                            Nagy Vilmos
                            wrote on last edited by
                            #13

                            Consider

                            #warning This code is dodgy, I was sober when I wrote it
                            public void Kludge()
                            {
                            // sober code goes here
                            }

                            Warning in your output every time you build

                            veni bibi saltavi

                            J P 2 Replies Last reply
                            0
                            • N Nagy Vilmos

                              Consider

                              #warning This code is dodgy, I was sober when I wrote it
                              public void Kludge()
                              {
                              // sober code goes here
                              }

                              Warning in your output every time you build

                              veni bibi saltavi

                              J Offline
                              J Offline
                              Jorgen Andersson
                              wrote on last edited by
                              #14

                              So, an OutOfGinAtribute()

                              Wrong is evil and must be defeated. - Jeff Ello

                              1 Reply Last reply
                              0
                              • M Mike Hankey

                                [Incomplete] [LitelyTested] [CutAndPasteAtYourOwnRisk] [CodeProjectQAQuality] [hmmmmNotSureAboutThis] [YouFeelLucky]

                                The less you need, the more you have. JaxCoder.com

                                J Offline
                                J Offline
                                Johnny J
                                wrote on last edited by
                                #15

                                Mike Hankey wrote:

                                [CodeProjectQAQuality]

                                Surely, nobody here produces SUCH bad code? :doh:

                                Anything that is unrelated to elephants is irrelephant
                                Anonymous
                                -----
                                The problem with quotes on the internet is that you can never tell if they're genuine
                                Winston Churchill, 1944
                                -----
                                Never argue with a fool. Onlookers may not be able to tell the difference.
                                Mark Twain

                                1 Reply Last reply
                                0
                                • D Daniel Pfeffer

                                  I'm going to be the heretic here, and claim the "kludgey" code should not be in the public repository of your library. It should either work properly, or be kept in your private repository until it can be fixed. To give examples from other engineering fields, would you tolerate a building code which deems it acceptable that a building will collapse approximately 1 in a million times that you lock the front door? would you tolerate electronics that burst into flame approximately 1 in a billion times you switch them on? So why should your clients be expected to tolerate "kludgey" code?

                                  Freedom is the freedom to say that two plus two make four. If that is granted, all else follows. -- 6079 Smith W.

                                  D Offline
                                  D Offline
                                  Dar Brett 0
                                  wrote on last edited by
                                  #16

                                  Daniel Pfeffer wrote:

                                  would you tolerate electronics that burst into flame approximately 1 in a billion times you switch them on

                                  Might not be the best example because it seems like we do: ‘The irony’s not lost on me’: Solar panel safety device led to 500 per cent rise in rooftop fires[^]

                                  1 Reply Last reply
                                  0
                                  • P PIEBALDconsult

                                    (I broach this subject here because I don't think there's an answer. Note the "rant" icon.) Consider: ObsoleteAttribute -- Marks the program elements that are no longer in use. What would be the opposite/complement? A way to mark some code as not-yet-ready-for-primetime? Not to the extent of throwing a NotImplementedException, because the code exists and works (mostly). Not a todo either; that's too passive. But, if I have a kludgey Method I intend to rework at some convenient future time, I want to be reminded about it every time I compile code which calls it. Even if the Method has been compiled into a DLL. An ObsoleteAttribute will do this -- but I expect that it would be confusing to my colleagues. Even a UseAtYourOwnRiskAttribute would be better.

                                    1 Offline
                                    1 Offline
                                    11917640 Member
                                    wrote on last edited by
                                    #17

                                    PIEBALDconsult wrote:

                                    not-yet-ready-for-primetime

                                    Seems to be a natural state for all the code in the world. The opposite ReadyForPrimetimeAttribute or just WorkingAttribute belongs to science fiction.

                                    1 Reply Last reply
                                    0
                                    • N Nagy Vilmos

                                      Consider

                                      #warning This code is dodgy, I was sober when I wrote it
                                      public void Kludge()
                                      {
                                      // sober code goes here
                                      }

                                      Warning in your output every time you build

                                      veni bibi saltavi

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

                                      Even when it is referred to by other code?

                                      1 Reply Last reply
                                      0
                                      • C CodeWraith

                                        You forgot some important things. [DontTouchOrTheBossWillRipYourHeadOff] [UnmaintainableButLightningFast] or simply [ThisIsDeliberate]

                                        I have lived with several Zen masters - all of them were cats. His last invention was an evil Lasagna. It didn't kill anyone, and it actually tasted pretty good.

                                        D Offline
                                        D Offline
                                        davecasdf
                                        wrote on last edited by
                                        #19

                                        Here there (may) be dragons.

                                        1 Reply Last reply
                                        0
                                        • P PIEBALDconsult

                                          (I broach this subject here because I don't think there's an answer. Note the "rant" icon.) Consider: ObsoleteAttribute -- Marks the program elements that are no longer in use. What would be the opposite/complement? A way to mark some code as not-yet-ready-for-primetime? Not to the extent of throwing a NotImplementedException, because the code exists and works (mostly). Not a todo either; that's too passive. But, if I have a kludgey Method I intend to rework at some convenient future time, I want to be reminded about it every time I compile code which calls it. Even if the Method has been compiled into a DLL. An ObsoleteAttribute will do this -- but I expect that it would be confusing to my colleagues. Even a UseAtYourOwnRiskAttribute would be better.

                                          D Offline
                                          D Offline
                                          dandy72
                                          wrote on last edited by
                                          #20

                                          PIEBALDconsult wrote:

                                          But, if I have a kludgey Method I intend to rework at some convenient future time, I want to be reminded about it every time I compile code which calls it.

                                          OMG. No. Is there ever any code you don't intend to rework? Over time my code would evolve into endless warnings every time I compiled it. Until I turn it off, making it completely pointless.

                                          P 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