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 […]
Category Archives: Tip
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 […]
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 […]
Fluency in Chaining Methods – as most refer or understand it as
Do you use fluent interfaces? What? I am fluent in using interfaces … or atleast I think… yeah I am fluent. Now if that was a conversation that made little to no sense, then you are not alone. There are so many words coined for simpler things than expected and that leads to a confusing […]
Add Video Thumbnails in your apps
While a majority of the apps that are being made and will continue to be made are templates based on social media like features, the could be a requirement that it will have to display a video thumbnail. This is not difficult because at the end of the day they are simply images that represent […]