Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Top 5 Mistakes that Beginner iOS Developers Make — Part 1

Ignoring error handling

Here is the truth: sh*t happens. Even the best Mobile apps can fail. However, if you can’t predict everything, what do you do then? You make sure that the users of your applications aren’t confused by the situation.

For example, if a user wants to upload an image and nothing happens after a few unsuccessful attempts, you should let them know that their Internet connection may be unstable and they should try again later.

It can be a simple error message or something more creative like what the guys from Google implemented in Chrome. If you don’t have an Internet connection, the browser shows a corresponding message and a pixelated image of a dinosaur, which becomes animated as soon as you press the spacebar. In the next second, you find yourself playing a Mario-style game. Even though Chrome isn’t a mobile application, the idea is really cool.

Of course, this doesn’t fully solve the issue, but it shows the user that you know about it and are working magic to come up with the solution ASAP (which you are, I hope).

So make sure that your error messages are as clear and easy-to-understand as possible. But don’t overdo it! Displaying a dozen identical alerts every few seconds will only irritate your users.

Improper testing

Testing is one of the most important parts in any development process; whether it’s mobile or web development. As they say, the only thing that’s worse than not having your app accepted by an app store, is having a buggy app released to the public.

A common Mistake that Beginner Ios Developers make is testing their mobile applications only on the latest iOS device or Xcode simulator.

Why is this approach wrong? In short, you’re missing out many factors. For example performance. Every new Apple device is more powerful than the previous one. Especially with the introduction of the 64-bit architecture. The latest iPhone chip in the form of A11 goes toe to toe with Intel’s desktop core i5 processor.

That may be great for iPhone 8 and iPhone X owners, but what about people who are still using iPhone 6 or even 5s? When you’re testing your app on the latest device you’re simply forgetting the fact that it may run much slower on the earlier versions, if run at all.

Remember, your application should provide the same user experience no matter what iPhone or iPad they’re using, as long as it’s supported by Apple of course.

Ignoring security aspects

Year after year, both users and programmers are reminded of how vulnerable online data is. Mobile apps and websites get hacked, companies get sued for six-figure sums, people get fired, etc. One slight miscalculation and the data becomes exposed to millions of people who are dreaming to get their hands on your credit card numbers, bank accounts, insurance, etc.

So what can you do to prevent your mobile app from data exposure?

First of all, make sure all sensitive data is stored in a secure place, not CoreData or NSUderDefaults. Check all components that may secretly store sensitive data without you knowing about it.

Second, always use data encryption; forget about static encryption keys.

Hackers can also receive access to the server of your mobile app. To prevent that, delete any information related to your test servers as well as test endpoints. If you want to know more about best iOS security practices, you can read my article on the subject:

iOS Security How-To: User Data Protection

Following these basic steps won’t protect you from North Korean hackers, but it will shield your mobile application from the most common security threats and risks.

Not thinking about performance and memory utilization

Ever since Apple has introduced its mobile operating system, iOS has been an example to follow in terms of performance. Because of that, users expect your application to perform fast and power-efficiently.

Remember, there are nearly 2.2 billion apps on the App Store. Do you really think someone will wait several days till you finally roll out an app that runs smooth and doesn’t drain iPhone battery in one hour? Unless you’re Uber or something, that’s very unlikely to happen.

But why should I bother if Automatic Reference Counter (ARC) takes care of all memory-related issues? When ARC was first introduced in the fifth version of iOS, it was a huge relief for iOS developers.

However, just as any advancement, ARC made people lazy, tricking beginner developers into thinking that they’re no longer responsible for memory optimization.

That’s not true.

Memory leaks are among the most common mistakes found in the code of beginner developers. What is a memory leak? In plain English, it’s a part of memory in a mobile device that’s no longer used by your app, but is unavailable for other apps.

When memory leaks keep piling, the iPhone/iPad runs out of free memory and gets really slow. In the end, the operating system is simply forced to close your app. The outcome: your application has crashed and the user is confused and has no idea about what just happened.

What do you do about it?

Prepare a list of things that may cause performance and memory utilization issues. Double check them. For example, if your application deals with some sort of graphics, there is no need to use 5k HDR images. Not only do they weight a dozen of megabytes or more, but also increase the workload on the server.

Not following style guides

Many beginner developers are stressed about the quality of their code. Sometimes even too much. They gaze at the elegant lines written by senior developers in awe and wonder if they’ll ever be able to create something like that themselves. Too simple to be true, too complex to repeat — they think.

You know what? That’s absolutely normal. When you’re a beginner, nobody expects you to write perfect code. What they do expect is you to write functional and readable code.

Oftentimes, beginners think that if users won’t see their code, why bother leaving comments and spending a few extra minutes organizing it. The faster I write this or that feature, the better it is for everyone, right?

Wrong.

When your code looks like spaghetti (which is why they call it “spaghetti code”), it’s extremely difficult for other people to make heads or tails of it. This includes your fellow-developers, QA, and even DevOps engineers. Instead of doing their job, all of these people will have to spend hours — if not days — trying to untangle your code.

As a result, deadlines are missed and budget is exceeded all because you didn’t bother to write readable and easy-to-understand code from the very beginning. Oh, and need I to say that badly-written code is also why so many apps fail for no reason?

To avoid all of that, make a habit of organizing your code and keeping it clean at all times. If you’re working on a team, you should agree on a set of coding rules or style guides that everybody would follow.

Conclusion

There are many iOS programming mistakes that beginners face at the outset of their career. Most of those mistakes have technical nature such as not optimizing memory usage while some of them require soft skills to be solved, e.g. forgetting to clarify all the details about this or that issue before starting to work on it.

What’s important to understand here is that nobody is 100% immune to mistakes. Failing is a natural part of any learning process. In fact, it’s only through mistakes that you can really understand if you’re going in the right direction. Luckily, the majority of iOS development mistakes have already been already made and analyzed, so you don’t need to repeat them.

Speaking of which, here is a must-watch video from the last year’s “The Lead Developer UK 2017”, where Kevin Goldsmith, a top-level software engineer who worked at such companies like Microsoft, Adobe, Spotify, and Avvo, talks about failing and how you can leverage it. I’ve watched it twice and genuinely recommend it.

So what was your most challenging mistake that you have had to deal with, guys? Feel free to tell me about in the comment section below.

P/S — Hope you enjoyed my article. If so, I’d really appreciate it if you support it with claps and by hitting the subscribe button. Cheers!

Top 5 Mistakes that Beginner iOS Developers Make — Part 1 was originally published in JetRuby on Medium, where people are continuing the conversation by highlighting and responding to this story.



This post first appeared on JetRuby Agency - Featured Technical Stories Based In Our Experience, please read the originial post: here

Share the post

Top 5 Mistakes that Beginner iOS Developers Make — Part 1

×

Subscribe to Jetruby Agency - Featured Technical Stories Based In Our Experience

Get updates delivered right to your inbox!

Thank you for your subscription

×