Swan's Quest - For an absolute beginner

I feel rather foolish asking this, but for someone who has almost no coding experience, I'm a little lost for this being a "beginner" project.

There are four code snippets given in the lesson. I'm assuming that the first two code snippets will be new files underneath the SwansQuest package (is package the right word?), with their file titles being Graphic.swift, and AccessibilityHints.swift? I'm also assuming these are incomplete, and will need to be fleshed out?

Also, do the last two code snippets - I know these need to be completed for each torch - just go under the "Navigating the Dark" page?

Once again, I do feel a bit foolish for asking, but for someone trying to learn from nothing, this was rather tough. Thanks to anyone who wants to help a beginner learn ;)
Answered by mhanlon99 in 614769022
For sure this is a deep(ish) end to jump into!

The absolute best place to start, in my mind, is with the free Everyone Can Code Puzzles book from Apple: https://books.apple.com/us/book/everyone-can-code-puzzles/id1481279769

I ran an online course for the last little while that I can't link in the forums, but it's up on YouTube as The Code Hub Everyone Can Code Puzzles. I walked through the material (it was aimed at kids ages 8-18 in Ireland, but a lot of their parents and folks outside Ireland followed along, too) in the book and in Swift Playgrounds. We just did a session on Swan's Quest, Chapter 1, and the background of Everyone Can Code Puzzles certainly helped them.

You don't need to edit any code in the shared code files (like Graphic.swift and all), just in the main swift file that you see when you navigate to the page. Like you mentioned, you just need to set the accessibilityLabel property on each of those torches to turn them all on.

I hope this helps!
Glad it's not just me! Have rewatched video a couple of times and am digging around in the various files on Playgrounds but definitely need a bit more of a push in the right direction. The principles discussed all make sense in terms of needing to apply labels, but where to do that and turning theory into practice is proving challenging!

Accepted Answer
For sure this is a deep(ish) end to jump into!

The absolute best place to start, in my mind, is with the free Everyone Can Code Puzzles book from Apple: https://books.apple.com/us/book/everyone-can-code-puzzles/id1481279769

I ran an online course for the last little while that I can't link in the forums, but it's up on YouTube as The Code Hub Everyone Can Code Puzzles. I walked through the material (it was aimed at kids ages 8-18 in Ireland, but a lot of their parents and folks outside Ireland followed along, too) in the book and in Swift Playgrounds. We just did a session on Swan's Quest, Chapter 1, and the background of Everyone Can Code Puzzles certainly helped them.

You don't need to edit any code in the shared code files (like Graphic.swift and all), just in the main swift file that you see when you navigate to the page. Like you mentioned, you just need to set the accessibilityLabel property on each of those torches to turn them all on.

I hope this helps!
I really appreciate the reply and the help! I'll check out the book as well as your video, and thanks again for the friendly push ;)
Second that, just taken a look at the video and thanks for the pointers - looking forward to chapter 2.
RiverCityCards and cjmathews, I’m sorry for your confusion. For starters, Swan’s Quest is not meant to be “beginner content”. It assumes some Swift programming background to complete, and the challenges will ramp in complexity in further chapters.

That said, there’s no reason you can’t wade-in and try to figure them out. Experimenting is the best way to learn. With that in mind, here’s a few pointers (from an engineer on the Swift Playgrounds team):
  1. Unless the lizard tells you otherwise, you write your code on the page. The additional files will only be needed if the Lizard tells you to look at them, and they’ll tell you which page to open when the time comes.

  2. Each session video will give you examples for most of the code you need. You can copy these examples directly from the Developer app.

  3. I’d look at Swift enums, to prepare for Chapter 3 and Chapter 4.

  4. If you want to start from scratch in Swift and learn some basics, you don’t need to leave Swift Playgrounds at all. You can download Learn to Code 1, or Code Machine directly from the app. All of this content is free. Both are good places to start if you don’t have experience. If you want more of a challenge after doing some of the pages in those books, I’d recommend looking at Sensor Arcade or Sonic Workshop next.

Good luck, and don’t feel silly or dumb asking questions in the forums. That’s what we’re here for—to help you succeed and make it to the next chapter. I hope to see both of you again in the forums for Chapter 2, 3, and 4. :)

Hi, really appreciate the response, and reassuring to know we weren’t missing something too obvious 🤔. Thanks also for the suggestions, will follow up, and having started this, think I now need to stick with it for the rest of the week, even if I might be in a bit deep here...
Also, thank you nameless Dev Tool Engineer! :) With both your and mhanlon99’s help, I’ve completed both chapters 1 and 2. What threw me off was the code snippets that were shown on the Developer App, but not necessarily needed in Swift Playgrounds. Also, the Swan’s Quest shows up under the “WWDC20 Coding and Design Starter Kit” topic/entry, which I figured would be a good beginner start. It turns out I was making things harder than they really were. Thanks again to both of you for the help! I’ll definitely check out the other swift playgrounds you mentioned as well. Who knows, maybe one of these days I’ll develop an app that is actually useful! :)
Swan's Quest - For an absolute beginner
 
 
Q