Guideines for posting to Piazza

Asking questions

Being able to ask good questions is a vital skill for a programmer. In a forum like Stack Overflow or other professional forum, people are very willing to help. But you are more likely to get help if you show you have put in some effort. Don't just say, "This doesn't work. Why not?" The same thing applies in the Piazza forum. It is not there so someone else can do your homework. It is there so you can became a more competent programmer. In that spirit, I have written these guidelines to hep you learn to ask good questions and participate actively, and beneficially in the forum.

  1. Before you ask a question, search to see if it has already been asked and answered

    You can add to a current thread if you need further clarification. People get tired of answering the same question over and over so take the time to be sure yours is a new question.

  2. When posting a question, include what the question is about in the summary (subject) in addition to the problem number. That will make it easier for students with a similar problem to find an answer.
    Good
    hw4c draft - how to find the square root
    hw6b final - Always get 0
    hw4a - how do I cast a double to an int.
    Bad
    hw4a
    hw6b final - In need of help
    hw4a - stuck
     
  3. Explain what the problem is. Do you get a syntax error? Does your code throw an exception? Does it run but not do what you expect?
    Good
    I get this syntax error: Cannot find symbol - class Rctangle
    Here is the line of code: Rectangle rec = new Rctangle();

    My code throws this exception: java.lang.ArithmeticException: / by zero
    at Test.main(Test.java:13)
    The line of code is
    int a = 3/0;

    My method always returns false, but I can not figure out why.
     
  4. Tell exactly where your confusion is. Don't just say, "I don't understand." Take the time to figure out where your confusion begins and ask about that.
    Good
    I know what a meethod is, but I do not know what a static method is.
    I understand how to write a for loop with an increment of one, but how do I write a loop to increment by 2.
    I know how to cast from a double to an int, but how do I cast from an interface type to a class type?
  5. Use the code button to format your code. It will be much easier to read

    code button

Answering questions

  1. It is generous of you to try to help your classmates, but do not just give the answer. Point them in the right direction or give suggestions to help them solve their problem. If you just give the answer, they get credit for that problem but are no better equipped to solve the next problem. They will be stronger programmers for putting in the effort to solve the problem with a little help along the way from you.

  2. Do not post the entire solution or a sizable part of the solution. You can post a few lines or you can give code example. If yu post too much, I wil delete it.