Ibex10, actually coming from a background where I started with HyperCard, switched to SuperCard and have been using that ever since, Swift actually is by FAR the closest programming language in terms of simplicity and being approachable. I actually did start by reading Apple’s Swift Programming Language guide. It was the first programming language I have looked at that makes sense. With minor changes a lot of the basics of the language are almost exactly like SuperTalk with just a few differences that are easy enough to pick up. There are some more advanced areas though where there isn’t any equivalent in SuperCard so the concepts are brand new to me, not to mention that Xcode is far different from SuperCard’s Runtime Editor or SuperEdit. I had looked in the past at C++ and at Objective-C… they pretty much freaked me out with their strange syntax and complexity.
But Apple’s iBook had some issues for me. They do a lot to explain the new language and there are playgrounds to follow along and try things out and learn from. BUT… 1. There were (I haven’t read the latest revision so can’t say if it has changed) certain crutches they relied on saying “as you know from Objective-C” especially when it came to certain more advanced concepts I have no reference for in terms of what I know in SuperCard/SuperTalk. That was something of a problem since I don’t know Objective-C. Even worse: 2. The book is completely divorced from using Xcode in any sort of app development way. So while the playground stuff is fun and I could follow along, it did nothing to explain how to create apps.
That was a bit discouraging, but I was happy to see some updated (Swift 2 compatible) third-party iBooks starting to appear. In fact, I picked up three of them.
“Swift for Beginners” by Boisy G. Pitre (Peachpit Press). This one actually disappointed me the most I think. The author did a better job of explaining some of the basics of the language but once again it was all about playgrounds and there were a lot of parts where it just skipped over details and left a lot of unanswered questions. Finally at the tail end of the book it just throws the reader into Xcode for building an app… starts with a very simple OS X utility app and when that is done… it proclaims the reader something of an expert after just one short chapter (wait… what?) and then it jumps into iOS with a basic memory game… and then it sort of drops a whole bunch of miscellaneous stuff on you that probably should have been mentioned earlier but the author couldn’t seem to find a way to include in the prior chapters… and then there is a more advanced iOS game to wrap things up.
“Swift OS X Programming for Absolute Beginners” by Wallace Wang (Apress). Honestly… I was pretty impressed with this one. Far better approach with a rather general overview of what “Object Oriented Programming” is about, and then it actually jumps right into Xcode and creating really simple apps. Lots of “we’ll explain some of this in later chapters” but a good approach overall as learning the language is more directly linked with the Xcode developer environment and actual app interfaces and they mostly did explain things as you progress through the chapters. Some playgrounds as well to demonstrate concepts. Very good balance overall. Missing some details here or there and unfortunately it just didn’t go far enough. Still, I think I got a LOT more practical information out of this book. Actually looking into if Apress has something that follows on from this one.
And then of course “Swift Programming - The Big Nerd Ranch Guide” by Matthew Mathias and John Gallagher (Big Nerd Ranch). In terms of structure… same as that first third-party book (so right there I was a bit apprehensive). That said though, this is, by far, the most detailed when it comes to learning the Swift language and it does an extremely good job of that. I didn’t end up with a lot of unanswered questions in each chapter (in fact, I found it answered gaps in the prior two books that I had been left with). The playground stuff in each chapter is actually very well thought out and useful and the twist… the challenges at the end of each chapter to see if I’m actually understanding the stuff I’ve just read and typed along with or if it is going over my head completely. Yes, that actually made things interesting. And hey, at this point having read 3 other books before this one about Swift language it actually has been mostly easy going and a good review of not only what I read in this book, but anything I might have learned from the others. And the chapters about the Swift language itself are very well done… there is nothing in there I can think of that isn’t explained in the chapter you just read or in prior chapters (and yes, there have been a few times I’ve had to go back and reread the chapter or part of a prior one because something didn’t make sense or just hadn’t quite sunk into my memory yet - but it was also apparent what I missed when I went looking). In this book it all builds up nicely. And then comes the actual app building part of the book. I wish there had been more of this throughout the book. They do a pretty good job here but… the final chapters do seem to take on a little different tone and seem far too short. Some of the details explaining things are a bit less than in prior chapters (still far better than that first third-party book I read). But yes, then we come to the point I asked about in the challenge. How was I to know to do this? That is actually a bit surprising given how previous chapters were rather methodical about making sure there was something to go on. So I do agree that maybe there is something in there I missed. I’ve read through that chapter several times now and I don’t see it and I’m not seeing anything in prior chapters of relevance to this either. I remain rather annoyed having to find the answer here on this forum if the answer is sitting there in the book somewhere. Interestingly… the answer is also needed in the next chapter as well for one of the challenges, but again, I only now have that knowledge from this forum topic. I just want to find out why and if I did actually miss something in this chapter or some prior one that explains it (from anyone who actually has read this book). And, if there isn’t actually an answer in this book, perhaps the authors can consider improving on things in a future revision - and I wouldn’t mind if they also maybe could explain it here as well so I don’t have to wait around for a new revision to find out an answer to this one question.