Play With Code

Want to improve your Swift programming skills? Practice with these ‘Play With Code’ tutorials! They touch upon many fundamental Swift topics and concepts – perfect to improve your mastery of Swift.


  • Play With Code: Binary Search in Swift

    Play With Code: Binary Search in Swift
    Binary search is a simple algorithm that lets you search an array for a specific value. In this tutorial, we're going to code a binary search algorithm from scratch in Swift. It's good practice, and you'll learn some interesting tidbits about Swift along the way!

  • Conway's Game of Life in Swift

    Conway's Game of Life in Swift
    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.

  • Playing With Code: Insertion Sort in Swift

    Playing With Code: Insertion Sort in Swift
    Let's play with code! Today, we'll discuss a sorting algorithm called insertion sort. And we'll build it step-by-step in Swift. It's interesting to see how sorting works exactly, and good practice to code it ourselves. Let's get started!

  • Let's Solve The FizzBuzz Challenge in Swift

    Let's Solve The FizzBuzz Challenge in Swift
    FizzBuzz is a legendary coding challenge. You simply must give it a try! But... what approaches can you use to solve FizzBuzz with the Swift programming language?

  • Shuffling Arrays in Swift with Fisher-Yates

    Shuffling Arrays in Swift with Fisher-Yates
    In this tutorial, you'll learn how to shuffle an array of strings in Swift. We'll use the Fisher-Yates approach, and also work out our own algorithm for shuffling. It's great practice to brush up on your algorithms skills. Algorithms are fun!

  • Play With Code: Palindromes In Swift

    Play With Code: Palindromes In Swift
    The date 02-02-2020 is a palindrome. Palindromes are words that read the same forward as backward. And they're great fun to play with in Swift! In this article, we'll discuss and code 3 approaches to check if a string is a palindrome in Swift.

  • Play with Code: Converting Roman Numerals with Swift

    Play with Code: Converting Roman Numerals with Swift
    Roman numerals, such as "MMXIX", are exciting! In this article, we're going to write some code that converts any integer number to a roman numeral. It's a fun, short exercise that touches on many aspects of the Swift programming language. It's perfect if you have a spare minute or two to play with code!