Three days before Sophomore year, I enrolled in AP Computer Science for reasons unbeknownst to me now. Even though I can’t remember why I switched from AP Statistics to AP Computer Science that year, I do know that it was the best decision I made regarding classes. There were a few things that not only helped me survive the class. but also made it the best class I took in high school.
On the first day of class, it was clear to me the amount of time and effort this class was going to take. My teacher was saying things like, “You will need to complete an average of three hours of work a night.” I was so overwhelmed. The thing about AP Computer Science is that it is a math class, science class, and foreign language class and you need all the skills you would use in each of those classes to be successful. If I’m honest, it’s even an English class. So, let’s tackle each aspect of AP Computer Science:
It’s a math class
AP Computer Science is a math, but obviously not in the traditional numbers and equations sense. It’s considered math because it uses logic. So, when you are about to bang your head against the wall and shut down your computer, remember this: there’s a way. There is a structured algorithm that will eventually work. That’s the whole point of logic – that there is a way. You just haven’t gotten there yet. If you are getting errors you don’t understand, check out Stack Overflow. It’s a forum, where people can ask questions about AP Computer Science, or any upper level math course. So, it’s basically Yahoo Answers for Java and like Yahoo Answers, you won’t need to post a question because your question has most likely been answered.
It’s a science class
Every page of code you write is an experiment. Your hypothesis is that it will work and when it doesn’t, you will adjust it until you get the result that you want. It is so important to keep this attitude in mind when you code. So, if your code isn’t work, adjust one or two things and mark it using your double backslash (“//”). If this doesn’t work, then you know that that section wasn’t it or that your approach was wrong. Take it one step at a time. but make sure you thoroughly document each step, so you can remember exactly what you changed and what effect it had.
It’s a foreign language class
Java is another language. You can’t speak it, but you can read it and write it. How do you learn another language? Practice! Say your teacher tells you to make a program that draws a house. Don’t just make a square with a triangle on top. Draw the White House or do something large because all that extra coding is just more practice. When you get comfortable with the new language, make it efficient. In my early days of coding, I once had a code that was 17 pages long! Looking back, I see that there are so many things I could have done to shorten the length of the code and make it more efficient. Taking assignments once step further, learning things beyond what is taught in your class and applying them, and then shortening your code will make you fluent in Java.
It’s an English class
There’s an important lesson here about readability. On the AP exam, you will have to write out code, which is so much harder than on the computer because you can’t render it and check to see if it works. It is helpful if you start explaining lines of code on the computer with //, so on the test, not only will the reader understand what each line does, but also you won’t forget a step in your algorithm.
If you learn anything from this article, it should be that you should always be yearning to add “spice.” Every effort to go the extra mile will help you with Java, with your teacher, and with the AP exam. Even if you do spend three hours a night on it, know that each minute is helping you grasp computer science more fully. Who knows? Maybe, it will be the best class you ever took in high school.