SwiftUI Day 6: Anyone say FizzBuzz?

Day 6 involved a lot of loop learning. As usual this was a case of ‘How to use them’ and ‘When to use them’ I really enjoyed this section but like last time, the checkpoint had me stumped.

The checkpoint was what is known as Fizz Buzz. The idea is that you’re printing numbers from 1-100. If your number is a multiple of 3 it prints “Fizz’ and if it’s a multiple of 5 it prints ‘Buzz’. Finally, if it’s both a multiple of 3 and 5 - you guessed it! It prints ‘FizzBuzz’

I managed to get the numbers sorted and managed to get the wording sorted but ended up with a situation where it was listing all the numbers and also the words (which were correctly placed but you’d see something such as 1, 2, 3 ,Fizz, instead of 1, 2, Fizz) after going over notes, I needed to get a hint and eventually got the result! Blimey, I almost felt like that came together there! - That was kind of addicting.

Swift UI Day 5: Learning conditions

Today was a longer lesson! Time to learn:

  • How to check if a condition is true

  • How to check multiple conditions

  • How to use switch statements to check multiple conditions

  • Finally, the ternary conditional operator

I now know things such as if, else, && and also || - who knew! Not me (and probably not me in 30 minutes because I absolutely need to re-read some of this! I’m getting used to commenting notes inside Xcode for reference. It’s allowing me to firstly, remember how to comment and also - it’s helpful for when the tasks come up! Future me should be thankful.
I feel like things so far are making sense but I absolutely have to follow a long - there’s no way I’m writing things from scratch. I have found myself pausing the video as much as I can and writing ahead which I managed to do for some of the image below!

SwiftUI Day 4: Second checkpoint and powering through

I was feeling confident today whilst I watched Day 4’s Hacking With SwiftUI video and read all optional reading. Boy, was I in for a slight wake up call. I watched the challenge video and if you didn’t know, hints are provided mid-way. I stopped and really gave it some thought. I got the first part nailed but I had to go back over previous lessons/literature and I was still pretty stumped. I then listened to the ‘hints’ and was still in the dark. I was reminded that I’m not meant to know all this yet, I’m learning. After more frustration and further reading - I got there. Well, Xcode isn’t shouting at me and I got an answer - We’ll count that as a result!

It's Time - I'm Learning SwiftUI

As I look back on the journey I took with tech, there has always been a nagging feeling of something I didn’t do—learn to program. I’ve dipped my toes into C++; I’ve stuck my nose into Python, and I even tried a few poor attempts at Unity game design, but nothing ever stuck. The truth is, I really do like Apple products, and as much as I use a PC more times than not during work, I love my Mac, iPhone, iPad, etc. It’s that ecosystem, right? I got my first Mac in my teens after waiting a long time and spending way too many hours watching and reading everything about them. I was absolutely obsessed with that machine. (If you’re wondering, it was the white plastic MacBook—the thing was beautiful. Well, until I wore out where I rested my hands!) I still feel the rush I had back then getting a new Apple product and working on MacOS.

I have finally settled on learning SwiftUI. I did a lot of research on UI vs. UIKit and where to even begin! I needed to find recommendations as this is something I’m doing without the luxury of a university course where someone was going to teach me personally. The internet points to one source in particular: 100 Days of SwiftUI I’m not only using this, but I’m using it as a base and something I should at least be completing daily. I’m also looking at books and other tutorials, but this as a general consensus is a good starting point. One of the ‘rules’ is that you should really share your progress. I’m doing so on Twitter but also want somewhere that I can write more openly and not annoy my more gaming-focused Twitter followers!

Please feel free to comment or follow along - I’m sure this will be full of rants, joys, and everything in between.