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

Get in Contact

Menu Close
  • Home
  • Author

Author: tomkausch

When Code Smells – change it

October 1, 2015tomkausch Leave a Comment

When your  code smells it is often not awful code that makes your hold your nose. Rather it’s a simple indication that something may need to be changed. However when you don’t change  and ignore  you probably will end with a… Continue Reading →

Effective Objective-C

When to use Implicitly Unwrapped Optionals

September 20, 2015tomkausch Leave a Comment

Since the introduction of Swift, our behavior towards nil values have greatly changed. Swift brings type safety, and also works hard to prevent sending messages to nil by introducing Optionals. Optionals force you to write guards around your optional code at… Continue Reading →

Swift

State machines to the rescue

September 16, 2015tomkausch Leave a Comment

Today I came across code that implemented a complex  login process. The login flow was quite complex but what made the code really difficult to understand was how it was implemented. Notifications, delegates, and long  case switch statements were used to implement the login flow.… Continue Reading →

Effective Objective-C

Swift implicit parameters

August 24, 2015tomkausch Leave a Comment

Swift comes with some implicitly defined variables – that are variables that are accessible in your code even though you’ve not explicitly defined them. These variables are helpful when logging errors or writing test code. __COLUMN__ (Int): The column number in… Continue Reading →

Swift

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

Custom Transitions on iOS

August 13, 2015tomkausch Leave a Comment

iOS provides several built-in types of transitions. Navigation controllers push and pop to navigate through an information hierarchy, tab bar controllers switch between sections by changing tabs, and any view controller can present and dismiss another view controller modally for… Continue Reading →

iOS, Objective-C

The Objective-C error model

June 8, 2015tomkausch Leave a Comment

Many modern languages have exceptions. If you come from Java you’ll most likely using exceptions all the way to handle error cases. For objective-C you are going to have to go back and forget everything you knew about exceptions and… Continue Reading →

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

Prefere Typed Constants versus Pre-processor #define

May 25, 2015tomkausch Leave a Comment

When you write testing code you will often want to define a constant. Typical constants that you might want to factor out are your test fixtures. Often Objective-C programmers take the approach of defining the constant like this: #define USER_NAME… Continue Reading →

Effective Objective-C

Algorithm to find the area of a Polygon

May 13, 2015tomkausch Leave a Comment

Today I came across the following problem: “If you know the coordinates of the vertices of a polygon with square edges, find the surrounded area. Or more formally given an array of the X and Y coordinates enumerated in a clockwise… Continue Reading →

Algorithms

Post navigation

Newer 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