Refactor #3 – Designing a system Architecturally

When you look at refactoring some code there are a couple of reasons to do so. What are the reasons to do so? Take you pick from this list. 1. The version of Swift has changed, need to be current 2. I read about this amazing technique, I need to implement it 3. This would […]

Refactoring #2

In this post let us look at a piece of code that was written by senior devs trying to consolidate the code. Since I cannot post the code as it is, lets look at portions of the code. The Codebase Say the codebase is common and shared between variants of the app that can be […]

Refactoring Code – #1

A lot of things have happened since the last time I wrote a post which seems to be around August 2018 here. The post was inspired from a Swift class I was teaching. At the time it was Swift 4.2 and now we have Swift 5.3. During this time, I worked for a few organizations […]

Making a simple Game using Enums

This idea stemmed from the fact that majority of developers create an UI in Interface Builder without an issue, but the real struggle comes when they have to write the code and it was difficult for me to believe at first that writing code or structure is really difficult, so I decided to write these […]

Learning a New Language

This is not a swift related post – This is more like what I did over the weekend in a day. I learned to read and write Korean (Hangul). Since it is self taught and the sounds are slight different than the languages that I have learned / know so far. However I feel that […]

Advanced Usage of Functional Methods

In the last post at reducing-code-for-readability-and-speed which took you through using functional methods instead of loops. The issue was that in some of these functions you might require the index and therefore pushed one back to using loops instead.

Reducing code for readability and speed

In a conversation a couple of days ago, somebody mentioned that they needed to determine the missing digit(checksum) of an ISBN-10 number. This was interesting, specially because this was a perfect example for reducing the lines of code written to resolve this. The specification of ISBN-10 checksum The final character of a ten-digit International Standard […]

Swift Extensions

WWDC 2018 recently concluded and though there was no new hardware, no talk about the HomePod, etc. There was a special emphasis on Developers – both Code and Tools. Swift is now becoming the defacto language for Apple. However it has come to a point where there are many core Objective-C devs that feel Swift […]