Imagine you have never gone swimming in your life. You decide to take swimming lessons. Your first lesson, you spend the first half of the class sitting in a classroom while the instructor shows you a series of static images demonstrating the breaststroke, backstroke, and butterfly. You are then taken out to the deep end of the pool and told to jump in and demonstrate all three strokes.
That is what this particular lesson feels like. Almost all of the lesson is “Here is some code; look at it.” At the end, you are asked to build an app that presents a view controller three different ways. What should have been a series of small steps leading up to a completed major project ended up being one giant leap. There is no reason the lesson could not have been structured such that you build the final project in three steps corresponding to the three different ways to present a view controller: learn then build, learn then build, and learn then build.
I am also starting to have major quibbles with the quizzes. I know from past experience that Udacity courses can have problems grading quizzes with open-ended responses. There are ways around this, but this particular course appears to have thrown up its hands and decided that whatever you want to write is a perfectly respectable correct answer. And much of the time, that is because the quizzes are not doing what quizzes should be designed to do: assess learning. Reflection is all fine and dandy, but some of the time (actually, most of the time) you need an accurate and impartial assessment of how you are doing, along with steps for remediation when how you are doing is not very well!
On the positive side, kudos for continuing to display common problems that arise when writing iOS apps, how to diagnose them, and how to fix them.
There are many good things about this first lesson, “Outlets and Actions”, in the “UIKit Fundamentals” course. Among them:
- (Almost) Comprehensive use of Interface Builder for connecting outlets and actions
- Debugging Storyboard connection issues
I say “almost comprehensive” because they left out the easiest and most intuitive way to connect objects to outlets and actions. That way is by control-dragging from the object in the storyboard to the outlet or action in the Assistant editor. The other methods of connecting that they show in the videos are really only useful if you are restricted to a single standard-width display instead of a widescreen display or multiple displays.
Unfortunately, there are also some issues with the lesson. The biggest one is that the second debugging issue recap refers to a problem that just is not there in the actual sample project. Fortunately, the quiz does reflect the proper answer.
Another big issue is due to the changes in Swift between when the video was made and now (Swift 3.1). The button property “.on” was renamed to “.isOn” between versions. Unfortunately, “.isOn” is listed as a potential answer for a quiz question. Although “.isOn” is (now) the correct answer, you won’t get the quiz correct unless you select “.on”.
Quibbles include the frequent use of “self” where “self” is not needed. I would also prefer that the changeColorComponent() function be called in viewDidLoad() so that the colorView properly reflects the state of the buttons at startup.
I can’t help but think that we are rushing through so very many parts of this code that would benefit from a slower pace, and I already know what is going on here! I really dislike it whenever I am just handed some code in an educational course. People don’t learn well when they are given a big chunk of code and told what is going on in the code. It is much better to explain it in small chunks as you go along and have them actually build it.
Kudos though for showing some of the many things that can go wrong in Interface Builder and what to do about it.
Just a note that you may have a very difficult time getting your PlaySoundsViewController layout to look just like theirs, because they reworked it with two vertical stacks nested into another vertical stack after the video. Getting things into the right place is pretty simple in Interface Builder if you do it correctly the first time and work your way from the outside in to the details, but often quite difficult or nearly impossible if you start on the inside details and try to add outside containers after the fact. Many times, IB will just completely remove all constraints when you move something inside something else.
On to “UIKit Fundamentals” and MemeMe!