Conway’s Game of Life in Swift

Aasif
By Aasif | December 29, 2021 5:29 pm  | 6-min read

Conway’s Game of Life is a fun simulation game, and we’re going to code it in Swift! Based on 3 simple rules, we’ll see which of the pixels makes it to the next generation. It’s great coding practice, perfect for a Sunday afternoon. Table of Contents What’s Game of Life? Example Code How Life Works in Swift Getting Started: The Grid Coding The Glider Factory Drawing The Grid with GridView Creating The Game of Life Environment Which Cells Stay Alive? Computing The Next [...]

Read More

Shuffling Arrays in Swift with Fisher-Yates

Aasif
By Aasif | December 29, 2021 4:12 pm  | 4-min read

Algorithms are fun! In this tutorial, you’ll learn how to shuffle an array of strings in Swift. Learning how to efficiently shuffle arrays is a good entry point to learn more about computer algorithms and complexity. You’ll want to understand how efficient an algorithm is and how you can make an algorithm faster. You might not need to shuffle arrays in every one of your app projects, but algorithms definitely come into play in many of your apps. Understanding how algorithms run efficie [...]

Read More

Going from Coding Tutorials to Building Your Own App Projects

Aasif
By Aasif | December 29, 2021 3:26 pm  | 5-min read

How do you shift from coding tutorials to building your own app projects from scratch? Tutorial purgatory is a real problem, and in this tutorial 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 Ho [...]

Read More

Why App Architecture is Important

Aasif
By Aasif | December 29, 2021 2:40 pm  | 4-min read

You wouldn’t build a house on quicksand. Would you build an app without architecture? In this tutorial, we’ll discuss the importance of app architecture and how you can get started with it. A while back I got an email from an iOS developer. He was tasked with extending an app with new features. The app was built by someone else. He ran into these issues: “When I change one thing in the code, another part breaks!” “I can’t find any feature of the app. They are all over the p [...]

Read More

Objective-C for Swift Developers

Aasif
By Aasif | December 29, 2021 2:11 pm  | 5-min read

Is Objective-C officially dead? If you look at the rise in popularity of programming language Swift since 2014, you’d most certainly think so. Swift is easier to learn than Objective-C, it has a powerful syntax and it’s widely used for iOS, macOS, tvOS, watchOS and iPadOS apps. Swift is open source and supported on Linux and Windows (5.3-6), which means it has the power to break free from the Apple ecosystem. Has Swift replaced Objective-C? Absolutely not! A beginner app developer’s [...]

Read More