Category Archives: Uncategorized

The GridWorld Case Study – A Great Teaching Tool

This post is a recap of an article I wrote for the CSTA Voice a year or two back explaining how I use the GridWorld Case Study in my AP Computer Science classes from day one.

The AP Computer Science GridWorld case study provides a tool that teachers can and should use from day one to introduce new topics, enhance prior topics, provide a game programming platform, and engage students.

From the very first day, GridWorld can be used to demonstrate what an object is and how to call an object’s methods without ever forcing students to write a single line of code.  Due to GridWorld’s interactive nature, manipulating the world is as easy as a mouse-click, allowing students to quickly add objects to the world and call methods.  Students quickly learn and observe how methods affect the appearance and behavior of an object; thus, learning why methods are important and useful.

After learning to create and interact with objects, students learn to write basic code to create objects using Actor and Location classes.  As it takes very little code to do this, students are not overwhelmed and gain confidence quickly learning one skill at a time.  Students learn how to add actors to the world and how the location class is used to store the position of an actor.  Method calling and parameter passing comes naturally as the results are seen visually via the graphical nature of GridWorld.

Having the basics in place, Actor can be used to teach inheritance by a simple override of the act method.  Constructors and instance variables are not yet necessary which once again allows students to simply focus on mastering a single concept – inheritance.  Using inheritance, students can make new actors that move around the grid and explode when hitting an edge which is very entertaining and engaging.  Students learn how to use the fundamental actor methods and get more acquainted with the location class.

Once inheritance is down to an art, decision making can be introduced so that the actors no longer move and explode, but rather move across and reappear on the opposite side of the screen.  Students learn to use if statements to check boundaries and determine when to make the actor move so as not to collide with the edges.  This process is once again very visual and engaging and students really get into it.

At this point, Bug comes into play perfectly.  Bug has some new methods and it requires a fundamental understanding of inheritance and decision making.  Using Actor before Bug enables students to learn how a Bug is built before every seeing one.  Bug moves around the grid very much like the new Actors created in previous units.  Students find the movement and action of Bug pretty straight forward as the students have already made an Actor move and are also very comfortable with inheritance and method overriding.  The prep work has paid of big time as Bug is very easy to use and understand.

After using Bug and making Actors move, looping is pretty much ingrained as students have now been using the step button of world which continually calls the act method of each actor over and over again.  Students can now transition into writing loops and using loops to solve problems.  GridWorld can be used to teach for loops, while loops, and nested loops more easily as the graphical nature allows students to see the results of the looping.  Working with loops graphically helps students as they can see how the loop works.

Using GridWorld very early in the year enables student to gain a solid understanding of  basic object instantiation,  method calling, inheritance, and decision making while learning how to interact with a grid, properly use a location, create an actor, and interact with a world.  These are all very important skills that provide a great foundation for students in the AP Computer Science class.  The GridWorld case study provides a wonderful tool that can be used all year long to enhance the learning of all computer science students.

Once the foundation is built, lots of great game projects can be used to expand student knowledge and get students very excited about Computer Science.  Board games work very well with Gridworld and can be created with lots of interactivity.

More GridWorld Information

CS News – Gaming Degrees in Demand

Gaming Degrees in Demand

Games are very popular and most students like designing and creating games.  Scratch is a platform that enables quick game creation as does the XNA platform.  Game projects help get students excited about Computer Science.
As there are more and more companies creating games these days, it is much easier than in the past to find a job in the gaming industry.

CS News – Enrollment and Majors Up

CS Enrollment and CS Major Numbers Are Up

Computer Science enrollment at the University level is up.  This is consistant with what I have heard from friends that teach at Universities.  It also appears that those choosing CS as a major is up as well.  That is good news.
It looks like the new Computer Engineer Barbie has inspired everyone to go into Computer Science.

AP CS Principles Website

AP CS Principles Website The AP CS Principles course website is now up and running.  Information regarding the work of the commission has been posted as well as some general information on the AP Computer Science Principles course.

As as member of the commission, I think the course is coming along nicely and that it will be a course that will convey to everyone the coolness, power, and relevance of Computer Science.
The course will include programming as programming is a very fundamental component of Computer Science, but not focus only on programming.

Alfred Thompson has some cool reflections on his blog about the AP CS Principles course.  His blog is a very good one to check out for all sorts of Computer Science information.

High School Computer Science Contests

High School Computer Science season is just about to officially begin here in Texas as the UIL District Academic Meet is about to kick off.  Computer Science Education in the state of Texas owes quite a bit of gratitute to UIL and the UIL Academic Contents.  UIL Academic Competitions provide the venue for academic areas to compete and without them, Computer Science in Texas might likely be about as dead as it is in most other states.  As UIL has a Computer Science contest, many schools have classes or at least teams in order to be a part of the UIL contest and to ensure that their respective school has entries in all events.  This is very important as many Computer Science programs have grown from these seeds of competition.

The UIL Computer Science contest is a great contest and one that other states could model.   The contest consists of a 40 question multiple choice test and a 12 problem two-hour programming contest.  Teams compete and consist of 4 members.  3 members of the team program and all 4 take the written test.

I have been the sponsor of the Computer Science team and club at every high school at which I have taught.  The Computer Science program has grown at every school at which I have taught and part of that can be attributed to the fact that we take teams to contests in Texas all year long as well as hosting our own contest.  Students love to compete and want to belong to a winning tradition.   Once the tradition is established, students start to pour in.  Currently, there are over 450 students in Computer Science at my school and many of them are in the program as they want to compete and be the best.

Most of the Texas high school programming contests use PC^2 as their contest system.

CS News – Lego Robot Set to Take Over Twitter

Lego Robot Set to Take Over Twitter

This is a funny and cool article if you like robots and web 2.0 tools like Twitter and such.  The Lego NXT kits can do some amazing things.  I use the NXT kits in my Computer Science classes and the results are phenomenal and will use them some at my AP Computer Science Summer Institute this year in Houston.

The following site has great Lego Robotics Projects –  NXT Programs I have had several students build electric guitars using the Lego NXT kit.  The projects on the NXT Programs site are pretty nice.  Try out the Forklift project as my students really had fun with that.

CS News – Humanoid Robot Safety Concerns

Humanoid Robot Safety Concerns

Is iRobot that far off?  What is it going to be like when a robot gets your newspaper instead of your dog?  What am I saying?  Who actually reads a printed newspaper these days?  Robots are actually getting my electronic newspaper as we speak.  Go Robots!  Autobots – Roll Out!  We have nothing to worry about as long as Optimus Prime is here.