|
Ha. You got it.
#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
|
|
|
|
|
That is so funny. I had no idea who you were referring to but it fits Ryan so well that I had to say it, just for a joke!
|
|
|
|
|
When you know that no one understands you just as much you never understand anyone else, you will know you do not understand that, either.
In that state, there is a very small chance wisdom may begin.
«While I complain of being able to see only a shadow of the past, I may be insensitive to reality as it is now, since I'm not at a stage of development where I'm capable of seeing it. A few hundred years later another traveler despairing as myself, may mourn the disappearance of what I may have seen, but failed to see.» Claude Levi-Strauss (Tristes Tropiques, 1955)
|
|
|
|
|
I've been looking for an implementation of Kademlia in C# (not, it's not a disease) and found this, 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
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.
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.
Example:
Log4Net is used almost everywhere. But then...
Console.WriteLine("Storing resource from peer " + peer);
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
|
|
|
|
|
Marc Clifton wrote: 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. We can't all be as perfect as you.
#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
|
|
|
|
|
TheGreatAndPowerfulOz wrote: We can't all be as perfect as you.
It's not perfection, it's good coding practice!
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 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
|
|
|
|
|
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.
"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
|
|
|
|
|
That's 90 percent you know.
|
|
|
|
|
I would not be surprised if the code was refactored to use log4net and they forgot some old console writes.
As for the other stuff, I feel your pain.
|
|
|
|
|
|
|
rguilmette wrote: Dihydrotestosterone
I am not the one who knocks. I never knock.
In fact, I hate knocking. Just barge in will'Ya?
|
|
|
|
|
Distributed Hash Table.
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
|
|
|
|
|
Marc Clifton wrote: like, who the heck uses log4net anymore??? No one, that code is at least 6 years old though. Looks like a rip of even older code from the Daylight project (which is very dead now). So it might be 8 years old or so, and that also explains the inconsistencies.
|
|
|
|
|
Marc Clifton wrote: like, who the heck uses log4net anymore I do. It seems to be my fate to keep 20+ year old application that have been ported to .Net alive. Often enough I'm hapy that a single library for loging has been used (at least most of the time).
My own code also tends to get as old as a turtle and I would not be doing very much anymore if I always was ripping out libraries that are not fashionable enough anymore. Even Microsoft's efforts to drain all fun and motivation from those projects by changing everything, only to sell us yet another windows version, has not made me do that. The more they make me feel like a donkey that's being baited with a carrot, the less I'm inclined to play along. Don't fix it as long as it's not broken.
I need a perfect, to the point answer as I am not aware of this.
Please don't reply explaining what method overloading is
modified 9-Aug-17 12:57pm.
|
|
|
|
|
CodeWraith wrote: Don't fix it as long as it's not broken.
<sarcasm> Unless I wrote it, it is broken and requires changes. </sarcasm>
|
|
|
|
|
maze3 wrote: <sarcasm> Unless I wrote it, it is broken and requires changes. </sarcasm>
<sarcasm^2>How good to meet the guy who singlehandedly rewrote the OS and the .Net framework, just for warmups.
I need a perfect, to the point answer as I am not aware of this.
Please don't reply explaining what method overloading is
|
|
|
|
|
I did not write .net 3.5, hence it was broken.
I reworte it and named it 4.0.
Then someone else decide Core was a good way to go.
I have not looked at it yet, so might be broken.
|
|
|
|
|
I understand your frustration but you get a solution that works for free and you still complain? Maybe you share your results with the community when you are done!?
|
|
|
|
|
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
|
|
|
|
|
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
|
|
|
|
|
Marc Clifton wrote: 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.
I actually see myself writing this code a few years back. The thing is, I knew a lot, read a lot of books "BUT", have always worked on small projects, never on frameworks or libraries. I even got an MCC Award from Microsoft for my contributions to C# and Windows Forms.
But I had never actually really understood or worked with the SOLID principles before. I hadn't read the GoF book or any other architectural design books, which were my main source of knowledge back then.
I took me a while, to actually work on projects that implemented more sophisticated design patterns. But I still wrote a lot of very good code, using all advanced knowledge I had acquired about language and frameworks. I even wrote good code for embedded devices.
What I believe contributed for my lack of knowledge on design patterns:
- The companies I worked for never really understood the concept so they could spread it.
- Lack of initiative to work and contribute to important open source projects.
- Bad luck. I read a lot of books, should have gotten to a SOLID book.
- Lack of engagement on coding communities in general, like participating of webinars, conferences, etc. My environment was never tech friendly, Brazil is a little late when it comes to tech.
- Ignorance in general, when you don't know that you're missing something, it's hard to realize it.
To alcohol! The cause of, and solution to, all of life's problems - Homer Simpson
Our heads are round so our thoughts can change direction - Francis Picabia
|
|
|
|
|
Marc Clifton wrote: who the heck uses log4net anymore???
What is your preferred logger these days then? It's probably been a decade since I've looked, and log4net filled 100% of my needs at the time and since (an idiot friendly way to barf into a textfile).
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
|
|
|
|
|
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. 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
|
|
|
|
|