CSC 350

Database Systems

Getting Help

The most important skill you'll develop as a software developer is how to find answers to problems you're experiencing.

There are three steps to this:

  1. Know what to ask.
  2. Ask.
  3. Apply the answer.

Asking for Help

If you've exhausted everything you can do on your own, please feel free to ask your teacher for assistance. There's a common phrase used in teaching: "there's no such thing as a dumb question." While this may be true, some questions are a lot better than others:

Bad questions

"I don't know what to do."

"I'm stuck."

"I'm lost."

"It doesn't work."

Good questions

"I'm working on the guessing game assignment and I've been able to work out most of it except how to choose the random number. Right now, the computer always picks the number 12 as the secret number, using this code.... but I'm not sure how to get it to assign a random number."

+++

"I was trying to use the foo_blaster command, and I expected this to work: foo_blaster fulano -d tal, however when I used that I received this error message: Error: no tal available. I looked this up on Stack Overflow and found that there is a known issue with using tal commands on Windows 64bit computers, but that didn't seem to apply to me. What would you suggest I try next?"

The difference between a good question and a bad question is one of agency. Bad questions often indicate a lack of agency, a desire to be "acted upon", whereas good questions show a desire to be an agent who acts, someone who is proactive about their own learning.

Searching for Answers

The best place to find answers to specific programming questions is StackOverflow.

Let’s say that you’re trying to complete an assignment that asks you to create a Java program to simulate a random number guessing game.

The first step would be to break this down into small steps:

# 1. Have the program choose a random number.
# 2. Repeat these steps until the user guesses correctly:
#    a. Ask the user for their guess.
#    b. Tell the user if they were too high, too low, or guessed correctly.

Let’s pretend you know how to do everything for choosing the random mumber.

You could conceivably try googling for "Write code for number guessing game" and find a bunch of code that would work. However, in that case you would learn very little. In addition, using such code would be considered plagiarism.

Instead, you should search for just how to do step 1: random number in java.

Those results show several examples of how to select a random number in Java.

Avoiding Plagiarism

Note what does and does not count as plagiarism when it comes to programming assignments.

Copying and pasting the code we found directly without modifying or understanding it would constitute plagiarism.

Instead, if you make sure you understand what all of the code does and why, and incorporate those concepts into your own code, that is not plagiarism.