Saturday, May 21, 2011

Why teach programming using Corona SDK?

At the moment, I am not aware of other schools teaching App Development in Corona SDK. I am sure that such schools are out there and I would love to get to know the teachers. Being a beginner in this field, I am sure I can learn a lot from those with more experience.

Here is why I believe Corona SDK is a good platform for teaching programming:
  • App Development is more likely to engage the kids' imagination than, say, database programming;
  • Corona supports both iOS and Android devices;
  • Lua, the language used by Corona, is a flexible, minimalistic language. Eg: variables don't need to be given a type and semicolons are not required at the end of each statement;
  • The SDK includes objects that give access to the mobile device's screen with great ease;
  • It is a new platform that is gaining a lot of momentum among developers;
  • The Apple University Consortium (AUC) has started offering courses on Corona SDK. A great endorsement;
  • Every evaluation I have read of the performance of Corona Apps has concluded that speed is not an issue at all; and
  • The Corona community is very helpful. There are many bloggers who are happy to post tutorials and answer questions by email.
If you can add to this list, please do so via the comments.

Tuesday, May 17, 2011

App Development Club: Starting on our first game

Today, there were 31 students in the after-school App Group. One student had apologised for a medical reason and another one was absent from school.

We started on a simple game that would help consolidate what we have learnt so far note my use of the first person plural, as I am sorting things out myself. This is what was achieved today:
  • Words falling across the screen (using transition.to)
  • An event handler for the "touch" event.
  • When the user touches the words, they disappear.
This may not seem like much, but this simple App made them understand the concept of event handling. They also had to do some debugging, which was nice. For the first time, they had to write their own code and then look over it to find - mostly spelling - mistakes.

A few of them replaced the words with an image and one student had three different sentences coming in from different parts of the screen.

We will make this App a little more involved next time. I hope to have and iOS developer license sorted out in the next week or two so they can finish this term's sessions (six in total) with something on their mobile devices.

It was very rewarding to see the joy on some of their faces when they got it working. I really look forward to these sessions each week.

Exciting news: Corona SDK celebrity, Peach Pellen, has agreed to appear by Skype in two weeks' time. I bet the girls will be inspired by her.

Saturday, May 14, 2011

App Development Club: Beginning to program

After getting over the installation problem discussed in the last post (using the laborious process described in that same post), we had a great class last Tuesday after school. 30 girls filled the lab and worked in pairs. Among them, 3 year 10s sat on the floor and worked on their laptops.
Here's what we did:
  1. I demonstrated a "Hello World" program, where the words fall across the screen. This was a tutorial posted on the Ansca videos page.
  2. I explained about Red, Green, Blue and why 255 was a significant number inside a computer (largest unsigned integer that fits in 8 bits).
  3. I left the students to reproduce this themselves.
  4. The students moved on to a tutorial published by Peach Pellen:
    • Display a picture in the middle of the screen
    • Listen to a "touch" event on that picture and make it disappear
It was great to see the girls modify the exercises to suit their own purposes. Some simply swapped Peach's picture with their own. Others used a picture of their favourite singer and made his name drop across the picture.

At the end, I asked them if they had enjoyed the session, and I heard a collective "yes".

My next project is to get them to write a simple game. The words "Tap me" keep appearing at the top of the screen, in a random position, and then move to another place on the screen while fading. When the user "taps" the text successfully, the score increases by one. The game ends when the user has managed 10 successful taps. I intend to break this exercise up into smaller ones with increasing complexity.

I have three people to thank for the learning I have done so far:
  • Carlos Icaza, from Ansca Mobile, who corresponds with me about all kinds of issues;
  • Peach Pellen, of the Techority website, for her excellent; and
  • Jayant Varma, of OZApps, who gives me personalised tutorials via Skype
The reason I am promoting this club is to hook up with other schools that may be teaching App Development, especially using Corona SDK. So, if you're doing this, please get in touch with me.

Tuesday, May 10, 2011

App Development Club: Teething problems

Late last year, I decided to start an App Development club at my school. I wanted to use a programming environment that used a language that was less intimidating that Objective C. The idea had to have some differentiating feature, as previous attempts to teach programming had not met with great success. I decided, in consultation with a few others, that it would work best as an "extension activity" for those identified as being among the school's top Maths students.

I spent sometime in the summer exploring LiveCode. It looked good but I couldn't find a clear learning path. In the last week of the holidays, I discovered Corona SDK.

On the last day of Term 1, I sent out ninety odd invitations to girls (no boys at my school) in years 8 to 12. I specified 6 Tuesdays on which we would meet for an hour after school. I was very pessimistic but, while rejecting late submissions, I had to accept a total of 33 students. A mate of mine, Maths/Science teacher and all round scholar, Tony, expressed an interest in learning alongside them.

Well, there was nothing to it. Corona SDK, TextWrangler and a few other tools were installed in one lab. The year 10s, of whom there were 3, would bring their own laptops, as would Tony and I.

It may all sound straight forward, except that it isn't! Here is the issue we have had to deal with:
  • Corona SDK requires the user's registration details when it is run for the first time on a machine. 
  • This registration procedure cannot happen through the school's proxy server
  • Each registered user can log on to two machines. There is no such thing as a multi-machine or site license! (Picture me tearing my hair out at this point)
Here is how I have solved the problem for the time being:
  1. Log on to the machine as administrator
  2. Use my Samsung Galaxy S phone as a mobile access point (note: untick remember network)
  3. Turn off all proxies for that connection
  4. Pull out the Ethernet cable
  5. Adjust the time on the machine (Corona is very meticulous)
  6. Run the Corona Simulator and register using one of the student's registration details (we decided that did not need to be a top secret. Those who want to profit from Apps can buy a license for the computer in their garage!)
  7. Restore proxy settings
  8. Reconnect the Ethernet cable
  9. Log out.
  10. Move on to the next machine
  11. repeat steps 1 to 10
Thank you to those who are still reading at this point. The problem is that the registration only "sticks" for admin! So, I now log the students in myself, given that I cannot divulge the admin password under pain of death (my own, that is). The students have been warned not to use the admin privileges for evil, lest the club be terminated.

I will let you know if I find a permanent fix or if Ansca come back to me with a good idea. I will soon blog about the actual learning activities I am using and the people I have to thank for them.

If your school is doing something similar, I would love to hear from you.

Saturday, May 07, 2011

A lesson in leadership from a thirteen year old

Last week, I was on camp with the Year Sevens. A colleague of mine and I were in charge of 17 year 7s and one year 10 "peer-helper". One morning, the team had an activity called "Team Rescue". It was their task to get through a crocodile infested river using a minimal set of equipment, until they arrived at a helipad. The girls had to carry a mannequin on a stretcher. They decided the mannequin's name was Janet.

The activity brought out many individual characteristics in the girls. One girl displayed some selfishness, while others were great foot soldiers. A few girls carried Janet through obstacles without complaining once about their burden. The most remarkable girl was Jenny. She was a great leader and this article is an attempt on my part to consolidate the lessons I learnt about leadership by observing her.

Jenny was full of creative ways to get through the course. She conveyed them to the other girls in a courteous manner and they accepted her suggestions. She gave herself many of the less glamorous jobs. Jenny listened to the suggestions that others made and affirmed them. One thing she wasn't doing at the beginning was giving others pats on the back. This changed half way through the activity, to complete her skill set as a leader.

The thing that impressed me the most about Jenny's manner was how nonplussed she was in urgent situations. Her sense of humour was not threatened for one second, even when she fell and when others were doing the wrong thing by the team.

When we're back at school, I intend to speak to Jenny about her leadership. Our school provides training and responsibilities for such girls, especially as they enter Year Eight. I hope she puts her hand up for a captaincy. I also hope I can learn to maintain my sense of humour when "the chips are down".

Like many of my colleagues, I find camps tiring and I wonder about the sacrifices that have to be made, such as leaving my family and being on duty for 24 hours of the day. What makes it all worthwhile is the privilege of seeing students in a different light and coming to realise just what remarkable individuals some of them are.

Can you think of a time when you learnt a lesson from a child? If so, please share it.