|< How long before SwiftUI replaces UIKit?||What are the most important concepts when learning Swift? >|
Recorded – watch the full episode on YouTube.
What would you say are the three most common mistakes people hit on that journey of learning Swift?
Sean Allen: Well, you touched on one a little bit earlier and I think that is an unrealistic expectation. Like you mentioned earlier, some people think I'm going to learn this in a month and they lack the patience, and, that just sets up their whole mentality, like all wrong. You mentioned like six months. I think that's the low end of how long it typically takes.
You know, from the people I've seen in my community that have actually finished the journey. I've seen them from the start to them get hired. It's anywhere from six months to two years. And I think not having that right mindset and expecting results in two or three months just completely messes people up because when they don't hit it in two or three months, then they get all discouraged, frustrated. Maybe they even quit.
So it's just having the right expectations upfront and the right mindset, I think it is one major mistake a lot of beginners make.
“You mentioned like six months. I think that's the low end of how long it typically takes. You know, from the people I've seen in my community that have actually finished the journey. I've seen them from the start to them get hired. It's anywhere from six months to two years.”
Another one is not willing to put in the repetitions. What I mean by that is, it is just like practicing any other skill. Like you mentioned learning a language. You practiced that over and over and over again. I think when people are learning these things in Swift or iOS, like table views or the delegate pattern, they watch one tutorial and they move on to the next topic or they just move on too quickly.
The reason you know table views very well is because you build a hundred of them. You know what I mean? They're not willing to just pound the fundamentals and really learn it. Or if you're not understanding closures, you're not willing to spend three days learning nothing but closures. Right.
You move onto the next topic too soon. So I don't think people put in enough repetitions in my opinion from what I've seen. And then lastly, people may be familiar with me talking about this and that's the tutorial trap. Where you just do nothing but tutorials and I'm not knocking tutorials. Of course that would be not wise for me, but you can't spend a year doing nothing but tutorials.
Like I mentioned earlier, eventually you have to move on to building your own idea, building your own product. Of course tutorials are great to get you started, spend a month or two there but, like I said, your learning really takes off when you start building your own idea and you're not following a paint by numbers, recipe, or tutorial. So get out of that tutorial trap, don't stay there too long.
So those are the three, again, lack of patience, not willing to put in the repetitions and then staying in that tutorial trap way too long.
“You're good at something. Just think about how you got good at that. Like you said, you did it for years and programming is no different.”
Paul Hudson: Absolutely repetitions I think is so undervalued. People don't recognize that things are very, very unnatural in programming. We weren't designed to type into a metal box and see numbers appear on the screen and make it work. That's not how our brains are wired to work and repeating things again and again, and again, 10 times, 20 times, 50 times until it really becomes muscle memory is one of the most powerful ways of learning.
I've been doing maths with my 10 year old recently, and we've been working on how you divide numbers by five. So in saying, "Sophie, what's 28 divided by 5?" And she'd try and figure that out. I said “You know what you do Sophie? You take 28 and you divide it by 10 to make 2.8, then double it to make 5.6, and that's 28 divided by five. So what is 33 divided by five?” And she'd go, “Uh, I don't know.” I'd say, “Well, no, it's 6.6, because you do the same thing again and again and again.”
But you've got to repeat the same formula again and again and again, eventually it sinks in, it becomes muscle memory and it's just the same thing for programming. We're not special. We're not magic. We don't just get things the first try that people learning French or learning math or learning ice-skating, will take years to learn. We have exactly the same problem and exactly the same solution. Repetition.
Sean Allen: Yeah. I say that all the time, everybody here listening or watching right now is good at something. I don't care if it's a video game or whatever. You're good at something. Just think about how you got good at that. Like you said, you did it for years and programming is no different.
Paul Hudson: Actually in the Hour of Code, the original one from code.org, and you'll hate me for this, a famous basketball player. I don't know who, some guy, I don't know basketball! Henwas saying that he wouldn't leave the court. He got 10 free throws in a row just like that.
“So that's why you, you do the whole practice and then you got to make those free throws. So you're used to shooting free throws with your legs tire. I don't know if there's a programming corollary to that, but I just thought I'd put that out there.”
Sean Allen: That's a common thing in like... I remember that back in my high school practice days. Yeah.
Paul Hudson: Yeah. That makes sense. I mean, what are you doing? You end up doing a hundred free throws after you get 10 free throws in a row. And that is the repetition and you know what? You will nail free throws, you know?
Sean Allen: The reason you do that at the end of practice is just because oftentimes the fourth quarter comes down to free throws. So you want to get practice on your free throws when your legs are tired. So that's why you, you do the whole practice and then you got to make those free throws. So you're used to shooting free throws with your legs tire. I don't know if there's a programming corollary to that, but I just thought I'd put that out there.
Paul Hudson: Come for the Swift folks, stay for the amazing insight into basketball techniques!
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.
SPONSORED In-app subscriptions are a pain to implement, hard to test, and full of edge cases. RevenueCat makes it straightforward and reliable so you can get back to building your app. Oh, and it's free if your app makes less than $10k/mo.
Link copied to your pasteboard.