• Home
  • Author
Swift & Small Pieces
ARTICLES ABOUT SWIFT , OBJECTIVE-C, ALGORITHMS and Cryptography BY THOMAS KAUSCH

Get in Contact

Menu Close
  • Home
  • Author

Algorithms

What is an actor model?

September 15, 2023tomkausch Leave a Comment

The actor model was proposed decades ago (1973) by Carl Hewitt as a way to handle parallel processing in a high performance network — an environment that was not available at the time. As a quick summary an actor is a message… Continue Reading →

Algorithms, Concurrency, iOS, Swift

Fast Queue implementation for SWIFT

January 26, 2022tomkausch Leave a Comment

The Swift Standard Library currently implements the three most essential general-purpose data structures: Array, Set and Dictionary. These are the right tool for a wide variety of use cases, and they are particularly well-suited for use as currency types. But sometimes, in order to… Continue Reading →

Algorithms, Code Blocks, iOS, Swift, Uncategorized

Producer-Consumer Problem with GCD and Sempaphors using Swift (Part 1)

January 2, 2022tomkausch Leave a Comment

The producer–consumer problem also known as the bounded-buffer problem is a classic example of a multi-process synchronisation problem. It is defined as follows: The Producer generates items in random time intervals and writes them into a bounded buffer. The Consumer consumes these items… Continue Reading →

Algorithms, Code Blocks, Concurrency, Swift concurrency, swift

Solving a simple code puzzle in Swift

June 16, 2021tomkausch Leave a Comment

Georgina loves making up weird sequences. Here is her latest: “1 2 4 8 10 20 22 44 46 92 94 188 190 380…” Write a program that finds the sum of the first 150 numbers in Georgina’s series. There… Continue Reading →

Algorithms, Languages swift

Reversed String

September 6, 2020tomkausch Leave a Comment

Reversing a string in Swift is done by using the reversed() method on its characters, then creating a new string out of the result. Here’s the code: Reverse a String without using reversed built-in function in Swift can be done using Swift higher order… Continue Reading →

Algorithms, Code Blocks

A “Swifty” Longest Palindrome Substring Algorithm

July 13, 2017tomkausch Leave a Comment

In computer science, the longest palindromic substring  problem is the problem of finding a maximum-length substring of a given string that is also a palindrome. For example, the longest palindromic substring of “bananas” is “anana”. Some people will be tempted… Continue Reading →

Algorithms, iOS, Swift

Greedy and simple

September 14, 2016tomkausch Leave a Comment

Greedy algorithms  look for a simple, easy-to-implement solution to complex problems. These algorithms work by recursively constructing a smaller instance  of the the same problem with a rule that is easy to understand and straightforward. The advantage is they are… Continue Reading →

Algorithms, Swift

Kindergarten programming

January 4, 2016tomkausch Leave a Comment

Today I tried to explain my 6 years old daughter what programming means and what an algorithm does. I encountered scratchjr and was impressed how fast she “wrote” her first program on the ipad. Even if you’re not part of the Kindergarten… Continue Reading →

Algorithms, Languages Scratch, teaching

Randomness generation with Objective-C and Swift

August 17, 2015tomkausch Leave a Comment

Randomness is the lack of pattern or predictability. We can be sure of one thing, however: in the closed, digital universe of CPU cycles there is no true randomness, only pseudo randomness. Pseudorandomness, is often implemented in a way very… Continue Reading →

Algorithms, Effective Objective-C

Swift Game Bench

May 25, 2015tomkausch Leave a Comment

Some weeks ago I have finished GameBench a simple two player board game framework implemented in the Swift language. It comes with a simple Connect4 App so you can learn how to use it and implement your own board games. SwiftGameBench framework… Continue Reading →

Algorithms, Swift

Post navigation

← Older Articles

Thomas Kausch

Recent Posts

  • Swift 6 & Foundation
  • How to Use VSCodium for Swift Development with Continue AI
  • Use MLX LM for large language models on Apple silicon with MLX
  • Download .ipa Files from iOS AppStore
  • What is an actor model?

Recent Comments

    Categories

    Algorithms Augmented Reality Code Blocks Concurrency Dev Tools Effective Objective-C Encoding & Decoding Date iOS Languages Objective-C Pyhthon Security Swift Uncategorized Virtual Reality XCode
    © 2025 Swift & Small Pieces. All rights reserved.
    Fashionista by aThemes