Tips for success in AP CS A

AP CS A is challenging for students new to coding. But there are some important study habits and strategies that are useful for beginners and experts alike. When you take lessons with me, I can help you practice and apply these strategies.

Study regularly and consistently

Coding is not like other classes.

In many classes, even in math, you can skip certain concepts and still score well based on a partial understanding of the material. But coding is not like this. Every complex concept is built on having first mastered a simpler concept. It’s important to study regularly starting at the very beginning of the course; if you fall behind, it’s difficult to get caught up.

We’ll start with a good foundation.

When you come to me for lessons, I will start by teaching you the foundational concepts to make sure you truly understand the later material. However, you won’t be able to understand all of it if you fall too far behind.

Tip: start practicing coding early, and do a little every day.

Problem-solving tip: solve a simpler problem first

A very general and powerful strategy when you are faced with a complex problem is “solve a simpler but related problem first.”

For instance, you might solve only a part of the problem.

If you are stuck, try picking just one of the things your code is supposed to do, and write just one line of code. This might feel easy, and that’s the point. Once you’ve figured out the easier task, you will begin to see how the lessons you learned from it apply to the more complex task.

We’ll practice making problems simpler.

It’s not always straightforward to choose a simple problem to solve first. When I work with you, we’ll be practicing this strategy throughout our time together, so that come test day, you’ll be able to apply it yourself.

Solve the problem by hand before you write the code

Start with how you would do it as a human.

When you are given a problem to solve with code, many times you will understand how to solve the problem yourself using a human strategy. The challenge is how to express an algorithm in code.

Begin by solving the sample problem yourself. For example, if you are asked to order some data, just look at it and write down the data in order.

Next, pay attention to how you did that. Can you express your own human process as a series of steps?

Try a few more examples of the problem. You’ll start to see how the steps can be made precise and orderly.

At this point you are well on your way to expressing the solution as an algorithm that can be written in code.

We’ll practice this strategy frequently together.

Practice “tracing” code by hand

The ability to pretend that you’re the computer, carrying out the instructions, is key to every part of AP CS A.

It will make you a stronger programmer in the free response questions, but even more it will help you answer the multiple-choice questions.

We’ll practice this.

We will practice “tracing” code by hand. That means making a table of variable names and line numbers, and tracking how those things change line-by-line as the program executes.

Many students stuck on understanding why code works have an “aha moment” the first time they trace code by hand.

Learn the three, and only three, data structures used in the AP

Java can be quite complicated, but AP students have one big advantage.

The only three data structures used are arrays, ArrayLists, and 2D arrays.

As we work together, you’ll understand these thoroughly.

Start FRQ practice early

It’s okay to start with an IDE.

You’ll probably write a lot of code as homework during the course, and depending on your teacher, you might write most of it on an IDE or Integrated Development Environment. This an application that “holds your hand” and helps you avoid silly mistakes.

But then, practice coding on paper.

On the other hand, the Free Response Questions, or FRQs, don’t allow you to use an IDE. The answers must be written on paper. Therefore, you should start practicing writing code on paper early and often. This may seem daunting, but it’s just a matter of practice and familiarity with code, so we’ll be sure to practice coding both in an IDE and on paper as we work together.

In summary, there are important strategies that make coding easier.

Many students struggle, and it can be a relief to discover there’s an easier way to solve problems and write code. A theme in my teaching is “find the easiest way.”