Coding at Home: April 9th

Live stream, today at 1pm Irish time: https://twitch.tv/thecodehub or catch up on the kids.code() playlist on YouTube.

More Types

We’re going to go over types and initializers (chapter 6 of Everyone Can Code Puzzles) one last time today. It’s a deep subject, and a bit of a shift from our previous lessons, which is why we’re spending a few days on it.

We saw one student use two turtles to draw the picture above, each instance of a turtle taking responsibility for drawing a different part of the picture. This is a nice use of instances to divide up tasks. A lot of what we’re covering these days is about organizing our code.

If you practice your Types and Initialization playgrounds you’ll get a ton of work on organizing your code. I would recommend “Setting the Right Portal” for practice with setting properties on instances. For organizing your code, the “Train Your Expert” page is excellent.

The Anatomy of a Type

Lastly, we looked at how a type is constructed, just to have a look at the guts of what we were doing.

For kicks, we designed a Dog type. This is something you might do if your code was part of an application that cataloged dogs… or trained them. We defined a property, called name, and a method, called chaseStick().

The point of this exercise wasn’t for us to go off creating our own types now. It was just to give you an idea of how types are constructed to demystify the code you’ve been using so far.

Today’s Session

For today’s session we’re going to dive into another new playground, called Shapes.

This will be our last stop in Chapter 6 of Everyone Can Code Puzzles. We’ll get to see a few new types, create some instances, and interact with those instances.

See you at 1pm!

Coding at Home: April 8th

We’re live again today at 1pm, still talking about types!

Recap: Types Everywhere!

We went through a LOT of stuff yesterday. A whole new concept with some fancy new language and new ways of writing code.

If we think about our playgrounds so far, we’ve been dealing with lots of different types:

  • Our character, who navigates around the puzzle, is a type
  • Portals are a type
  • Tiles are a type that have an isOnGem and isOnClosedSwitch property

Many of these things, so far, have been hidden to us, to ease us into coding. But as we go on, we’ll see types, and especially instances, in use everywhere in the code we’re writing and reading.

In other playgrounds we’ve used, like the Turtle Graphics playground, the turtle itself (which is a monkey, in our case) is an instance of a Turtle type.

Our Turtle type has certain properties, but what we’ve been using it most for is to perform certain actions, by calling methods on the instance. forward(), left() and setColor() are all functions on our type.

We’re going to explore turtles a little more in today’s lesson and we’re also going to open up a type and show you what the guts look like.

Types: Working with Blueprints

We’ll see how useful types are and use them as another way to organize our code.

So join us at 1pm today!

Coding at Home: April 7th

Join us for our live session today at 1pm on Twitch!

If you’re just joining us for the first time, feel free to watch through some of our earlier sessions. The sessions are relatively short (30 minutes or so) and gently walk you through the playgrounds to get you oriented. The kids.code() playlist on YouTube is a great place to start. We’ve even posted a new “Getting Started” video to help you get the right apps and content on your iPad before you start viewing.

Today’s Session

Today we’ll be starting a new concept: Types and Initialization.

This might sound a little daunting, but we’ll try and ease our way in.

We’ll be using the Learn to Code 2 playground again, so make sure you have that downloaded to Swift Playgrounds.

Types are yet another way for us to organize our code, and a way others have organized their code for us to use. Just like functions and loops and conditions before them, we can construct types many different ways, but we’ll try and show off a few techniques in today’s session.

Elsewhere

We’re featured on Everywhere School today, which is a great place to find live, upcoming streams of educational content that is super entertaining. I highly recommend checking it out!

See you at 1pm for Types and Initialization!

Coding at Home: Week Three – April 6th

We’re back again today at https://www.twitch.tv/thecodehub at 1pm Irish time!

Recap: Week Two

We covered a ton last week. We started with for loops and then moved on to variables. And then we dropped smack dab in the middle of conditionals! It was a busy week, with so, so much to remember.

We set up a discussions board with some common areas of discussion. Just register and post away! If that doesn’t work for you, you can always drop me a line or you can try joining the Code Hub’s Google Classroom with the code: mnynk52

If worse comes to worse and you need help with the lessons you can always contact me through our website.

Today’s Session: More Conditionals!

Hopefully you’ve all done your homework and we’ve got one quiz a student wrote over the weekend with some advanced features in it.

I’m going to walk through it with you. We’ll explore how the student handled answers in the quiz (including some of those more advanced moves). We’ll also take a look at how we solved problems with the code and did some real heavy-duty troubleshooting.

Conditionals, Loops, and Functions, Oh My!

There are 5 additional playground pages in Learn to Code 1 we talked about doing over the weekend, all to do with conditionals and building on our knowledge.

We’ll cover those today and see if we remember where we left off on Friday.

The Rest of the Week

This week is another big week with a lot of weighty topics, so buckle in, get plenty of sleep, eat a healthy lunch, and let’s get coding!

See you at 1pm, Irish time!

Coding at Home: April 3rd

We’re live streaming again today from 1pm, Irish time. It’s half an hour or so of your time, why not drop in? Or catch up on the sessions with the kids.code() YouTube playlist, review things that might have been a bit more difficult.

Conditional Code

Aaaaand, speaking of which, yesterday’s session was 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.

See you at 1pm, Irish time!

Coding at Home: April 2nd

Catch our live stream today at 1pm, where we’ll be talking about Variables and hopefully seeing some examples of people’s work!

Stream: https://www.twitch.tv/thecodehub

Variables

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.

Things are getting exciting quick!

See you today at 1pm, Irish time!

Coding at Home: Wednesday, 32nd March

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?

The live stream is on https://www.twitch.tv/thecodehub today at 1pm, Irish time, that’s no April Fools’ joke.

Variables: Getting Set Up

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!

Coding at Home: Tuesday, March 31st

We’re back with for loops today! Live stream at 1pm Irish time at https://www.twitch.tv/thecodehub

More Loops!

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.

See you at 1pm!

Coding at Home: Week Two!

Here we go with week two of Coding at Home! Live stream at 1pm Irish time at https://www.twitch.tv/thecodehub

Recap

I’ve posted a recap of last week, which includes videos to all of last week’s session.

I’ve set up a discussions board with some common areas of discussion. Just register and post away! If that doesn’t work for you, you can always drop me a line or you can try joining the Code Hub’s Google Classroom with the code: mnynk52

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!

See you at 1pm!

Coding at Home: Week One Wrap-Up

Week one is in the books! Thanks to everyone who tuned in this past week to our live sessions on twitch.tv/thecodehub

You can catch up with any of the sessions you missed on the kids.code() playlist here: https://www.youtube.com/playlist?list=PLc_MDphRrtdJhvBXZMn5lbddqW4F3kaPd

Recap of the Week

Day one, we covered getting set up with the Swift Playgrounds app on your iPad (and Mac) and the Everyone Can Code Puzzles book in the Books app on your iPad. We also started on the Learn to Code 1 Swift Playground and showed you how to download it.

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.

So far, so good, though! And if you have any questions or comments or suggestions for us, don’t hesitate to drop us a line. Or start a new thread on the forums!