Thomas Carruthers once said, "A teacher is one who makes himself progressively unnecessary."
Nowhere is this more true than in online courses where, despite their greater flexibility, they inevitably shift the responsibility for learning onto the learner with the teacher become a "guide on the side" rather than a "sage on the stage". An online class, in my opinion, really isn't designed to teach but, instead, to facilitate learning. This is because an online course is usually intended for very independent learners comfortable with self-study, rather than those more comfortable with direct, structured, live and interactive pedagogy. And, in my experience, the Socratic approach is the best way to learn, rather than teach.
Often, different people need different perspectives on the same material; some are more visual learners, other kinesthetic, others aural. Most of us, in fact, respond best to some blend of these learning styles so seeing the same material from a different perspective can be invaluable when learning new material. This is why I highly recommend everyone should read the text AND check the youtube videos AND, most of all, write little programs as much as possible! All the helpful advice in the world cannot substitute for the learning that occurs from writing a piece of code and throwing it into the fires of the compiler. Then fixing it. Then recompiling. Then Googling the often-frustrating error messages that seem to make no sense. Then recompiling. Then celebrating! This is the absolute best and most efficient way to learn programming (and most other things, as well).
In fact, I assume that's exactly what you guys are doing: you should be writing, compiling, and then searching google for what the heck happened. This is one of the main reasons I encourage (some might say force :) everyone to post their technical questions in the Q&A forums and employ the socratic method which, in my opinon, is the best way to learn critical-thinking/evidence-based reasoning. This is where both your colleagues and I will take the examples you post and ask things like, "What if x fact is changed in y way? What results from that change?" Once you answer, your colleagues might ask, "Why does that necessarily result?" and you can, in turn, ask your colleagues if they think the change makes a significant difference.
My job is to help facilitate your learning (rather than just answer questions that are in the book or online) and the process outlined above is absolutely essential to that learning.
Also, when you feel stuck, one of the best things to do is consult one of the references in my references links and/or search on google. Almost every single question for a class at this level is likely already answered on the web and should show right up via a quick search.
"One of the advantages of an online course is that you don't have to go to class to listen to Miss Pammi drone on during boring lectures (as if!). One of the disadvantages of an online course is that you don't GET to come to class and listen to Miss Pammi give you insightful and inspiring lectures that teach you the material!"
Saying "I'm lost" might help release some frustration (and accurately reflect your internal state! :) but it won't get you much help as no one is as familiar with your work as you. So the first step in getting help is explaining your problem precisely. Just imagine all the various things you'd explain to someone in person and how much of an iterative, back-and-forth process explaining the problem is, with the person trying to help asking many clarifying questions to get a handle on what might be wrong. Online, you have to be able to capture that same information in a single post!
Remember, the people you're asking for help are at least as busy as you. In general, when posting questions online (either in classroom forums or in the wilds of the internet), please do follow the protocols outlined below for eliciting the best help. These protocols build upon the latest research in Cyberlearning/Social Learning from community/knowledge sites which suggests how best to ask questions and learn new material.
Mandatory Posting ProtocolThe first step is to state your problem precisely; not only will this clearly communicate the issue you're trying to resolve but, as Charles Kettering said, "A problem well stated is a problem half solved."
As you know, all technical questions should be posted in the Q&A Forum. Like all such communities, before posting, all posts are required to include the following basic information:
- List what you tried
- List what you expected it to do and what it actually did
- It's very important to include a description or screenshot of what it actually did
- List why you think it failed or should have worked
- Summarize how you tried to research your question. Simply saying that you used Google and Wikipedia isn't enough. What are some of the search terms you tried? What articles did you read?
- This information is essential as most errors can be solved by simply searching for the exact error (in quotes).
- If necessary/appropriate, post pseudocode (only!) of your actual program/script with the full text of all errors.
- Expressing your program in pseudocode (YouTube video of pseudocode) will help you in understanding what you're doing and help others to understand what is going on. Please do not ever post your actual lab code for the lab that's due that week.
- Besides pseudocode, as also stated in these FAQs, if you're programming in Java, you should post the full stacktrace (which is described here and here).
- If absolutely necessary, you can include a short excerpt of just the specific block of actual code causing the error. When posting code, it is a requirement to follow the guidelines posted at sscce.org for creating a Short, Self Contained, Correct (Compilable), Example.
It's necessary to follow the above 5 steps as not only does that communicate the issue plainly for potential helpers but clearly defining the problem will VERY much help you get a handle on it, too.
For more generic issues, the follow-up will likely involve posting:
Beyond this course: If you intend to do any programming after you're done with this course, you'll likely need some help down the line. Although our course Q&A Forums won't be available then, the same skills you acquired in asking questions here will aid you in getting answers from the programming community on the Web! Here is a little guide on how to ask questions on the Web Forums: http://www.catb.org/~esr/faqs/smart-questions.html
Please remember, if you're in an academic situation, your professor likely has about 60 - 100 other students that are vying for his/her time; if you're in an industry-setting or seeking help online, the people you're approaching for help have other full-time jobs or tasks. Unless you've hired a personal tutor, the people helping you are likely giving of their own valuable time so it's incumbent upon you to make good use of it otherwise you'll get little to no help (and, on the internet, quite a few snarky responses, as explained here and here :).
javac not recognized
type of error, the issue is with your PATH variable.
If you don't have your Java IDE directory in
your PATH environment variable, you'll likely have to use the full path
to the javac
executable. E.g., if you installed the Java IDE into
c:\java\
, you might have to use something like
c:\java\jdk1.7\bin\javac.exe
instead of just javac
.
Here's a great link about the PATH variable, as well:
http://docs.oracle.com/javase/tutorial/essential/environment/paths.html
jar not recognized
type of error, the issue is likely your PATH variable again, as explained here:
http://www.sethi.org/classes/comp/shared/public_labs/lab_08
java.lang.NoSuchMethodError: main
: http://stackoverflow.com/questions/5407250/causes-of-java-lang-nosuchmethoderror-main-exception-in-thread-main
In particular, if you get the dreaded Exception in thread "main" java.lang.NoClassDefFoundError: HelloWorldApp
,
it's a very common error and just means you need to set the
classpath and make sure package directory exists (c.f., http://www.jarticles.com/package/package_eng.html.
If needed, simply remove the package declaration temporarily to
see if everything runs okay without it.
JOptionPane
s???
JOptionPane
s
quite extensively in Ch. 4 and Ch. 8 (of the 3rd and 4th editions) and also in
the exercises in in Ch. 1 and Ch. 5. In addition, the Java-specific
references contains tons of links that discuss this essential
library.
The method printf(String,Object[]) in the type PrintStream is not applicable for the arguments(String, double)
or about String.format("Average:%.2f",average);
and gives the error parameters should be (String,Object[]) not (String, double)
then the problem is the compiler compatibility in Eclipse. To fix, choose
Project → Properties, then choose the "Java Compiler" option on the left and then
click "Enable project specific settings" and then finally set "Compiler
compliance level" to "6.0". Or set the default in the Preferences → Java → Compiler, as per setting:
Workspace in use or cannot be created, choose a different one
error:
.lock
file and restart Eclipse.
f:\workspace
to get it to work. Please also note that your host computer is on the v:\
drive, in-case you need to move any saved files.
File -> Switch Workspace
.
"Client" V:
drive and then drill down to find the folder you want to use.
The serializable class does not declare a static final serialVersionUID
warning:
Serializable
interface (e.g., JFrame
),
you'll likely see this warning in Eclipse, unless you
told it to either ignore this, instead of giving a warning OR to
autogenerate a serialVersionUID
for you. You could
also add the @SuppressWarnings("serial")
directive
to the calling method. But, most simply, just adding a new
field (private static final long serialVersionUID = -1113582265865921787L;
)
to your class should do the trick.
setVisibility()
call at the
end of your GUI initialization. Please do check here
and here.
ifstream
, it might be because of the
following reasons:
"C:\\encrypt.txt"
PROJECT\Debug\Bin
directory for a Debug projectf:\
and your host computer is on v:\