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. Why do people code this way?

Why do people code this way?

Scheduled Pinned Locked Moved The Lounge
csharplearningpythonwcfcom
34 Posts 20 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.
  • M Marc Clifton

    Dan Neely wrote:

    What is your preferred logger these days then?

    Granted, log4net is very cool, and one could probably write a plugin (if it doesn't already exist) to log to [PapertrailApp](https://papertrailapp.com/). I use that as my primary logging tool (nothing sensitive/secure is being sent to it of course) and the site's filtering features. That said, since I have the luxury of using my own code base for several projects, which utilizes a pub/sub architecture for messaging between objects, all messages can be logged, exceptions (as a final fallback) are handled by the pub/sub and logged, and I frequently log what Linq2SQL emits (again sanitized.) The logger is a service, I can replace it with a console logger or whatever (including emailing me exceptions only) so it's a pretty flexible setup. Marc

    Latest Article - Class-less Coding - Minimalist C# and Why F# and Function Programming Has Some Advantages Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802

    N Offline
    N Offline
    nightsoul94
    wrote on last edited by
    #23

    PapertrailApp might work great but that assumes an extraordinarily large amount of things that are, in my opinion, not true for most organizations. The biggest assumption is that the organization wants any of their information, logs or not, going to the cloud. There is a lot of data that should never leave a DMZ. The second is that there is a case for aggregating all of that data together. Depending on the organizations needs, much of what PapertrailApp will do is just straight overkill. Loggers like log4net and nlog are simple, easy to configure loggers that make rapidly building an application with some tracking and logging quick and easy. I am not saying PapertrailApp wouldn't do the trick but don't hit a tiny nail with a sledge hammer, it never ends well.

    M 1 Reply Last reply
    0
    • M Marc Clifton

      I've been looking for an implementation of [Kademlia](https://en.wikipedia.org/wiki/Kademlia) in C# (not, it's not a disease) and found [this](https://github.com/zencoders/sambatyon/tree/master/Kademlia/Kademlia), which actually looks pretty good. It seems they have implemented all the concepts. The only problem is that their implementation is entangled with RavenDB, and the fact that they are using a DHT for an audio player, UDP transport layer (that's fine, but not for testing, where you want to completely spoof the transport layer), and other annoyances (like, who the heck uses log4net anymore???) and WCF bindings X| Why? Why can't people write a nice coherent, independent, library with proper inversion of control, interfaces, etc., that completely decouples the DHT from the specific application. :mad: Now I have to go through the code and extract all this shyte, which I *think* is still more efficient that rewriting/debugging everything from scratch. What's particularly disappointing is that code seems well written and documented, I would have expected better from the people that wrote this, given the quality of their stuff. The dichotomy makes me think they borrowed some stuff from somewhere else. Or, given that it's written by two people, maybe their architectural skills were orthogonal. :rolleyes: Example: Log4Net is used almost everywhere. But then...

      Console.WriteLine("Storing resource from peer " + peer);

      :wtf: Marc

      Latest Article - Create a Dockerized Python Fiddle Web App Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802

      L Offline
      L Offline
      Leng Vang
      wrote on last edited by
      #24

      My take from open source is that beggar can't be choosy. I take it as was threw at me. If I don't like threw it away. Its free. That said, I'm currently maintaining a project which was written by an idiot. Storing the DOM elements tree and the JavaScript code that handled the element in a self-reference tree in a single database table.

      1 Reply Last reply
      0
      • T TheGreatAndPowerfulOz

        I agree. It also depends the skills and on the goal of the developers in question. Sometimes you just want to "get the job done" and not worry about extensibility and overridability, etc. Being overly concerned with that can lead to over architecting.

        #SupportHeForShe Government can give you nothing but what it takes from somebody else. A government big enough to give you everything you want is big enough to take everything you've got, including your freedom.-Ezra Taft Benson You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun

        E Offline
        E Offline
        Erik Burd
        wrote on last edited by
        #25

        I've been there - all too often it's "get this thing out the door" instead of taking the time to architect it. Then they wonder why it takes so long to implement changes. :doh:

        "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." -- Marcus Brigstocke, British Comedian

        1 Reply Last reply
        0
        • M Marc Clifton

          hug.login wrote:

          but you get a solution that works for free and you still complain?

          Well, it doesn't quite work because it's entangled. ;) That said, I imagine that the same complaint can be made for code I have on GitHub.

          hug.login wrote:

          Maybe you share your results with the community when you are done!?

          That was the intent. Detangle it, understand thoroughly the implementation of the Kademlia algorithm, document it and post it on CP. Assuming that'll be my next article, that'll make 214 I've contributed to this site so far. :-\ Marc

          Latest Article - Create a Dockerized Python Fiddle Web App Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802

          T Offline
          T Offline
          TheGreatAndPowerfulOz
          wrote on last edited by
          #26

          Marc Clifton wrote:

          that'll make 214 I've contributed

          You're a friggin' beast! We're not worthy! LOL. Seriously. I've read several of your articles. I'm impressed.

          #SupportHeForShe Government can give you nothing but what it takes from somebody else. A government big enough to give you everything you want is big enough to take everything you've got, including your freedom.-Ezra Taft Benson You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun

          1 Reply Last reply
          0
          • N nightsoul94

            PapertrailApp might work great but that assumes an extraordinarily large amount of things that are, in my opinion, not true for most organizations. The biggest assumption is that the organization wants any of their information, logs or not, going to the cloud. There is a lot of data that should never leave a DMZ. The second is that there is a case for aggregating all of that data together. Depending on the organizations needs, much of what PapertrailApp will do is just straight overkill. Loggers like log4net and nlog are simple, easy to configure loggers that make rapidly building an application with some tracking and logging quick and easy. I am not saying PapertrailApp wouldn't do the trick but don't hit a tiny nail with a sledge hammer, it never ends well.

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

            nightsoul94 wrote:

            but don't hit a tiny nail with a sledge hammer

            Wiser words never spoken. ;) In my scenarios, I was monitoring the "health state" of 100's of ATM's remotely, and when the central management tool flagged an ATM as being down, going through the logs on PaperTrail to see what errors occurred was immensely useful. In another scenario, again I'm remotely monitoring an installation at a club in Tijuana (I'm in New York) that is communicating to 60 or so BeagleBone single board computers, and being able to view the logs in realtime again has been really useful. Granted, all those logs could be sent up to a central server on the cloud, or logged locally and I could connect remotely to the local server, etc., but this was a simpler solution. Marc

            Latest Article - Class-less Coding - Minimalist C# and Why F# and Function Programming Has Some Advantages Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802

            1 Reply Last reply
            0
            • D Dan Neely

              Papertrail looks interesting. Although "simple setup" linking to a screenshot of documentation that I couldn't find in 5 minutes of poking around on their site has burned most of my opening enthusiasm.

              Did you ever see history portrayed as an old man with a wise brow and pulseless heart, weighing all things in the balance of reason? Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful? --Zachris Topelius Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies. -- Sarah Hoyt

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

              Dan Neely wrote:

              has burned most of my opening enthusiasm.

              There's also some better ones out there now - better in that they look like they have more advanced filter/search features. Google "papertrail vs" and let it autocomplete. ;) And if it helps, [my article on PapertrailApp](https://www.codeproject.com/Articles/843938/Logging-With-PaperTrail-Directly-In-Your-Applicati). Marc

              Latest Article - Class-less Coding - Minimalist C# and Why F# and Function Programming Has Some Advantages Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802

              D 1 Reply Last reply
              0
              • M Marc Clifton

                Dan Neely wrote:

                has burned most of my opening enthusiasm.

                There's also some better ones out there now - better in that they look like they have more advanced filter/search features. Google "papertrail vs" and let it autocomplete. ;) And if it helps, [my article on PapertrailApp](https://www.codeproject.com/Articles/843938/Logging-With-PaperTrail-Directly-In-Your-Applicati). Marc

                Latest Article - Class-less Coding - Minimalist C# and Why F# and Function Programming Has Some Advantages Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802

                D Offline
                D Offline
                Dan Neely
                wrote on last edited by
                #29

                Thanks for the pointer. Something I'll keep in mind if/when I start another greenfield project. While the concern about off premise data's real; but my employer mostly does solutions using Azure or AWS depending on if the customer wants the ASP.net or a Penguin Stack for their backend; so that ship's largely sailed for most of what I do.

                Did you ever see history portrayed as an old man with a wise brow and pulseless heart, weighing all things in the balance of reason? Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful? --Zachris Topelius Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies. -- Sarah Hoyt

                1 Reply Last reply
                0
                • M Marc Clifton

                  I've been looking for an implementation of [Kademlia](https://en.wikipedia.org/wiki/Kademlia) in C# (not, it's not a disease) and found [this](https://github.com/zencoders/sambatyon/tree/master/Kademlia/Kademlia), which actually looks pretty good. It seems they have implemented all the concepts. The only problem is that their implementation is entangled with RavenDB, and the fact that they are using a DHT for an audio player, UDP transport layer (that's fine, but not for testing, where you want to completely spoof the transport layer), and other annoyances (like, who the heck uses log4net anymore???) and WCF bindings X| Why? Why can't people write a nice coherent, independent, library with proper inversion of control, interfaces, etc., that completely decouples the DHT from the specific application. :mad: Now I have to go through the code and extract all this shyte, which I *think* is still more efficient that rewriting/debugging everything from scratch. What's particularly disappointing is that code seems well written and documented, I would have expected better from the people that wrote this, given the quality of their stuff. The dichotomy makes me think they borrowed some stuff from somewhere else. Or, given that it's written by two people, maybe their architectural skills were orthogonal. :rolleyes: Example: Log4Net is used almost everywhere. But then...

                  Console.WriteLine("Storing resource from peer " + peer);

                  :wtf: Marc

                  Latest Article - Create a Dockerized Python Fiddle Web App Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802

                  I Offline
                  I Offline
                  Idaho Edokpayi
                  wrote on last edited by
                  #30

                  They built something for a project they were working and not for you. They were just nice and let you copy their homework.

                  Idaho Edokpayi

                  1 Reply Last reply
                  0
                  • M Marc Clifton

                    I've been looking for an implementation of [Kademlia](https://en.wikipedia.org/wiki/Kademlia) in C# (not, it's not a disease) and found [this](https://github.com/zencoders/sambatyon/tree/master/Kademlia/Kademlia), which actually looks pretty good. It seems they have implemented all the concepts. The only problem is that their implementation is entangled with RavenDB, and the fact that they are using a DHT for an audio player, UDP transport layer (that's fine, but not for testing, where you want to completely spoof the transport layer), and other annoyances (like, who the heck uses log4net anymore???) and WCF bindings X| Why? Why can't people write a nice coherent, independent, library with proper inversion of control, interfaces, etc., that completely decouples the DHT from the specific application. :mad: Now I have to go through the code and extract all this shyte, which I *think* is still more efficient that rewriting/debugging everything from scratch. What's particularly disappointing is that code seems well written and documented, I would have expected better from the people that wrote this, given the quality of their stuff. The dichotomy makes me think they borrowed some stuff from somewhere else. Or, given that it's written by two people, maybe their architectural skills were orthogonal. :rolleyes: Example: Log4Net is used almost everywhere. But then...

                    Console.WriteLine("Storing resource from peer " + peer);

                    :wtf: Marc

                    Latest Article - Create a Dockerized Python Fiddle Web App Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802

                    E Offline
                    E Offline
                    E Anderson
                    wrote on last edited by
                    #31

                    What's wrong with using log4net?

                    M 1 Reply Last reply
                    0
                    • M Marc Clifton

                      I've been looking for an implementation of [Kademlia](https://en.wikipedia.org/wiki/Kademlia) in C# (not, it's not a disease) and found [this](https://github.com/zencoders/sambatyon/tree/master/Kademlia/Kademlia), which actually looks pretty good. It seems they have implemented all the concepts. The only problem is that their implementation is entangled with RavenDB, and the fact that they are using a DHT for an audio player, UDP transport layer (that's fine, but not for testing, where you want to completely spoof the transport layer), and other annoyances (like, who the heck uses log4net anymore???) and WCF bindings X| Why? Why can't people write a nice coherent, independent, library with proper inversion of control, interfaces, etc., that completely decouples the DHT from the specific application. :mad: Now I have to go through the code and extract all this shyte, which I *think* is still more efficient that rewriting/debugging everything from scratch. What's particularly disappointing is that code seems well written and documented, I would have expected better from the people that wrote this, given the quality of their stuff. The dichotomy makes me think they borrowed some stuff from somewhere else. Or, given that it's written by two people, maybe their architectural skills were orthogonal. :rolleyes: Example: Log4Net is used almost everywhere. But then...

                      Console.WriteLine("Storing resource from peer " + peer);

                      :wtf: Marc

                      Latest Article - Create a Dockerized Python Fiddle Web App Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802

                      C Offline
                      C Offline
                      Charles Programmer
                      wrote on last edited by
                      #32

                      Why do people grab kind other peoples' code and complain it isn't coded like they would do it? It isn't enough that they put it out for the benefit of others? So, can we expect that you submit your version to the authors? And write it well and document it well?

                      M 1 Reply Last reply
                      0
                      • C Charles Programmer

                        Why do people grab kind other peoples' code and complain it isn't coded like they would do it? It isn't enough that they put it out for the benefit of others? So, can we expect that you submit your version to the authors? And write it well and document it well?

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

                        Charles Programmer wrote:

                        Why do people grab kind other peoples' code and complain it isn't coded like they would do it? It isn't enough that they put it out for the benefit of others? So, can we expect that you submit your version to the authors? And write it well and document it well?

                        I seem to have hit a nerve with some. As I replied elsewhere, I'll be posting a Code Project article on this once I've got it fully working, I understand all the code, and document my understanding. If you want watch my work-in-progress, the core of it is already [a public repo on GitHub](https://github.com/cliftonm/Kademlia). Once complete, I'll post a comment on the original site (I didn't fork the repo, because I'm only extracting a small piece) and of course mention the original code source on any article/documentation that I write. Marc

                        Latest Article - Class-less Coding - Minimalist C# and Why F# and Function Programming Has Some Advantages Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802

                        1 Reply Last reply
                        0
                        • E E Anderson

                          What's wrong with using log4net?

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

                          E. Anderson wrote:

                          What's wrong with using log4net?

                          Nothing really. I just use other tools nowadays. As mentioned earlier, PapertrailApp is something I often use for server applications that I want to monitor remotely. That however would not be appropriate for this project -- nobody wants their personal peer logging to some central site! :laugh: Marc

                          Latest Article - Class-less Coding - Minimalist C# and Why F# and Function Programming Has Some Advantages Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802

                          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