Advertisement
iOS SDK

iOS Quick Tip: From Novice to Expert

by

Even though it's possible to learn the essentials of iOS Development in a weekend, it will take much longer to master the craft. The question then is how do you transition from a novice to an expert? In this quick tip, I will provide you with a breadcrumb trail that may help you on your way to becoming a great iOS developer.


1. Practice, Practice, Practice

There are no shortcuts. This is something that I'd like to emphasize before continuing, because it is important to get rid of any illusions that might be stuck in your head. You don't become a skilled developer if you only program on Sunday afternoons between 4PM and 5PM...if the sun isn't shining and there's nothing on television. Don't get me wrong, it may be fun to do so, but it won't bring you much closer to your goal of becoming an expert developer. Apart from a few exceptions, most people need practice -and lots of it. If you aren't prepared to put in the hours, then it's better to revisit your goals and ambitions. Become great at something you love and the time spent practicing will be its own reward.


2. Learn From Others

One of the best strategies to improve your skills and to adopt best practices is to learn from other people's code. This not only means browsing Stack Overflow, but also, and more importantly, libraries or code snippets that are open sourced by fellow developers.

Whenever you dive into a library, such as AFNetworking or Magical Record, it is key to not be overwhelmed by the code you read. Chances are that you don't understand every line of code in these libraries, but that's not really the point. The point is to look at the source code from a higher level and learn as much as possible, such as naming conventions, best practices, design patterns, etc.

In addition to learning from other people's code, it is a good learning experience to create your own libraries. Some time ago, I was developing an application that uses Core Data as the data layer. Instead of using Magical Record, I decided to create my own library by exploring Magical Record and recreating the pieces of functionality that I needed. Not only did this result in a lean, agile library, it also taught me a lot about the inner workings of Magical Record.


3. Don't Copy and Paste

This brings me to another key aspect of learning the right way: don't mindlessly copy and paste code. We all use code snippets that we find on places like Stack Overflow or Apple's Developer Forums, but it's important to not mindlessly copy and paste the code that you find on the web. By copying code that you find, you don't learn a thing. The greater danger is that you don't know what you've just added to your code base. This might result in unexpected behavior and it will make it very difficult to debug your code later.

It may be tempting from time to time to quickly use a code snippet that seemingly solves the problem that you are working on, but I strongly urge against this practice. Read the code, understand what you are adding into the code base, and, possibly, customize the solution to your needs.

It goes without saying that this doesn't apply to libraries or frameworks that are actively maintained. If you had to go through Magical Record before you'd be able to use it in your project... I'm sure you understand the difference. Use your common sense.


4. Patterns

Cocoa and Objective-C are in many ways very different from other programming languages and environments. This means that they have their own patterns and best practices. I'm sure that you're already familiar with a few common patterns, such as delegation and notifications. However, there are many more patterns that can help you during your development, such as the singleton, observer, and command patterns. The Cocoa Fundamentals Guide gives you a nice overview of the most common patterns in Cocoa.


5. Know Your Tools

Becoming a great developer isn't only about understanding the language and the frameworks. It is just as much about working efficiently with the tools that you use day in and day out. For iOS development, this means Xcode and possibly other tools, such as PonyDebugger and Charles.

If you'd like to learn a few extra tricks, you may be interested in a previous quick tip that I wrote about this topic.


6. Stay Up To Date

Even if you can't attend Apple's yearly developer conference, WWDC, it is a good idea to browse the numerous session videos and watch the ones that spark your interest. The presentations are usually given by the engineers that work on the technologies covered in the session, which gives you detailed information and instructions about how to use them. It is also a great way to quickly get up to speed with those technologies.

There are many excellent developers that regularly write about their craft, such as Matt Gemmell, Aaron Hillegass, and Mike Ash. You can find a more extensive list in a previous post I've written for Mobiletuts+.


Bonus: Learn Other Languages

I have noticed that my overall understanding of software development has improved significantly by learning new languages or working with new frameworks. The advantage of this approach is that you don't limit your view of what is possible to the language that you are most familiar with.

I recently dipped my toes in Ember.js and learned that the creators, Yehuda Katz and Tom Dale took inspiration from Cocoa. The implementation of the MVC (Model-View-Controller) pattern of Ember.js is a bit unconventional for a JavaScript framework, but it is not that surprising if you are familiar with Cocoa.

There is no "best" language to write software in as they all have their pros and cons. The nice thing, however, is that they are all a little (or a lot) different and it's those differences that makes learning new languages interesting and eye opening. Ruby, for example, was a real eye opener for me in terms of writing DRY (Don't Repeat Yourself), readable, and clean code.


Conclusion

If you don't want to put in the hours to become a better programmer, then you may want to reconsider why you wanted to become a programmer in the first place. However, if you get excited about a new library or tool that can help you in your development, then you probably won't have a problem improving your skills over time. You really have to love what you do to become good at it and I think this is especially true for programming. No matter what people tell you, you won't become an expert developer overnight, but I promise you that your skills will improve if you keep learning and beating on your craft.

Related Posts
  • Code
    Mobile Development
    iOS: Tools of the Trade741pm preview image@2x
    There are numerous tools and services that have become indispensable in the workflow of many Cocoa developers. In this article, I will highlight some of the tools that I use as well as some alternatives.Read More…
  • Game Development
    How to Learn
    How to Learn Starling FrameworkHow to learn starling 400px
    Starling Framework is a free, open-source framework written using ActionScript 3.0. The primary purpose of this framework is to make it extremely easy for developers to build games for the Adobe Flash Platform. In this article, we'll introduce you to Starling, and share tips, screencasts, tutorials, and resources for getting started with it.Read More…
  • Code
    iOS SDK
    iOS Quick Tip: 7 Tips to Speed Up Your DevelopmentPreview@2x
    Most developers are always looking for ways to improve or automate their workflow being it with a simple script to automate a common task or by learning every possible keyboard shortcut of their favorite text editor. In this article, I will show you seven tips that will speed up and streamline your workflow in Xcode.Read More…
  • Code
    Interviews
    Master Developers: The Ember.js Core TeamEmber js
    Single page apps are the new hotness; everyone's trying to figure out the easiest way to build them. But it's more than just finding a couple of controls to slap together and sprinkling Ajax pixie dust on it. Building scalable and maintainable apps is serious business, which requires serious tools. Ember.js is a very serious framework for doing just that. Check out the interview I did with Ember.js Core Team leads, Yehuda Katz and Tom Dale, as they discuss what prompted them to begin the Ember project, its design philosophy, and where it fits into an already crowded library ecosystem.Read More…
  • Code
    iOS SDK
    Where To Go NextPreview image@2x
    You have learned a lot over the past five weeks, grasshopper, and you might even feel a bit overwhelmed at this point. I would like to leave you with some advice and a bunch of resources to keep you on track to become a proficient iOS developer.Read More…
  • Code
    iOS SDK
    Exploring the iOS SDKPreview image@2x
    A good understanding of the iOS SDK is key when developing native iOS applications. Not only will it help you choose the right tools to tackle a particular problem, it will also make sure that you don't get lost in the dozens of frameworks that are included in the SDK. In this article, we zoom in on the iOS architecture and find out what powers iOS applications under the hood.Read More…