We've been getting a lot of questions recently when users dump hundreds, or even thousands (yes, this has happened) of lines of code into their question without even narrowing it down. This is simply not acceptable. We have lives, too, and we can't always find the problem by skimming code.

Some things that they could do:

  • Create many methods so everything flows and it's easy to read
  • Follow one coding convention throughout all of the code... this code is hard to read (not that it really does anything) because it has different styles:
void setup () {
one.function();  }
void loop ()    {
delay ( 500 ) ;
digitalWrite (5, HIGH); 

Although this one is minor, it seems only helpful to possible answers to stick to one coding convention. Also, if no convention is followed, it sometimes shows that the OP copied a bunch of code and mixed it up, and when it didn't work, they copied it to our site. Don't get me wrong, not all of these questions are this way, and I'm not saying if they followed a coding convention that it would be a good question. Unless I'm wrong, it's usually expected to show prior knowledge of what you've tried, and not doing anything doesn't follow that practice. We're a site targeted at newer users, and I can see these questions becoming common. I may be overreacting, but I just am genuinely concerned about the quality of some of these questions.

  • With many methods, they could send data to the serial window between each function that's called in main() printing out variables. Then, they could narrow it down to a few lines of code that mess everything up.

It's hard to explain this to a new user, but SE's expectation is to include in your post what you've tried. I don't want our site to turn into a wasteland of questions that're unanswered. Even 200 or 100 lines of code IMHO is too much... even if it's a 40 line sketch it would help a lot to narrow it down to five or ten lines. If a user can't narrow it down to a portion of their code, then they are probably talking a too big of project.

So what can we do about this? I've been thinking that we could add this to the help center somewhere, or create another meta post tagged , and show new users it. We could add a few examples to that post explaining how to narrow down a problem.

  • Lets not force a specific set of coding conventions on people. I personally follow BSD style, and would not like to be asked/told to use a different style philosophy.
    – asheeshr
    Apr 30 '14 at 2:05
  • @Asheesh I wasn't saying we should enforce a specific coding convention. I (although I didn't emphasize this as well as I though) meant that people change coding conventions in one sketch. An accident is an accident, but really, four different styles? It seems sometimes like they copied code, edited a bit, and when it didn't work they dump 300 lines into their question and ask "how to fix this code." I may be being too critical, but as far as I know you're supposed to show prior research on SE, and many of these questions just don't. Apr 30 '14 at 2:29
  • Personally I'd like to see comments on people their scripts. That way we'd get an idea of what it should do right at that moment and we can see if someone misunderstand a command.
    – Handoko
    Jun 11 '14 at 7:09

You must log in to answer this question.

Browse other questions tagged .