-1
\$\begingroup\$

I find the question Knowledge-based authentication using Domain-driven Design in C# should be moved to Software Engineering because the only code that OP has posted is clearly hypothetical, OP even calls it a draft. They intend to use it in their new application that they are going to write so we cannot say whether it's working at all.

One of OP's question also indicates that they have not used the presented code yet:

Q. How do I display answers in the UI to include 'Unanswered' and 'Incorrect Answer'?

OP clearly did not make it work as the properties OP mentions here

A. I can now do this by adding an 'Unanswered' and 'Incorrect Answer' DataProtectionAnswer to the DataProtectionQuestion, but this 'feels' wrong. Isn't this the responsibility of the Presenter?

do not exist.


None of the presented drafts has been tested in a real application. It's all about what if.

\$\endgroup\$
  • 1
    \$\begingroup\$ draft != hypothetical \$\endgroup\$ – 410_Gone Apr 3 at 16:05
  • 1
    \$\begingroup\$ @DerKommissar For our rules, it's close enough. Code that's not actual code in use is disallowed per the help center. "If you have a working piece of code from your project" does not include drafts. "Details matter! In order to give good advice, we need to see real, concrete code, and understand the context in which the code is used. Generic code (such as code containing placeholders like foo, MyClass, or doSomething()) leaves too much to the imagination." \$\endgroup\$ – Mast Apr 3 at 21:05
  • 3
    \$\begingroup\$ However, if this works as a proof-of-concept, it's more than a draft. At that point it's actually doing something. I'm not versed in DDD so I won't comment on whether this question should be here or there, but if it is a draft (a sketch, only slightly above pseudo-code, something that hasn't actually be verified to do what it should), it's simply posted too early on CR. Come back when it works. \$\endgroup\$ – Mast Apr 3 at 21:08
  • 1
    \$\begingroup\$ @Mast shrug If Code Review wants to push the idea that if it isn't "super strictly 100% within our guidelines, with no tolerance for leeway" I suppose the community can come to that consensus. \$\endgroup\$ – 410_Gone Apr 3 at 21:11
  • 1
    \$\begingroup\$ As for some of these Q and A thingies, I see them more or less as the OP rubberducking with himself, to answer some of his own questions that he thought of in the process of writing this code. \$\endgroup\$ – Simon Forsberg Apr 5 at 15:25
4
\$\begingroup\$

I find the question Knowledge-based authentication using Domain-driven Design in C# should be moved to Software Engineering

First of all, two things.

  1. Just because a question seem to be a better fit on other sites does not make it off-topic here. We have told Stack Overflow about this many times when we see people suggesting migrations to Code Review, and the same thing applies to us.

  2. If it's off-topic here, that doesn't automatically make it a good fit for Software Engineering. Software Engineering (formerly known as Programmers Stack Exchange) is not a trash can. They want high-quality questions just like everyone else does. They have repeatedly said this to people who recommend questions to their site.


That said, I did a check with Software Engineers to see if this question would belong to their site, I got the following answer:

If it were asked here, I'd vote to close the question as too broad. It's just asking too many things. However, the subject matter of the question would indeed be on topic.

Good questions pose problems. That question asks asks [sic] whether some solution is correct. Difficult to pull that off in a manner that's not opinion-based.

The last time we discussed on meta whether CR style design reviews would be acceptable, I think the outcome was “in theory yes, but in practice asking such a good question well is too difficult”


OP even calls it a draft.

Pay less attention to what the code is called and more attention to what the code is.


Conclusion: On-topic or off-topic on CR, it does not belong on Software Engineering.

\$\endgroup\$
  • 1
    \$\begingroup\$ "Pay less attention to what the code is called and more attention to what the code is." Isn't one of the bases of CR that we mostly take OP's word for it? \$\endgroup\$ – Mast Apr 5 at 15:17
  • 2
    \$\begingroup\$ @Mast Given the amount of "FIX meh broken codez" question titles that are on-topic questions I'd inclined to say no. \$\endgroup\$ – Peilonrayz Apr 5 at 15:18
  • 1
    \$\begingroup\$ @Peilonrayz You got a great point there. \$\endgroup\$ – Mast Apr 5 at 15:22
3
\$\begingroup\$

Please give reasoning in relation to our rules so that it's easier to agree or disagree.

TLDR

A couple of the questions in the post are off-topic. But that doesn't make the post off-topic. I would recommend you don't answer these, unless you're ok with the potential problems these questions may pose.

The code whilst it may look like 'example code', it doesn't have any of the problems highlighted in our meta posts or close reasons. And so I find no reason to close the question on the code alone.

Is any of the text off-topic?

  • How do I display answers in the UI to include 'Unanswered' and 'Incorrect Answer'? (I realise the UI is not the concern of the Domain, but having the ability to choose these as answers is)

[...]

  • Q. How do I display answers in the UI to include 'Unanswered' and 'Incorrect Answer'?
  • A. I can now do this by adding an 'Unanswered' and 'Incorrect Answer' DataProtectionAnswer to the DataProtectionQuestion, but this 'feels' wrong. Isn't this the responsibility of the Presenter?

These bullet points are all related, making it harder to comment on them.

  1. If you take the first and second quoted point by themselves then it's an off-topic question. This is as the code has not been written yet.

    However this shouldn't make the post off-topic. This is as it is a small aspect of the overall question. Since the OP has posted lots of different questions that can be answered it's harsh and unfair to close a question because it's not 100% perfect.

    This goes hand in hand with existing meta posts saying it's ok to ignore some of the requests the OP makes.

  2. The third quoted point is talking about code that isn't there, but not in the same way as the first two points. To me this is more inline with our 'not real code' reason, and more specifically the problems arising from example and hypothetical code.

    The code they've presented has gaps in functionality and so we may answer the question in a way that ignores this additional functionality, leading to the asker getting vexed and argumentative. Ultimately leaving both the asker and answerer dissatisfied due to this problem.

    Again the solution to just ignore these points and comment on the code and questions that are concreate. And since there are concreate things we can comment on this question shouldn't be off-topic for this reason.

Taking the entire question into consideration, these questions are off-topic. But not for the hypothetical problems, this is as the question has accurately described the situation and has provided the entire context. Even if the code doesn't contain it all. But it doesn't make the entire post off-topic.

And so if I were to answer it I wouldn't touch on these issues to protect myself from the potential wrath of the user. And would suggest others to do the same. Some people would recommend not answering these questions as they allow others to point to the question an answer as an example to post their own off-topic questions.

Is the code off-topic?

  1. Authorship of code
    It is not off-topic because of this, as the code is in the post, they are the owner and they know why it was written the way it was.
  2. Lacks concrete context
    Going from the close text they have provided concrete code, two different versions in fact. And there is sufficient context in the question to know how the code is working and how to improve it.

    Firstly given their first code block alone it made me go "WTF why'd you do x" and so I have enough context to improve it in one way.

    Given that they've fully described the problem statement I can also solve the problem without their code and compare the two. This context sometimes comes from the text and the code. For example this questions maths was poorly defined, but their code worked fine. Meaning they had all the context they need in their question as a whole.

    This leaves the argument for whether it's pseudocode, stub or example code. Given that the code is fully working C# it's not pseudocode. Given that we have enough context it's not stub code either. Leaving example code.

    It could be example code given the missing functionality. But then again, it could also be actual code in the process of TDD. Since they are "rewrite the software", it's looks to me like a flimsy excuse based in assumptions.

    We also allow example code if it looks like actual code, and this looks like actual code. It also doesn't have any of the problems highlighted in the meta posts I provided earlier.

  3. Code not implemented or not working as intended
    You could argue that due to missing some functionality that it falls under this reason. But this mostly revolves around the issues in the text.

And so no I don't think their code alone is off-topic. Yes we 'don't allow example code', but this seems to be archaic wording we use like 'broken code'. It's the meaning around these words that are important.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .