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. For The Love Of God, Please Let Me Override Your Method

For The Love Of God, Please Let Me Override Your Method

Scheduled Pinned Locked Moved The Lounge
question
31 Posts 17 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.
  • R Robert Vandenberg Huang

    I've received hundred of enterprise libraries directly depending on other third-parties. Do I have to include log4net just because I need to use your library? Do I have to register an unknown unmanaged DLL as a part of my project output just because your code needs to access a system setting? For the love of god, and world peace, please do not make your library directly depend on third-party components. Do let your users override them.

    W Offline
    W Offline
    Wonde Tadesse
    wrote on last edited by
    #14

    Quote:

    Do I have to include log4net just because I need to use your library?

    Do as the spec says.

    Wonde Tadesse

    1 Reply Last reply
    0
    • J Jeff Buxton

      Exception.GirlsNotFound

      S Offline
      S Offline
      Smart K8
      wrote on last edited by
      #15

      Oh boy. :doh:

      1 Reply Last reply
      0
      • R Robert Vandenberg Huang

        I've received hundred of enterprise libraries directly depending on other third-parties. Do I have to include log4net just because I need to use your library? Do I have to register an unknown unmanaged DLL as a part of my project output just because your code needs to access a system setting? For the love of god, and world peace, please do not make your library directly depend on third-party components. Do let your users override them.

        J Offline
        J Offline
        Jeremy Falcon
        wrote on last edited by
        #16

        Oh wait, but .NET was supposed to end DLL hell.

        Jeremy Falcon

        P 1 Reply Last reply
        0
        • J Jeremy Falcon

          Oh wait, but .NET was supposed to end DLL hell.

          Jeremy Falcon

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

          GAC!

          1 Reply Last reply
          0
          • P PIEBALDconsult

            Use of third-party libraries is a cry for help. Plus, libraries shouldn't log. They should just throw Exceptions and the application can log or otherwise do what it likes with them. Another possibility would be for the library to provide an Event that it calls when it encounters something interesting but not fatal.

            N Offline
            N Offline
            newton saber
            wrote on last edited by
            #18

            Good points. Good you point these out. We just want the functionality the library provides not all the overhead.

            1 Reply Last reply
            0
            • K Kenneth Haugland

              Fun Fun Fun![^] :laugh:

              N Offline
              N Offline
              newton saber
              wrote on last edited by
              #19

              That is a great tune. Thanks for sharing. Amazing singer and an amazing song. No one else like her.

              K 1 Reply Last reply
              0
              • N newton saber

                That is a great tune. Thanks for sharing. Amazing singer and an amazing song. No one else like her.

                K Offline
                K Offline
                Kenneth Haugland
                wrote on last edited by
                #20

                Its seen 80 million times, and has 1,6 million downvotes, and 600 thousand upvotes :laugh:

                N 1 Reply Last reply
                0
                • K Kenneth Haugland

                  Its seen 80 million times, and has 1,6 million downvotes, and 600 thousand upvotes :laugh:

                  N Offline
                  N Offline
                  newton saber
                  wrote on last edited by
                  #21

                  Those numbers only prove that the song is True Art. Everyone loves pop music, which we all know isn't art. But, this has been viewed 80 million times. That forces it to the top of True Art. Everyone else is just a poser & hopeful copier of this great artist. :)

                  M 1 Reply Last reply
                  0
                  • P PIEBALDconsult

                    Use of third-party libraries is a cry for help. Plus, libraries shouldn't log. They should just throw Exceptions and the application can log or otherwise do what it likes with them. Another possibility would be for the library to provide an Event that it calls when it encounters something interesting but not fatal.

                    J Offline
                    J Offline
                    John Torjo
                    wrote on last edited by
                    #22

                    "plus, libraries shouldn't log" I don't think this is a realistic assumption. Libraries can have bugs too. In case a bug happens, they would want to know what led to it -> thus, logging. And more to the point, when an error happens in your application - libraries can have huge APIs, complex usage scenarios - in such a case, you + the lib's authors would probably want to know: is there an error in the lib, in your code, both? Without logging, this would be much more complicated. Best, John -- LogWizard - Log viewing can be a joy!

                    P 1 Reply Last reply
                    0
                    • N newton saber

                      Those numbers only prove that the song is True Art. Everyone loves pop music, which we all know isn't art. But, this has been viewed 80 million times. That forces it to the top of True Art. Everyone else is just a poser & hopeful copier of this great artist. :)

                      M Offline
                      M Offline
                      MKJCP
                      wrote on last edited by
                      #23

                      It's almost as good as a vid of a cat chasing string. Who is this Art guy?

                      1 Reply Last reply
                      0
                      • R Robert Vandenberg Huang

                        I've received hundred of enterprise libraries directly depending on other third-parties. Do I have to include log4net just because I need to use your library? Do I have to register an unknown unmanaged DLL as a part of my project output just because your code needs to access a system setting? For the love of god, and world peace, please do not make your library directly depend on third-party components. Do let your users override them.

                        A Offline
                        A Offline
                        Asday
                        wrote on last edited by
                        #24

                        https://mail.python.org/pipermail/tutor/2003-October/025932.html Nothing is really private in python. No class or class instance can keep you away from all what's inside (this makes introspection possible and powerful). Python trusts you. It says "hey, if you want to go poking around in dark places, I'm gonna trust that you've got a good reason and you're not making trouble." After all, we're all consenting adults here.

                        1 Reply Last reply
                        0
                        • R Robert Vandenberg Huang

                          I've received hundred of enterprise libraries directly depending on other third-parties. Do I have to include log4net just because I need to use your library? Do I have to register an unknown unmanaged DLL as a part of my project output just because your code needs to access a system setting? For the love of god, and world peace, please do not make your library directly depend on third-party components. Do let your users override them.

                          T Offline
                          T Offline
                          Thornik
                          wrote on last edited by
                          #25

                          ....of D-language! :) There everything can be overriden. Not so "everything" as in Smalltalk, but enough to program w/o pain.

                          1 Reply Last reply
                          0
                          • J John Torjo

                            "plus, libraries shouldn't log" I don't think this is a realistic assumption. Libraries can have bugs too. In case a bug happens, they would want to know what led to it -> thus, logging. And more to the point, when an error happens in your application - libraries can have huge APIs, complex usage scenarios - in such a case, you + the lib's authors would probably want to know: is there an error in the lib, in your code, both? Without logging, this would be much more complicated. Best, John -- LogWizard - Log viewing can be a joy!

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

                            That's what Exceptions are for. Logging should be done only at the highest levels of an application. Would you want each library to log to a different place? And then have to read them all and try to figure what order they happended in? I wouldn't. Additionally, logging itself can be error-prone. If a disk fills up, and a library tries to log that, but can't because the disk is full -- that's a very bad situation. The application may log to a different disk, or a database, or a Web Service, or send messages across a socket to a monitoring system. With an Exception, the calling routine can add detail and context to the Exception's Data collection, or possibly wrap the Exception in a more meaningful Exception. The library developer also doesn't know what format the application developer wants to use. I like XML, not everyone does. Libraries should only raise Exceptions, never try to log -- you don't know what the application developer wants to do with it.

                            J 1 Reply Last reply
                            0
                            • P PIEBALDconsult

                              That's what Exceptions are for. Logging should be done only at the highest levels of an application. Would you want each library to log to a different place? And then have to read them all and try to figure what order they happended in? I wouldn't. Additionally, logging itself can be error-prone. If a disk fills up, and a library tries to log that, but can't because the disk is full -- that's a very bad situation. The application may log to a different disk, or a database, or a Web Service, or send messages across a socket to a monitoring system. With an Exception, the calling routine can add detail and context to the Exception's Data collection, or possibly wrap the Exception in a more meaningful Exception. The library developer also doesn't know what format the application developer wants to use. I like XML, not everyone does. Libraries should only raise Exceptions, never try to log -- you don't know what the application developer wants to do with it.

                              J Offline
                              J Offline
                              John Torjo
                              wrote on last edited by
                              #27

                              Let me reiterate - what if the library has some bugs? You do logging in order to catch possible bugs, especially when the app is run somewhere else. From the library's standpoint - that will always be the case (it will be run somewhere else).

                              -- LogWizard - Log Viewing can be a joy!

                              P 1 Reply Last reply
                              0
                              • J John Torjo

                                Let me reiterate - what if the library has some bugs? You do logging in order to catch possible bugs, especially when the app is run somewhere else. From the library's standpoint - that will always be the case (it will be run somewhere else).

                                -- LogWizard - Log Viewing can be a joy!

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

                                That makes no sense. If it has bugs, how will it know to log them? If it wants to allow the caller to review the internal state, it can have appropriate methods, or perhaps events, to do that. It should not log.

                                J 1 Reply Last reply
                                0
                                • K Kenneth Haugland

                                  Fun Fun Fun![^] :laugh:

                                  M Offline
                                  M Offline
                                  Mbithy Mbithy
                                  wrote on last edited by
                                  #29

                                  Someone gorge my eyes out

                                  1 Reply Last reply
                                  0
                                  • P PIEBALDconsult

                                    That makes no sense. If it has bugs, how will it know to log them? If it wants to allow the caller to review the internal state, it can have appropriate methods, or perhaps events, to do that. It should not log.

                                    J Offline
                                    J Offline
                                    John Torjo
                                    wrote on last edited by
                                    #30

                                    The idea is - when a bug happens, to look at the log, and see if you can infer enough information to reproduce/fix the issue. Apparently, we're talking two different languages. So lets just agree to disagree. Best, John

                                    -- LogWizard - Log Viewing can be a joy!

                                    1 Reply Last reply
                                    0
                                    • R Robert Vandenberg Huang

                                      I've received hundred of enterprise libraries directly depending on other third-parties. Do I have to include log4net just because I need to use your library? Do I have to register an unknown unmanaged DLL as a part of my project output just because your code needs to access a system setting? For the love of god, and world peace, please do not make your library directly depend on third-party components. Do let your users override them.

                                      B Offline
                                      B Offline
                                      BrainiacV
                                      wrote on last edited by
                                      #31

                                      I always try to discourage third party products. My argument is, you buy them for their solutions, but you also get their problems. Their priority on fixing those problems do not necessarily match yours. Earlier in my career we encountered an intractable problem with a third party product. We called them and told them of the problem. They said, yeah, that will get fixed in the next release. Great! When's the next release? In six months. We had a six week delivery deadline. My solution was simple, throw it away and write our own. Ours was smaller, faster, did just what we needed, and was under our control for bugs and future enhancements.

                                      Psychosis at 10 Film at 11 Those who do not remember the past, are doomed to repeat it. Those who do not remember the past, cannot build upon it.

                                      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