<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Fidan Musazade on Medium]]></title>
        <description><![CDATA[Stories by Fidan Musazade on Medium]]></description>
        <link>https://medium.com/@frmusazade?source=rss-b9464cc8df3b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*ySYuUQADShe6qSRz1EIbIQ@2x.jpeg</url>
            <title>Stories by Fidan Musazade on Medium</title>
            <link>https://medium.com/@frmusazade?source=rss-b9464cc8df3b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 20:16:40 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@frmusazade/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[CoreML: Machine Learning in iOS]]></title>
            <link>https://frmusazade.medium.com/coreml-machine-learning-in-ios-ed2149931d4f?source=rss-b9464cc8df3b------2</link>
            <guid isPermaLink="false">https://medium.com/p/ed2149931d4f</guid>
            <category><![CDATA[ios-app-development]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[coreml]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Fidan Musazade]]></dc:creator>
            <pubDate>Sun, 27 Dec 2020 12:22:03 GMT</pubDate>
            <atom:updated>2020-12-27T12:22:03.880Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/851/0*yIQEIBqeq1L226fP.png" /></figure><p>One of the most interesting findings for me recently was the presence of a library, which would make it possible to train and use machine learning models inside an iOS mobile application.</p><p>CoreML was released in iOS 11, around 3 years ago. It is very powerful, as you can build models using TensorFlow, scikit-learn, and other frequently used technologies, then simply convert it to CoreML format and integrate it into the mobile app.</p><p>CoreML supports a great number of models, including Support Vector Machines (SVMs), tree ensembles (e.g. Random Forests), Convolutional Neural Networks (CNNs), Recurrent Neural Networks (RNNs), and Deep Neural Networks (DNNs).</p><p>However, there are obviously certain advantages and disadvantages we can discuss. Basically, CoreML gives you a set of pre-trained models you can use or even develop your own.</p><h4>Advantages:</h4><ul><li>The model operates on the edge. This means that they are calculated on the device and do not need to wait for request to get the result. Therefore, the latency is low and you get almost real-time results</li><li>It can be used offline. As there are no requests/responses from the external API, the model can operate without an internet connection. This gives the app advantage as it can be used without the Internet</li><li>The data is private, as it is not sent anywhere and stays on the device all the time. Privacy issues are therefore eliminated by using a CoreML model</li><li>The cost of operating this app is also lower, as there are no API calls and nothing has to be hosted anywhere on the cloud. With traditional models, the back-end has to be hosted somewhere in order to send and receive API calls</li></ul><h4>Disadvantages:</h4><ul><li>The size of the application can become very large if the model is big. Even with small models, the presence of the CoreML still adds to the size of the app as the model has to be kept on the device</li><li>As the computation and prediction is done on the device, the app consumes an extensive amount of battery and may add additional issues to the older devices, which are not that powerful</li><li>The model would need to be constantly trained, and if there is any change to it, the app should be updated. This could lead to very frequent updates required to operate the app correctly</li></ul><p>So, as you can see the coin has two sides and it is your choice to decide whether you should use CoreML, or go with traditional API calls.</p><p><strong>References:</strong></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FKDC2HhbK-zI%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DKDC2HhbK-zI&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FKDC2HhbK-zI%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/f2ebc83508f37a316f62d8e456b28bd8/href">https://medium.com/media/f2ebc83508f37a316f62d8e456b28bd8/href</a></iframe><ul><li><a href="https://www.infoworld.com/article/3200885/apples-core-ml-the-pros-and-cons.html">Apple&#39;s Core ML: The pros and cons</a></li><li><a href="https://www.raywenderlich.com/7960296-core-ml-and-vision-tutorial-on-device-training-on-ios">Core ML and Vision Tutorial: On-device training on iOS</a></li><li><a href="https://developer.apple.com/documentation/coreml">Core ML | Apple Developer Documentation</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ed2149931d4f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Software Architecture: Views and Viewpoints]]></title>
            <link>https://frmusazade.medium.com/software-architecture-views-and-viewpoints-113d1592fe3a?source=rss-b9464cc8df3b------2</link>
            <guid isPermaLink="false">https://medium.com/p/113d1592fe3a</guid>
            <category><![CDATA[views]]></category>
            <category><![CDATA[architectural-design]]></category>
            <category><![CDATA[viewpoints]]></category>
            <category><![CDATA[software-architect]]></category>
            <category><![CDATA[software-architecture]]></category>
            <dc:creator><![CDATA[Fidan Musazade]]></dc:creator>
            <pubDate>Fri, 25 Dec 2020 08:07:25 GMT</pubDate>
            <atom:updated>2020-12-25T08:07:25.369Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*yK0YL3kvYfkF3LkN.jpg" /><figcaption>Image Source: lynda.com</figcaption></figure><p>One of the most used strategies nowadays in many problem-solving challenges is <strong><em>“divide and conquer”</em></strong>. This has not left Software Architecture out.</p><p>As you may know, the job of a <strong><em>software architect</em></strong> involves finding the needs and requirements of the stakeholders and addressing them in a reasonable manner, which is realistic and efficient. For this purpose, one of the main responsibilities is preparing an architecture design document. A more formal definition of software architect can be found <a href="https://en.wikipedia.org/wiki/Software_architect">here</a>.</p><p>There can be a huge amount of stakeholder concerns, and addressing all of them in one stage is not considered a good practice. Here comes in handy the concept of <strong><em>“divide and conquer”</em></strong>.</p><p>In order to simplify the architecture design and make it more readable for the target user, the concept of <strong><em>views</em></strong> has been introduced.</p><blockquote>Formally, a <strong>view</strong>, in software architecture, is a way to portray those aspects or elements of the architecture that are relevant to the concerns the view intends to address and, by implication, the stakeholders to whom those concerns are important.</blockquote><p>What is implied by this, is the fact that we split the big problem into small subparts, each of which addresses some specific set of concerns of stakeholders. Each view is a different look at the problem and could be targeted to a specific audience. Some stakeholders may be interested in a specific view more than others, and vice versa.</p><p>Then a question arises. How do we define, which views to create? Should I invent them from scratch for every project? Or what should I do?</p><p>Luckily, we have <strong><em>viewpoints</em></strong>. These act as templates when creating the views. Viewpoint is like a blueprint to what can be created later as a view.</p><blockquote>A <strong>viewpoint </strong>is a collection of patterns, templates, and conventions for constructing one type of view. It defines the stakeholders whose concerns are reflected in the viewpoint and the guidelines, principles, and template models for constructing its views.</blockquote><p>There are different accepted types of viewpoints, and a software architect can choose any of them to address in the specific project. The most common viewpoints are context, functional, information, concurrency, development, deployment, and operational.</p><ul><li><strong><em>Context viewpoint</em></strong> addresses overall relationships and dependencies between the components of the project and the way the system interacts with its environment</li><li><strong><em>Functional viewpoint</em></strong> describes the system’s runtime functional elements, their responsibilities, interfaces, and interactions between them</li><li><strong><em>Information viewpoint </em></strong>is intended to address the ways data is collected, stored, and managed to make the system work</li><li><strong><em>Concurrency viewpoint </em></strong>includes aspects of how concurrent units of the program are handled and what parts specifically can execute concurrently</li><li><strong><em>Development viewpoint </em></strong>is made for use of technical staff, which build and test this software. It includes design specifications of software and is used as a guideline when preparing the product</li><li><strong><em>Deployment viewpoint </em></strong>describes where and how the system will be deployed and includes technical details for dependencies and other requirements</li><li><strong><em>Operational viewpoint </em></strong>handles the part that comes in a production environment, which includes how the software will be operated, administered, and supported</li></ul><p>It is worth noting that not all projects require all of these viewpoints to be used. Some have more weight and some less depending on the type of software that you build.</p><p>These blueprints help to build a document that describes many aspects but does not overwhelm the reader. However, it is still the job of the software architects to decide on which viewpoints to use to construct views and the level of detail they require.</p><p>What distinguishes a good software architect from a bad one is the ability to satisfy the stakeholders, while also balancing the opportunity costs. It would be unrealistic to address all the concerns, as there are time and cost limits for all the projects. Software architect has to choose, which concerns are most important, and explain why.</p><p><strong>References:</strong></p><p>Nick Rozanski, Eoin Woods (2012). <em>Software Systems Architecture. Second Edition. </em>Published by Pearson Education, Inc.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=113d1592fe3a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to become an iOS developer?]]></title>
            <link>https://frmusazade.medium.com/how-to-become-an-ios-developer-e2497ebd3123?source=rss-b9464cc8df3b------2</link>
            <guid isPermaLink="false">https://medium.com/p/e2497ebd3123</guid>
            <category><![CDATA[ios-app-development]]></category>
            <category><![CDATA[how-to]]></category>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[ios-development]]></category>
            <dc:creator><![CDATA[Fidan Musazade]]></dc:creator>
            <pubDate>Mon, 21 Dec 2020 09:57:38 GMT</pubDate>
            <atom:updated>2020-12-21T09:58:39.475Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/560/1*d78mdYO8yPKbhH_O3QfCPA.png" /><figcaption>Algorithm of Success</figcaption></figure><p>In today’s world, the need for web and mobile applications is following an increasing trend. Not only new businesses are starting online, but also traditional businesses are trying to establish a presence in digital markets. With the realities that the Covid-19 pandemic has brought these digitalization attempts are ever-increasing.</p><p>Considering that a major portion of users prefer mobile experiences over desktop ones, starting a career in mobile development could be insightful. There are two major platform mobile applications run on Google’s Android and Apple’s iOS operating systems. In this article, I will try to give a guide, a roadmap for becoming an iOS developer. Let’s get started!</p><p>To develop iOS applications the first thing you should learn is the platform’s programming language. The development language for iOS applications is Swift. Let’s take a look at Apple’s definition of Swift:</p><blockquote>“Swift is a powerful and intuitive programming language for macOS, iOS, watchOS, tvOS, and beyond. Writing Swift code is interactive and fun, the syntax is concise yet expressive, and Swift includes modern features developers love.”</blockquote><p>If you have prior programming experience in other programming languages, you will be able to get started with Swift in no time. If you have no experience in programming, no worries, Swift is a great choice for the first-comers, and it is incredibly easy to learn. There is a great community that produces quality content on Swift. You can get started with Swift in 60 seconds which is a collection of tutorials that exposes syntax and features of Swift.</p><p>Despite being a Data Scientist myself, I could learn Swift in a relatively short period of time. All you need is practice and motivation to create. The first thing you have to do is learn the syntax of Swift. This requires a very small time if you programmed in any other language.</p><p>Swift highly resembles C, as it descended from C-based languages. The “father” of Swift is Objective-C, which was used to develop native iOS applications for a long time. Despite being similar, it is much more user-friendly and easier to learn.</p><p>The major step in learning any language is developing applications in that language. So, if you wish to learn Swift and become an iOS developer, you should start building projects. These could be small ones, like a calculator, a basic game, or an app about you. This is how I learned the basic stuff required for bigger projects.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/709/0*rJAOHz0mpOSml4oT.png" /><figcaption>Brian Voong</figcaption></figure><p>One of the best resources available is an online course offered by Brian Voong. There are actually a bunch of projects he implements in his tutorials and shows the important concepts behind iOS development. If you wish to learn more, visit his website: <a href="https://www.letsbuildthatapp.com/">LetsBuildThatApp</a>. Even though the courses are paid, they provide great value for the money you give. He also has free videos on Youtube, which you can watch to decide whether you want to enroll or no.</p><p>Overall, if you have the motivation to build and deploy cool iOS apps, you can definitely do it! All you need is practice! Hope this article was useful for you ;)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e2497ebd3123" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Swifty Way to Build Models for JSON Data]]></title>
            <link>https://medium.com/working-from-home-wfh/a-swifty-way-to-build-models-for-json-data-3e1fe72508b8?source=rss-b9464cc8df3b------2</link>
            <guid isPermaLink="false">https://medium.com/p/3e1fe72508b8</guid>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[swift-programming]]></category>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[ios-app-development]]></category>
            <dc:creator><![CDATA[Fidan Musazade]]></dc:creator>
            <pubDate>Fri, 18 Dec 2020 13:05:56 GMT</pubDate>
            <atom:updated>2020-12-18T13:36:38.322Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UmKp0yA_FcjQnErnJxBTpA.png" /></figure><p>Let us say the backend developer on the project you work on has chosen PHP or Python for the development and strictly follows then guidelines and design API according to naming conventions of these languages. For example, as a result of a login request you receive the object in the following format:</p><pre>{<br>  “access_token”: “eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC96ZXl0dW5hei5ncy1ob3N0LmNvbVwvYXBpXC9sb2dpbiIsImlhdCI6MTYwODI0MDE4NCwiZXhwIjoxNjA4MjQwMjQ0LCJuYmYiOjE2MDgyNDAxODQsImp0aSI6IjJZcTFuNktPS3Rocmh2WnEiLCJzdWIiOjIsInBydiI6IjUyMmExYTY1ZTEyNjg4M2M0YWIwNTA0NGEwNDM3NTVlOThlMjU1NWMifQ.UqIXYh73kSXRjlhegpapo-pz198I-Tf_K_VwIdiPJNA”,<br>  “token_type”: “bearer”,<br>  “expires_in”: 60<br>  “last_login_date”: “2020–12–11 13:33:39”<br>}</pre><p>You need to create a model struct that is capable of parsing this JSON. So, the first thing you can do is create a struct like the following:</p><pre>struct LoginResponse {<br>  let access_token: String<br>  let token_type: String<br>  let expires_in: String<br>  let last_login_date: String<br>}</pre><p>And decode the jsonData as follows:</p><pre>let jsonDecoder = JSONDecoder()<br>jsonDecoder.decoder.decode(LoginResponse.self, from:         loginResponseData)</pre><p>This struct model will work perfectly, you will be able to parse the JSON data and save it in the cache. However, by doing so you will be violating the naming conventions of Swift (see more at <a href="https://google.github.io/swift/#naming">this link</a>) which requires you to use lowerCamelCase.</p><p>What most developers do in this case to avoid such a violation is to take advantage of the CodingKey protocol and create an enum. So they design they struct like below:</p><pre>struct LoginResponse {<br>  let accessToken: String<br>  let tokenType: String<br>  let expiresIn: String<br>  let lastLoginDate: String</pre><pre>  enum CodingKeys: String, CodingKey {<br>    case accessToken = “access_token”<br>    case tokenType = “token_type”<br>    case expiresIn = “expires_in”<br>    case lastLoginDate = “last_login_date” <br>  }<br>}</pre><p>And decode the jsonData as follows:</p><pre>let jsonDecoder = JSONDecoder()<br>jsonDecoder.decoder.decode(LoginResponse.self, from: loginResponseData)</pre><p>This helps the developer parse the JSON data through the JSONDecoder instance while strictly following Swift conventions. This mapper enumeration takes the responsibility of converting snake_case keys into lowerCamelCase alternatives. Although the example given here is concise, we might be in the need to map dozens of keys in reality. Thus one may argue that such a solution is inefficient.</p><p>Luckily JSONDeconder has a property that can take care of such conversion in a single line. All we have to do is define our struct like the following:</p><pre>struct LoginResponse {<br>  let accessToken: String<br>  let tokenType: String<br>  let expiresIn: String<br>  let lastLoginDate: String<br>}</pre><p>And decode the jsonData as follows:</p><pre>let jsonDecoder = JSONDecoder()<br>decoder.keyDecodingStrategy = .convertFromSnakeCase<br>jsonDecoder.decoder.decode(LoginResponse.self, from: loginResponseData)</pre><p>That is as simple as this. However, let’s continue by better shaping our example.</p><p>In the struct, we have a property lastLoginDate that return the date string in the format of <em>“yyyy-MM-dd HH:mm:ss”</em>. We parse the date value as a String and store it in the model instance. We will need to parse this date later to use within our UIViewControllers subclasses.</p><p>It is totally okay to parse dates using DateFormatters within view controllers, however, what if there are multiple such date values in the JSON data we receive?! We will be in the need of parsing them individually.</p><p>JSONDecoder interface comes again in handy at this moment. All we need to do is define dateDecodingStrategy and change the type of date properties from String to Date like follows:</p><pre>struct LoginResponse {<br>  let accessToken: String<br>  let tokenType: String<br>  let expiresIn: String<br>  let lastLoginDate: Date<br>}</pre><p>And decode the jsonData as follows:</p><pre>let jsonDecoder = JSONDecoder()<br>decoder.keyDecodingStrategy = .convertFromSnakeCase<br>let dateFormatterWithTime: DateFormatter = {<br>      let formatter = DateFormatter()<br>      formatter.dateFormat = &quot;yyyy-MM-dd HH:mm:ss&quot;<br>      return formatter<br>    }()<br>decoder.dateDecodingStrategy = .formatted(dateFormatterWithTime)<br>jsonDecoder.decoder.decode(LoginResponse.self, from: loginResponseData)</pre><p>That is it. Our model struct is ready for use in the most Swifty way.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3e1fe72508b8" width="1" height="1" alt=""><hr><p><a href="https://medium.com/working-from-home-wfh/a-swifty-way-to-build-models-for-json-data-3e1fe72508b8">A Swifty Way to Build Models for JSON Data</a> was originally published in <a href="https://medium.com/working-from-home-wfh">Working From Home: WFH 🏠</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Which cloud provider is better? The comparison of AWS, Azure, & Google Cloud]]></title>
            <link>https://frmusazade.medium.com/which-cloud-provider-is-better-the-comparison-of-aws-azure-google-cloud-3dcb2fa48556?source=rss-b9464cc8df3b------2</link>
            <guid isPermaLink="false">https://medium.com/p/3dcb2fa48556</guid>
            <category><![CDATA[cloud-services]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[cloud]]></category>
            <dc:creator><![CDATA[Fidan Musazade]]></dc:creator>
            <pubDate>Fri, 11 Dec 2020 11:18:17 GMT</pubDate>
            <atom:updated>2020-12-11T11:32:11.798Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/640/0*Y6SKJJKGSVcO1JAm.png" /></figure><p>Cloud computing has become a hot topic nowadays. With the increasing number of companies shifting to the cloud, it has become interesting why and how they choose a certain provider. The three main leaders in the market are AWS, Microsoft Azure, and Google Cloud. The article aims at describing the strengths and weaknesses of each of them.</p><p>Synergy Research Group noted in their paper that 33% of the market share belongs to Amazon (2020). Then came Microsoft, having an 18% share. Lastly, Google Cloud was mentioned with around 10% of market share. However, this ranking does not mean that the best one is the AWS, and the worst is Google Cloud. Each of them has its own strengths and weaknesses, and depending on what your organization is doing, the best one might vary.</p><p>Even though Google Cloud has the least market share among the three, it has one of the most supportive programs for AI, which is increasing in popularity. It is projected that because of this fact alone, the share of Google in this market is going to rise significantly. With the introduction of Google Machine Learning Engineer Certification, which implies several years of experience developing machine learning models on Google Cloud, the number of practitioners is expected to rise.</p><p>However, Amazon also offers similar certification for its machine learning engineer users, and this certificate is even more popular than Google’s. The reason is that it was launched much before Google did and already marketed its offerings to the potential market. It becomes a matter of time to wait and see which platform takes over in the AI/ML side of the market.</p><h3>Key Differences</h3><p>The biggest of them is AWS, hosted by Amazon, one of the top players in the market. AWS was established the first and is one of the most experienced cloud providers in the market. It offers more variety of services and can be considered a “veteran” of cloud computing. AWS is present in the biggest number of regions, as compared with its competitors.</p><p>The next one to come was Microsoft Azure, which has less variety than AWS but is more suitable for enterprise customers. The reason is the high level of support for this group of customers. Azure is one of the key players in the market, as it showed a considerable amount of progress. The number of regions for this provider is less than that of AWS, but still quite satisfactory.</p><p>The newest among all three is Google Cloud Platform, backed by Google, one of the most important companies in the tech industry. Since its establishment, Google Cloud has proven itself as one of the most reliable and up-to-date cloud services present in the market. Google Cloud is available only in 20 regions, which is more than three times less than AWS, and two times less than Microsoft Azure.</p><p>Let’s review the pros and cons of each of the platforms to see the major differences.</p><h4>AWS</h4><p>What makes AWS the leader among all three, is its maturity as shown by the huge number of various services offered as well as a significant number of data centers worldwide. However, it is one of the most ambiguous options when it comes to cost. The pricing of AWS is usually found confusing, which makes it hard for its customers to efficiently manage the costs. This aspect makes AWS less preferred for small businesses, which have a high dependency on the cost structure.</p><h4>Microsoft Azure</h4><p>The major benefit of Azure is its integration with other Microsoft services. A significant deal of companies worldwide use Windows and other products of Microsoft, which means this integration is beneficial for them. Microsoft also keeps its customers by providing significant discounts for corporate packages and other benefits. However, it also comes with its own cons, such as the lack of proper documentation, training, and imperfect experience with the platform overall. Usually, the clients rank it as less user-friendly compared to AWS, which is one of the reasons why it still falls behind its competitor.</p><h4>Google Cloud</h4><p>The reason for Google’s popularity is the support for artificial intelligence, machine learning, and overall data management. Google has high computing power, as the platform is considered to be used by data and power-intensive tasks. The company has a significant number of data centers and the experience is extremely fast. As a specialist, who used their services, I can tell that if you are in ML or AI, you should definitely go for Google Cloud.</p><p>However, Google Cloud also has its downsides. It has fewer ties with corporations and does not offer the same corporate benefits as its competitors, thus making the service less attractive for enterprise customers. However, the situation is changing as the company realizes the need to align with this segment of the market. Apart from that, as Google Cloud is the youngest of the three, it has much less variety of offered services than its competitors.</p><h3>So what should I choose?!</h3><p>From the above analysis, we can see that each of the providers has its own ups and downs and there is no universal best for you and your company. Here are a few tips you should consider while choosing your provider.</p><p>Firstly, if you need a mature provider that will have almost anything you might need, and you do not need much-tailored solutions, you can go for AWS. Of course, if the cost is not an issue. You should also consider that this option suits best for public cloud.</p><p>Secondly, if you are a loyal user of Microsoft products and have the vast majority of their offerings, then Microsoft Azure might be a great choice. Considering its success in hybrid cloud, this provider might be the best for corporations.</p><p>Lastly, those who need high speed and data processing capability should choose Google Cloud. Even though this is the youngest of the three, the reputation of GCP is rising each year as the platform proves it to be one of the best for AI and ML. This will also be a good option for small companies that do not need a high variety of services and have a limited budget.</p><p>That’s it ;) Hope you found the article useful! Let me know if you have any comments or suggestions for the topic. For more info refer to these articles:</p><ul><li><a href="https://www.datamation.com/cloud-computing/aws-vs-azure-vs-google-cloud-comparison.html">AWS vs. Azure vs. Google: Cloud Comparison</a></li><li><a href="https://intellipaat.com/blog/aws-vs-azure-vs-google-cloud/">AWS vs Azure vs Google Cloud - Detailed Cloud Comparison</a></li><li><a href="https://www.computerworld.com/article/3429365/aws-vs-azure-vs-google-whats-the-best-cloud-platform-for-enterprise.html">AWS vs Azure vs Google Cloud: What&#39;s the best cloud platform for enterprise?</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3dcb2fa48556" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Agile Data Science: Does it really work?]]></title>
            <link>https://frmusazade.medium.com/agile-data-science-does-it-really-work-1aa174d6a44d?source=rss-b9464cc8df3b------2</link>
            <guid isPermaLink="false">https://medium.com/p/1aa174d6a44d</guid>
            <category><![CDATA[kanban]]></category>
            <category><![CDATA[scrum]]></category>
            <category><![CDATA[agile]]></category>
            <category><![CDATA[agile-data-science]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Fidan Musazade]]></dc:creator>
            <pubDate>Sun, 06 Dec 2020 18:34:05 GMT</pubDate>
            <atom:updated>2020-12-06T18:36:07.435Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/750/0*NBqzDvS7icdb9zdc.jpg" /><figcaption>To be, or not to be, that is the question</figcaption></figure><p>Agile has become some kind of hype nowadays. There is an increasing number of vacancies in most of the companies for Agile Coaches, Scrum Masters, etc.</p><p>However, usually, most of these specialists are hired to work for Software Development departments. Now, with the increase in the popularity of data science, the question arises. Do we also need to implement Agile in that department?</p><h4><strong>Overview of Agile</strong></h4><p>First, let’s decide on what <strong><em>Agile</em></strong> is and what it is not. According to the Agile Alliance, “agile is the ability to create and respond to change”. This is a <strong><em>philosophy</em></strong> rather than some technology. Agile concerns the way of thinking and aims at changing the values and beliefs of people.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*eg0wahvOse_B9ktc.jpg" /><figcaption>What we think of when we hear the word “philosophy”</figcaption></figure><p>This is a very powerful instrument in helping companies to efficiently work in unstable environments. However, Agile is not a magical instrument. Let’s start by examining what it is not.</p><ol><li>Agile is not a tool to completely omit <em>planning. </em>It still requires teams to efficiently plan sprints and have a global plan for the project.</li><li>Agile is not <em>undisciplined</em>. It does not eliminate deadlines and responsibilities. Even though the deadlines are set by people who work on them, they should still be reasonable.</li><li>Agile is not <em>new and unproven</em>. There is tons of evidence of the effects of agile. The concept did emerge long before the Agile Manifesto was created.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qNkbMD2l9TDs_OkXf2GSoQ.png" /><figcaption>History of Agile</figcaption></figure><p>Now on what Agile is. Agile is for all departments, not only for Software Development. Yes, it has more evidence coming from development teams, however, it can also be applied to other departments.</p><h4><strong>Data Science vs Software Development</strong></h4><p>As opposed to Software Development, it is hard to show results in Data Science projects. Most of the work done consists of research and implementation of certain techniques, which may have unclear results for people outside the team.</p><p>This creates an issue in such rituals of Agile, such as <em>demos</em>. Every 2 or 3 weeks the teams using Agile methodology, have a demo ritual, which involves showing the stakeholders what they have done in the sprint. The period may be more or less depending on the team but generally is around two weeks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/605/0*wMLdZZUYtX8oprux.jpg" /><figcaption>How data scientists show analysis results</figcaption></figure><p>In a software development project, it is rather easy to show a result. For example, this spring some button was added that was not present before, or some bug is eliminated. Pretty straightforward.</p><p>You know what you are working with on a software development project, there are clear expectations and deliverables that you need to meet. However, DS projects are like research tasks you get at university. No one knows what you will get at the end.</p><p>Here, Forrest Gump’s mom got it right, when she said “Data Science is like a box of chocolates. You never know what you’re gonna get”. xD</p><h4><strong>Data Science and Agile</strong></h4><p>So let’s talk about why you should use Agile for DS projects if there is so much trouble associated.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*C8WNv0uopPIZiPr1.png" /><figcaption>Spring Planning in Real Life (or no :D)</figcaption></figure><p>First of all, Agile brings mandatory <strong><em>planning</em></strong> to the process. At the beginning of each sprint, teams have a Sprint Planning ritual, which makes the team think of tasks for this sprint and define deadlines. This positively affects the projects as they become more organized and less messy.</p><p>Secondly, the team can <strong><em>clearly see</em></strong> at what stage they are, what are the blocks they face, and what they should do to move from one stage to another. Agile teams usually have boards that show the tasks, the category of these tasks, and at what stage the task is. For example, let’s say the specialist had a task of model validation but needs the approval of another department to finalize the issue, then this task can be moved to the “blocked” column. This visualization helps the team to spot the bottlenecks in a timely manner and fix them.</p><p>Thirdly, having <strong><em>retrospectives</em></strong> is beneficial for the team. By recapping everything that happened during a sprint, the team is able to look backward and define what happened wrong, what could be better, and what actually stood up. This ritual brings benefits to DS projects, as it could help the team to spot the problems earlier.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/850/0*pvisw4VR5sfPFG1i.jpg" /><figcaption>Feedback</figcaption></figure><p>Another benefit of Agile is getting <strong><em>feedback</em></strong> at the end of each iteration. It is vital to know what you are doing wrong in order to be able to fix it. Sometimes, your research may go wrong in the beginning and the whole project could depend on that error. Fixing it at the end could be a real pain, so spotting it early on is definitely a win.</p><p>But you have to keep in mind some challenges that come with these benefits. Teams have to be careful when loosening up the deadlines and letting everyone decide on their own timeframes. Some could exploit it.</p><p>It also could be hard to define deadlines as most of the challenges are hard to spot before starting the task. For example, the data to be used could be not as clean as expected and need additional processing. In these cases, the extension of the deadline is reasonable as more work came up.</p><p>Overall, Agile is there and it works not only for developers but also for data scientists. Even though there are some practical challenges, the benefits usually outweigh them. So to the question “does Agile work for DS projects” the answer is YES. But remember to be careful ;)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1aa174d6a44d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A practical guide to passing data between UIViewControllers using Delegates]]></title>
            <link>https://frmusazade.medium.com/a-practical-guide-to-passing-data-between-uiviewcontrollers-using-delegates-650f5a30b91e?source=rss-b9464cc8df3b------2</link>
            <guid isPermaLink="false">https://medium.com/p/650f5a30b91e</guid>
            <category><![CDATA[swift-programming]]></category>
            <category><![CDATA[ios-app-development]]></category>
            <category><![CDATA[uiviewcontroller]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[swift]]></category>
            <dc:creator><![CDATA[Fidan Musazade]]></dc:creator>
            <pubDate>Thu, 03 Dec 2020 17:01:51 GMT</pubDate>
            <atom:updated>2020-12-03T17:19:41.924Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4-O7GZhL84jdWlXqBi7whg.png" /><figcaption>Pharmacies app</figcaption></figure><p>When developing iOS applications, we usually build a flow where the user takes a series of actions, which acts as an input to further user flow. Most of these actions take place within a single view controller. For example, a button to show/hide password fields where its action only affects the same view controller. However, in some cases, we end up with a flow that takes the user to another screen to make a decision whose result should be reflected in the previous controller.</p><p>Let’s have a look at a particular use case. Assume we have a view controller that displays a list of pharmacies. In our viewDidLoad method, we call PharmacyService to get the list of pharmacies from the API so that when the user opens this view controller, he/she can see all pharmacies. This list can be long and is randomly sorted. This screen is good for browsing, but if the user intends to focus on a particular pharmacy or group of pharmacies we need to have filtering and sorting options. Luckily in our API, we are provided with an endpoint that can filter and sort pharmacies based on a set of parameters.</p><p>We can, of course, place these filters and sorting options at the top of the UIViewController’s view and apply filter and sorting as a result of API call, but this will block the scrolling experience as it will take a large portion of a screen. For the sake of a better user experience, we can locate the filtering and sorting options in another UIViewController subclass named FilterController.</p><p>Now, the app users can view the list of pharmacies in PharmaciesController and filter these pharmacies by tapping the filter button will open FilterController. The user selects filters in this controller and clicks on the apply button. At this point, the filter endpoint from API will be called, and the user will be transitioned to PharmaciesController with filtered results loaded.</p><p>Let’s try this in action. First, we create PharmaciesController:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/60b56977d55449f853950f5a3bad3182/href">https://medium.com/media/60b56977d55449f853950f5a3bad3182/href</a></iframe><p>And then we create FilterController:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0aba8d38c1e36e187cfc37e010e216de/href">https://medium.com/media/0aba8d38c1e36e187cfc37e010e216de/href</a></iframe><p>Later we continue by creating a delegate.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a33867fe6e2960fdc456af90a674b17e/href">https://medium.com/media/a33867fe6e2960fdc456af90a674b17e/href</a></iframe><p>Here we define a function that will take filtered pharmacies as an argument.</p><p>Next, we add delegate property to FilterController:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f75d0d8cb79eb9a8ef69e187509f69f3/href">https://medium.com/media/f75d0d8cb79eb9a8ef69e187509f69f3/href</a></iframe><p>Whenever filters are applied, and data from API is retrieved we call the didRetrivedPharmacies function and pass filteredPharmacies.<br>pharmacyFilterDelegate?.didRetrievePharmacies(pharmacies: filteredPharmacies)</p><p>To receive updates in Pharmacies controller we apply the below changes:</p><p>Firstly, in handleFilter() method set pharmacyFilterDelegate of filterController instance to self:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/bcc750c8275c8250e29313b38066c7f7/href">https://medium.com/media/bcc750c8275c8250e29313b38066c7f7/href</a></iframe><p>Secondly, conform PharmaciesController to PharmacyFilterDelegate:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b5687708bd0cc20e7209e907453374cf/href">https://medium.com/media/b5687708bd0cc20e7209e907453374cf/href</a></iframe><p>And lastly, implement didRetrievePharmacies function of the delegate:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b428f20598e042d14e1bf97effe7d902/href">https://medium.com/media/b428f20598e042d14e1bf97effe7d902/href</a></iframe><p>As a result, we passed the required data and achieved our goal.</p><p>This is it, hope you enjoyed :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=650f5a30b91e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Magical Power of Convenience Initializers in Swift]]></title>
            <link>https://frmusazade.medium.com/the-magical-power-of-convenience-initializers-in-swift-4abad9c923c5?source=rss-b9464cc8df3b------2</link>
            <guid isPermaLink="false">https://medium.com/p/4abad9c923c5</guid>
            <category><![CDATA[ios-app-development]]></category>
            <category><![CDATA[swift-programming]]></category>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[ios]]></category>
            <dc:creator><![CDATA[Fidan Musazade]]></dc:creator>
            <pubDate>Sun, 29 Nov 2020 17:02:11 GMT</pubDate>
            <atom:updated>2020-11-29T17:02:11.808Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/735/0*TGFRYecIEl4M-KV2.jpg" /></figure><p>Classes group a set of behaviors and properties of an object by abstracting some parts of code that need to remain unknown to its user while keeping some other parts open for change. Often as software engineers, we work with classes that have been composed by other developers.</p><p>While mostly the way these classes are designed to fit our purposes, sometimes they lead to code duplication, unnecessary inheritance, and other similar problems. Some of these problems can easily be fixed if the programming language we write our code enabled us to create constructors (initializers from now on) according to our needs.</p><p>For example, every time we initialize a UICollectionView, we call UICollectionView(frame:collectionViewLayout:) specifying its frame and layout. However, does this initializer satisfy our needs? Of course, not. We have not specified the background color for the collection view (which is black for some reason by default), we have not specified its delegate, dataSource, or registered a cell class with an identifier for it. Thus every time we initialize a UICollectionView we also need to specify all those values as below:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/17552cd5e9d64ba0a7d9e68e41085691/href">https://medium.com/media/17552cd5e9d64ba0a7d9e68e41085691/href</a></iframe><p>Now we can assume we have fully initialized a collectionView, and it is ready for use. What if we need to use a collection view not in one place but multiple other occurrences? The first idea that comes to mind is to copy/paste the above code. Although this fixes our problem, it causes yet another problem — DUPLICATE CODE. Well, what we can do to avoid it?</p><p>We can, of course, subclass UICollectionView and do this:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6e55d98b5cea65ac6977b9a62b9b721f/href">https://medium.com/media/6e55d98b5cea65ac6977b9a62b9b721f/href</a></iframe><p>However in this case:</p><ul><li>We hardcode the number of cells.</li><li>We hardcode the background-color</li><li>We hardcode cell class</li><li>We hardcode delegate</li></ul><p>Fortunately Swift enables us to use a feature called convenience initializers. What is it? Let us see in action:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/cdf4de765627340f95b4e1236deba40a/href">https://medium.com/media/cdf4de765627340f95b4e1236deba40a/href</a></iframe><p>The above code now will enable us to initialize the UICollectionView according to our needs, fully-customizable without code duplication, inheritance:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/287b12695edd6a6b961852b05c075c11/href">https://medium.com/media/287b12695edd6a6b961852b05c075c11/href</a></iframe><p>That is it. The UICollectionView instance is ready for use.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4abad9c923c5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[REST API — Interview Preparation]]></title>
            <link>https://frmusazade.medium.com/rest-api-interview-preparation-ff6f83484c73?source=rss-b9464cc8df3b------2</link>
            <guid isPermaLink="false">https://medium.com/p/ff6f83484c73</guid>
            <category><![CDATA[web-services]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[rest-api]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Fidan Musazade]]></dc:creator>
            <pubDate>Fri, 27 Nov 2020 14:37:11 GMT</pubDate>
            <atom:updated>2020-11-27T14:37:11.746Z</atom:updated>
            <content:encoded><![CDATA[<h3>REST API — Interview Preparation</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/938/0*WNmooPgwRuqNi389.png" /><figcaption>Source: Seobility</figcaption></figure><p>It is commonly known that many programming interviews may include questions related to APIs, and most probably REST API. So this article aims to give you five possible questions and answers to expect at an interview. Enjoy! :)</p><p><strong><em>1.What is the REST API?</em></strong></p><p>In short, REST stands for Representational State Transfer. This is a set of guidelines to use when developing a web service. Those services that comply with these guidelines are called RESTful services. There are six main principles of a REST architecture:</p><ul><li>There is a division between client and server</li><li>REST API is stateless</li><li>It is cacheable</li><li>The interface is uniform</li><li>The system is hierarchically layered</li><li>Optional: code on demand</li></ul><p><strong><em>2. What are the differences between REST and SOAP?</em></strong></p><p>SOAP stands for Simple Object Access Protocol. Key differences:</p><ul><li>While SOAP is a protocol, REST is rather an architectural pattern.</li><li>SOAP requires more bandwidth than REST.</li><li>SOAP is compatible with XML, while REST can work with text, XML, HTML, and JSON.</li><li>SOAP cannot usee REST, while REST can use SOAP.</li><li>SOAP cannot be cached, while REST can.</li></ul><p>There are also other minor differences, but these should be enough to note.</p><p><strong><em>3. What are the benefits of REST API?</em></strong></p><p>First of all, as the client and the server are clearly separated, it becomes easier to scale the application up and add new functionality. Furthermore, portability to other platforms is also improved by this.</p><p>Secondly, the separation mentioned above makes the application more reliable and the possibility to easily scale. This advantage also concern the independence of API. It is independent and can work on any platform. For example, you can use Python, PHP, Java and other servers.</p><p><strong><em>4. Name some of REST API security threats</em></strong></p><ul><li>Injection attacks</li><li>DoS attacks</li><li>Broken authentication</li><li>Sensitive data exposure</li><li>Broken access control, etc.</li></ul><p><strong><em>5. What is a “Resource” in RESTful web services?</em></strong></p><p>Anything that can be named. Example: document, image, virtual object, etc. Resource identifier is used to name a particular resource. Resources also have resource representations. This is data, metadata and hypermedia links associated with a resource at a given time.</p><p>These are some of the basic questions that you can expect. This topic can be extended to cover request types, security details and other relevant sections.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ff6f83484c73" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Object-Oriented Programming in C++]]></title>
            <link>https://frmusazade.medium.com/object-oriented-programming-in-c-b4fdcd463991?source=rss-b9464cc8df3b------2</link>
            <guid isPermaLink="false">https://medium.com/p/b4fdcd463991</guid>
            <category><![CDATA[object-oriented]]></category>
            <category><![CDATA[c]]></category>
            <category><![CDATA[c-programming]]></category>
            <category><![CDATA[polymorphism]]></category>
            <category><![CDATA[encapsulation]]></category>
            <dc:creator><![CDATA[Fidan Musazade]]></dc:creator>
            <pubDate>Sun, 22 Nov 2020 19:11:24 GMT</pubDate>
            <atom:updated>2020-11-22T19:11:24.309Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/770/0*RHmgvzQRP8IouCyF.png" /><figcaption>Source: OnceHub</figcaption></figure><p>C++ is one of the most powerful languages currently present. And, believe it or not, one of the reasons it emerged, is support for OOP (object-oriented programming).</p><p>OOP means creating and interacting with objects instead of writing procedural code. If you imagine a human being as a class, for example, it may have subclasses of Female and Male, and so on. There are various benefits brought by OOP support in the language, however, that is out of the scope of the current discussion. The article aims at exploring how OOP is supported in C++.</p><p>As with any objects, C++ objects have methods and properties. Methods are represented as functions that can be used on a given object and properties are data about a given object. For example, a class Dog may have properties of the breed, color, age, and methods of run, bark, and so on. This is how a sample C++ class looks like:</p><pre>#include &lt;iostream&gt;<br>using namespace std;</pre><pre>class Dog<br>{<br>    //properties<br>    char name[20];<br>    char breed[20];<br>    int age; </pre><pre>public:<br>    //methods<br>    void run(){ cout &lt;&lt; &quot;Running&quot; &lt;&lt; endl;}<br>    void bark(){ <br>        if (self.age&lt;20) cout &lt;&lt; &quot;Hav-hav&quot; &lt;&lt; endl;<br>        else cout &lt;&lt; &quot;Woof-woof&quot; &lt;&lt; endl;}<br>};<br> <br>int main()<br>{<br>   //barkie is an object of class Dog<br>   Dog barkie; <br>}</pre><p><strong>Encapsulation</strong></p><p>As in other OOP supporting languages, in C++, you put the data and functions associated with a certain class inside the class definition and therefore can make properties private and have public methods to modify them. For example, one may have getters and setters to access and modify data. Let’s extend our previous code to have this concept:</p><pre>#include &lt;iostream&gt;<br>using namespace std;</pre><pre>class Dog<br>{<br>private:<br>    //properties<br>    char name[20];<br>    char breed[20];<br>    int age;</pre><pre>public:<br>    //methods<br>    void run(){ cout &lt;&lt; &quot;Running&quot; &lt;&lt; endl;}<br>    void bark(){ <br>        if (self.age&lt;20) cout &lt;&lt; &quot;Hav-hav&quot; &lt;&lt; endl;<br>        else cout &lt;&lt; &quot;Woof-woof&quot; &lt;&lt; endl;}<br>    void setAge(int age){self.age = age;} // setter<br>    int getAge() {return self.age;} // getter</pre><pre>};<br> <br>int main()<br>{<br>   //barkie is an object of class Dog<br>   Dog barkie; <br>   barkie.setAge(20); //now barkie&#39;s age is 20<br>   cout &lt;&lt; barkie.getAge(); //this will print 20<br>}</pre><p><strong>Abstraction</strong></p><p>It is possible in C++ to hide internal details of the program and provide only meaningful methods to execute them. For example, if something can be calculated inside the class using data and methods present, abstraction can be achieved by hiding those details and having only method call in the main part of the program. Looking at our example above, we do not care about how the bark of the dog is implemented, we call bark on our object and get the output expected.</p><p><strong>Inheritance</strong></p><p>Objects in C++ can also have parents and inherit their properties and methods. This makes it possible to build a basic class and extend it to newer objects. For example, we could have an Animal class and extend it to get Dog, Cat, and other classes.</p><pre>class Animal {<br>    // eat() function<br>    // sleep() function<br>};<br><br>class Dog : public Animal {<br>    // bark() function<br>};</pre><pre>class Cat: public Animal {<br>    // meow() function<br>};</pre><p>We could have a blueprint for an animal and later create similar functions. This powerful feature makes C++ even more powerful.</p><p>With the addition of inheritance, some aspects become vaguer. For example, are private features inherited? What about protected and public? The answer is quite simple. <strong><em>Private</em></strong> features are not inherited. If we want to restrict the access from outside the class, but want the property or method to be inherited we need to use <strong><em>protected</em></strong>. As it is logically expected, <strong><em>public</em></strong> ones can be accessed from anywhere and are inherited.</p><p>Now regarding how we inherit classes. In the examples above, we use public <strong>access mode. </strong>However, there are two more options possible: private and protected. Now on the differences:</p><ol><li><strong>Public </strong>access mode makes the class inherit everything as they are. For example, if age is public property in the parent’s definition, it is inherited as public.</li><li><strong>Private </strong>access mode makes everything private when inherited.</li><li><strong>Protected </strong>access mode converts all public members to protected.</li></ol><p>Overriding is also possible in C++. If parent class and child class have a member with the same name, the child’s member is used.</p><p><strong>Polymorphism</strong></p><p>Last, but not least, polymorphism is also supported. It refers to the ability of the object to take on many forms. There are, in total, four ways to use polymorphism in C++: function overloading, operator overloading, function overriding, and virtual functions.</p><p>For example, two functions could have the same names and have different arguments. And then, depending on the arguments, one of them is called. This is called <strong><em>function overloading</em></strong>. Example code:</p><pre>#include &lt;iostream&gt;<br>using namespace std;</pre><pre>int calcSalary(int base, int premium) {<br>    return base + premium;<br>}</pre><pre>double calcSalary(double ratio, double base) {<br>    return base*ratio;<br>}</pre><pre>int calcSalary(int base, int premium, int bonus) {<br>    return base + premium + bonus;<br>}</pre><pre>int main(void) {<br>    cout &lt;&lt; calcSalary(5, 10); //15 is printed<br>    cout &lt;&lt; calcSalary(0.5, 1500.0); //750 is printed<br>    cout &lt;&lt; calcSalary(1000, 100, 100); //1200 is printed<br>    return 0;<br>}</pre><p>Another possible option is <strong><em>operator overloading. </em></strong>Here, we can define a new logic for a usual operator we know. However, you cannot do it for primitive types, such as <em>int, double, float, etc. </em>Example:</p><pre>#include &lt;iostream&gt;<br>using namespace std;</pre><pre>class Human {<br>private:<br>    int age;<br>    char name[20];<br>public:<br>    void operator ++() {age = age + 1;} //operator overloading<br>    void setAge(int age) {self.age = age;}<br>};</pre><pre>int main(void) {<br>    Human fidan;<br>    fidan.setAge(22);<br>    fidan++; //now age is 23<br>}</pre><p>As discussed in the previous section, functions can be overridden in child classes, and depending on the object calling this function, the same function can execute differently. For example, Animal class may have an “eat” function. If Dog class inherits from Animal and also has an “eat” function written explicitly in Dog, then if “eat” is called on Dog, it will perform what is in Dog’s specification. But if you call “eat” on Animal, its eat function will be performed. This is known as <strong><em>function overriding</em></strong>.</p><p>Another important concept in C++ is <strong><em>virtual functions</em></strong>. These functions are used when we use pointers of the parent class to point at child class. In this case, to make sure that the function is overridden, we have to use virtual keyword.</p><pre>#include &lt;iostream&gt;<br>using namespace std;<br><br>class Parent {<br>   public:<br>    virtual void print() {cout &lt;&lt; &quot;I am the parent&quot; &lt;&lt; endl;}<br>};<br><br>class Child: public Base {<br>   public:<br>    void print() {cout &lt;&lt; &quot;I am the child&quot; &lt;&lt; endl;}<br>};<br><br>int main() {<br>    Child childInstance;<br>    Parent* parentPoint = &amp;childInstance;<br>    parentPoint-&gt;print(); //this will print &quot;I am the child&quot;<br>    return 0;<br>}</pre><p>Therefore, we have achieved overriding by making the parent’s function virtual.</p><p>With this, we have covered all of the essentials in C++’s OOP support. Feel free to reach me for any comments and suggestions for the post. Hope you enjoyed it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b4fdcd463991" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>