From: Douglas Kiang [dkiang@punahou.edu]

Sent: Thursday, January 06, 2011 4:39 PM

To: AP Computer Science

Subject: [ap-compsci] iOS Programming in Computer Science class


This is a brain dump of what I've been doing with programming for the

iPhone. As such it's a little long and rambling. :-) For more details (and a

video that says it all) look here:

http://wiki.punahou.edu/groups/apcompsci/blog/


I have just completed a semester of iOS programming with my AP Computer

Science students and we are changing over to learning Java in the second

semester. We are a one-to-one school and every student has a school-issued

MacBook. 75% of the kids have iPhones or iPods that can run apps. The

Developer Tools are free and the kids have been working in Xcode and

Interface Builder on their own laptops at home.


The first quarter we worked on selected labs from the Stanford CS193 course.

I wrote a first quarter exam based on the Stanford labs (I also adapted some

of my previous years' first quarter exams, which were in Java but featured

AP-style problems.) The kids found the Stanford labs very difficult. But I

think the labs prepared them well for their later work, especially the

WhatATool lab, which introduced arrays, dictionaries, and keys.


Second quarter the kids took on the challenge of creating an iPhone app

using Objective-C. Their challenge was to create an iPhone app that is

useful to the school community. After much discussion about what "useful"

means, some brainstorming sessions, and a school-wide survey, the students

decided to write a scheduling and task management app to replace the

venerable old paper school planner.


One of my main goals was to get kids used to reading the Apple Developer

Documentation -- lots of good articles, plus the documentation of the

different APIs. I also wanted to introduce them to the basics of programming

structures in a real-world context, one in which their planning (or failure

to plan) and collaboration directly affected the success of the project.


We are in beta testing of the app right now, and in couple of weeks we're

going to submit it to the App Store. My kids have studied the App Store

guidelines as well as the Apple Human Interface Guidelines and are worried

about whether or not the project will be approved.


Ironically, this has been a greater motivator for them than my own approval,

disapproval, or letter grade for their app! In fact, no one seems to be

thinking about the grade at all. They are waiting for the day it goes live,

and have organized themselves into teams to handle any bug reports, feature

requests, or other comments that we receive.


We also worked on documenting and commenting the code to make it as clear as

possible because the expectation is that next year's AP class will take on

the task of supporting it -- in addition to any new app they want to

develop, of course!


Actually, although I would never say this to the kids, I am much less

concerned about whether or not Apple approves the app. The learning has

taken place regardless, and they have a real sense of pride and ownership in

their app that I have not seen in previous years, when students did

independent or group projects for a letter grade.


My classes are different too. In the past we used to do most of the lab work

in class. Now, kids are using their laptops to do the work outside of class,

and our in-class time is mostly spent sharing information with each other,

and making sure the different project teams have what they need to do their

work. Our class time is much more like a corporate meeting or strategy

session, where everyone brings what they have been working on to the table.

Nobody wants to look unprepared for the meeting!


This is the first year I have taught Objective-C so I'm actually not sure

what the transition to Java is going to be like. But with this group of

kids, I am feeling pretty good about it. They are highly motivated, and

excited about having completed what looked impossible at first.


Most of my kids had no prior programming experience. The ones who did have

become leaders and have taken on more responsibilities. I lost one kid who

dropped the course early on. I think he struggled with the immersion into an

unfamiliar language. The rest of the kids also struggled with it but having

persevered, won't scare easily when they come across something strange or

unfamiliar in Java. They have developed the tools and the wherewithal to get

themselves unstuck when they run into an obstacle. It's what they've been

doing all semester!


In terms of managing the devices, I purchased one Apple Developer account

for $99 and the kids use a shared login to access the developer resources.

We'll also use that account to submit the app. It allows you to generate up

to 100 provisioning profiles so different devices can run the apps we

create.


For testing purposes I set up a provisioning profile for kids' iOS devices.

Then if kids want to test their app code on their own device, they just give

me their project and I install it on their device from my laptop. It's

worked OK, although I would love a high school Developer U account like the

higher ed institutions have. But we're making it work.


I've been pleased with how the course has gone so far. I think the prospect

of making an app that expresses their creativity has really gotten the kids

fired up about learning. It just seems really real to them, much more so

than the labs I used to use, like CheckingAccount and IncomeTaxCalc (even

though personally, I found them riveting.)


In terms of content we have been exposed to pretty much everything I would

have thrown at them first semester, except the case study and recursion. The

work they had to do with arrays and dictionaries has already gone well

beyond anything I would have given them in Java -- not because we chose to,

but because we had to -- in order to represent the kids' school schedules in

code!


So all in all, a very positive experience for me teaching iOS programming in

Objective-C. We've managed to cover nearly all of my first semester content,

they've learned how to be self-sustaining and solve their own problems, and

I've learned quite a bit as well!


My kids have been much more intrinsically motivated to learn this language

to create a tool that has a real-world purpose. Whether my students go on to

be programmers or not, they've learned some great organizational skills and

collaborative skills, and are exercising their creativity in the pursuit of

an ambitious project that has relevance to their lives. What more could I

ask? :-)


I'd be happy to converse more with anyone interested in teaching iOS

programming in Objective-C -- either as an AP course, or as an intro course

-- and sharing resources. Contact me off-list and let's talk!


Aloha,


--Doug.


Douglas Kiang

Technology Resource Teacher

Punahou School

Honolulu, HI 96822

dkiang@punahou.edu