Today we’re going to get into the real detail of Swift: operators and conditions. This can sometimes trip folks up when they are learning, because as Joseph Campbell once said, “computers are like Old Testament gods: lots of rules and no mercy.”
Don’t worry, though. Sure, if you get a condition wrong then your code might not work at first, but it costs nothing other than a little head scratching to fix it up and try again.
In fact, a common mistake folks make while learning is they have a fear of running their code. Trust me on this: while you’re following all the code here, none of the code you write can somehow break your computer. So, make a change and run it. Make another change and run that. Just try changing your values until you feel comfortable with what’s happening – it all helps.
Today you have ten one-minute videos to watch, and you’ll meet things like operator overloading, switch statements, and more. After watching each video you’re welcome to go through the optional extra reading if you want, and as always there’s a short test to help make sure you’ve understood what was taught.
Hit Send below to start a virtual conversation with me.
You’ve finished day three now, and you’re starting to write useful Swift code – make sure to tell the world about your progress!
Need help? Tweet me @twostraws!
SPONSORED Would you describe yourself as knowledgeable, but struggling when you have to come up with your own code? Fernando Olivares has a new book containing iOS rules you can immediately apply to your coding habits to see dramatic improvements, while also teaching applied programming fundamentals seen in refactored code from published apps.
Link copied to your pasteboard.