Ray Wenderlich Fundamentals Course - Part 1

So, as expected, I can't use the Swift UI functionality yet. Not at least for a few more days. So I'm going to focus on this fundamentals course, which should just be recap. I need to keep my eye in as I feel it slipping away with all of the delays. So a little bit of time now, whizzing through the core concepts. 

Start Time - 15:51

Technically we're out of sync as this should follow the Bullseye app. But I can't do that without the Swift UI stuff. But that's fine.

Playgrounds

This is all VERY basic. So far we've got creating a string for a message and where it appears. Then printing it.

Think of playgrounds as a notepad for trying things out.

So, unlike the Lynda course, it makes sense to REALLY skim through this. Just basically pick out any nuggets!

*Markdown - go to editor/show rendered markup to get the proper view! OK, one useful thing learned then!

Booleans and Comparisons

All recap here. Nothing new.

Comparing ints, doubles, strings etc. All the same operators.

Challenge time!

Paused at 16:12; restart at 16:20

All challenges easy - done in three minutes!

A note here - for strings, less than means alphabetically ahead. E.g. ant would be less than bee.

Logical Operators

The use of !. Only useful for booleans as this is the inverse.

So ! && and ||.

Can use multiple && or || in a statement.

Now onto if statements. Again, just whizzing through this!

OK ternary conditional...

let passingGrade = 50
let samGrade = 99

var message: String


messagesamGrade >= passingGrade ? "Well done!" : "Too bad!"

So ternary is used instead of the if/else statement block basically.

Challenge!

Done in a couple of minutes. All good!

Optionals

! or ? at the END of the code.

I know the concept of these. Absence of a value or a value etc. Box analogy.

Forced unwrapping etc.

Shadowing - using the same name for the temp constant as the actual one we are unwrapping. Only available in the unwrapping stage.

if let petName = petName {
    print(petName)
} else {
    print("No pet")

}

Challenge!

Around 5 minutes this time! All good!

Conclusion - recap

No need to actually recap!

Finish Time - 17:17 (1 hour 17 minutes)

A good recap session. Nothing much new other than 'shadowing', more practise with ternary conditionals and the use of mark-down view. That's it! Next time, collections...

The plan is to do a chapter each day for now until this course is done. By then, the new, fancy UI update will be ready hopefully! 

Comments

Popular posts from this blog

*Xcode Project Entry 2* F1 Quiz - part 1

Angela Yu Course Part 10 (up to lesson 112)

Angela Yu Xcode 12 Course - Part 7 (lectures 74 to 79)