Over the past few months, I have been learning how to build iOS apps with Objective-C, and only now am I finally getting the hang of it. I have to say, it is much harder than I imagined.
Confused, frustrated, and discouraged, I actually spent less time writing code than finding and fixing bugs. But when I finally got to play with the mobile app I had built with my own hands, I suddenly felt that all the effort was worth it!

Along the path of building apps, I learned a lot—not just about how to develop iOS applications, but also about overall planning, and even my programming skills improved. However, many problems could have been avoided if I had taken a different approach to learning Objective-C.
Combining all these lessons, if I were to learn coding again today, here is what I would do:
Find a "Coder Buddy"
First, find a "coder buddy" you can exchange insights with.
A friend of mine, Josh, is a Python developer who also knows Objective-C. He appreciated many of the substantive questions I asked ("How do I use if statements again?"), and when I was completely stuck, he would help me debug. It was truly a case of teaching benefiting both teacher and student.
Honestly, having such a patient coder friend explain basic programming principles to me was tremendously beneficial. If I had had such a friend earlier, I believe I would not have gone down so many detours with Objective-C.
Use All Available Resources
If you don't have such a patient coder buddy around, you can get help using the following methods:
1. Stack Overflow
For specific syntax and development problems, Stack Overflow is the way to go. I personally haven't asked questions online yet, because just reading other people's questions and answers is enough.
2. Subscribe to Online Newsletters
Online learning resources are intricate and can often leave beginners confused. Some online newsletters regularly push recent quality content to you so you can learn selectively. We recommend "Happy Coder" launched by CodeCao; you can directly click here to subscribe by email.
3. Treehouse
Learn how to code through video courses and built-in community forums.
4. askadev
Through askadev, you can get connected to experienced developers when you need help. I haven't tried it myself and don't know whether it covers all programming languages, but one thing is good: it's free. So next time you run into a tough problem, feel free to give it a try.
5. Codementor
If you don't mind spending a little money to get help from senior developers, you might want to try Codementor. It will match you with the best options, covering languages including Android, iOS, HTML, CSS, PHP, Python, and so on.
6. The Rubber Duck Method
The key point of this method is to speak your problem out loud, explaining it to a rubber duck or any other inanimate object—even a toaster works.
While you are explaining, you will often suddenly have an insight and think of the answer (or notice something wrong).
Learn the Fundamentals
Many things become obstacles because of our own misunderstandings or unfamiliarity with the technology we are using.
For example, using an API means you need to understand how the API works, how to use POST and GET requests, and how to parse JSON data. You even need to know how to receive JSON data.
To build an iOS application, learning Objective-C alone is not enough—at least it wasn't enough to build the app I had in mind. I made exactly this mistake before.
Even worse, I often got stuck. Even with forum explanations, online tutorials, and book chapters, they all skipped over some fundamentals—assuming I knew them when I actually didn't.
If I were to learn again, I would definitely master the basics of HTML and CSS. If I were to make an app again, I would never start blindly as I did; instead, I would build a solid foundation first.
The First Language
Any language is an asset. Even though the HTML and CSS I learned still haven't been put to use, I still don't think learning them was a waste of time.
Beginners can start by trying to build websites with HTML and CSS. These are actually markup languages, so they may not help much with building mobile or web applications. But even if they're not directly useful, we still gain a lot of knowledge and experience during the learning process, making it easier to learn the next programming language.
If you are just starting to learn coding but don't know where to begin, you can just pick books, tutorials, or online courses you like. As long as you feel okay with them, don't hesitate. Once you have a definite goal, you can immediately switch to learning other different programming languages.
Find a Project You Truly Want to Work On
I consider myself a fairly hardworking person. I learned HTML and CSS as a teenager, then learned some Ruby basics a few years ago, and recently set my sights on Python.
Then I decided to learn Objective-C—not because I liked it more or because I saw others learning it and got envious, but because I wanted to build an iOS application. I genuinely really wanted to build one myself.
It can be said that my passion for learning Objective-C was stronger than for any language before it.
Most importantly, when I ran into various problems and felt frustrated, I never thought about giving up—because this was a project I truly wanted to do. Even a small step forward was the motivation for me to keep going.
If you are considering learning to code and have no other constraints, choose a programming language that you truly love and that the project you want to build requires.
Everyone's learning process is different, so your experience may differ from mine. But if you are just starting out or considering learning to code, I sincerely hope my lessons can help you learn faster.
Translation link: http://www.codeceo.com/article/what-to-do-if-be-programmer.html
English original:What I would do differently if I was learning to code today
Translator:CodeCao– Xiaofeng