Learning Swift coding on iOS and Xcode

Using Xcode and Learning Swift coding

In the past I’ve bought books and courses to learn how to code for iOS and for the Mac. I wasn’t terribly successful and I really couldn’t get my head around using Objective-C. So when Apple announced the Swift programming language and showed how much easier it would be learning Swift coding than to use Objective-C, I was delighted. Again I got access to a course to learn Swift not long after it had been announced, but I never got very far with it either. So now Apple have announced another way to learn Swift coding with Swift Playgrounds. It looks amazing and it’s got to be simple because it’s aimed at children under the banner of “Everyone Can Code”. I haven’t got to use or play with this way of learning to code yet because it’s only available if you use the beta version of iOS. I have in the past tried to use a beta version of the iOS operating system and I didn’t like the experience very much. I am going to be patient and wait until the full version of iOS 10 becomes available in the autumn. What can I do the meantime for learning Swift coding?

Learning Swift coding using TapCoding

The application TapCoding was mentioned in a podcast as being a good way to learn Swift. The podcaster said it was a step further on from Swift Playgrounds in terms of the age range it’s aimed at. This is absolutely correct in that it’s aimed at adults, but it’s still very easy to follow. It is an application to use on the iPad or iPhone. I found it’s been useful to go over a lesson a second time, but inputting the code into Xcode instead. This way you get to see the difference between entering code on the Mac as opposed to typing code into an iOS application. I’ve been using the on-screen keyboard which on the iPad is an improvement over the keyboards on the smaller iPads. It’s still not quite the same as using a mechanical full-size keyboard when learning Swift coding. The other thing with using Xcode for typing in Xcode is that you get to see the syntax colouring for Swift. This makes it easier to see which parts of the code are which. You also get help from Xcode to enter variable and constant names. You only have to start typing in the name of a variable and the application Xcode offers you the named variables. It saves a lot of time in keying in the code and stops code being broken due to a typo in a name. Xcode also gives you information on screen if you’ve made a mistake. Sometimes the information you get is a little bit cryptic but at least it gives you an idea where you’ve gone wrong.

Tapcoding Learning Swift coding

Doing the TapCoding lessons a second time is a good learning experience. Well worth typing the code into the proper coding application on the Mac. Repetition is a good idea for learning anything and there have been things I’ve learned on the second go around. I might even do a couple of the modules a third time to make sure the concepts go in my long term memory.

Xcode playgrounds for learning Swift

I downloaded a book from Apple called App Development with Swift. This book has also been useful for me to learn how to code and I found links to download a swift playground. The Swift playground within Xcode gave instructions on how to do certain things with code. These were lessons within the Xcode itself. The good thing about the playground is being able to see the results of your coding in an area to the right side of the screen. It’s this part of Xcode I’ve been using to type in the lessons from TapCoding that I’ve been following on the iPad.

It’s possible to go a long way through the TapCoding course without paying any money. All you have to do is to have a streak of a certain number of days learning to code with the application and the next modules are unlocked ready for you. I decided it was well worth the €9.99 to pay for the full access to the course so if I wanted to take a day off I’d be able to. Even so, it is a good idea to work on these things daily to reinforce the learning processes. There were occasions where I had to redo one of the modules just so I could unlock the next module in the course. Repetition is good for moving the information from the short term memory to the long-term memory.

When will I hit the coding roadblock

There always comes a point when there’s a roadblock when learning to code. At least that’s how it seemed to me so far. Either I didn’t learn the basics well enough, which is possible. Or I just got to a point where the lesson expected me to understand concepts which hadn’t been explained. It was of those stumbling blocks where I felt I’d need to actually be in a classroom with a teacher who could be asked what needed to be done next. I think that some teachers of programming in the books are so deeply into what they know how to do intuitively, they forget what it’s like to be a beginner. I haven’t got that bad feeling yet using TapCoding, so I’m still feeling quite hopeful.

What to do with Mac and iOS coding

When you consider there are thousands and thousands of applications available to download or buy on the iTunes App Store and the Mac App Store, you’d wonder if there was anything left to be done. Are there any ideas left to develop into applications for either the Mac or for iOS? I suppose there will always be the bespoke requirements for applications for specific businesses. We don’t need any more photo filter applications, Twitter clients or ways to organise our things to do in an application. Yet, still the computer companies, schools and business are recommending people should learn how to code. Most of the things I want to do with a computer I only have to find the right application and the job is done. I’m going to have to get my thinking cap on and see if there are specific requirements I would need in an application and then find out if I could make it. Maybe I could make an application which would take over from the scripting type of coding I’ve done using Editorial app on the iPhone. I’ve used Launch Centre Pro on iOS to give me buttons I only need to press once to complete an action. It would be nice to have that all in one bespoke application. I could save myself a couple of button presses and make it a little bit more attractive and functional in use.

An explosion of coding due to Everyone Can Code

I have heard a number of people say they’re incredibly interested in using Swift Playgrounds on the iPad. It does look quite amazing and gives a tactile approach to learning Swift coding. Swift Playgrounds application is probably the first step into providing iOS users with the means necessary to do all the coding required to make new apps on iOS. The application might be aimed primarily at kids, but I know many adults have expressed an interest. It seems it might be possible also to take code created from within the Swift Playgrounds app and move it into Xcode. You’ll then be able to make real applications using that iOS created code.

What do you think? Are you going to be learning Swift coding?

Put something in the comments below if you’re thinking of having a go with coding now that Swift is coming of age. Will you be champing at the bit to get your hands on Swift Playgrounds when becomes available in the autumn? I can’t wait to get into learning Swift coding