But you can’t copy and paste from the Hint bubble into the code editor-you have to type it out manually, which will help you learn. If you need more help, it will supply clues about how to break down the challenge into parts, and finally just shows you the correct code if you’re really stumped. At first, the Hint popup offers ways to think about the challenge. The whole experience is heavy on praise, which made me want to keep going lesson after lesson-it’s really motivating! And a progressive Hint button cuts down the frustration factor if you do hit a wall. The app is extremely encouraging, and constantly reminds you that you’re learning a real skill. If you break out ahead, say, adding a loop to your code before you are formally taught loops, the app gives you props for your advanced skills. But the app does teach good coding habits like looking for patterns that repeat, and using descriptive names for functions so you can more easily remember what they do. You aren’t graded on how few lines you can use or how many functions you come up with. Swift Playgrounds encourages creative problem-solving-there isn’t one single solution, or even one “best” solution. Learn to Code 2, which will launch with the final version of Swift Playgrounds this fall, has a different world than the gem-collecting, switch-flipping realm of Byte, which is meant to show that Swift’s tools can be used for tons of different applications, as well as to cut down on repetition. You can tap commands from the list along the bottom, pull up to get a full keyboard, or tap individual items in your code (like the For loop highlighted in red) for contextual items. Swift Playgrounds takes advantage of the iPad’s touchscreen interface. The preview pane supports Multi-Touch, so I was able to scroll around the game world and zoom in and out to count, for example, how many squares Byte needed to move forward before he turned left. You can run the program after entering each command, or try to write the whole thing out at once by tapping the commands in the QuickType row or expanding the whole keyboard. But there’s no turnRight command out of the gate, so one of my first challenges was writing a turnRight function that combined three turnLeft commands. You’re given some commands to get started: You can tell Byte, for example to moveForward and turnLeft, which are both examples of how Swift commands really appear. (Easter egg: Tap on Byte to change the character model there are three to choose from.) For the Learn to Code 1 lesson, I’m giving commands to Byte, a goofy cartoonish mascot who’s moving around a game board collecting gems and flipping switches. The right side of the screen shows the results, with a big red Play button you can tap, labeled Run My Code. The left side is text: Your challenge is explained at the top, with a space below for you to compose your program. Anything jargony in the instructions is colored red, and all you have to do is tap a red word for a definition. Later, when introducing For loops, the analogy is breaking down a task like planting a flower garden into small steps you’ll repeat over and over.īut once the concepts are introduced, the lessons use the real terms for everything: call a function, loop commands, if statement, conditional code. The first group of lessons, for example, covers basic commands, so the cut-scene makes the analogy that these are like following a recipe or set of instructions. A friendly cut-scene introduces each new topic and explains it in a way anyone can understand. Since I had no Swift experience, I plunged right in to Learn to Code 1, which assumes no prior knowledge. (Swift Playgrounds will also work with the classroom-management features Apple added for teachers in You can duplicate the playground to make a copy, then reset the copy to its original state. Say your child is halfway through a lesson her little sister wants to try, too. Sphero could actually make its own playground and distribute it on its own site, explained Wiley Hodges, Apple’s director of tools and technologies product marketing.įrom this shelf, you can also duplicate a playground or reset it. For example, Apple made a Sphero playground to demo at WWDC, showing how Swift Playgrounds can use all of the iPad’s hardware and software features, in this case connecting via Bluetooth and issuing commands to a Sphero robotic ball. You can create new playgrounds too, or download them from other sources. Learn to Code 1 and two Challenges are available now, with Learn to Code 2 and more playgrounds coming later.ĭownloading a lesson pack or challenge adds it to the My Playgrounds tab, which looks like the shelf in iBooks.
0 Comments
Leave a Reply. |