Learning Help
Getting Help | Pair Programming | Taking Tests | Assignments | Research | Working Smart | General Remarks
Some students work hard, yet still don't do well in computer science courses because they're not getting help when they need it and not using their time well. Here are some proven strategies for success in this course.
Getting Help
Peer tutoring for this course is available. See the syllabus page for more information on this especially valuable opportunity.
The course instructors are eager to help you. No appointment is needed to see us during our office hours. If these hours are not compatible with your schedule, contact one of the course instructors to make an appointment at a time that does work for you.
For quick questions (such as making appointments), you can easily catch me after class, or before class if there is time after I am done setting up. You can also call me at my office, 855-3376. If I'm not there, I may well be working at home, where you are welcome to call me at 336-3221 between 9am and 5pm.
We can help you best if you have made an attempt to study the material or do the assignment on your own and come with questions. Our goal is to help you where you got stuck and how to avoid getting similarly stuck in the future.
When you come for help with a program, please have it available online and/or on a flash drive, preferably in a directory containing just the files related to the program. It saves time if you also bring a printed copy of the most current version of your program. If you are unable to get past the design stage, bring your design notes (however tentative). If you have a problems indicated by an error message, please mark in your program listing the lines referred to in the error message and write down the last line of the message. Of course the listing needs to be of the same version of the program that produced the error message.
Don't expect quick fixes. After a problem has been located or a reasonable debugging technique has been found that will bring you closer to solving your problem, you learn more by implementing the improvement on your own and making an effort to resolve the next bug, if there is one. Of course you may return if you have made such an effort and are stuck again. But we will not resolve multiple bugs in one advising session. Until your program is working you have no way of knowing how many errors it contains, so the only safe approach is to start work early and plan on completing the assignment well before it it due.
Since every personal machine is different, we may not be of much help for problems specific to personal machines. If you have a laptop, it helps a lot to bring it with you for help.
You're also welcome to see me to discuss things that aren't specific to this course. I enjoy discussing all sorts of things related to computer science and the college experience.
A tutor list is maintained by the undergraduate computer science office in LH225. See the department's tutor wwwboard. Instructors are not permitted to recommend individual tutors.
The Student Academic Center offers a one-credit course on study habits and other academic assistance that can be very valuable.
The Why and How of Pair Programming
An article in a leading journal of the programming profession [*] begins "Pair programming is a practice in which two programmers work side-by-side at one computer, continuously collaborating on the same design, algorithm, code, or test. This method has been demonstrated to improve productivity and the quality of software products. Moreover, a recent survey ... found that programmers were universally more confident in their solutions when programming in pairs as opposed to working alone. Likewise, 96% agreed they enjoy their jobs more when pair programming ..."
The person at the keyboard is the driver, and the other the navigator. The navigator may have a tendency to sit back and go along for the ride, but actually the navigator has the most intellectually challenging job: checking for errors and thinking what to do next. The driver is most concerned with tactics, the navigator with strategy.
Switch who is the driver and navigator least every half hour to avoid getting stale.
Pair programming is takes a little getting used to, but it's really worth it! It is one of the rules of Extreme Programming (XP), a programming methodology that has recently proved to be extremely effective and gaining popularity in the programming industry. This course also introduces several other XP rules, such as simplicity, refactoring, and unit testing,
To insure that everyone gets a wide range of programming experience, in some assignments you are to work individually. Of course pair programming is not allowed in these assignments.
[*] Communications of the Association for Computing Machinery, May 2000, pp. 108-114.
Taking Tests
Tests and the final are primarily designed to test your ability to program. Thus there is not shortcut to preparing for them, other than learning how to program using all the features of the languages covered so far in the course. The strategies discussed on this page and other resources of this course are designed to assist you in achieving that goal.
There are no shortcuts for doing well in this course without learning how to program. But we do emphasize techniques that can help you avoid unproductive use of your time and much frustration.
You may feel you do well on the assignments, but that the quizzes are much harder. In most ways quizzes are significantly easier than assignments, but you may be relying too much on a computer to catch elementary errors and to try many possibilities without understanding them. I try to design tests so time pressure is not a problem for most students.
Assignments
Please follow the advice on the File Storage page so you do not loose time due to lost work or unnecessary confusion. Use a separate directory for each assignment, and save files at least every 10 minutes.
When possible, write test code before writing the main part of your assignment. If this is not possible due to the interactive nature of the program, write out a basic test plan instead. Writing or planning tests requires a thorough understanding of the intended behavior of the program, which is very important before writing code. Writing test code before writing the code that it tests is another tenant of the Extreme Programming methodology.
Develop your program in stages. And when you get a stage working, keep a copy of the working code at least until the next stage is working. That way if in adding code for the next stage you break earlier code, you have something to go back to.And you will have a partially working version to turn in if you do not get every stage of an assignment to work. That will be worth a lot more than a bunch more code that does not work at all! If you do not get the entire assignment working, include comments at the beginning indicating what works or what doesn't. Your program may also contain "commented out" code that documents an unsuccessful effort to complete the assignment. You will get partial credit for that if it is along the right lines.
Whenever possible, debug programs in your head, rather than at a computer. This will often save you lots of time. Debugging at a computer can be very time consuming. And you can't use a computer in exams.
Have a strategy for solving programming problems. Write it down, as informally as you wish. For any but very simple functions and methods, write pseudo code. Do not start writing code unless you're sure you have a good picture of the whole program, which you can't do in your head for any but very tiny programs until you are experienced. Professional programmers also use written design notes except for programs that are quite simple.
Some Learning Research
A leading scientific study examined a great many factors to see what most contributed to student success in college. The three leading factors contributing to success were:
- Time on task: Ok, so this one is obvious. But it's hard to put in time studying if you're not enjoying it, because you're not succeeding, because you're not studying effectively by taking advantage of the other factors contributing to success.
- Studying with other students: Many students rate social life as the most valuable parts of their college experience, but fail to extend this to their studies. Studying together can be more fun, and more productive too. You can really relate to each others learning needs. And when you help a friend, the material becomes more lively in your own mind. When you verbalize something you have only read or heard, it activates a whole different part of your brain, which research has shown can increase memory and understanding.
- Involvement with faculty: Most faculty wish students would seek their help more often. They have a deep and broad perspective on the material and learning process, and an enthusiasm for the material, which they are eager to share with students. Naturally you learn more, and faculty enjoy working with you more, if you make a good effort to learn what you reasonably can by reading and attempting exercises on your own. Then please do come with any questions you are stuck on. There are no stupid questions!
The most consistent result of research on learning is this: learning happen when you are solving problems. Passive learning, such as listening to a lecture or reading a book with few thoughts of your own, is of little value other than as preparation for active learning. Your brain quickly flushes most information unless it is used right away to solve problems. Active learning means giving assignments and class exercises your best effort. It also means doing provided review questions, exercises, and programming projects, and if need be additional ones of your own design or from other sources, until you can apply the material you have learned.
Working Smart
It's not just how hard your work, or how smart you are, it's how smart you work! Making the most of your mind is a skill, like any other, that you get better at by working at it. But most people almost never think about how they're thinking. What helps someone else think their best may not work for you. And what helps you do one kind of thinking may not help when you're thinking about other kinds of things. You'll become much better at solving programming problems if you make adjustments in how you think. So periodically practice meta-thinking: that is, practice thinking about how you're thinking. Research has shown that developing this ability is one of the most valuable things you can learn in college.
You'll probably discover things like the following:
- Your mind works best when you're thoroughly rested. Recent research has shown that even mild sleep deprivation, of the kind most students experience most of the time, significantly reduces cognitive ability. For many people this means working on hard problems in the morning, rather than late at night. If you think you're not a "morning person," try getting enough sleep on a regular basis and see if that doesn't change. In any case, notice that some kinds of work you can do satisfactorily when you're a bit tired, but others are much harder then.
- Draw pictures. Most people find that they can think better about abstract problems if they draw some sort of abstract picture to give their mind something more to focus on. It doesn't matter what kind of picture it is if it helps you. This applies very much to the design or programs and visualizing what is happening when a program runs.
- Try printing your program when you're really stuck. Many people find that though reading from a computer screen is no problem for most purposes, when they need to think really hard about something it works better to be looking at a printed page. It seems that it takes a bit more mental effort to read from the screen and sometimes that makes a real different. And you can draw pictures, underline things, and otherwise take notes more easily on a printout.
- Monitor your thinking every few minutes. Are you getting stale? Mind wondering a lot? Restless? Arms tired? Then take a break for at least a minute. Rest your arms, breath deeply, close your eyes or focus at a distance, stretch. If you're really stuck, take a longer break or do something else for a while.
- Sometimes thinking works much better when you're not working at it! If you're stuck, take a break. Think about your problem off and on, in a relaxed way, while you're doing something relaxing, like walking. Sometimes your "background processing" may be much more creative than your "foreground processing." In fact, memory research has shown that we're more likely to remember something if it was the last challenging thing we thought before going to bed. Our brains keep working on it while we sleep!
General Remarks
Doing assignments is no substitute for reading the text and studying class material. By doing lots of debugging and trying lots of possibilities you may eventually succeed in getting small programs to work with little attention to the book or class material. But you will not become a good programmer this way, or do well on tests. To be a good programmers you must know the structure of your programming language and the principles involved in its design. Otherwise, you will not know what the possibilities are for structuring programs unless you have already done a very similar program, you will make many more mistakes than necessary, and you will sometimes have very great difficulty debugging your code. Though you may eventually figure out some aspects of the underlying principles without studying them directly with the help of a book or class material, it is much easier and more reliable to study the principles directly with these aids.
When you hear a term you don't know, write it down. Look it up after class in the index of the text and/or another source. If you still don't understand, ask a friend or a course instructor.
Don't procrastinate. Yes, everyone does at times, and sometimes it seems to do no harm. But in this course there are two special reasons to avoid procrastination:
- You can't tell how close your program is to working until it works completely. There's no way to know how many bugs may be lurking inside. You may also get really stumped by a bug and need to get help, which can be impossible to get at the last moment. So the only safe approach is to plan on completing assignments well ahead of time.
- Programming is often challenging, so you need to be at your best. If your mind is fatigued, you are much more error prone and less creative. After a break of a few minutes, or a day, you may be amazed how much easier things can be.
- Knowledge in this course is cumulative: you will often have difficulty with the current material if you do not have a firm grasp on what has come before. So if you delay studying the text until shortly before a quiz or exam, you will have more trouble understanding lectures and doing assignments.
Learn to read computer science material like a scientist. It's tempting to read your text like a novel. You see some code or read some statement and think "I sort of see what is going on" or even "I expect this will be clear later" and continue. This is appropriate for a first reading to get an impression of the material, which is a good idea before the class in which it is discussed. But you must go back and reread it until you really understand it. Reread it until you feel you understand why what you've read is the way it is. If you don't understand the why of it, you really don't understand a significant underlying concept, and you won't be able to use the concept.
Seek help when you need it. It's valuable to try understanding things and solving problems on your own first, but when you're really stuck, get help from the course instructors, or (unless it is an assignment) a friend or tutor.
Review these strategies often. You may have to overcome deeply ingrained habits to use the strategies you need most.