Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: ===== Read before posting =====  (Read 82147 times)

0 Members and 1 Guest are viewing this topic.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
===== Read before posting =====
« on: August 12, 2011, 02:22:45 pm »
Hi :)

This thread gathers some simple rules to follow before posting.

They will help you to:
- identify the problem more clearly (and sometimes solve it!) before posting
- write a helpful and relevant help message
- have more answers
- avoid the same questions again and again (what's your OS? what's the error message? can you post a minimal code?) and get the relevant answers faster
Laurent Gomila - SFML developer

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
===== Read before posting =====
« Reply #1 on: August 12, 2011, 02:23:44 pm »
Search before posting

Sometimes, a problem is just a lack of understanding, and can be solved very quickly by looking at the right piece of documentation, so make sure that you've carefully read the relevant parts of:
  • the API documentation
  • the tutorials
  • the wiki
Chances are that your problem was already solved somewhere on the internet, so after checking the documentation, don't hesitate to:
  • search the SFML forum
  • ask Google
Searching for a specific error message or function/class name often leads to relevant answers.
Laurent Gomila - SFML developer

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
===== Read before posting =====
« Reply #2 on: August 12, 2011, 02:24:15 pm »
Check basic stuff

Before posting, there are a few steps that you can perform. They may not seem to be related to your problem, but sometimes they just magically solve the problem.

So, you can:
  • clean and completely recompile your project (object files can be corrupted)
  • make sure that you're not mixing incompatible stuff: debug/release, different versions of the compiler
  • check if there are no SFML files/versions lost somewhere that may conflict with the version you're using
  • check the working directory; a lot of loading failures are caused by a bad assumption of what the working directory is: when launched from the IDE, it may be the project's directory rather than the executable's one
  • update your graphics/audio drivers
  • if you're using the latest development snapshot of SFML, check the Git logs and messages on the general forum, API changes can happen at any time
Laurent Gomila - SFML developer

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
===== Read before posting =====
« Reply #3 on: August 12, 2011, 02:24:49 pm »
Choose the right post, the right title, the right forum

A lot of people end up posting in the wrong forum, and this can be irritating for admins. Moreover, people may not read your post if it's at the wrong place, and you may not receive all the help that you could get. Please post in one of the "help" forums if you ask for help -- or in one of the "bindings" forums if your post is specific to a SFML binding. Then post in the forum that corresponds to the module: if you don't know which module your problem is related to, try to find in which header/library the relevant class(es) is(are) defined.

Don't be afraid to create new topics, this is how a forum is supposed to work. Posting in an old and possibly badly related topic won't help you at all. Create your own topic, the website database won't blow up ;)

Choosing a relevant title is very important, a bad title will make other users ignore your post. So please avoid fuzzy titles such as "help!" or "I have a problem", be as precise as possible.
Laurent Gomila - SFML developer

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
===== Read before posting =====
« Reply #4 on: August 12, 2011, 02:26:06 pm »
Give details

Provide as much relevant information as possible to people who will help you -- it saves time and posts.
  • What's your OS? Graphics card?
  • Which version of SFML are you using? Static or dynamic? If you're using a development snapshot, which revision is it?
  • Are you showing all the relevant source code?
  • Have you ran the debugger? What does the call stack look like? Don't know how the debugger works? Find a tutorial, seriously, this is the most important tool for a developer
  • Is it a compiler or linker error? A crash? What's the exact message?
Laurent Gomila - SFML developer

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
===== Read before posting =====
« Reply #5 on: August 12, 2011, 02:26:45 pm »
Identify the problem (a.k.a "complete and minimal code")

At this point you're about to write your post. Many people will read it and try to help, but none of them have hours to spend on your problem. So it is a very bad idea to copy-paste pieces of your original code, or even worse, the whole thing.
Why is it a bad idea? Because:
  • your code contains 95% of code which is irrelevant to the problem
  • people just give up reading when they see too much code
  • people can't test it themselves
  • everybody loses precious time because the problem is lost in tens or hundreds of lines of code
So, let's say you have a problem when displaying a sprite. Nobody cares about how you check collisions, how you play sounds, how you export your game files, etc... It would just be a waste of time to read this code. So what you must do is to extract the relevant lines of code from your application and write a new piece of code that contains only them. We don't care if the new code doesn't do exactly what your original application does, all it has to do is to reproduce the problem.

It is important that:
  • the code is complete, so people can test it
  • the code is as simple as possible, the best is one main() with all the code inside -- people don't want to setup a complex project just to test your code
  • the code reproduces the initial problem
  • the application doesn't depend on external resource files (unless it's related to the problem)
While reducing the code, chances are that you solve the problem yourself: things are clearer and more obvious with less code. And if you can't find anything, we will most likely give you an answer very quickly because the code to examine is very small.
Laurent Gomila - SFML developer

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
===== Read before posting =====
« Reply #6 on: August 12, 2011, 02:27:28 pm »
The perfect post

Here is a perfect example of a helpful post:
http://en.sfml-dev.org/forums/index.php?topic=2208.0

The user found out that there was a problem when copying a sf::Font instance, so he wrote a small code that did it -- and nothing more. Then he provided the debugger call stack, and gave details about his OS and version of SFML.

The result is pretty clear: 2 posts and 16 minutes later the problem was identified and solved.
« Last Edit: May 07, 2012, 02:58:47 pm by Laurent »
Laurent Gomila - SFML developer

 

anything