Swift Playgrounds for iPad? Great for High School Students!
One of the most satisfying and rewarding parts of being a teacher is seeing your students grasp a concept, internalize the material, and then use or expand upon the concept in their work. The greatest part of teaching coding is that I get to see the results of my students learning right away when they are coding. This week we finished the Parameters section of Learn to Code 2. The patterns in the playground puzzles are not terribly difficult, but the code required to get your
expert and/or your
character to complete the playground puzzles has become increasingly challenging, as expected. However, one of my students, Justin, just blew me away with his solution to the "Rivers to Cross" playground. Justin's code is elegant, simple, logical, and easy to read (aka expressive code).
I LOVE it when my students properly use
while statements. It's proper use demonstrates a maturity and a deeper level of understanding that their code is solving a problem or performing a task. The students, therefore, understand that the best way for their code to solve a problem or perform a task in some cases is to just let the function execute until the state changes from true to false or vice versa. Justin used a
while statement in combination with two logical "and" operators (
&&) paired with incrementing the value of his variable to meet the requirements of the boolean values of his
while loop and the logical "and " operators. Incredible! Justin told me that he had finished the playground in class and then went home in the evening and spent another hour refactoring his code to make it better. I told him that his hard work and dedication shows in the result of his work: great code.
I know that the Swift Playgrounds app was developed ideally for students in middle school, but it is just as appropriate for high school students as it is for middle school students. I teach at a Career/Tech high school in northeast Ohio (home of the World Champion Cleveland Cavaliers). My students come to our district to learn Web and App Development career-tech program. I use the Swift Playgrounds app and accompanying materials (Learn to Code 1 & 2 and Learn to Code 3) with my 11th grade students to teach them the Swift language. The value my students gain from learning to code in Swift through the Swift Playground app is definitely in solving the puzzles and thus being forced to think logically and with purpose. Moreover, my students are learning much of the most important aspects of the Swift language in small, bite-size chunks that are fun and challenging. I think that most middle school students will get the best first coding experience possible with the Swift Playgrounds app. But I also think that my high school students are having a FANTASTIC first coding experience because they are more mature, more easily understand abstract concepts, and are passionate about learning to code (this is the advantage of teaching in Career-Tech Education). The mental maturity and motivation to learn to code that my students have contributes to their overall ability to learn the Swift language concepts and later generalize those concepts in later playgrounds. I have seen many examples, like Justin's above, where my students learn a concept, such as variables, and then properly use it in subsequent lessons in proper, novel, and sometimes unexpected manners. When we finish Learn to Code 3, I think my students will be perfectly positioned for us to continue our study of Swift with the App Development with Swift (Teacher) (Student) curriculum because of their prior, recent learning experiences in the Swift Playgrounds app. I am excited to see how my 11th grade students will do with that course in comparison to my 12th grade students who did not have previous Swift Playground learning experiences before starting the App Development with Swift course.