Strings are everywhere in our world. We developers start our day with strings, writing code in our favorite IDE and end with strings, writing our status emails.
It doesn’t matter whether we want to or not, we’re writing lots of string interpolation every day. We have no other option.
Perhaps you’re now thinking, when did I use string interpolation? I don’t think I’ve ever used it!
Well, perhaps you’ve failed to spot it, but trust me — you’re using it daily!
If I am using it daily, then why do I need to learn it now?
Many programming languages in…
So, it’s almost about one month already since WWDC 2019 happened this year. All the developers are still busy figuring out what new things Apple has added or updated for development. There were some big announcements and small announcements, but we, the developers need to make sure that we won’t miss anything important. So, I created a quick checklist of the items what we should not miss. Let’s make it short, concise and simple.
This is pretty much the first thing, every swift developer read at the time they started. Let’s understand optional in a more funnier & shorter way, Let’s say you have gone for some shopping with a wallet in your pocket. The wallet can have some money or not. If you think the wallet as an optional variable, then either it has some value or no value at all.
Before purchasing anything from a shop, you will check whether the wallet has the money or not. If money is there, then you will purchase otherwise you will skip. This is the…
💥💥💥A value type is a type whose value is copied when it is assigned to a variable or constant, or when it is passed to a function.💥💥💥
In Swift, we have to deal with both reference type and value type property. If the property is a pure value type or reference type, then we should not worry as everything works as per your expectation.🤘
But what if we mix those properties together?👨👨👧👧 What will happen? 🧐
Let’s try to find out in this article.🔎
✅ Value types can hold reference type property, and vice-versa is also true.✅
If you add…
Yes, It was one of the greatest improvements in technology. We use Dispatch Queue in Swift to create a new thread. Dispatch Queue, as the name suggests, it manages the execution of work items that are submitted to it.👏
Stop here for a minute..🚷🚷🚷
Before jumping into some serious kind of discussion and code, let’s try to understand some concepts of threading in a funnier way, then it will be easier for us to digest. 🍔🍟🍳😬
We all know the terms Concurrency, Parallelism, Synchronous, Asynchronous in threading, but how are they different from each other?🤔
🤘Hurrah!!! It’s a nice weekend…
Swift is a mother🤰and it has two sons 👬-
But what are their characteristics?🤼♂️
Do they behave the same or opposite to each other? 🧘♂️
Swift is a multi-paradigm programming language developed by Apple for iOS, macOS, watchOS, tvOS, Linux, and z/OS.💪
Just like other object-oriented programming languages, Swift has classes as building blocks which can define methods, properties, initializers, and can conform to protocols, support inheritance & polymorphism.👍
But, wait wait wait…🖐🖐🖐
Swift has structs also and it can define methods, properties, initializers and can conform to protocols with only one exception of…
Swift is one of the topmost type-safe languages nowadays. 🎯🎯🎯
A type-safe language always ensures that an operation works with the right kind of data available at that point.✓
If a language has the ability to declare different data types (e.g., Int, Float, String, Array, Dictionary) and it has also the ability to ensure that a variable that is declared with a particular data type will never hold a different kind of data, then it is called a type-safe language.
In type-safe languages, type checking is always done. …
As developers, we know Git very well, as it is a very important part of our daily activity. Software developers use it all the time. We can not spend a day without interacting with Git. We can run Git from the terminal or use some third party tools like Sourcetree.
But there are some terminal fans who always love to run Git from the terminal only. So for them, it is sometimes difficult to remember and write those long commands. Ohh no buddy!! It is very much a boring and time-consuming task to write long commands all the time 😭😭😭.
A function takes some input, does something to it and creates an output. A function has a signature and a body. If you give the same input to a function then you always get the same output. That is in short a definition for the function.
Now we will talk more about functions by getting a closer look into them. We will explore higher order functions in Swift. A function that takes another function as input or returns a function is called a higher order function.
In Swift, we play with map, filter, reduce everyday. When we use these functions…
Programmers come across functions every day. A function represents a special type of relationship: every input value that the function takes is associated with some output value. So in a more generic way, a function is a rule which maps some input values to one output value.
The basic idea behind function composition is applying one function to the result of another function. So it is a mathematical concept of combining functions into one function.
Swift Developer. In love with Python & Machine Learning.