Showing posts with label AP Computer Science. Show all posts
Showing posts with label AP Computer Science. Show all posts

Monday, March 30, 2015

String Immutability - APCS A Deep Dive

Content has moved to CodeVA's Teacher's Lounge - latest post


http://www.supercs.net/2015/03/29/immutable-strings/



The String class can cause a lot of confusion for students as they first start working with code. We often introduce it early in the year, indeed it is hard to do many meaningful things without it. The problem is, as an example of a class data type, it can behave in some unusual ways...

Thursday, May 1, 2014

AP Computer Science Exam Review Worksheet

My favorite cartoon - Savage Chicken


Here are some things I use with my students for last minute AP exam review. My goal is not new learning at this point. I focus instead on reinforcing skills that will help them move up a point or two in their score.


Tuesday, February 18, 2014

Recruiting for Computer Science - the AP Potential Report

For many high schools it is recruiting season. If you school has an AP program there is a little kown report, called the AP Readiness Potential, that can help you in attracting kids to your classes. This is an especially helpful way of identifying girls and other groups that may not already be taking your Computer Science classes.




Basically this report takes students' PSAT scores and predicts the AP tests they are statistically likely to score well on. It is based on a past correlation between past PSATs and AP exams.

While we do not yet have this for APCS Principles, since no AP tests have been given yet, we do have it for the current APCS class.

A new feature is teachers can now log in to see the reports. To access the report you will need an access code. You can get this code from the person in your building that coordinates the AP exams. I find that person often doesn't know about the report, or have any idea of how to find the code.

You can call to get your school's code. The number is 866-630-9305. You just have to identify yourself and your school.

The login for the site is here. You'll need an account for AP Central. Once you pull the report the site even has sample letters to send home to parents. I have found letters directly to parents to be a powerful way to attract kids to computer science.

Long term I am very curious to see how this test correlates for the new APCS Principles class. Since much of the assessment for this course will be written it will be interesting to see if a correlation with the writing section of the PSAT.

Monday, July 22, 2013

Home - Mid Summer Roundup

I am home for about 5 days before my next trek up to New York to work on the AP Computer Science MOOC.

In the past week I traveled from NYC to Boston for the CSTA annual conference, then on to Las Vegas for the APCS Principles Pilot II training and the AP National Conference.

Vector River Map From Flowing Data


In other words, my brain is full, but full of good things.

Unless you have been wilderness camping for the last 6 months you may have noticed a few things going on in computer science education.

I'll be posting more details about all of these projects soon, but some highlights:
  • Code.org - http://www.code.org/  - There's the video, which everyone should see. They are also building up some great advocacy resources, worth a look. Plus, I got to have dinner with Hadi and Pat. So exciting to have incredible people committed to computer science education. They are a huge part of the interest in computer science education right now. 
  • Computer Science Education Week -  http://www.csedweek.org/ - Do you have your plans yet? Dec 8 - 14th, better get on it.
  • Expanding Computing Education Pathways - http://expandingcomputing.cs.umass.edu/ - "Alliance seeks to increase the number and diversity of students in the pipeline to computing and computing-intensive degrees by supporting state-level computing education reforms." I got to attend a great workshop from ECEP at CSTA National lest week - really exciting momentum. I am especially glad to hear more about the role of community colleges in preparing our kids.
  • Exploring Computer Science -  http://www.exploringcs.org/ - They are coming to Washington DC, and I am really hoping to attend a training in the next year. I got to do a PD workshop with them at CSTA, and hands down the best PD I have attended. One of those where you walk away going "Well, the last 16 years of my career have been nice, but now I know how to make it better."
  • Hour of Code -  http://www.csedweek.org/ - they are asking folks to organize to give beginners 1 hour of code for every one of the country's 55 million school children...ideas? Let me know!
  • http://sitwithme.org/ - "Sometimes you have to sit to take a stand. Sit With Me invites you to validate and recognize the important role women play in creating future technology by taking a small but symbolic action: sit in a red chair and share your story." 
Whew! I know I am forgetting things. It has been a jam-packed summer. Please drop me a line to tell me what is going on in your neck of the woods for computer science education. 

Sunday, June 16, 2013

Summer of Computer Science

The class of 2013 has graduated, which means summer vacation has finally started. I got hit with the flu this past week which has made the last week extra hectic.

Finally


Posts may be a bit sporadic this summer. I won't step foot in Virginia until mid July, and then only for three days:


Hope to see you at one of these - if you are there make sure to say hello. 

I  follow computer science stuff on Twitter - so drop me a line and let me know how your summer is going. We have so many things happening as a community right now, it is really exciting to see all the hard work so many people have put in through the years building a k-12 computer science presence really start to take off. Here's hoping big changes are coming - because every kid in the United States should have the opportunity to take a computer science class.




Sunday, May 26, 2013

Make an Inside Out Computer

For the end of the year my AP students are working on projects. This year I left it very open ended, use anything in the lab and just make something awesome.


They can make with code or something physical. I have students doing everything from a scratch version of Doom to building a cell phone signal amplifier.

One of my favorites at this point is this - the Inside-Out Computer. The parts are all recycled from a couple of old 486s that were donated. Once we can find a non USB mouse the plan is for them to load Linux on it.
I'm pretty excited about having this in the lab next year when we need to teach hardware. 

I am particularly excited about this for next year when we go over computer hardware. Having a running computer while you point out all the various parts and pieces seems like it will be very helpful.

Basically they're attached all the parts to an old plastic crate using zip ties. The have booted it up several times and it works perfectly, except for the no mouse thing.

We have five weeks from the AP exam until the end of the school year, which is a lot of time to fill. In order to get grades on the books I give them a daily Ted Talk to watch and respond to on a discussion board. More on that later.

Update: Another student turned in their final project today. It is a bike with a chainsaw motor added to make a moped. Did all the welding themselves. I was kind of expecting a poster, then they rolled this in:


Amazing!



Thursday, May 9, 2013

AP Computer Science Doldrums

So - what are your AP kids doing for the rest of the year?

Here in Virginia school doesn't get out until June for most school districts. This makes for a lot of time to fill.

Ted Talks
My AP kids do end of the year projects. I leave these pretty unstructured. Pick something available in the lab and make something amazing. That's the rule.

So I have kids working on 3-D printing projects. Some are working in Python. Last year one person went totally old school and really delved into QBasic.

Overall this has been pretty successful, but as we all know at the end of the year we are competing with spring and senioritis. So to make sure they don't go completely off the rail this year I am trying to make them write - I know, they'll love it, right?

Please allow me my delusions, it has been a busy year.

Each block I am showing them a Ted Talk. They respond to the videos using Piazza. I collect these as a quiz grade just so I have something to nag them with. Sometimes keeping them focused is about bribery and threats. Whatever works.

Whenever I do discussion board topics in computer science classes I have a very structured set of rules for them to follow. I am trying to transition them to academic writing and beyond LOL.

So I am curious - how is everyone else handling this wasteland of time between the AP exam and the last day of school? What works for you?

Oh, and if you are interested, here are my discussion board rules:


We are going to be using the discussion board for the rest of the year. Your participation on the discussion board will count as a quiz grade each marking period. Some guidelines:
  • Use full sentences. No abbreviations or text-speak.
  • Be nice!
  • No bad words
  • No personal attacks
Ways of participating:
  • Be prepared – do the reading and share your information
  • Offer a new fact
  • Respond to other people’s ideas
  • Ask questions
  • Answer questions
  • To get full credit you must have at least 3 posts     

Friday, May 3, 2013

Mind Mapping the AP Computer Science Exam


This year we tried something different for teh final APCS exam review. We've been doing multiple choice and free response problems for weeks now, and really we are at the point where they either know it or they don't.

So what I want is for them to remember all the connections - those picky details that can make a huge difference. Like when do you use == and when the .equals? Or when to use super vs this.

So I gave them a list of terms from the APCS curriculum (see below) and I had them cut them out to make a mind map. They had to draw and explain the connections. They worked in groups on this and there was a lot of great discussion today as they debated where the pieces fit together.

The list isn't complete - I keep remembering things I left off. The kids found most of those as they built their maps.


.length()
.move
.random
.remove
.size()
.turn
++
= =
abstract
accessor
Actor
array 1-D
array 2-D
base case
boolean
Bug
class
Color
concatenation
constructor
Critter
double
extends
Flower
for
for-each
if
implements
int
interface
List
Location
Math
method
mutator
new
Object
object
overload
override
parameter
primitive
private
public
recursion
return
Rock
row major
toString
void

Thursday, April 18, 2013

AP Computer Science - Mock Exam

For the past few years I have been involved with VASS , the Virginia branch of the national NMSI AP readiness grants. They work in increasing access to college by implementing rigorous AP programs in STEM areas in public schools.



The program has a specific methodology for increasing student success in AP classes. There are a ton of things they offer teachers, and I'll write about those separately.

The method they use for students could be implemented anywhere. This includes:


  1. Weekly hour long structured tutorials in AP classes. This is not just "does anyone have any questions?" but a structured session that focuses on elements of the curriculum that will most impact student success. I spend a lot of time in these sessions on tracing code and writing code on paper.
  2. External prep sessions that cover course topics more in depth. We do these online and each session lasts an hour. 
  3. The annual mock exam. Students sit for an AP style exam as practice. We use the released 2009 multiple choice questions (purchased) and the free response from the previous year. The results are used to steer the review for each individual student.


I have been grading Mock Exams for VASS  all this week. It is so nice to see my students aren't the only one making goofy mistakes. After grading over 50 exams I have noticed a few patterns that might help you prepare your students for the free response section.


  1. Many of the questions are set up as methods:
    1. Do not rewrite the method header or make changes to the header! (this one boggles my mind)
    2. If they give you parameters - use them
    3. Do not re-declare the methods as local variables
    4. If the method returns an int, declare an int and return it
    5. If the method is void DO NOT RETURN A VALUE
  2. These questions are usually in a larger class. Look for how the data is stored - probably as an array, ArrayList or a 2-D array.
    1. Do not re-declare that object locally. Use the one from the class.
    2. Do not use [] with an ArrayList
    3. arrays and Strings use .length 0 ArrayList uses .size

  3. Look for patterns- especially if you are stuck. You can sometimes steal a few points even when you have no idea how to solve the problem.
    1. simple array? put in a for-loop
    2. does it ask a question? You'll need an if-statement

In the next week I am thinking of putting all of the free response question prompts from the past 5 years on a sheet of paper, handing out highlighters, and letting them look for these patterns.

I wouldn't do these all at once, but as you do practice coding on paper encourage them to think in terms of patterns. Even the best programmer can get stuck when having to code on paper. These tips should help them from making silly mistakes.


Wednesday, March 6, 2013

60-80-100 Quiz in AP Computer Science


One of the bigger issues in getting ready for the APCs exam in May is transitioning from coding on a computer, with full support of a compiler with error checking, to writing code down on paper.

To get the kids used to doing this I use the 60-80-100 Quiz.These are short problems where they wrote out the code. If they get it right, they get a 100. Make a few mistakes they get an 80, and if the code doesn't resemble anything we are working on it is a 60.

The rationale is an 80 is not likely to tank your grade for a marking period. they get immediate feedback and start to build confidence in their ability to write out code.

Early in the year we do simple things like:
write an if statement to test of both x and y are equal to 67;

When I grade these I am checking for three main things:


  • did they set up the if correctly
  • did they use &&
  • did they use ==


Super quick and easy to grade. I grade them in class while they do some practice on the computers and I hand them back immediately. They get instant feedback while they are still thinking about it.

As the year moves on I up the difficulty, trying to mimic the style and complexity of the Ap Free Response questions.

So later we might try something like:

Write a method that accepts an ArrayList <Integer> parameter and removes all even numbers.

again I am looking for specific things here...but this also lets me reinforce things like:

  • How do you get an int from an Integer
  • Should you use a for-each loop if you are removing items form the ArrayList

Notice also that it is set up as a method. Since many of the Free Response questions are in the context of a method the more practice they have with using methods, the better.

Monday, March 4, 2013

Marching towards May - APCS exam prep


In my APCS class we are functionally done with new topics this year. They are working on searches and sorts the next two weeks, but in my mind that is just an application of the array material we covered back in December.

This is how I pace my AP class...as a spiral. We hit a topic early on, like arrays. Then in the next unit we cover methods, and guess what? Most of the methods I have them write process arrays. We do class design, and here we are back on arrays. My hope is that by seeing them embedded throughout with lots of repetition, they might actually remember a few things about them on the AP exam, or in college, or on Jeopardy. I'm a dreamer that way.

To start off we did a day of review about arrays. I gave them some practice exercises, then we did CodingBat  problems. That was Monday. Wednesday we started searches. First I gave them a quiz - I randomly picked one of the CodingBat problems from last class and used it for a 60-80-100 quiz.

 As went over the problem we talked a lot about stealing points on the APCS Free Response questions...did you know you could steal points?

We did the 2009 #1 free response problem. it ties in nicely with a lot of what you see in the CodingBat problems.

Then we did searches. I used Plastic eggs  for the linear search. We did the telephone book trick for the binary search. Here's a video of another way to teach this.

And as a side note, as telephone books become less common I am finding I horde these.


Sunday, March 3, 2013

To Make a Program you Have to Break Some Eggs


One of my favorite toys in computer science are plastic eggs. Cheap and they can be used to teach so many things. We are working on searches and sorts in the APCS class right now. They also work well when doing algorithms in the CS Principles class.

To start with searches and sorts I use plastic eggs filled with fish tank gravel. Email your faculty and parents - I guarantee you can get these for free. Fill the eggs with varying amount of gravel and tape them shut. Better yet have a kid do this. You are busy.




I let the kids pick a partner and each pair gets 6 or 7 eggs. Please do not forget to explain that the eggs do not have candy in them. I didn't do that the first time we did this and it made for a very disappointing mess.

Have them put the eggs in a row then "search" for the heaviest egg. Write out the steps you followed.

On the board I then do:

int eggs[] = new int[6];

This is in the APCS class, in CS Principles I make this less formal since they will be doing this in Scratch.

I have the kids come to the board and write out their algorithm, in Java in the APCS, pseudocode in CS Pricniples, using this array. Bam! They just all created a Linear Search.

So, why eggs?

I used to do this writing numbers on the board. They watched and I did. It is always better when THEY do. They are going to remember the Linear Search much better if it was their idea in the first place. 

Also, when you do numbers the amazing processor that is the human brain can just scan the list and pick the biggest. No problem. 

But a computer cannot do that - it cannot just look at a data set in aggregate and pick one. It must "touch" every piece of data in the set and make a comparison. Which is exactly what the kids do with the eggs. Point that out, they should know that.

This is also a good time to go over swapping. They get so confused on this.

How many times have you had them try to swap two numbers and they do:

a = b;
b = a;

Here is the fix: Hand each group some cups - make it look like you are giving them an arbitrary number, but make sure they all get at least 3.

Rule - you can only have an egg in a cup. NEVER can you have two eggs in a  cup. Now swap two eggs.

Again, once they get the point of using a third cup, you have them write out the algorithm in the language of your choice.

Friday, March 1, 2013

I'm the Robin Hood of the APCS Free Response Section


In the AP class we are transitioning from new content towards test prep. While we do AP style problems all year I have just really started talking about strategy for the AP exam itself. On the Free Response questions our theme is Stealing Points.



Grabbing points on the free response --> Here's what I march my kids through:

  • Is it a method? Look for return type - does it return an int? 
                         int x = 0;

                         return x;
  • while we're looking at the return, does it return a boolean? You should probably have one case that returns a true, and one a false. Just a thought
  • Does it tell you to return a -1 under certain situations?
                         int x = -1;

                         return x;
  • does the problem use an array? Well, we usually use a for loop with those - write one. Use .length
  • ArrayList? for-each loop, unless you are removing things
  • does the problem ask a question? We use if's for those. You probably want to access the array/ArrayList there too.

You get the idea - we're just looking through our programming toolkit and looking for patterns in the problem.

Now obviously this is a terrible way to solve a problem.  This technique is our worst case scenario. You've read the problem and have. no. clue. of what to write. It happens to the best kids, especially on a timed test under a lot of pressure.  

Take a second to look over the grading rubrics and think about this technique. We did part 1a in class the other day. In theory you could get over half the points on this question and not have any idea of how to solve it.

Is this teaching to the test? Sure. But what I find is when you remove a kid's blind panic and just get them putting some code on paper they often have that light-bulb moment that shows how to solve the problem. And really, writing code on paper is a bit silly, so a game plan is bound to help.

Tuesday, January 8, 2013

Technique Tuesday - ZAP!


It is midterm exam time here, which means lots of review. Especially for the AP Computer Science class I try to build in plenty of time to do multiple choice practice.

Not my Board - it's from Mathastrophe 
This year I am trying a new game - ZAP.

Directions can be found here.

Teams of students play against each other. Everytime a team gets a question correct they pick a ZAP card out of one of the envelopes. The cards say things like "Steal 2 points from one other team", "Add Two Points to your Score" and "ZAP!" where you lose all points.

The advantage to this is it keeps all the teams scores pretty close. This is my main rule for classroom games - Close scores = engaged students. You've had that experience right? Your team is getting beaten badly, how long do you really keep playing? If all the team's scores are with in 2-3 points everyone is envolved. When one team starts gaining a huge lead it means everyone else is pretty tuned out.

For AP we'll use review MC questions from the Barron's review book.

In my imaginary free time I would redo the cards with things like "MOD your score by 5" and "Score ++".

Here's a similar game called Bazinga that also includes this like "Randomly Switch a Member  with Another Team", "Randomly have a player from the winning team go to the losing team" and "Take half of all the other team's points". I like the idea of switching kids around, not so sure about the last one. Seems to violate my rule of "keep the game pretty close ando the kids stay interested".

Monday, December 17, 2012

AP Computer Science - Case Study

For the AP Computer Science class I try to incorporate Gridworld throughout the year. Each unit we do at least a half day of lab excesses relating GridWorld to the material we just covered.



I want them very comfortable with using it. I have also found it is a great way to introduce topics. "Remember when we did that GridWorld lab and it used the word extends...?". It is a great way to give them a framework for some of the more abstract stuff we cover.

Here is my LabManual and the java files that go with it. BoxBug is from the student manual AP provides.

I have to say my favorite is the RockMonster - originally it was the RoachMotel (bugs check in but never check out), but sadly my kids didn't get the reference. I am sure the WS are "buggy" and are offered as is. I'll b updating them as the year goes on.

Sunday, September 16, 2012

Arrays in AP Computer Science


I've been asked by a few folks for some help with teaching 1-D arrays in the AP Computer Science class. I went ahead and posted it in a public drive in Google Docs:

APCS Arrays

I am sharing with the full understanding that I cannot type or spell, so the typos are a part of what you are getting. I am also pretty sure these are not complete - I add a lot as we go.

We start 1-D arrays as a part of our third unit where we go over Strings and Arrays. Arrays are such a big part of the AP I think the earlier they are introduced to them the better. Then for each unit we cover we can use arrays as a part of our practice problems. So when we do methods we can practice arrays as parameters...you get the idea.

If you are interested here is my pacing guide for the year. We start after Labor Day, so it is tight. I am still adding dates, but it should be complete through May by the end of the week.


So, how do I teach arrays?

First off, I flip. So for homework the students copy the notes. This means in class we have a lot more time for practice.

Every day they start off with a fast start that reviews the topics we have covered. We then do a lab lecture or some some type of dependant practice. In a lab lecture I put small problems on the board and they code them. So for 1-D arrays I might ask them to declare an array of 15 decimal values. Then I check to see that they did it correctly. Next we print the values int he array, and I check. Then we initialize the array to the values 0.1, 1.0, 2.0, 3.0, etc. and I check. Point being this lets me catch the tiny mistakes they make in the beginning and they are more confident in their coding.

For the 1-D arrays we do a practice power point where the students write out their answers on whiteboards to make sure they understand the indexing.

Once we have done some practice together they work on independent practice and I float around and answer questions and generally nag them to get to work.

Really 90% of teaching is nagging, don't you think? This is just how I structure my nagging.

Friday, July 20, 2012

HTML is not programming, so why teach it?

So in talking to parents and guidance counselors I occasionally get asked if a kid can jump ahead and take one of our upper lever computer science classes. My first question is always "have they programmed?" Yes, I know, programming is not the end all and be all of computer science, but for a student that wants to take the current AP Computer Science course they need to be able to code.

Sadly the answer I most often get is "yes, they know HTML". Sigh.

For the CS Principles pilot this last year my second unit was The Internet Unplugged.  We covered both the hardware side along with how to actually make a web site. Yes, I taught HTML and CSS.

So the question is - why cover HTML at all?

One of the core themes of the CS Principles course is broadening participation. So many students have had exposure to HTML, and they all use web sites. This is the interface they use to get at the information on the web. It is an immediate way to show abstraction in action.

Plus, as we transitioned to coding students were already used to the idea that formatting and exact punctuation matters. This let us focus on the tools of programming, like ifs and loops.

And of course, CS Principles is not all about programming. The Internet is one of the seven core principles, equal to programming.

So this summer I am reviewing what we did in CS Principles last year. Honestly this was one of the better units we covered. It tied into all of the big ideas and was something we referred back to the rest of the year.

On the other hand I am not crazy about how I taught HTML. It was a bit dry - too much lecture and we got a bit bogged down. I'd like to reduce this to just 4 days.

Next year I plan on trying Thimble. This is offered by Mozilla and lets you type in the HTML interactively and see what happens immediately. It also points out errors right away.

Saturday, June 30, 2012

AP Computer Science Mastery Packets

Ideas for Badges


This year I tried flipping in my AP Computer Science class. Overall the results were pretty good - of course I won't know for sure until the scores come in next week. (Post from last summer on flipping)

One of the core pieces this year was mastery. I had several students that were weaker than normal with the basics of programming. It really doesn't matter how well you understand inheritance, if you cannot write an if-then statement you are toast on the free response section.

So as a part of flipping I started doing mastery quizzes. I started them at the beginning of second semester. The quizzes are short and sweet. Fast to take and easy to grade. It gave me a quick picture of who needed to review the basics.

If the student got a 90 or above they had demonstrated mastery. If not they had to come in to review before retaking the quiz.

If you are interested you can use the quizzes posted here. They are not complete (is anything ever). My retakes for ifs/loops happened on the board not on worksheets. As I finish them I will post them.

I have thought about designing badges to cover these basic skills. Rather than making this a graded assignment they retest until they earn their "badge".


Thursday, June 7, 2012

What are we doing after the AP exam?

This question pops up every year with my students...we have six weeks after the AP Computer Science exam, are we doing anything?

Nope, I've decided you can just nap for six weeks of school. That sounds reasonable.



They know me well enough that there is a lot of eye rolling at this point. After fifteen years teaching high school I have learned eye rolling equals success. It is my job to annoy them occasionally.


Usually I pick something new to everyone and we work through that. Sometimes we do advanced data structures like linked lists, java graphics or a new language.

This year's group is too eclectic for that to work. I have students that already know VB, C++, Python and just about anything else I could throw at them. They have done NASA summer internships, built robots and held part-time jobs doing web design.

So I tried something new, this year they got to pick their own projects.

The ground rules were:
  1. Do something new to you
  2. Do something non-trivial (something that will take several weeks to complete)
  3. Amaze me
I had them write about what they were going to work on first. So far this has kept them much more engagged then they normally are this time of year. Plus it has been a lot less work for me.

In short, I have been amazed. Plus, anything that cuts down on the amount of nagging I have to do everyday is a total win.

Tuesday, May 29, 2012

I Have a Dream - bookstore edition

It is sad that in the local book store with the best selection of these:

There is not a single computer science book in these:


My goal? To have enough local high schools offering computer science that is is financially viable for them to carry computer science review books too.