Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

BootLoxes

macrumors 6502a
Original poster
Apr 15, 2019
747
880
I am not sure where else to post this but I have been doing Swift for about a month now and there is so much that I do not know that at times it just feels overwhelming.

Going to sites like leetcode and being unable to solve the simplest of challenges.

I know it is very early on but I find myself questioning whether I can actually do this.

How did you guys maintain your motivation when learning?
 

casperes1996

macrumors 604
Jan 26, 2014
7,485
5,649
Horsens, Denmark
Properly learning took me quite a few years, and honestly it took university courses to really get me going even though I had been trying for a few years prior. - That's not to say you can't do it without; Point I'm making is that I can empathise with the struggles.

One thing that's actually rather nice about Swift for learning is "progressive disclosure"; By which I mean, yes. Swift has a lot of things to learn to fully understand the language. But you don't need anywhere near all of it to start getting work done. Of course basically all languages share this property to some extend, but it's important to remember that most of the time what you already know can express the same semantics as what new feature you're currently reading up on - the way you're learning may just express it More concisely and descriptively.
Another thing to remember is that you're not just studying one thing. You're trying to learn a language; Swift, as well as the discipline of programming, which is so much more than any language. It's a whole mindset. And even further, there's algorithms and data structures, which is what LeetCode is most focused on. You really shouldn't be thinking of LeetCode challenges as appropriate for learning a language. They are for algorithmic problem solving, and generally speaking whatever solution you think of for a problem on there is applicable to any language. And most the time, you don't even need any of that when programming.

Anyway that was a bit more general, going back to your actual question about motivation. I can recommend having a network of people who're also learning if possible, or a mentor to talk to and guide you along the right path. Having. someone to talk to when you struggle so you don't feel stuck for too long at a time can help a bit. And acknowledge for yourself that it's a huge field with so much to learn. People spend decades on mastering things, so nobody would expect you to have cracked through just a few months in.
On the topic of self conscience, I think everyone gets struck by imposter syndrome every now and then; Even people who'v'e actually been in the business for a long time.

PS. Don't get beat down by LeetCode. The difficulty labels really don't always reflect the truth. Some medium are easier than some easy and such.
 
  • Like
Reactions: artfossil

BootLoxes

macrumors 6502a
Original poster
Apr 15, 2019
747
880
Properly learning took me quite a few years, and honestly it took university courses to really get me going even though I had been trying for a few years prior. - That's not to say you can't do it without; Point I'm making is that I can empathise with the struggles.

One thing that's actually rather nice about Swift for learning is "progressive disclosure"; By which I mean, yes. Swift has a lot of things to learn to fully understand the language. But you don't need anywhere near all of it to start getting work done. Of course basically all languages share this property to some extend, but it's important to remember that most of the time what you already know can express the same semantics as what new feature you're currently reading up on - the way you're learning may just express it More concisely and descriptively.
Another thing to remember is that you're not just studying one thing. You're trying to learn a language; Swift, as well as the discipline of programming, which is so much more than any language. It's a whole mindset. And even further, there's algorithms and data structures, which is what LeetCode is most focused on. You really shouldn't be thinking of LeetCode challenges as appropriate for learning a language. They are for algorithmic problem solving, and generally speaking whatever solution you think of for a problem on there is applicable to any language. And most the time, you don't even need any of that when programming.

Anyway that was a bit more general, going back to your actual question about motivation. I can recommend having a network of people who're also learning if possible, or a mentor to talk to and guide you along the right path. Having. someone to talk to when you struggle so you don't feel stuck for too long at a time can help a bit. And acknowledge for yourself that it's a huge field with so much to learn. People spend decades on mastering things, so nobody would expect you to have cracked through just a few months in.
On the topic of self conscience, I think everyone gets struck by imposter syndrome every now and then; Even people who'v'e actually been in the business for a long time.

PS. Don't get beat down by LeetCode. The difficulty labels really don't always reflect the truth. Some medium are easier than some easy and such.
Thanks for the advice. LeetCode is probably what hits my confidence the most. I sort by difficulty and choose the easiest ones with high success rates and get destroyed. I have yet to figure out a single one.

I bought a udemy course by Angela Yu which so far has been good. I have done her programming challenges and have been able to figure it out through a combination of the previous vids and googling.

I even used my knowledge from the course and built a simple music app where you hit a key and it plays the note. Granted it isnt perfect but each key plays the correct note and refining it would be out of the scope of my knowledge, but I did it entirely on my own which made me proud.

I just second guess myself when I cannot do the easiest leetcode challenges and it made me wonder if Angela's course was giving me a false belief that I was actually learning how to make apps.

I guess I will just keep at it. Only about 20% done with the course so there is a lot to learn
 

casperes1996

macrumors 604
Jan 26, 2014
7,485
5,649
Horsens, Denmark
I just second guess myself when I cannot do the easiest leetcode challenges and it made me wonder if Angela's course was giving me a false belief that I was actually learning how to make apps.

What LeetCode represents is algorithm challenges. That knowledge *can* be useful in app creation, but honestly, it's very infrequently it comes in handy. A bit more if you're doing games programming, a lot of data manipulation or lower level programming where you don't have access to libraries.
The first algorithm we looked at in my uni course on algorithms and data structures was Binary Search. In almost all practical cases you'd just use a library function, but if you want to start out with also challenges like those on LeetCode, binary search is an easier one to start off with than most examples on LeetCode :)
All it is, is this:
Imagine you're to find "Helicopter" in a dictionary. What do you do? The naïve approach is to just begin from the first page and go through all the words until you find helicopter. A binary search however will start in the middle of the dictionary, think "Is what I'm looking for before or after this page?" and if it's before it'll go to the middle of where it is and the first page; Continuing to go to the middle until the target is found. Thus the algorithm will run in O(log(n)) rather than O(n); Which means that as the size of the dictionary increases the worst case scenario will take looking through at most log(n) words (n is the size of the dictionary), whereas looking through the entire dictionary will take n words to look through.
Note this of course only works on a sorted list.

I even used my knowledge from the course and built a simple music app where you hit a key and it plays the note. Granted it isnt perfect but each key plays the correct note and refining it would be out of the scope of my knowledge, but I did it entirely on my own which made me proud.

See? You don't need LeetCode to make something :). LeetCode represents just one aspect of programming, and in practice it's often one of the least important aspects (depending on what type of programming). It's valuable to know the field of algorithms and data structures, but knowing how to structure your code well and write clean, descriptive code is way more valuable!

Btw. I mentioned mentorship; If you ever want a look through any of your code to perhaps give pointers or any other type of guidance, I'd be happy to help in any way I can. I of course don't know everything or even close to it, but I've written quite a lot of code at this point and am working on a little operating system for my bachelor project, so I think I'll probably be qualified enough to give some assistance here and there :) - I can be privately reached through both mail, Discord and pm here on MR

Don't get too beat down. It sounds to me like you're making really really good progress on learning

 

BootLoxes

macrumors 6502a
Original poster
Apr 15, 2019
747
880
What LeetCode represents is algorithm challenges. That knowledge *can* be useful in app creation, but honestly, it's very infrequently it comes in handy. A bit more if you're doing games programming, a lot of data manipulation or lower level programming where you don't have access to libraries.
The first algorithm we looked at in my uni course on algorithms and data structures was Binary Search. In almost all practical cases you'd just use a library function, but if you want to start out with also challenges like those on LeetCode, binary search is an easier one to start off with than most examples on LeetCode :)
All it is, is this:
Imagine you're to find "Helicopter" in a dictionary. What do you do? The naïve approach is to just begin from the first page and go through all the words until you find helicopter. A binary search however will start in the middle of the dictionary, think "Is what I'm looking for before or after this page?" and if it's before it'll go to the middle of where it is and the first page; Continuing to go to the middle until the target is found. Thus the algorithm will run in O(log(n)) rather than O(n); Which means that as the size of the dictionary increases the worst case scenario will take looking through at most log(n) words (n is the size of the dictionary), whereas looking through the entire dictionary will take n words to look through.
Note this of course only works on a sorted list.



See? You don't need LeetCode to make something :). LeetCode represents just one aspect of programming, and in practice it's often one of the least important aspects (depending on what type of programming). It's valuable to know the field of algorithms and data structures, but knowing how to structure your code well and write clean, descriptive code is way more valuable!

Btw. I mentioned mentorship; If you ever want a look through any of your code to perhaps give pointers or any other type of guidance, I'd be happy to help in any way I can. I of course don't know everything or even close to it, but I've written quite a lot of code at this point and am working on a little operating system for my bachelor project, so I think I'll probably be qualified enough to give some assistance here and there :) - I can be privately reached through both mail, Discord and pm here on MR

Don't get too beat down. It sounds to me like you're making really really good progress on learning

Awesome! I just sent a friend request through discord. I appreciate your kindness. You were helpful to me months ago when I was still saving up for a mac and was not sure how to go about programming.
 

TokMok3

macrumors 6502a
Aug 22, 2015
672
422
I am not sure where else to post this but I have been doing Swift for about a month now and there is so much that I do not know that at times it just feels overwhelming.

Going to sites like leetcode and being unable to solve the simplest of challenges.

I know it is very early on but I find myself questioning whether I can actually do this.

How did you guys maintain your motivation when learning?
Hi, my advice is to buy 2 or 3 books that are currently updated for the latest iOS and Xcode, once your system is setup and in synchrony with the books don't upgrade Xcode neither the macOS until you are done with the books.

Two of those books must be for beginners and the third for intermediate programmers, then invest time studying them, following each chapter until you are done with each book, the books will take you by the hand in the journey. After you have read those books only then you will have a better idea of what iOS programming is all about (data structures, frameworks etc...)

After you have invested time studying those books you will be ready to create a simple app, but your own app and the books will serve you as a reference to build that app, and if you can't remember things or the books simple did not teach you how to do certain things, google is your best friend and the the answer to that problem is right there, you just need to know how to formulate the question. Just remember that computer programming is an art, and it takes years to master it.

Take time to learn the fundamentals, once you know that it will be easy to learn any computer language.

Don't watch YouTube videos (tutorials) because most of those are outdated and it will be confusing for someone that is trying to learn, avoid that at the beginning and buy the books.
 
Last edited:

BootLoxes

macrumors 6502a
Original poster
Apr 15, 2019
747
880
Hi, my advice is to buy 2 or 3 books that are currently updated for the latest iOS and Xcode, once your system is setup and in synchrony with the books don't upgrade Xcode neither the macOS until you are done with the books.

Two of those books must be for beginners and the third for intermediate programmers, then invest time studying them, following each chapter until you are done with each book, the books will take you by the hand in the journey. After you have read those books only then you will have a better idea of what iOS programming is all about (data structures, frameworks etc...)

After you have invested time studying those books you will be ready to create a simple app, but your own app and the books will serve you as a reference to build that app, and if you can't remember things or the books simple did not teach you how to do certain things, google is your best friend and the the answer to that problem is right there, you just need to know how to formulate the question. Just remember that computer programming is an art, and it takes years to master it.

Take time to learn the fundamentals, once you know that it will be easy to learn any computer language.

Don't watch YouTube videos (tutorials) because most of those are outdated and it will be confusing for someone that is trying to learn, avoid that at the beginning and buy the books.
I am doing angela yus course on udemy which i think is for catalina and the previous xcode.

I do have a book thats up to date though but its for beginners. Where I live, most of the books are out of date. There is 1 more book on the shelves that is up to date and I planned on getting it when I finished my current book and the course.

From there I am not sure where to go.
 

TokMok3

macrumors 6502a
Aug 22, 2015
672
422
Hi, after Angela's course and that book you are ready to build your app, at that moment you need to stop doing more courses, with that course and that book is enough to build an app. By building your first app you will consolidate all that new knowledge that you had learnt from the book and the course... The only way to learn computer programming is by programming your own projects. When you understand what a framework is then you can buy a new book or an online course related to that framework. When your own projects become more complex, you will need to learn more frameworks and more advanced programming technics but at the beginning just keep it simple and advance one set at a time. Learn to be pacient and good luck!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.