-9

I had an answer 90% completed last night for the question What granularity does it make sense to use dependency injection in C# solutions?, but then ran out of time and had to leave.

I got a chance to return to my unfinished answer and complete it a few minutes ago, but then discovered that I can't post it because in the meantime, the question has been closed as primarily opinion-based. Yet, I think my answer could truly help the asker—and others who have similar questions. Do I just have to throw away my work?

I saved the text of my answer just in case I could use it somewhere. I thought of posting it here, but I hesitate to do this as I don't want to be forceful or be seen as valuing my contributions more highly than they deserve. If you think I should add my proposed answer here so you can judge, let me know.

I'd kind of like to open the question for 5 minutes, post my answer, and close it again, but that's probably asking for too much—it seems a bit like thinking my preferences are more important than the community's opinion, which I don't believe is true. Yet it's painful to have spent 35 minutes typing only to throw it away. What do you think?

Just for the record, I don't think I am any kind of leading expert on dependency injection. However, I did put in serious effort and time 2 years ago to understand it and grasp it, then worked with it in a project under my control for over a year, and it seems that this effort to understand it was unique compared to the other developers I have worked with, who could not answer my questions that prompted me to do the research in the first place. So while for all I know, it could be a case of being overconfident that I know something I really don't know well at all, at the same time I will risk hazarding a guess that I'm farther along in grasping it than the average developer who hasn't spent 30+ hours of solid research on the topic (reading 25+ full-length articles and other material to try to get a handle on it).

13
  • I would be astonished if this never happens to you again. Just chalk it up and move on. Feb 22, 2018 at 19:30
  • 17
    Do get that right: You think the question is primary-opinion based and should be closed as such, but you still want to answer the question? The short version: Stop answer off-topic questions. That only encourages people to post more of them because they get their answer and don't care about SOs quality.
    – BDL
    Feb 22, 2018 at 19:32
  • 3
    Also: Should one advise on off-topic questions?.
    – BDL
    Feb 22, 2018 at 19:34
  • @BDL I guess I think that there are some objectively useful things to say about the topic. I don't know if that exact question is a good one. But even when someone is asking an opinion-based question, there are times when solid advice from an experienced software developer can help set them on track. This seems like one of those cases to me. It would be troubling if there's no place on stackoverflow/stackexchange at all for discussing such large concerns as Dependency Injection. Perhaps softwareengineering.stackexchange would be a better site?
    – ErikE
    Feb 22, 2018 at 19:35
  • 1
    I can't say what other sites on the stackexchange network accept. And I'm also not familiar with the technology. If you think the question is on-topic and should be reopened, then go for it and ask about that. But if you say: It is off-topic but I still want to answer, then this (in my opinion) actively harms the site and you should definitely not do that for the reasons described in the link I posted above.
    – BDL
    Feb 22, 2018 at 19:38
  • 3
    @BDL You make a good point. If the question as asked is not good, then no answer is good. So, I've come to the conclusion that there exists some question, acceptable to be on stackoverflow or softwareengineering, for which my answer is good. I just have to come up with that question, then I can post it and self-answer it.
    – ErikE
    Feb 22, 2018 at 19:42
  • 4
    Asking a high-quality, self-answered question would be a perfect solution for not wasting your effort :)
    – BDL
    Feb 22, 2018 at 19:43
  • In response to your edit, keep in mind that you feeling that your opinion is more valuable than other developers (even if you're entirely correct in that assumption) doesn't mean that the question isn't opinion based. SO just isn't a good place for opinionated discussions. That doesn't mean that it's always bad to discuss opinions, or that there aren't experts whose opinions are useful, it's just that SO isn't a suitable platform for those opinions to be shared. It sounds like you'd benefit from trying to share this particular information on a platform more suitable for it.
    – Servy
    Feb 22, 2018 at 20:17
  • @Servy Thanks for the input. I'll be wary about not automatically conflating the fact that I have some confidence in the topic with believing that my understanding is anything but 100% opinion-based.
    – ErikE
    Feb 22, 2018 at 20:20
  • Good subjective, bad subjective is the title of an SO blog post on potentially-opinon-y questions like this. Software Engineering is a site that accepts questions about the "whiteboard stage" of programming, into which the subject question seems to fit.
    – jscs
    Feb 23, 2018 at 0:11
  • Okay, thanks for the input; consider that anyone who needs such input is unlikely to know the referents that you earlier shared so briefly.
    – ErikE
    Feb 23, 2018 at 0:20
  • I will try to make my question more clear. The first 2 answers were not what I was looking for. Feb 23, 2018 at 0:47
  • @EricCherin I will shortly comment on your question what I think the elements need to be for such a question to be on-topic and answerable objectively. It may also be a question better asked at softwareengineering.stackexchange.com.
    – ErikE
    Feb 23, 2018 at 0:51

2 Answers 2

13

The general answer here is: if you think it's possible to construct a clear, objective answer to the question, then re-write the question to focus on a problem that has precisely that answer. And then vote to re-open it.

I don't have much more specific advice to offer though; I have to admit, most discussions of dependency injection leave me with the distinct feeling there's a pervasive subjectivity to the entire practice. But that's my weakness; if you're skilled enough to write a compelling answer, you should have the background to suss out a good question to match it. Do so, and make it manifest via an edit.

9
  • 2
    "re-write the question" I, usually, end up amazed how such solution eludes so many users, even seasoned ones. Can we maybe invite people to be more aggressive towards editing questions into shape.
    – Braiam
    Feb 22, 2018 at 19:53
  • You're right that there is a fair amount of subjectivity to the question, and that this state is not helped by the fact that a significant portion of developers do DI based on conventions, habits, and patterns they learned without ever really understanding what the point was and why it was being done that way. However, given that DI does provide objectively useful benefits (inversion of control, increased testability, forcing coding to adhere to principles that yield modularity, the correct seams for composition and change occuring in the future, etc.), people NEED guidance on the topic.
    – ErikE
    Feb 22, 2018 at 19:55
  • I have faith that this is true, @ErikE. But the fact of the matter is, most of the guidance I've seen on DI has boiled down to "do what the guru says or the monsters will eat you". And the results are... Depressing. Perhaps, you could start by separating the assumptions made in the question from what the asker is hoping to accomplish.
    – Shog9
    Feb 22, 2018 at 20:00
  • It's a delicate matter, @Braiam - for all the years of frustration over closed questions, a lot of folks stop short of admitting, "instead of closing, we could just fix the problems" because that requires them to admit that there are problems. It's much easier to get along with people if you never have to admit that either one of you is fallible. Two perfect people, guaranteed of success but for the fickle winds of chance - ah, such a life!
    – Shog9
    Feb 22, 2018 at 20:05
  • I agree that it's a quite difficult part of software development. Almost 2 years ago I was completely confused on the topic and I spent almost a whole week of solid 8-hour days researching to get my initial handle on the subject, and only after experimenting with it for the next year or so was I finally able to really have a solid opinion of the benefits of DI, why we do it, how to do it, and what the objective needs are that DI is actually trying to address. It's a tricky, tricky topic for most people. Few developers really do understand it, and I don't blame them.
    – ErikE
    Feb 22, 2018 at 20:06
  • It's worth noting that at some point the changes may get to a point where what you'd like to answer has been so far removed from what the OP was asking for that it becomes better to just ask your own new question. Sometimes the existing question can indeed be edited as it doesn't take radical changes to turn the question into a specific/objective question, but in my experiences for questions like these it tends to take pretty radical changes to create a specific objective question inspired by the one asked, and at that point everyone is better off with a new question.
    – Servy
    Feb 22, 2018 at 20:09
  • 1
    Which is fine, @Servy; heck, I've done both: submit the edit, and if it's rejected then post the question myself (or even use a sockpuppet to avoid the appearance of gaining from someone else's loss - but then don't answer). Plenty of ways to skin the cat.
    – Shog9
    Feb 22, 2018 at 20:11
  • So, the author has apparently inherited a large C# codebase, bringing with them the experience on a different platform where pervasive DI was just done without regard to need or effect. Applying this to an existing codebase on a different platform is, I would surmise, intimidating - and so they're questioning their assumptions as to when and where DI should be used. That's the concrete problem as we know it. The question wanders off from there, assuming that there must still exist some magic practice similar to the one they've known - one divorced from need or effect. Aim there, @ErikE
    – Shog9
    Feb 22, 2018 at 20:16
  • That seems entirely reasonable and in fact my answer goes straight to the fundamentals of why DI is used in the first place, to expect him to study up the needs of his system and apply the knowledge practically, rather than trying to give specific advice on how his projects and solutions should be organized.
    – ErikE
    Feb 22, 2018 at 20:18
4

tl;dr: This happens. It's frustrating. Move on.

If the question should be reopened, then you could post a reopen request to the Close Vote Reviewers chat room.

But if you feel like the question should be closed, then you shouldn't be trying to answer it in the first place.

1
  • You make a good point. If the question as asked is not good, then no answer is good. So, I've come to the conclusion that there exists some question, acceptable to be on stackoverflow or softwareengineering, for which my answer is good. I just have to come up with that question, then I can post it and self-answer it.
    – ErikE
    Feb 22, 2018 at 19:42

You must log in to answer this question.

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