Going from Coding Tutorials to Building Your Own App Projects

Written by Reinder de Vries on May 28 2020 in App Development

Going from Coding Tutorials to Building Your Own App Projects

How do you shift from coding tutorials to building your own app projects from scratch? Tutorial purgatory is a real problem, and in this article we’re going to discuss how you can overcome it. Less following instructions, more writing your own code.

Here’s what we’ll get into:

  • First things first: What’s the real problem we’re dealing with here?
  • How to pick a beginner app project to build (and a few good app ideas!)
  • Why planning your project before you start is so important
  • How to plan your app’s features, libraries and frameworks
  • How you can graduate from following coding tutorials

Ready? Let’s get good at this stuff!

  1. The Problem: Stuck with Coding Tutorials
  2. Pick a Beginner App Project to Code
  3. Plan Your App Project
  4. Learn to Code Without Tutorials
  5. Further Reading

The Problem: Stuck with Coding Tutorials

Before we move on, let’s start at the beginning. What exactly is the problem we’re dealing with here?

This is what I hear over and over again from beginner coders:

  • “I’ve completed learning Swift, but I’m finding myself unable to develop apps on my own. What should I do?”
  • “I’m OK when following along with coding tutorials, but I’m completely stumped when it comes to building my own apps.”
  • “I’ve expanded some existing apps with new features. How can I build my own apps completely from scratch?”

Some people call it tutorial purgatory: you’re stuck with coding tutorials, and you’re struggling to move from following tutorials to building your own app projects.

You’re proficient in following tutorials and you understand the code from the tutorial. But when you’ve started a new project in Xcode, it’s as if you’ve completely forgotten how to code!

In this article, we’re going to discuss how you can successfully shift from following coding tutorials to writing your own code and building your own app projects. We’ll focus on Swift programming and iOS development, but the same techniques and principles apply to any programming language and platform, too.

Learn how to build iOS apps

Get started with iOS 14 and Swift 5

Sign up for my iOS development course, and learn how to build great iOS 14 apps with Swift 5 and Xcode 12.

Pick a Beginner App Project to Code

The foundation for shifting from coding tutorials to building your own apps, is, in fact, your own app project.

We’re immediately diving into the deep end here. Abandon only learning from coding tutorials right now, and start your own app project! There is no middle ground.

What are you going to build? Answer that question for yourself. Here’s some beginner app project ideas:

  1. A to-do list app
  2. A photo sharing app
  3. A news reader or aggregator
  4. A note taking or writing app
  5. A wiki app with birds, fish or types of trees
  6. A calculator app (always fun!)
  7. A conversion app, EUR to USD or pounds to kilogram
  8. A social media app (not recommended!)
  9. A real-time chat app
  10. A weather app

Your goal is to pick a project that’s interesting enough for you, so you’ll have intrinsic motivation to complete it. I’m a to-do list nerd, so I’d happily nerd out over building a gorgeous, slick and clean to-do list app. What’s something you would want to build?

It’s also smart to pick a project that’s juicy, but not too complex. You want to build an app project that has enough opportunity for learning, but isn’t completely out of your league. This is why building a social media app isn’t recommended.

If an app project is to challenging to build, you’re more inclined to give up. Constantly being frustrated because of bugs and errors isn’t motivating either, and it doesn’t help your learning curve as much as a challenging-but-not-too-challenging app project would.

Found a project you like? Don’t immediately search for coding tutorials that teach you exactly how to build the app project you picked. Your goal is to build it from scratch, not to follow someone else’s instructions.

Let’s move on to the next step, which is planning.

Plan Your App Project

The next step is planning your app project. We’re going straight for the gold medal here; no half measures! Don’t worry, we’ll discuss plenty of strategies and approaches, next.

A beginner mistake plenty of app developers make, is starting to build their project immediately after coming up with an app idea. This isn’t an ideal approach, because later on in the project you get tangled up in decisions you should’ve made before starting the project.

An example: You’re making a social media app with a local database, like Realm, but later on you realize that app users need to be able to interact with each other. A cloud-based back-end, with user authentication, would have been a smarter choice. It sucks to go back and rewrite a large part of your app…

What do you do instead? You plan your tech stack ahead of time. A few questions you can think about:

  • What features should your app have? What are features that you can live without, and what are absolute must-haves?
  • Do you need a graphic design for your app? Can you use the default User Interface components or do you need custom UIs? What do they look like?
  • What’s the data structure of your app? What are the properties of objects, like Recipe or Article? Are you storing data locally or in the cloud?
  • Which libraries, platforms, frameworks and tools are you going to use? Can you work more productively by using open source software? What’s your tech stack?

Let’s discuss a few of those questions more in-depth.

In How To Think Like a Programmer, we’re discussing how learning to code requires you to come up with your own workflow for solving problems. The same principle applies here, so it’s important you’re clear on how problem-solving works for you.

Design Your App’s Features

What features should your app have? Designing them can be as simple as scribbling some notes on a piece of paper.

  • If you could only pick one thing the app should do, what would that be?
  • What does this feature look like? What goes “in” and what comes “out”?
  • Can you simplify the feature to make it easier to build?

Let’s say you are going to build a to-do list app. What features should it have?

  1. Create and edit to-do items
  2. Show all to-do items in a list on screen
  3. Mark a to-do item as completed

Based on these features, you can define User Interfaces (UIs) that should go into your app. A few ideas:

  1. A UI for showing all to-do’s, as a table view
  2. A UI for editing to-do’s; a view controller with a text field
  3. An action for ticking off to-do’s, with a button in the table view cell

This list gives you a good idea of where you need to look to build this app. Don’t know anything about view controllers? Start learning there, then come back to your app, and implement what you’ve learned.

Quick Note: Although it’s a compelling idea to add new features to existing app ideas, I want to caution against it. If you don’t move on to building app projects from scratch, you still stay stuck in coding tutorial limbo. It’s OK to expand apps, but also invest time into learning to build from scratch.

Structure Your App Project’s Data

Every app stores data of some kind, either offline or in the cloud. How are you going to structure your app’s data?

  • A game app needs to save highscores
  • A to-do list app needs to store to-do’s in a local database
  • A chat app needs to sync messages between users

The kind of data storage you need depends on your app project. You want to keep it as simple as possible, of course. Some examples:

  • Reading and writing Swift objects from/to disk with NSKeyedArchiver
  • Storing configuration values with UserDefaults
  • Creating an offline-first database with Realm or Core Data
  • Storing objects in the cloud, and sharing them between app users, with Parse Server or Firebase

The requirements you have for a database platform are based on how your app works. It’s a good idea to take a look at your app’s features, its UI and its mockups to get a feeling for what kind of database you might need.

You also want to design your app’s data models. What structured data do you need to store, and what are the properties of those objects? For example, a Todo object has the following properties:

  1. The text of the to-do item
  2. A createdAt date-time that specifies when the object was created
  3. A completionDate date-time that specifies when the to-do was completed
  4. A user field that specifies which user this to-do belongs to

You can check if a to-do item has been completed by seeing if it’s completionDate property has been set. When it’s nil, the task is not completed yet.

What kind of query do you need to get pending tasks?

  • Select all Todo objects
  • … where user is equal to the currently logged in user
  • … where completionDate is equal to nil
  • … order by createdAt in descending order (most recent first)

See how that works? Once you start “thinking in data”, it’s easy to figure out what the data models, properties and database your app needs. This helps you make the right tech stack decisions prior to building your app project.

Discover Libraries, Frameworks and Tools

Don’t reinvent the wheel by programming everything in your app project yourself. Save time by adopting open-source libraries, frameworks and tools that make your life easier.

When you start a new app project, ask yourself: “What third-party tools and libraries can I use?” A few examples:

There’s so much open-source code out there! Maybe a library already has what you’re trying to build. You can implement the library, change some of its properties, or even fork its code and change it yourself.

It’s smart to keep the number of 3rd-party tools and libraries that your app relies on to a minimum. Use 1st-party (i.e., provided by Apple) whenever possible, because they’re often suitable enough. For example, if you need to make a few simple web request, then URLSession probably fits the bill.

Xcode integrates with a few dependency managers, to make working with third-party libraries easier. You use ’em to add 3rd-party libraries to your project. You can choose between Swift Package Manager (recommended), CocoaPods or Carthage.

Awesome! Now that you’ve planned your app project, let’s discuss how you can move forward with actually building it from scratch.

Learn to Code Without Tutorials

OK, let’s take a quick break here and recap what we’ve discussed so far:

  • The problem you’re facing is: How do you move from coding tutorials to building your own apps?
  • The first step is picking an app project you want to build, like a to-do list app. Pick an idea that you find motivating and that’s not too hard.
  • Step two is planning your project. What features does your app have? What tools do you need? How can you use 3rd-party libraries and frameworks?

Next, we’re going to focus on learning to code without coding tutorials.

The plan you’ve come up with so far gives you a good idea of where you need to look to build this app project. Don’t know anything about Xcode or Swift or view controllers? Start learning there, then come back to your app, and implement what you’ve learned.

This is the fundamental principle for moving from coding tutorials to building your own apps from scratch. I can’t overstate this enough! The “trick” is applying what you learn in tutorials in your own app projects.

Should you completely move away from coding tutorials? No! They’re good learning resources, just like books, courses, screencasts, webinars, podcasts, and everything in between. It’s about applying what you’ve learned.

Let’s discuss how that works practically. We’ll use that to-do list app idea as a starting point. Here’s what’s next:

  1. You’ve decided you want to use Realm as the local datastore for the app
  2. You find a coding tutorial about Realm and follow its instructions
  3. You “break out” relevant pieces of the tutorial, and play around with them
  4. You apply the break-out content to an intermediate app project, like a “prototype” to just read and write data to and from the database
  5. Once you feel that you’ve sufficiently mastered these topics, you get to work on implementing them in your own app

See how that works? You’re not stopping after you’ve finished the coding tutorial, but you’re using it as a stepping stone toward successfully implementing it in your own app project.

It’s a two-pronged approach: first you get comfortable with a new topic or technique, and then you apply it in your own project.

What if you only complete one of those two steps?

  • If you never apply a technique in your own project, you stay stuck with coding tutorials forever — and, in time, you forget what you’ve learned
  • If you immediately try to apply a technique in your own project, you get stuck because you lack a fundamental, isolated understanding of the technique

Remember Mr. Miyagi from The Karate Kid, and “Wax on, wax off“? It’s the perfect analogy for learning how to code!

You first want to practice your moves — by waxing cars, sanding the floor, painting — and committing them to muscle memory. By the time you’re ready to practice real Karate, you’ve sufficiently ingrained the movements that they almost automatically start to make sense. You’ve been practicing defensive blocks all along, and you then transfer those skills to actual karate.

It’s the same for you, when learning how to code. You “break out” the topic, practice it, and then weave it back into your app’s implementation.

What’s next for you? Make a list of techniques, approaches, topics, frameworks etc. you want to use in your app project. Find tutorials, books, courses that teach you more about them. Work your way through the list, completing tutorials, and make notes while you’re learning. Finally, apply what you’ve learned in your own app project.

Quick Note: I’ve seen first-hand how powerful it is to learn how to code with friends. Why don’t you jump on a Zoom/Jitsi/Skype/Meet call with a fellow coder, and work through a coding tutorial together?

Learn how to build iOS apps

Get started with iOS 14 and Swift 5

Sign up for my iOS development course, and learn how to build great iOS 14 apps with Swift 5 and Xcode 12.

Further Reading

The fundamental principle behind moving from coding tutorials to building your own apps, is applying what you learn in your own app projects. You discover topics and techniques you need to learn by planning your app project well. You then move on to learning more about these techniques, practicing with them, and finally implementing them in your own project.

The end goal is to complete your own app project. Once you’re done, you’re free to move on to the next app project, and the next. Meanwhile, you’ve learned a ton about building iOS apps. And the further you get, the more you learn about learning iOS development. Your learning techniques improve, and you start to develop a solid workflow for building your expertise. Awesome!

Want to learn more? Check out these resources:

Reinder de Vries

Hi, I'm Reinder.
I help developers play with code.

Get the Weekly

Get iOS/Swift tutorials and insights in your inbox, every Monday.
  • This field is for validation purposes and should be left unchanged.

Most Popular

Browse Topics

Swift Sandbox

Code Swift right in your browser!
Go to the Swift Sandbox

Reinder de Vries

Reinder de Vries

Reinder de Vries is a professional iOS developer. He teaches app developers how to build their own apps at LearnAppMaking.com. Since 2009 he has developed a few dozen apps for iOS, worked for global brands and lead development at several startups. When he’s not coding, he enjoys strong espresso and traveling.

×

Build great iOS apps
Learn how in my free 7-day course

  • This field is for validation purposes and should be left unchanged.

No spam, ever. Unsubscribe anytime. Privacy Policy