27

I have a question that deals with OO design aspects.

I do not have complete working code and my understanding is that non-working code cannot be posted on the Code Review site.

What I have is a bunch of classes with their attributes(and method stubs but no implementation). The names of the classes and the attributes and the methods are reasonably self-explanatory.

Where does this question belong? Here in Stack Overflow?

10
  • 1
    Why would design require code? Are you looking for an answer related to the code aspect or the design aspect?
    – Makoto
    Commented Mar 25, 2019 at 16:24
  • Great question :) I wanted to get feedback on whether the interfaces, enums, classes(and their corresponding atrributes and methods) would be adequate if I were to code it up into a proper solution and I thought organizing them as enums, interfaces and classes(without actual implementations) would be the best way to represent my thought process and ideas. My primary question is around the design aspect, but if it is adequate enough, I also have a follow up question on "yet to be written code"
    – Sai
    Commented Mar 25, 2019 at 16:30
  • Fair. It seems that you're trying to verify your approach rather than validate it. Do you think you could express your question independently of your code, or do you require your code for expression purposes?
    – Makoto
    Commented Mar 25, 2019 at 16:34
  • I think it would be handy for the reviewers to have the code, since I want feedback on whether I have used the right data structures for some of my attributes etc. Technically you could do this with a class diagram, but I am not sure I have the right tools for this. I have also organized the code in such a way that it easily gives away the idea behind why some of the classes are implementing the interfaces they implement. If I were to strip it all out and describe everything verbally, it could end up being quite verbose and would also likely require clarifying follow-up posts
    – Sai
    Commented Mar 25, 2019 at 16:39
  • The questions I'm asking you here are to determine where you're physically sat when you're trying to ask this question - if you're still at a computer screen, or if you're at a whiteboard. Verbosity in questions isn't a good trait to have, but you do want to be concise and ask a clear question. What data structures you should be using to solve your problem if you're looking to design an OO solution is an implementation concern, not a design concern. Focusing on one aspect or another - whether you're trying to implement it or whiteboard it out - would determine what site this best fits on.
    – Makoto
    Commented Mar 25, 2019 at 16:42
  • Have you seen any existting question similar to yours here on SO that you may want to use as a template? Many of these "design" questions can be very much opinion based.
    – yivi
    Commented Mar 25, 2019 at 16:45
  • 4
    Possibly softwareengineering.stackexchange.com - Though, check their tour and ask guide.
    – Script47
    Commented Mar 25, 2019 at 16:46
  • @yivi this question has the potential to be considered opinion based. I have narrowed down the set of requirements and assumptions to a degree, but still this was an open-ended interview question that is likely to be opinion based and that is why I am not so sure it belongs in SO. So let me rephrase this a little bit. If I were to make it into a class diagram instead of code and provided some metadata around the class diagram would it still be considered opinion-based on SO? Where would that belong typically?
    – Sai
    Commented Mar 25, 2019 at 16:48
  • But why do you need the class diagram? Full disclosure - I'm leaning slightly more towards Software Engineering but I can't fully recommend it to you since your question still feels a bit too broad for the site, still.
    – Makoto
    Commented Mar 25, 2019 at 16:53
  • Since SO, SE, CR are similar, almost all site recommendation questions with code will touch on similarities. As a result, there may be some of the same language as far as general guidance. However, as far as individual guidance, I do not think it is effective to close all site recommendation questions as a duplicate of the broad question suggested here as a duplicate. It is certainly similar, but it does not directly touch on OOP nor the situation described by the OP, nor do any of the solutions there address that specifically. I do not think that this is a duplicate.
    – Travis J
    Commented Mar 26, 2019 at 2:10

1 Answer 1

31

Your specific explanation

You seem to have a skeleton implementation setup and are trying to figure out where that fits into the exchange. It does not fit at Stack Overflow, since it would fall into many off topic reasons here: it is opinionated in that there are many ways to move forward, it is broad in that answers could cover a lot of ground, it is unclear in that it lacks a working example to use as a basis. For many similar reasons, Code Review is also a poor fit. Software Engineering may work here, although the question must include specific reasoning for design choices and give details for both goals and the decisions made towards those goals.

Generally speaking....

There is a lot of "it depends" here, because the way this is phrased. Where object oriented approach questions can be asked involves a broad spectrum of issues.

The most important aspect of asking these questions is to read the on topic sections of wherever you post, as well as ensuring that the question is not asking a duplicate problem; especially if the problem is something commonly encountered in the earlier stages of feature development.

  • If your question concerns trying to figure out how to make something that was coded or designed actually work, or why an approach with the coded implementation is not working as expected or not possible - Stack Overflow is probably best. For example, when trying to solve an issue where covariance is involved but type inference isn't working.

  • If your question concerns trying to figure out which approach or design to use with a specific use case and some structure for where the design or approach would fit in - Software Engineering is probably best. For example, when trying to figure out if inheritance is required in order to provide for multiple implementations of a feature.

  • If your question concerns existing written code which is working but is perhaps not properly designed or seems questionable from an implementation standpoint - Code Review is probably best. For example, when trying to figure out if the current implementation of inheritance is properly supporting polymorphism.

There are of course overlapping issues for each of these exchanges, so before asking on one, always make sure that you check their on topic page to be absolutely certain your question fits the site's guidance.

6
  • 15
    I'll paraphrase an explanation I saw elsewhere: If you haven't started coding yet, then Software Engineering. If you have problems with your code, Stack Overflow. If you have a code that works, then Code Review. It's a bit simplistic and loses some nuances but it's a good place to start when trying to find a fit for a question.
    – VLAZ
    Commented Mar 26, 2019 at 12:31
  • 14
    Generally, nobody knows what's on topic at Software Engineering, including users and moderators. They don't like programming questions much - in particular not broader design questions. So I wouldn't recommend anyone to post something there - we do need a SE site for program design questions.
    – Lundin
    Commented Mar 26, 2019 at 12:42
  • 4
    What Lundin said. It took several years just to come up with an appropriate name for the site, and even then it was highly controversial and fraught with debate. Commented Mar 26, 2019 at 13:09
  • 1
    Yeah, I agree with all of that.
    – Travis J
    Commented Mar 26, 2019 at 17:44
  • 1
    @Lundin the issue being that 'best-practice' is considered to opinion-based, and thus for a site which appears to be about programming best practices, most things are off-topic. Commented Mar 27, 2019 at 11:59
  • 3
    @Pureferret Most program design techniques are in fact de-facto industry standard. To follow established standards is best practice while at the same time it is not opinion-based. This is what that site often fails to understand.
    – Lundin
    Commented Mar 27, 2019 at 12:18

You must log in to answer this question.

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