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 […]

Parsing command line options using Swift

There is a higher chance that you might have stayed away from the terminal or the command line, after all the GUI is so much better and easier to use. However if you are like me or Old School, then you might love the command line. In most cases the command-line like a function requires […]

Build your own command extension for OpenTerm

Open Source projects are fun because there are a lot of amazing developers that spend time and effort and create something that all can use. What is more fun is the fact that other amazing talented developers add functionality and features to these open source projects. There is one such project called OpenTerm (was called […]

Add Numbers to get a value so Attitude = 100

You must have come across this little fun stuff that does the rounds on Social Media that adds the alphabets in a word to get a value. This is generally used for Motivational purposes or to prove points. For example, ATTITUDE = 100, BULLSHIT = 103, you get the idea. Let us use Swift to […]

Creating a command-line application

Swift is useful in creating not only Mobile applications or Mac OSX GUI applications it can be used to also create a commandline application which is run on the Terminal. Let’s start with the simplest/minimalist application. There is an commandline utility called yes. If you write and use bash scripts, then you could have come […]

Introduction to Variables in Swift

This is an experiment to have a textual article. This article introduces the concept and features of variables in swift in a graphical/textual form. If you like it, please share it…