Aaaaand, speaking of which, yesterday’s sessionwas hard. It wasn’t just your imagination. We covered variables from the day before, pretty quickly, and launched right into conditional code, which is another huge coding concept!
So I may be at fault for cramming juuuust a little bit too much into the session.
But we’ll go over conditional coding again, this time a little slower, to make sure we all have a fighting chance.
We’ll review all of the stuff you’ve done so far with us: commands, functions, for loops, variables, conditions; it’s a lot! And, as with any of these concepts, practice will also help.
We’ll be working out of the Learn to Code 1 playground and possibly the Answers playground today, so get them ready on your iPad.
We added a new tool to our toolbox with variables yesterday. They’re hugely powerful programming concept that lets us store information that we can use again later.
We learned about the syntax of variables (like we learned the syntax for calling commands and for writing our own commands, called functions). We’ll dive into the Spirals playground to finish off our introduction to variables.
What I really like about the Spirals playground is that it encourages play. Just like the Answers playground, just like our Turtle Graphics playground. If you want to explore and experiment, it’ll make coding that much more approachable. You’ll want to do more of it, which will make you a better programmer, in the long run.
Conditionals
And once we finish exploring Spirals, we’ll move on to the very start of Chapter 5 of Everyone Can Code Puzzles: Conditional Code.
Welcome to day seventy four of coding! You’ve now got hair down to your ankles, all graying, the length of your fingernails makes it tough to type, and we’re now on Advanced Autolayout for iOS Applications. Ready to start?
We’re going to start off today with the Learning Variables app, which you can download for free from the App Store for Mac or iPad (go to that link to jump to either store).
That will introduce us to the concept of variables and we’ll have a bit of fun building stories with those variables.
After a little bit of that, we’ll move back to the Everyone Can Code Puzzles book. This chapter is a big step up from previous chapters. We leave behind Learn to Code 1, which is the playground we’ve used so far, and leap into Learn to Code 2.
We also might use the Spirals playground and Answers playgrounds.
You can find them in the More Playgrounds bar at the bottom of Swift Playgrounds. Answers appears in the Starting Points section, and Spirals appears in the Challenges section.
So make sure you’re all set up for 1pm, Irish time! See you then!
We’ll be practicing our loops with some more Learn to Code 1. We’ll also take a look at a new playground that might spark some ideas about how you’d use loops.
If you’re really ahead of the game, go to https://www.thecodehub.ie/playgrounds/ on your iPad and subscribe to The Code Hub’s Playground feed. We’ll be using the Turtle Graphics – Simplified playground for an example of loops in action.
Chapter 4: Variables
Today we’ll also get set up to tackle a huge new subject: variables.
This means moving on to a new playground from Apple (Learn to Code 2), an app from The Code Hub (Learning Variables).
Learn to Code 2, the next big step!
It’s a big new topic, so we’ll dip in slowly to start.
Both the Google Classroom and discussions board are just a way to make the students feel a little more connected to the material and to each other. It helps to have support, especially when you’re learning something new!
Today we’ll touch on what we did last week, briefly, and then we’ll get into the meat of for loops!
Links
Bill Chapman, of the University of Illinois dropped a nice note with links to his own video resources. So if you want to check them out while you’re going through the Learn to Code Swift Playgrounds you might find them helpful. They’re well worth checking out, because the more time you spend with these playgrounds, the more practice you get, and the better programmer you become!
Day two we continued with the Commands chapter of the Everyone Can Code book and reviewed some of the puzzles we’d solved the previous day.
On day three we jumped into Functions, the next chapter in the book, and talked through the coding concept of functions.
And today, Friday, day four, we started with some advice about how to follow along with the live sessions or the videos and code on your iPad. We then jumped back into the Functions chapter.
Homework
“What? Homework? We’re all stuck at home all the time already?” you might be saying.
Well, consider it weekend work, then. Programming requires practice, just like playing a musical instrument or a sport; you don’t get better if you don’t try out the skills you’ve learned.
At the end of today’s video, we set you a challenge: solve the Treasure Hunt puzzle in the Learn to Code 1 playground.
Use functions, do it all out longhand, see how you get on. You can capture a PDF of your code from the ...‘s menu in Swift Playgrounds or you can copy and paste it into a thread on our new forum.
I won’t say there are no wrong answers, but even if your answers don’t 100% solve the puzzle, at the very least you’ve made an effort. Even the best of us programmers have bugs in our code!
Coming Up Next Week
Next week we’ll have more content and walk throughs of the Learn to Code 1 playground. We’ll also review the homework and show off one potential solution, at least.
I’m hoping to re-record some of the intro videos, for those of you coming to the sessions late, or who just want a refresher.
For today’s session we’re going to show you a good setup for following along with our live stream or videos and coding at the same time. We’ll also recap a little bit about functions.
The beginning of the video will help you get set up, so long as you have an iPad and an internet connection.
If you prefer to read your instructions, yesterday’s post will show you where to go to get Swift Playgrounds and Everyone Can Code Puzzles, the ebook we’re using.
Today’s Session @ 1pm Irish time
For today’s session we’re going to walk through some more lessons about commands: how to use them, how to figure out when they’re not doing what we expected, or debugging. We’ll look at strategies for solving puzzles, which is a lot of what programming is.
So tune in, grab your iPad, and spend a little time with me, coding!