Day 60 consisted of another milestone and the fifth consolidation day, reviewing what I learned, key points, and a challenge to build another complete app from scratch by ourselves:
Completely custom Codable implementations
Challenge: Use URLSession to download some JSON from the internet, use Codable to convert it to Swift types, then use NavigationStack, List, and more to display it to the user. Your first step should be to examine the JSON. There is an array of people, and each person has an ID, name, age, email address, and more. They also have an array of tag strings, and an array of friends, where each friend has a name and ID. At the very least you should 1) Fetch the data and parse it into User and Friend structs, 2) Display a list of users with a little information about them, such as their name and whether they are active right now, 3) Create a detail view shown when a user is tapped, presenting more information about them, including the names of their friends, and 4) Before you start your download, check that your User array is empty so that you don’t keep starting the download every time the view is shown:
I never fully grasped how to handle JSON before starting this project, and I learned so much in the past 24 hours, not only that. It taught me a lot. Tomorrow, I'll fix the date format, add the colors and designs I deemed lower priority, and review for Day 59's challenges. I interrogated the hell out of an AI, learned more in a day than I have in the past 5 days, and I'm going to sleep.
Day 60 quote: "I hope that in this year to come, you make mistakes. Because if you are making mistakes, then you are making new things, trying new things, learning, living, pushing yourself, changing yourself, changing your world. You're doing things you've never done before, and more importantly, you're doing something." - Neil Gaiman