11

I'd like to figure out how optimal my solution is for calculating the rebound angle of a 2D projectile inside a rectangular space. It's a fairly generic requirement and I'm certain that it will be useful to others.

I'd like to frame the question as "Can this [description of function] be simplified/refactored?"

The sites that I think it may be semi appropriate on are:

  • Mathematics
  • Code Review
  • Stack Overflow
  • Software Engineering

I'm not heavily familiar with the scopes of any of these sites beyond the obvious assumptions.

Where might I get the best balance of both the programming and math worlds?

8
  • 1
    You have a working / correct implementation in a common computer language of said function, right? And you can describe / have tried the kind of simplification you're looking for?
    – rene
    Feb 13, 2018 at 22:27
  • @rene yes, I've got Python and JS versions and based on 19 tests, I'm 90% confident it works.
    – Dom
    Feb 13, 2018 at 22:29
  • 2
    Great, that rules out SO then, assuming you're not looking for a performance improvement.
    – rene
    Feb 13, 2018 at 22:30
  • 2
    And as you passed the white-board stage I doubt software engineering would be a good fit.
    – rene
    Feb 13, 2018 at 22:31
  • 4
    If you want to get even more meta, the site this kind of question should be asked on is Meta Stack Exchange. Feb 13, 2018 at 23:14
  • 2
    gamedev.stackexchange.com may be another site to consider. Game development and precise math not necessary go together and that site may suggest some other approaches that not necessary fit for true math. Feb 13, 2018 at 23:41
  • A projectile in a rectangular space? If this is related to game or simulation development I would find a site specifically for that topic, you'll find a crowd which is quite trained in answering this type of question as they've been there.
    – Gimby
    Feb 15, 2018 at 10:57
  • 3
    the worst brute-force solution would be to post in all 4 and see where you will get least amount of downvotes Feb 15, 2018 at 18:23

1 Answer 1

16

I'll give a breakdown of criteria in this case that might make it on-topic for each site:

  • Mathematics: Are you able to reduce the problem to formal mathematical language without resorting to citing actual source code? If this is easy to do, this might be the best fit.

  • Code Review: Is your current approach working as expected? Does your refactoring require improving maintainability and / or optimization? If so, this will be the best fit.

  • Stack Overflow: Can you explain the problem in a way that has objective criteria for solving? Such as, upperbound of runtime requirement, along with current benchmarks. That would make it a good fit here.

  • Software Engineering: Is your problem something that can be generalized while still addressing your particular issue? I suspect that's not the case here, but if it is, this might be a good fit.

  • Game Development: According to what's on topic:

    game-specific programming issues (engine architecture, game-related APIs, networking, tools, etc), including modding existing games

    Your question about kinematics is certainly related to game development, and would probably be a good fit for there, as mentioned in this comment.

2
  • 1
    Thanks, based on this I think Code Review is the best fit.
    – Dom
    Feb 13, 2018 at 22:35
  • 7
    @Dom FYI, in my experience there are ample users on Code Review who have in-depth knowledge of mathematics, as that often goes hand-in-hand with optimization. However, due note that unlike Stack Overflow, an answer may require a few days, so be patient, and try to make it as easy as possible to answer by providing a minimal, complete, and verifiable example. Feb 13, 2018 at 22:44

You must log in to answer this question.

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