Coding at Home: WWDC Special #4, the Wrap-Up

Join us today at 1pm when we talk about the final chapter of Swan’s Quest!

The Quest

So Swan’s Quest ended on Friday with one more performance for the swan in Swan’s Quest, Chapter 4.

We added the the playground book for Chapter 4 to our special WWDC feed for ease of use putting it on your iPad.

We’ll spend a little bit of time talking about the final chapter today. The first chapter was an excellent reminder to make sure our apps are accessible, because there are all kinds of users out there.

We focused on playing notes and organizing our code to enable us to do so in a flexible and (relatively) easy to use manner in the last three chapters.

I’ve posted the code online (and will add it to the video description) for solving the puzzle for Chapter 4.

The last three challenges were designed for attendees of WWDC, who are typically professional software engineers who are doing this sort of thing for their day job. So if you’re still learning Swift with us, don’t be too frustrated. These playgrounds give us a nice level of knowledge to aspire to, especially if you’re into music. But don’t forget, most of this code is based on fundamentals you’ve just learned.

Other WWDC goodies

We’ll talk briefly about WWDC and some of the other fun sessions they had this year.

And I’ll also show you one little feature for Reality Composer on the iPad I didn’t realize was there (thanks to @PaulHamilton8!).

This will let us add images to our Reality Composer scenes.

It was an exciting week of great content from the engineers at Apple. We hope you enjoyed our little diversion to Swan’s Quest!

I’ll see you at 1pm, Irish time!

Coding at Home: WWDC Special #3

Join us today for our live coding session at 1pm, Irish time!

Today’s session

Today we’re going to explore Swan’s Quest: Chapter 3, but I’m not quite sure the material lends itself to our session. We’ll see.

There’s some music theory thrown in, subdivision of notes, pitches, frequencies… It’s a little bit Greek to me. But we can take a poke around the playground in the beginning, anyway, and see if we can make head or tails of it.

!! Image from Swan’s Quest: Chapter 3 WWDC20 Session

There are also Protocols, which is an interesting Swift feature, and enumerations, or Enums. This, again, is a little beyond the scope of what we’ve covered so far, but I hope we can make some of it clear.

As before, you can download the Swan’s Quest: Chapter 3 playground from The Code Hub WWDC Playground feed.

Or…

It might not be “or”, it might be “and.”

There was an awesome session yesterday called Create Swift Playgrounds content for iPad and Mac.

The playground book they used in that session was excellent, so we may talk a little bit about that playground book, which is now available in The Code Hub WWDC Playground feed.

We’ll see you at 1pm!

Coding at Home: WWDC Special #2

Join us today at 1pm for some more fun, playing with the new set of playgrounds from Apple, Swan’s Quest!

Swan’s Quest, Chapter 2

Wow.

Have you seen the session for Swan’s Quest, Chapter 2?

It is an awesome playground and builds on the previous challenge, but boy oh boy, are we in deep!

There are some brand new concepts we haven’t covered yet, in our sessions. But we’re going to dive in, anyway, and try and explain and help you solve this new challenge.

First, you’ll want to grab the latest playground from the playground feed we mentioned yesterday.

There’s no VoiceOver setup this time, today we’ll be working with sound, though.

What we’re almost certainly going to want to do is open up the Developer app, either on our iPad or on a Mac.

The Developer page for many sessions (including the Swan’s Quest ones we care about) has a tab bar near the top: Overview, Transcript, and Code.

We’re going to tap on the Code tab if we get stuck.

This tab includes all the code mentioned in the videos. You can copy the code and paste it right into your playground.

This playground uses some advanced stuff. In addition to more advanced audio stuff than we’ve played with, so far, in The Code Hub classes, it includes concepts like Timers, which have some interesting properties, and guard statements, which is a handy control mechanism in Swift.

We’ll talk about all of that stuff today on the session.

In these cases, where the content is that bit more difficult or maybe just something you’re not familiar with (yet), it helps sometimes to copy and paste in code someone insists will work, try it, run it, then play around with it. You can learn a lot by copying someone else’s code and then breaking it!

For the advanced

If you’re blazing ahead, congratulations!

I’ve added the blank Quest Create playground book in the feed, too, so you can grab that and add it to your iPad. It gives you a really interesting starting point for building your own adventure based off this code.

We’ll see you at 1pm, bring some popcorn, patience, and your coding pants!

Coding at Home: June 24th, WWDC Special #1

Join us today at 1pm to get set up for following along with the Swan’s Quest, the new playgrounds from Apple!

Today’s session

I love what Apple is doing with this Swan’s Quest series! We learn about accessibility, which is a hugely important, and often overlooked aspect of programming.

We are going to visit the Swan’s Quest, Chapter 1 session and download the playgrounds and set up our iPad to follow along.

I posted a short video yesterday to walk you through getting set up to use this playground.

So go to the session link and download the playground book.

You’ll need to unzip the file. I had to do it in Files on my desktop… so you can even download that playground book to your desktop and Airdrop it to your iPad for tomorrow’s session.

!!!UPDATE!!!

You can now add the playground book to your iPad via a Swift Playground feed. I’ve added a special, temporary subscribe button on https://thecodehub.ie/playgrounds/ that you can use, from your iPad, to add the playground to your own iPad.

Get the playground book on your iPad, and the next thing you need to do is enable Voiceover support.

First, open up the settings app on your iPad and tap on the Accessibility icon in the settings list.

Scroll down to the bottom of the Accessibility settings and tap on Accessibility Shortcut:

Tap on that item and we’re going to tap on VoiceOver from the next list:

This will let us enable and disable Voiceover by triple-clicking the home button on your iPad.

We can also turn on VoiceOver by going back to the main Accessibility setting screen. At the very top we can tap into VoiceOver and enable it by toggling the switch at the top of the screen:

We’ll need this to solve Swan’s Quest, Chapter 1!

See you at 1pm!

Coding at Home: June 22nd, Augmented Reality AND WWDC2020!

Join us today, WWDC2020 Day (like Christmas Day, but for developers), for some more live coding at 1pm, Irish time!

WWDC2020

Today’s the big day, the kick off of WWDC 2020. We’ll get the big keynote, of course, at 6pm, Irish time, followed by the Platforms State of the Union at 10pm.

They’re always inspiring events to watch, especially if you’re a budding programmer looking for a good, meaty set of problems to solve. Maybe some that you never even realized you could tackle. Like with our Reality Composer work, when we added elements to a book’s cover. Or when we built our own app out of a Swift Playground.

I’ve posted my own wish list for WWDC, but I’m sure there will be plenty of surprises to play with when it’s all said and done.

Today’s session

While we try to keep from bursting, we’ll keep coding in our Augmented Reality Swift Playground today!

We’ll use those actions and start to play with proximity: when the user and their iPad gets close to our models we’ve added to the scene, we’ll be able to run code to react.

We’ll see you today at 1pm for some more coding!

The Code Hub’s WWDC2020 Wishlist

At this stage, you can almost taste WWDC2020 and we’ve been talking with our students about what might come out of the sessions this week.

Since we’ve been immersed in Swift Playgrounds and Reality Composer for the last few months, I, for one, have a few things on my wish list for WWDC.

The Wish List

Here’s a brief list of things we’d love to see at WWDC:

Swift Playgrounds and Development on the iPad

  • New Swift Playgrounds challenges
    • I’m not saying our students are bored, but the existing content is so excellent and so well done, it would be amazing to get some more playgrounds during the week. I am an especially big fan of playgrounds like the Cipher playground that tell a story.
  • While we’re at it, The Code Hub Playgrounds in the official list of “More Playgrounds”
    • We’re not biased at all, but I’d personally love it if our playground feed was added to the app.
  • New Books
    • Again, I’m a huge fan of Everyone Can Code Puzzles, heck, we based an entire series on it. And the App Dev with Swift books are an incredible free resource to have. But I’d love to see the long-awaited Everyone Can Code Adventures ship!
  • More dev on iPad
    • Whether it’s Xcode on iPad or simply Swift syntax highlighting for Advanced > View Auxiliary Source Files in Swift Playgrounds, prepping folks for the full Xcode experience in Swift Playgrounds would be incredible…
  • Easier Playground Book Authoring
    • There is the Swift Playgrounds Author Template (for various versions of Xcode), which is a HUGE help. And it gets better every time they ship a new one for the new version of Xcode. But I would love to see 1) it announced more publicly (or at least to me 🙂 ) so I can go grab the latest one rather than keeping around older versions of Xcode and Swift to do my playground book authoring and 2) more integrated into Xcode itself, maybe as a template for new projects.

Reality Composer and ARKit

  • The ability to drag images as objects into Reality Composer on the iPad
    • Maybe you can do this somehow, but the only way I’ve found to drag images into a Reality Composer scene (as objects, not anchors) is to do it in Reality Composer on the Mac and then edit the Reality Composer project on iOS.
  • While we’re at it, movies as objects for Reality Composer
    • We can always jump back to Xcode to add an AVPlayerLayer and AVPlayerItem to our scene and layer it on top of an image anchor, ala Harry Potter’s Daily Prophet moving photos, but wouldn’t it be amazing if we could add it as an object in Reality Composer and tweak the way it’s laid out in Reality Composer’s interface?
  • More LiDAR!
    • I can’t wait until my students are all on the latest iPads with full-on LiDAR cameras on the back for playing around with our AR sessions.

WebObjects!

  • The Triumphant Return of WebObjects
    • Who wouldn’t like to see a new version of WebObjects ship; EOF, D2W and all? Enterprise Objects Framework for the desktop, anyone?

Like Christmas in June

The above is a short list of the things we’ve run into in the last few months. Of course, there are a few of them we can address ourselves.

Regardless of what we wind up getting, I’m excited for improvements to existing frameworks. I’m excited for the new technology the gang add this year.

The Swift Student Challenge was an impressive start to the event. I can’t wait to point my students at more inspiring content for them to consume and start dreaming up what they’ll do with it.

See you at the virtual Jamba Juice stand!

Coding at Home: June 5th, Reality Composer Lands a Rocket

Tune in live with us today at 1pm, Irish time, for some more fun with Reality Composer!

Recap: We Landed a Rocket!

Reality Composer Icon

We landed a rocket!

It wasn’t the prettiest, but we managed to land our rocket on the giant pink planet floating above our scene yesterday.

We used a combination of behaviors: y-axis change, followed by a z-axis rotation and another y-axis change.

Stuck in the pink planet!

It got a little disturbing, perhaps, when our math was off and the rocket embedded itself in the planet, but not bad for our first effort.

Today’s session

The rocket launching (and landing) gave me an idea.

Let’s try and build a simple game with Reality Composer. One that takes advantage of behaviors and the physics world in our scene.

So we’re going to try and build a lunar lander-style game!

Picture of 1979 Lunar Lander game by Atari, image from https://en.wikipedia.org/wiki/Lunar_Lander_%281979_video_game%29

I imagine it will be pretty simplistic, but let’s start building and see what we can create.

See you at 1pm!

Coding at Home: June 4th, Reality Composer, More Behaviors

Catch us live today at 1pm, Irish time. We’ll be working on our Reality Composer scene some more!

The story so far

So far we’ve got two rocket ships, a back up and the launch one, a planet, and a moon orbiting that planet.

We added some behaviors to our rockets to take off and stop when they hit the planet. We experimented with physics bringing our launched rocket back to earth pretty dramatically.

Today

Today we’ll explore tweaking our scene in various ways. We’ll also show you what some of the other icons on the Reality Composer toolbar do.

I know a few of you really want to get that rocket to land on the planet…

So we’re going to explore a few ways we might get that rocket to land on the planet. Maybe you’ll come up with another, better way?

So come join us and have a bit of fun with augmented reality and hash out how we’ll get our ship to land!

Coding at Home: June 3rd, Reality Composer Behaviors

Join us at 1pm today on Twitch for some fun with adding behaviors to the objects in our augmented reality scenes!

Today’s Session

Today we’ll be playing around with Reality Composer some more. Sticking with our horizontal plane anchor, we’ll work on adding behaviors. This will let us explore how objects we place interact with each other with different settings.

This will involve playing around with physics and materials a little bit, to see which material and combination of settings gets you the behavior you want to see.

Since we’ve built a rocket ship scene, maybe we’ll add some planets to our project.

If you want to dive into more AR and just can’t wait for our next session, you might want to check out developer.apple.com. They have amazing sessions like this: Building AR Experiences with Reality Composer, which are very relevant to the work we’ve been doing.

Even if you just watch those for aspirational purposes, we’ll try and re-create some of their examples with you during our sessions. If you have a favorite you’d like to see, why not drop us a line in the discussions?

Catching Up

Like we’ve done with other video series, we’ve gathered the augmented reality series into a playlist. You can now go sit and watch all the videos here, on this landing page.

And if you’d like to catch up on any of our past sessions, we have the whole coding at home box set here!

We’ll see you on the live stream today at 1pm!

Coding at Home: May 29th, Augmented Reality with Reality Composer

Join us today on Twitch at 1pm, Irish time, for some more augmented reality!

AR Makr

I hope you’ve enjoyed the AR Makr sessions; they’ve really built an amazing tool for telling stories. It’s a great way to try out augmented reality for yourself, and the way they allow you to create your own is brilliant.

I’ve loved seeing the odd planets people have designed and being able to walk through their creations!

Reality Composer

For today’s session we’re going to go into Reality Composer a bit more. Reality Composer is Apple’s app for building out scenes.

Slide from session 609, WWDC2019: https://developer.apple.com/videos/play/wwdc2019/609

A scene is comprised of an anchor in the real world: it could be a table top, a wall, an image, or a face. That thing, the table top, wall, image, or face, will be what we use to anchor the objects we want to add to our reality.

Reality Composer also lets us define behaviors for those objects and can have them interact with physics… but not just normal physics, like the regular gravity of your particular scene, you can define how strong or weak you want the pull of gravity to be!

There’s a great session from Apple called Get to know Reality Composer, which you can watch at https://developer.apple.com/videos/play/tech-talks/610.

More video sessions

We’ll go looking for some more great video sessions from Apple on this technology during today’s session. This will really pay off for us later this month, when all the Worldwide Developer Conference 2020 sessions start getting posted online.

Blast off!

So we’ll see you today at 1pm, when we’ll build our own rocket ship taking off, right in your very own living room (or wherever you’re watching this session)!