25

I've been a member for quite some time now, mostly in Java programming, trying to move into iOS programming now.

When asking questions in Java, I exactly knew what was needed to count as an MRE, basically a main method with a way to isolate the problem, but when asking questions for iOS I always get confused as to what would be considered OK to post and what not, and what might just be noise into the question.

I currently have a question for a game I'm making, so if any of you could look at the format of it: SpriteKit keep moving player in current direction while falling after touchesEnded and the previous question I asked: SpriteKit scrolling background image showing line between images, and tell me what can I improve in any future questions I might have.

Another question I asked before that basically contained a ton of classes is this one, where I had to post a GitHub link to the Interface Builder files (.xib): How to show the standard number keyboard without a UITextField in Swift on viewDidLoad

If my issues were about logic, non-UI related a playground might be enough, but when dealing with UI problems, how can I post those Interface Builder files or storyboards or how could I show it without linking to a GitHub repository with the MRE there? Or in the case of my game, are the assets needed?

I'm just trying to improve how I ask questions in this new environment.

25
  • 13
    No @SecurityHound I'm asking this question in order to improve my future questions, rep means nothing to me, but I'm curious about how to ask better questions when working in iOS projects. Actually I'm glad to have bounties when I really need an answer to any question I have but I'd like to help others to help me respecting their (and my) time
    – Frakcool
    Commented Mar 17, 2021 at 17:37
  • 1
    I don't see any way to improve the two questions you have asked about. The newest question asked 13 hours ago, was only asked 13 hours ago, probably should give that one more time. Commented Mar 17, 2021 at 17:38
  • 10
    Not looking to promote the questions here, genuinely trying to improve, as I find myself posting a ton of code every time I ask a question in iOS here, because I don't know what should I post especially when dealing with UIStoryboards, among other UI things
    – Frakcool
    Commented Mar 17, 2021 at 17:42
  • 2
    @Sinatr: The questions were posted on SO, where they're just as good a fit as on gamedev. I don't see why this would be asked on another meta.
    – BoltClock Mod
    Commented Mar 18, 2021 at 9:29
  • 1
    @BoltClock, OP wants to improve his experience and I believe gamedev is the place to ask questions about games. Perhaps I should write comments more clearly, sorry.
    – Sinatr
    Commented Mar 18, 2021 at 9:32
  • 5
    I'm not too familiar with gamedev community @Sinatr however while my latest questions were more related to gaming, my question goes beyond that, I've find myself posting a wall of code (like the latest link I posted), when trying to show a MRE, which to me in my experience with Java is not ideal, everything was contained in some methods and a single class but what about when you have UI issues and you're working with storyboards and xibs? Then should I post XML? Link to a GitHub repo? I don't find an easy way to post proper MREs for iOS programming
    – Frakcool
    Commented Mar 18, 2021 at 13:16
  • 1
    No, you shouldn't post a link to a GitHub repo. Your question needs to be self contained.
    – mason
    Commented Mar 18, 2021 at 14:35
  • 2
    And that is where my question comes in, how to show UI issues where you need to show constraints or that are related to UI + logic but the UI isn't created programmatically but with storyboards. You can't self contain them completely @mason
    – Frakcool
    Commented Mar 18, 2021 at 14:38
  • 5
    Yes, in Java that was easy as if working with desktop apps the UI was built programmatically, with Swift there are 2 ways: programmatically which I rarely use and storyboards which are huge and weird XMLs that when read make no sense until put into the Xcode IDE and seen as storyboards, that's basically where my question lies, I've not seen people posting the XML for their storyboards, and when they post screenshots of their UIView then they don't usually receive answers or are too vague because people can't reproduce the problem without having a look at all the constraints
    – Frakcool
    Commented Mar 18, 2021 at 14:47
  • 2
    Imagine showing you understand the differences between Java and iOS, the whole idea of MREs, and your decision to ask on SO, by stating it all upfront... and still having to reply to multiple people clarifying things that any iOS developer would've understood and not questioned.
    – BoltClock Mod
    Commented Mar 19, 2021 at 5:12
  • 2
    Tbh I've checked most of the profiles of people commenting here @BoltClock and none of them show any iOS question / answer, and if I had to guess, I bet 90% of the people who have upvoted either the comments or this question are mostly iOS developers who have encountered themselves in a similar spot than me. I wish there was a way in SO to probably upload those kind of files so we don't depend on external sites just to show them off, I mean, JS devs have fiddles / snippets, Java is mostly backend nowadays or homework tasks, android has their XML syntax clear but iOS... is a pain for SO's MREs
    – Frakcool
    Commented Mar 19, 2021 at 5:17
  • 2
    @Frakcool: Yeah, and I wish people were more understanding of that - that some techs are incredibly non-conducive to SO's rules and vice versa, and question askers are not to blame. I'm not sure what your overall impression of the SO community is, but I'm sure you know it doesn't exactly have the greatest reputation (heh) among developers. That said you seem like a pretty patient person, which is commendable. I've just been around much longer so I'm starting to show my exasperated-boomer side (I'm actually under 30).
    – BoltClock Mod
    Commented Mar 19, 2021 at 5:45
  • 2
    But you're right, maybe we can't apply the same MRE rules to all languages and I'll have to learn to live with posting walls of code when asking iOS questions (or answers) and probably those will be longer than the Java ones I'm used to, at least until SO does something to improve the experience for those other techs
    – Frakcool
    Commented Mar 19, 2021 at 5:54
  • 2
    Is there anything to be learnt from current well received related iOS questions that you can use as a guide? If nothing else, it can lend further credence to a hypothesis as to whether SO tooling is sufficient to provide the standard you have delivered in java? The latter part it sounds like you kinda already have a strong feel for based on your SO iOS experience. Perhaps start a community wiki on what an MRE would look like for this; bit like this: meta.stackoverflow.com/questions/405791/…
    – QHarr
    Commented Mar 19, 2021 at 6:59
  • 4
    As for the MRE, I'm not an iOS programmer but I wonder, are all private variables of the GameScene needed for the example? Do you really need a background and a floor? Is the name property necessary (maybe there could be only one entity)? Are two directions needed? One may be enough to show the effect. Is the up arrow needed for the example? These are all questions one might ask oneself when preparing a MRE. It really is not a simple task to create a truly minimal MRE. Commented Mar 19, 2021 at 8:53

1 Answer 1

4

So, after reading some of the last comments here are some things that should improve iOS MREs, I'll eventually create a Community Wiki as suggested by QHarr in the comments above

There are 2 types of questions we can ask when dealing with iOS issues

UI related questions

These are the questions where the layout is the problem, in such cases we need to provide screenshots of our interface builder of the culprit UIView along with its constraints, trying to isolate the issue with as few components as possible.

Behavior related questions

These are the questions where we're only changing values on the data, in case our code is modifying the UI (such as in a game) based on a state, we should post a video / gif showing the error and the code that is creating the problem, always trying to isolate the problem in a brand new project, in order to reduce complexity.


With the above recommendations, our questions should be self-contained.

You must log in to answer this question.

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