7 Hacks for Acing your Computer Science Course

James BilousSoftware Engineer
CERTIFIED EXPERT
Published:
Updated:
Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may help others on a similar path.
Computer Science courses are designed to mix problem solving with language learning in order to guide students to successful, yet challenging careers in the software industry. Some classes will stress accuracy while others require efficiency, and even more will demand both from budding computer scientists and software engineers who vie for a chance at a passing grade. Given these difficulties it is no wonder why computer science courses boast some of the highest failure rates in college programs. But all is not lost if you find yourself in one of these demanding courses; these few tips and tricks can help you realize your potential as a competent coder and propel you to the top of your class.
 
  1. Don't rely on a debugger. Debuggers, though wonderful tools for stepping through code and solving tough problems in industry, can quickly turn into a crutch for new developers. Many courses will have a test component that will require you to complete certain programming tasks within a time limit without the use of any extra tools. If you are used to using a debugger to solve all your problems this sort of task will be very difficult.

    Interviews for programming jobs will also require you to code either on a whiteboard, on a piece of paper or on a text editor with no text highlighting or debugger available. It is best to learn how to create proper test cases and debug your code using other means to prepare you for these sorts of scenarios.
     
  2. Write test cases first. Programming students often approach a problem by writing code to accomplish their task immediately. Many tasks in computer science courses, however, can be easily summarized by their inputs and outputs and are therefore perfect candidates for validation by test cases.

    In fact, grading in courses is often done by an automated script that runs student applications with a set number of these test cases and ensures that the output matches. Reduce your frustration by writing your own test cases and running your code against them regularly to ensure you are on the correct path. This may seem frustrating at first but is actually becoming a popular practice in industry called "Test Driven Development". You'll find that it often ends up saving you quite a bit of time in the long run.
     
  3. Don't expect the professor or TA's to debug your code. Your instructor and their teaching assistants are there to guide you through a course by helping you with concepts and strategies for accomplishing your tasks. If you come to them with a bug in your code, they will often turn you away, and rightly so. Learning to program is a problem solving endeavor; if you were given the answers to your problems, your program may end up working but you will be no closer to your goal of becoming a competent developer. If you are stuck, take a break and re-approach the problem with a clear head. If you are still stuck, ask your instructors or classmates for holistic approaches to problem solving but don't expect them to give you any specifics.
     
  4. "Rubber duck" the problem. In a highly regarded book about programming called The Pragmatic Programmer: From Journeyman to Master, authors Andrew Hunt and David Thomas present a method of debugging called "rubber ducking" which recommends describing your problem out loud as a means to better understand it. In doing so you will find that you will discover details you have overlooked which will help you solve your problem. 
     
  5. Compile less. Compilers, though they may frustrate you at times, are amazing tools. They will inform you of typos, errors in logic, and a variety of other "gotchas" that would spell disaster at run time. However, programming students will often rely on compilers too heavily, compiling every time they write a line of code. This is bad for several reasons: it slows down the development process, it breaks the developer's concentration, and it fosters dependency on a tool. Instead of compiling all the time, treat logical blocks as paragraphs and try to compile only after each one is written. Mentally step through the code and see if it makes sense; this will help you when writing similar code in the future.
     
  6.  Learn the concepts before you code. Coding is as much about understanding algorithms, data structures and software architecture as it is about writing code. You will find yourself drawing things out on paper in many classes in order to visualize what is going on. Don't be afraid to put a pencil to paper and draw lists, stacks, queues, trees, or whatever helps you picture the problem or your solution. In fact, many professional coders have white boards by their desks that they use to visualize what they are creating long before they program it.
     
  7. Learn to be okay with failure. Computer science is a tough field that requires students to learn quite a bit about themselves. As a student learning about computing you will find yourself confronted with your own limitations quite often which is why you should learn to deal with failure gracefully. If a test or project doesn't go well, learn why and apply your lesson to the next task rather than giving up. You can rest assured that your peers are going through the same growing pains and you will be rewarded for going head down, striving for your personal best, and focusing on the task at hand.
     
The journey to a career in computer science is daunting but ultimately rewarding. You will find yourself struggling but will be able to look back each year and recognize substantial growth if you are persistent. Be sure to make progress but do not overload yourself with coursework and remember that ultimately after graduating you will value your experience and what you learned far more than any grade you earned. Use these tips in conjunction with hard work and you will find yourself at the end of a successful academic career and ready for the beginning of a rewarding career in technology.
6
2,720 Views
James BilousSoftware Engineer
CERTIFIED EXPERT

Comments (1)

Commented:
Re: "Rubber duck" the problem. We call this programming with your dog. Explain your problem as if you were talking to your dog, and usually the solution becomes apparent. If you have someone actually there standing in for your dog, their correct response is 'woof'.

Have a question about something in this article? You can receive help directly from the article author. Sign up for a free trial to get started.