Join Todd Perkins for an in-depth discussion in this video Check it out: Messing with code, part of Teach Kids Programming with iOS.
Programming is similar to riding a bicycle. It's easiest to learn by simply doing it, but one important difference between programming and riding a bike, is that when you fail programming, you don't get hurt. And those failures, can teach you a lot. So what I want to do now is give you some practice in failing, by breaking the code, and then fixing it. First I'll demonstrate how to do it, and then you can try it on your own. For example, if I change the code where it says Wednesday, which again is the current day of the week at the time of this recording.
And I delete part of the word and then run the application, let's see what happens. Instead of Bob is having nachos, it say Bob is having null in parentheses. So, I've successfully broken the application and now, I'll fix it. By retyping the rest of Wednesday. Find other parts of the code that you can break and then fix, and see what happens. Some parts of the code will show an error message on your screen, and other parts will simply change what you see in the simulator window. Examples of things to change are basically anything in red.
So the name, the things that are for lunch, the days of the week, and of course, anything else you'd like.
- Teacher's Guide: Introduces the concepts in the chapter and preps the adult on places where the student might get stuck
- Try It: Immediately engages the student, showing working code in action
- Check It Out: Encourages the adult and student to engage with and edit some existing code
- The Facts: A lecture for the student to watch
- Extend It: An exploration of expanded and extended concepts
- Challenge: A hands-on coding challenge for the student
- Solution: A step-by-step solution presented by the author
This course is designed to help you, an expert, help a beginner learn about the code, logic, and interface elements that lie behind iOS apps and games. The structured curriculum supports those who have a solid understanding of the iOS SDK, but don't necessarily know how to teach it effectively to kids.