FREE TRIAL: Accelerate your app development career with Hacking with Swift+! >>

What’s the best way of learning Swift programming?

Recorded – watch the full episode on YouTube.

What advice do you have for someone who is just taking the first steps into Swift to help them learn or to encourage them along their journey?

Chris Lattner: So I think there's a couple of things I would say. So on a material section, I would start with some of the amazing tutorials. So, Paul, you've made a lot of great content public. There's a lot of other great books. There's some really, really valuable places to learn if you're a book based learner. The other thing I would say is that a lot of learning is social.

If you can find a group, if you can find a mentor, if you can find a Zoom chat or whatever, whatever it is in this pandemic world that we live in, I think that there's a lot of value in working and living, working through things and living through the experience of learning with other people.

"I think that there's a lot of value in working and living, working through things and living through the experience of learning with other people."

And I think that one of the things that, I don't know what you said to the 17 year olds when they asked you what is it like to be a programmer but programming is not just about cramming stuff into a keyboard. It's an amazingly social world these days. I mean everything from collaborating with people on GitHub to you're working in a team to you're working with the customer.

It's a very amazingly social problem and I think that we over-focus on the, well, how do you get code into the app as quickly as possible and pass tests? There's a lot of things like that are also really important to be effective that particularly traditional computer science curricula don't cover and I think that there's a lot to those.

Paul Hudson: The social thing is huge and I wish folks took it more seriously. Certainly when I do workshops, I'll tell folks, "Hey, you're going to split up and you're going to do pair programming and work with somebody else," because when you're learning something new, anything new, and someone's working through a project or whatever behind you, if you don't get it first time, you kind of look around the room going, wow, everyone else I bet gets it first time I'm just super stupid. I don't get this and everyone's way ahead of me. If you're with somebody else who says, "Did you get it?" "Nope." "Did you get it?" "Nope." And that’s reassuring.

It feels way better to just talk together. To rubber duck things together and figure things out together and it feels more encouraging. You get things faster and it's that place of there's no stupid questions. That's what you want to get to, to be why is this the case? Why do we have constants in Swift? This is why and ask those questions and get them answered with somebody else is just huge.

"You get exposed to sometimes people are awesome, sometimes people are not which is kind of the reality of the world. It's just a lot more real in terms of the experience and so I think that more of a focus on project based learning could be really useful in general."

Chris Lattner: Well and I mean thinking about my own college experience, almost all the projects were single person projects, right? Go do this project. Get this thing to work. Implement this algorithm, whatever. And it makes sense. It's easy to evaluate and when you evaluate you're evaluating the student. And so it makes sense for the education system to center on that.

The projects I enjoyed the most were groups of two or three or four people because now suddenly they're a larger scale project and so you are doing more, you're accomplishing more. There's more ambiguity. You have somebody to talk to and brainstorm with – you're in it together. You're working together. You get exposed to sometimes people are awesome, sometimes people are not which is kind of the reality of the world. It's just a lot more real in terms of the experience and so I think that more of a focus on project based learning could be really useful in general.

Paul Hudson: Speaking of community, it seems to me that before Swift came along, we had a brilliant community but it was more focused around platforms. There was an iOS community, there was a macOS community and similar, whereas when Swift launched, we're now seeing a broader Swift community where people identify with Swift and go to Swift conferences and read Swift books, whatever. What do you think changed there? What made Swift have this thriving language community where Objective-C didn't so much?

Chris Lattner: That's an interesting question. I don't know if I can give you the right answer on that because I don't really know. I think that there is an aspect of when Swift launched people decided they liked Swift. Whereas with Objective-C most of the community, there there are exceptions of course, but most of the community learned Objective-C because of iOS. And so maybe there was that aspect of it but it could also be that it was just the shiny new thing.

"I think that there is an aspect of when Swift launched people decided they liked Swift. Whereas with Objective-C most of the community, there there are exceptions of course, but most of the community learned Objective-C because of iOS."

It was an exciting new technology and so it made sense for the conferences and things like this, the mindset to come together around Swift. And I say this because Swift now is growing out to new places, but particularly early on it was really about Apple platforms. It was really about iOS. I don't think that Swift has any secret powers there that causes people to like it better than Objective-C functionally for that purpose of iOS development, particularly early on. I think the situation is changing now a little bit. So I don't know. I think that maybe it was just because it was the new thing.

Paul Hudson: Speaking of platforms, how cool was it to see Swift compiling code for MacOS 9?

Chris Lattner: That was Jordan Rose. I think that's super amazing! I think it was on 68k, right? This is fantastic and this is one of the things about there you're building on top of Swift, but Swift builds on top of the LLVM compiler framework so there it's really drawing on this huge community of people that have been working together on all these open source projects that work really well together.

Jordan's an amazing engineer by the way. He meant it as a joke, but this is really profound because it means that you can bring Swift to different kinds of platforms and the energy level required to do that port is low enough that one, I mean, in this case, truly exceptional, but even one engineer can do. So it's pretty great.

Paul Hudson: I think certainly anyone taking bets for would Swift come to Windows first or macOS 9 first, probably would have lost quite a bit of money on that one.

Chris Lattner: There you go. Exactly. I haven't seen one for the NeXTstation, so that's the next challenge.

Paul Hudson: There's always next year!

This transcript was recorded as part of Swiftly Speaking. You can watch the full original episode on YouTube, or subscribe to the audio version on Apple Podcasts.

Listen on Apple Podcasts

Hacking with Swift is sponsored by Essential Developer

SPONSORED From August 2nd to 8th you can join a FREE crash course for mid/senior iOS devs who want to achieve an expert level of technical and practical skills – it’s the fast track to being a complete senior developer!

Save your spot now

Sponsor Hacking with Swift and reach the world's largest Swift community!

BUY OUR BOOKS
Buy Pro Swift Buy Swift Design Patterns Buy Testing Swift Buy Hacking with iOS Buy Swift Coding Challenges Buy Swift on Sundays Volume One Buy Server-Side Swift (Vapor Edition) Buy Advanced iOS Volume One Buy Advanced iOS Volume Two Buy Advanced iOS Volume Three Buy Hacking with watchOS Buy Hacking with tvOS Buy Hacking with macOS Buy Dive Into SpriteKit Buy Swift in Sixty Seconds Buy Objective-C for Swift Developers Buy Server-Side Swift (Kitura Edition) Buy Beyond Code

Was this page useful? Let us know!

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.