Skip to main content
usr's user avatar
usr's user avatar
usr's user avatar
usr
  • Member for 14 years, 6 months
  • Last seen more than 2 years ago
awarded
awarded
comment
Why is using 'final' on a class really so bad?
@KonradRudolph Java takes this non-final-by-default mistake to the extreme. Methods are virtual by default. This is dangerous design. I'm sure many compatibility issues are caused by the fact that API consumers override things that were not designed to be overridden.
comment
Why is using 'final' on a class really so bad?
Any language that makes classes non-final by default has made a mistake. C# made that mistake for example.
awarded
comment
What's the logic behind the design of exceptions?
Is your question about division by zero or about exceptions in general? You might want to clarify the question with respect to that.
awarded
comment
Kernel mode web servers: A clever optimization or a security nightmare?
@user253751 this is a very interesting line of reasoning. In my opinion, user mode TCP stacks could be a very good thing. But many processes want to use the same NIC to receive network packets. There needs to be some global mechanism to dispatch such packets to individual processes. This is why kernel involvement is required. But there are user mode TCP stacks as libraries which take complete ownership of a specialized NIC. This does exist.
comment
Why F#, Rust and others use Option type instead of nullable types like C# 8 or TypeScript?
@8bittree maybe you're right. I was thinking of the case of allocating an array of references. There either has to be some default value or some way to ensure that elements are not accessed before initialization. I don't think that can be done in general.
comment
Why F#, Rust and others use Option type instead of nullable types like C# 8 or TypeScript?
It might be a billion dollar mistake but it's also a billion dollar gain. It is not easy to create a language without null references that also is efficient and general purpose. The fix for the "mistake" is not clear.
awarded
comment
Is it common practice to validate responses from 3rd party APIs?
This is the common sense answer. Checking API results is additional work. You do that if it's worth it (not always). Also, many things cannot be checked at all and must fundamentally be trusted.
comment
Whose responsibility is it to fix merge conflicts?
@sanyash your job is never done as long as you work there. Your job is to help the company as much as possible using any means available to you. Cooperate.
comment
Git branching and tagging best practices
It is worth noting that many projects do not have a need for some of the lanes shown in this diagram. Some projects only need what's called develop and feature here. This is often true for web apps that can be deployed at will.
comment
Managing and organizing the massively increased number of classes after switching to SOLID?
@Logarr And then there are people who have 1000 methods of 1 line in order to really just do one thing :) int IncrementCounter(int i) => i + 1;. The SRP does not define what "one thing" is. It's good as inspiration, not usable as a rule.
comment
Is there a method for differentiating informative comments from commented out code?
When code is removed nobody notices it ever existed. That makes it harder to recover. There is value in leaving commented code, especially if it seems likely that it will be used in the future.
awarded
comment
Aren't the guidelines of async/await usage in C# contradicting the concepts of good architecture and abstraction layering?
Yes, this is a significant downside to using async. In my opinion, this downside is widely underestimated in the community.
comment
Is duplicating files to avoid programming branching a good or anti pattern?
You seem focused on adhering to fairly specific patterns. Instead, focus on the best overall solution regardless of whether it matches any pattern or not. It seems that your if based code or the array would be a totally fine solution.
comment
Is there an equivalent to HTTP status codes for WebSockets messages?
+1, and why use the fairly unspecific HTTP status code when you can make your own! HTTP status code are not very good for application level errors. Not sure why people like to use them so much. I guess they like to craft artistic REST interfaces.
1
2 3 4 5
11