<?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 Pedro Oliveira on Medium]]></title>
        <description><![CDATA[Stories by Pedro Oliveira on Medium]]></description>
        <link>https://medium.com/@pedromoliveira?source=rss-1101e77ae57a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*1Wc713_aTo8EfUNrBgYznw.jpeg</url>
            <title>Stories by Pedro Oliveira on Medium</title>
            <link>https://medium.com/@pedromoliveira?source=rss-1101e77ae57a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 21:24:06 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@pedromoliveira/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[Privacy in today’s biggest tech companies]]></title>
            <link>https://medium.com/@pedromoliveira/privacy-in-todays-biggest-tech-companies-fd92f5e6ade1?source=rss-1101e77ae57a------2</link>
            <guid isPermaLink="false">https://medium.com/p/fd92f5e6ade1</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[google]]></category>
            <category><![CDATA[facebook]]></category>
            <category><![CDATA[apple]]></category>
            <category><![CDATA[privacy]]></category>
            <dc:creator><![CDATA[Pedro Oliveira]]></dc:creator>
            <pubDate>Tue, 02 Jul 2019 05:46:52 GMT</pubDate>
            <atom:updated>2019-07-02T05:46:52.769Z</atom:updated>
            <content:encoded><![CDATA[<h4>How 3 tech giants are handling the privacy topic</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kaoWFi0e9qxj-0J43N_dpQ.png" /></figure><p>In recent years, privacy has become a hot topic in technology, after countless scandals that exposed internet users’ data to the public. A subject often overlooked by the general audience in the past, it is now a crucial factor in the society we live in. People increasingly think about what they want “the outside world” to know, and what should be kept private.</p><p>Apple, Facebook and Google are the key stakeholders in this so-called privacy industry, as their products are used by billions of people every day. Apple has almost rebranded itself as a privacy-as-a-service company in recent years, highlighting its efforts on the sector. Contrastingly to their past, Facebook and Google are now “fighting” to show they care about their users’ privacy, while making millions with user personalized ads.</p><p>How did we get to such concerns about privacy? This article will touch on the past, present and (foreseeable) future of privacy, giving an insight into its evolution.</p><h3><strong>The road until now</strong></h3><p>Facebook’s first privacy polemic came in November 2007, three years after launching, with <a href="https://techcrunch.com/2018/04/10/a-brief-history-of-facebooks-privacy-hostility-ahead-of-zuckerbergs-testimony/">program Beacon</a>. It published user’s online purchases (in third-party websites) in the News Feed, without their knowledge. Eventually leading to a class action lawsuit, which Facebook settled for $9.5 million, the program shut down in 2009.</p><p>As Facebook grew, so did the scandals, and many governments (such as those of the <a href="https://techcrunch.com/2010/04/27/senators-call-out-facebook-on-instant-personalization-other-privacy-issues/">USA</a>, <a href="https://techcrunch.com/2011/12/21/audit-privacy-changes/">Ireland</a> and even the <a href="https://techcrunch.com/2015/02/23/facebook-ad-network/#.1sssm6k:PiE2">EU</a>) started to question Facebook’s privacy terms. The USA Federal Trade Commission (FTC), responsible for consumer protection, investigated many complaints, leading to several changes in Facebook’s privacy terms as well as biennial audits.</p><p>The biggest scandal happened during the 2016 USA presidential election, but only came to the surface in 2018 through a <a href="https://www.nytimes.com/2018/03/17/us/politics/cambridge-analytica-trump-campaign.html">NY Times exposé</a>, which revealed that 50 million raw Facebook profiles had been “extracted” via an app for research purposes. Such data aided in building psychographic models (i.e. establishing specific psychological trails such as political views, life satisfaction and IQ) used for political messaging targeting in favor of <a href="https://www.theguardian.com/us-news/2015/dec/11/senator-ted-cruz-president-campaign-facebook-user-data">Ted Cruz’s Republican nomination</a> and Donald Trump’s 2016 Presidential campaigns.</p><p>At the time, this data breach, done by the now infamous Cambridge Analytica political firm, was possible as <a href="https://techcrunch.com/2015/04/28/facebook-api-shut-down/">Facebook had a “Friends API”</a> (Application Programming Interface) that allowed developers to extract their friends’ data without their knowledge. The Cambridge Analytica app was consciously used by 270,000 paid individuals and, from those profiles, garnered information on 50 million unaware users.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/950/1*hHqWP21RVlcrLgCKjxQu9A.png" /><figcaption><em>Christopher Wylie: the whistleblower in Cambridge Analytica’s scandal (Dan Kitwood/Getty Images)</em></figcaption></figure><p>Just as Facebook obtains information on each user, so does Google, perhaps to an even bigger extent due to the services it offers. The company gathers massive amounts of data from our daily used apps, such as Google Maps, YouTube or Gmail. For example, Google Maps can show you track records on your time and place at a particular day, just pick the date!</p><p>All this information is then used, as Facebook’s, for ad targeting. The user data is not sold to third-party companies, but used to tailor advertisements to the user’s interest, thus potentially increasing the clicking rate on them.</p><p>Google has also had its fair share of scandals. In the past, it scanned Gmail user inboxes of its free users, eventually <a href="https://techcrunch.com/2017/06/23/google-has-all-the-data-it-needs-will-stop-scanning-gmail-inboxes/">stopping this practice in 2017</a>, after years of data collection. Furthermore, in 2018, the <a href="https://www.apnews.com/828aefab64d4411bac257a07c1af0ecb">Associated Press (AP)</a> revealed Google still tracks a user’s location in Androids &amp; iPhones after the user turns off the location access setting.</p><p>However, it should be noted that Google outplays Facebook in protecting your data from hackers and yourself from phishing. The amount of data leaks and scandals originated from Google are far less than those by Facebook. Yet, it is still exploiting your data at its own benefits, to make more profits.</p><p>In opposition stands Apple, a company with fundamentally-different views to Google or Facebook on privacy, and more transparency on how it handles user’s data.</p><p>Apple strives to keep its users informed on <a href="https://www.apple.com/privacy/approach-to-privacy/">how its privacy is protected</a> while using its apps. Some of the features it offers are the following:</p><ul><li>End-to-end encryption in FaceTime and iMessage.</li><li>No access to user’s contact information or conversations by third-party apps using iMessage.</li><li>Incognito mode &amp; third-party cookies blocked in Safari.</li><li>Differential Privacy used, such that random information is added to user data before being analyzed by Apple, making it impossible to associate it to a user.</li></ul><p>You might be asking yourself: how can Apple be so transparent while Facebook and Google are not? It all comes down to the business model of each of these companies.</p><h3><strong>The business model</strong></h3><p>The figure below shows the different revenue streams for each of the three companies during the 2018 financial year. Note that Google is a subsidiary of Alphabet, which owns other companies, including DeepMind.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FIIGGxirHvFgEoUuvQ92bw.png" /><figcaption>Revenue in 2018 for Apple, Alphabet and Facebook (Data source: Annual filling reports)</figcaption></figure><p>Both Facebook and Google rely almost completely on advertisement to make money, with Facebook collecting $55 billion (98.5% of its total revenue) and Alphabet collectively making $116.3 billion in revenue in 2018 (85% of its total revenue).</p><p>Comparing this data, we can see that Apple relies mostly on its hardware products (which represent 86% of its revenue) to make money, with services also playing a big role.</p><p>From these financial results, each company’s business model can be inferred. Apple builds new hardware products frequently, profiting from them. Google wants you to use their services (Google Maps, Gmail and so on) to be able to build a better profile of your offline self, and then uses that data for ad targeting. Facebook has a similar business model to Google but acquires personal information through your interactions on its social network to build such profiles.</p><p>The natural conclusion is that Apple is able to care about its users’ privacy as its profit does not depend on it, while Google and Facebook’s earnings are directly dependent on their users’ data, so a balance between money interest and responsibility for user privacy must be found.</p><h3><strong>Present efforts into privacy</strong></h3><p>In the ever-evolving technological world we live in, the average customer has now become much more aware of privacy-related issues. This has pushed many companies to emphasize it inhopes of gaining the client’s trust.</p><p>To begin with, Apple has recently highlighted its views on privacy and the protection its devices offer. Tim Cook, Apple’s CEO, recently spoke at a privacy conference, <a href="https://time.com/5433499/tim-cook-apple-data-privacy/">declaring</a> “We at Apple believe that privacy is a fundamental human right” going on to critique companies like Google or Facebook, calling their user data collection “surveillance” and even that “personal data serve[s] only to enrich the companies that collect them.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1fV6UzdspzWZ_yFtDLLU3g.jpeg" /><figcaption>Apple’s ad in Las Vegas ahead of the CES 2019 conference (Getty)</figcaption></figure><p>In light of this strategy, its 2019 Worldwide Developer Conference (WWDC) came with a few key privacy announcements for iOS 13 (the iPhone’s Operating System):</p><ul><li><strong>Addition of the option “just once” for app access to location</strong> (previously the options were “always”, “while using” or “never”), thus decreasing user tracking.</li><li><strong>Permanently disable access to private notes in Contacts’ entries</strong> when user gives app access to it. This is particularly important as many people store important information there, such as card pins and document numbers.</li><li><strong>Introduction of a Single Sign-On (SSO) feature “Sign in with Apple”</strong>. Its perk lies in user authentication via <em>TouchID</em>/<em>FaceID </em>(without submitting any personal information via social account logins) and the choice to provide a real email address or a relay, hence not sharing any private data.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WvbVMrZUBG6WLJnUmwYvjw.jpeg" /><figcaption>Apple’s announcement of its SSO tool at this year’s WWDC (Apple)</figcaption></figure><p>Traditionally, SSO tools are convenient for the user but can also come at a privacy cost, as sensitive data can be shared and lead to online tracking. This can be the case with Google or Facebook as they have access to your data.</p><p>Is Apple’s SSO tool “too good to be true”? While some have questioned the feature’s adoption by developers (who need users’ data for marketing purposes), Apple will in fact <a href="https://developer.apple.com/news/?id=06032019j">require</a> its SSO to be included in all App Store’s apps which accept third-party sign in.</p><p>Similar to Apple’s, Facebook’s focus at its annual F8 developer conference this May was privacy. Mark Zuckerberg proudly announced “The future is private” at the start of his keynote. Yet, what came next truly showed that it is indeed the future, not the present.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9QWUDvI9PEyW8CdpL4f9-Q.jpeg" /><figcaption>Mark Zuckerberg at 2019’s F8 developer conference (Tony Avelar/AP)</figcaption></figure><p>In a <a href="https://www.facebook.com/notes/mark-zuckerberg/a-privacy-focused-vision-for-social-networking/10156700570096634/">note</a> shared on his Facebook page back in March 2019, prior to the conference, the company’s CEO shared some long-term goals to hopefully bring a more privacy-focused social network. These included end-to-end encryption, a reduction in messaging permanence and secure data storage.</p><p>In the actual conference, even though the importance of privacy was repeatedly acknowledged, a concrete action plan of feature implementation or release was <a href="https://techcrunch.com/2019/05/07/show-dont-tell/">nowhere to be found</a>. In the end, a focus on its shift of strategy to a more Groups-focused network, effectively decreasing the public content that must be answered for by Facebook, took center stage.</p><p>Contrarily, Google showed in its annual I/O developer conference, also hosted this May, how you can have a “bad record” in privacy and try to improve.</p><p>Among the features announced were:</p><ul><li><strong>Incognito mode for YouTube, Google Maps and Search applications</strong>, allowing your activity to no longer be linked to your Google account.</li><li><strong>Ability to delete data from Google Assistant</strong>, for example all voice recordings from a specific time period.</li><li><strong>Block third-party website from using cookies set-up by other websites</strong>, helping online tracking prevention.</li></ul><p>In addition, Federated Learning (a novel machine learning approach that allows ML models to be trained on end devices) was <a href="https://techweez.com/2019/05/08/the-present-is-private-googles-commitment-to-privacy/">leveraged</a> in many applications, moving the data to be processed on-device and therefore not sent to Google. This approach is already used in Nest Home Max’s facial recognition feature.</p><p>In the past months, Google also announced a number of other privacy-related releases. Among them, an “Auto-Delete” feature which allows a user to pick a time frame (between 3 to 18 months) for its data to live before being automatically deleted. Your entire location history, web and app activity is then regularly removed after a maximum of 18 months, with Google not using it to tailor personal recommendations. It has since <a href="https://techcrunch.com/2019/06/26/google-launches-auto-delete-controls-for-location-history-on-ios-and-android/">started rolling out</a> to users. While this doesn’t include your YouTube history or voice/audio activity, it’s a step forward for user privacy.</p><h3><strong>The future of privacy</strong></h3><p>Following the European Union’s General Data Protection Regulation (GDPR — EU law regarding data protection &amp; privacy), companies face added pressure to provide more privacy-focused products, particularly if other countries follow with some rules of their own.</p><p>Historically, Google has given the user some privacy controls. In past months, it has either announced or released new user-defined privacy settings, letting the customers pick which data to share but also publicizing what it can do if given the data, with the introduction of several machine learning products. The two questions remaining are then: How much control is Google willing to give away until it affects its profitability? And to what extent does the user forfeit privacy for a better service?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NYFJ5qU633P2qbK1Ql8t7A.jpeg" /><figcaption>Google CEO Sundar Pichai unveiling the new Live Caption AI feature at I/O developer conference 2019</figcaption></figure><p>As for Facebook, it needs to start taking actions, rather than painting a pretty picture. Having the worst track record on privacy, all eyes are on its future approach, both from customers and governments.</p><p>Finally, Apple has been the most vocal company when it comes to privacy. Yet, this attitude can be perceived as hypocritical since it <a href="https://fortune.com/2018/09/29/google-apple-safari-search-engine/">receives billions of dollars yearly from Google</a> for making its Search application default in Safari.</p><p>In fact, <a href="https://www.theatlantic.com/technology/archive/2019/01/apples-hypocritical-defense-data-privacy/581680/">some</a> have suggested Apple should exclude Facebook and Google applications altogether from its App Store, so a change could be achieved. This could come both from a customer switching to a more privacy-aware application or from these companies modifying their data handling practices to not lose business. I guess money does play a role in user privacy after all.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fd92f5e6ade1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to get started in iOS Application Development]]></title>
            <link>https://medium.com/@pedromoliveira/how-to-get-started-in-ios-application-development-9cdd1ecf56b9?source=rss-1101e77ae57a------2</link>
            <guid isPermaLink="false">https://medium.com/p/9cdd1ecf56b9</guid>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[apple]]></category>
            <category><![CDATA[ui]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[application-development]]></category>
            <dc:creator><![CDATA[Pedro Oliveira]]></dc:creator>
            <pubDate>Wed, 01 May 2019 17:36:24 GMT</pubDate>
            <atom:updated>2019-05-01T17:36:24.088Z</atom:updated>
            <content:encoded><![CDATA[<h4>Learn fundamental concepts of iOS, Xcode &amp; Swift by building iOS’ Calculator app!</h4><p>iOS Application Development brings together two components that will dictate the success of any application: User Interface (UI) design and coding the app’s functionality. As such, this article will provide a “beginner’s guide” at both by first introducing <strong>Swift</strong>, iOS’ main programming language, followed by an induction into <strong>Xcode</strong>, application for iOS development, and iOS applications. This knowledge will be used to build iOS’ calculator app from scratch, explaining design concepts alongside the back-end code.</p><h3><strong>Swift: The iOS Programming Language</strong></h3><p>Swift, developed by Apple, substituted Objective-C upon its release in 2014. It is nowadays the primary programming language used for iOS application development.</p><p>Much like other statically typed programming languages, Swift has five primitive types:</p><ul><li><em>Int </em>(integer)</li><li><em>Float </em>(floating point number)</li><li><em>Double </em>(double-precision floating point number)</li><li><em>Bool </em>(boolean)</li><li><em>String</em></li></ul><p>It also inherently supports Loops, Switch cases, Methods, Classes, Arrays and Dictionaries. As for Variables, it provides two options: <em>let </em>(constants) and <em>var </em>(actual variables).</p><h3><strong>A brief introduction to iOS Applications and Xcode</strong></h3><p>The essential platform to start creating iOS applications is Xcode, Apple’s integrated development environment for macOS, which allows software development for its operating systems.</p><p>Upon creating a new iOS single-view application project in Xcode, five files will appear:</p><ul><li><em>AppDelegate.swift</em>: Application delegate class, handling specific app states (such as a user quitting the app or receiving a call during its use)</li><li><em>ViewController</em>.<em>swift</em>: View controller class, controlling what appears on the screen (view)</li><li><em>Main.storyboard</em>: To design the application views</li><li><em>LaunchScreen.storyboard</em>: To design the launch screen</li><li><em>Assets.xcassets: </em>To place all the pictures/icons used by the app</li></ul><p>Note that an application can have multiple View Controller (VC) swift files, depending on how many views it has. To illustrate, the iPhone’s Messages app has two views: conversations list view (list of all conversations) and conversation view (conversation).</p><p>Both the <em>Main.storyboard </em>and <em>LaunchScreen.storyboard </em>files depict an iPhone screen, with the developer able to push items in/out of the screen, and specify color, font and other characteristics unique to the item’s design. Comparing this method to web development with HTML &amp; CSS, it is more visual and easy-to-implement, as it is done through a UI tool instead of code.</p><p>The Xcode screen you have upon creating a new app looks like the figure below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p_7oQIwLGl4GlXpX4oy6jw.png" /><figcaption><em>Xcode main screen after creating an App</em></figcaption></figure><p>The Xcode main screen essentially features three separate parts:</p><ul><li>Navigator: To select a file</li><li>Editor &amp; Debug: To show the selected file</li><li>Inspector: To examine the chosen file’s properties</li></ul><p>If the editor’s file is <em>Main.storyboard</em>, selecting an item in the Editor area will provide you with UI customization options on the inspector area, thus enabling you to change its properties (e.g. a button’s size or background color). Different attributes can be selected and inspected using the Inspector bar (see figure above).</p><p>The highlighted buttons (in the figure) will be the ones used during the course of building this app. The most important one is the object library, providing access to the elements that can be featured on the screen.</p><p>For a more detailed description of Xcode, please read through <a href="https://help.apple.com/xcode/mac/current/#/devc8c2a6be1">Apple’s official Xcode documentation</a>.</p><h3><strong>The Calculator Application</strong></h3><p>The best way to learn about a new technology is to build something with it. To start off, building a calculator was the unanimous choice of many tech bloggers.</p><p>Building a calculator application encompasses three parts:</p><ol><li><strong>User Interface (UI) design</strong>: What the user sees. This goes from adding/formatting each button of the calculator to setting the app’s background color.</li><li><strong>Bridge between UI and the app’s functionality</strong>: Make the app responsive to user interaction (e.g. when a user presses a button).</li><li><strong>App’s functionality</strong>: Writing the code that provides the calculator functionality.</li></ol><h4><strong>Designing the Calculator’s UI</strong></h4><p>To begin with, we will design the Calculator’s UI. As such, we will mostly use <em>Main.storyboard</em>, which is initially blank. See below how the UI will look once finished with its design.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*juk093DbL1K3739O0ckyog.png" /><figcaption><em>Calculator User Interface (UI)</em></figcaption></figure><p>As can be observed, the app features 19 buttons and one label, which displays the result.</p><p>The first thing to do is adding the buttons, by reaching to the Object Library and searching for a button, and then pushing it into the VC. Once done, fiddle with the inspector bar’s values (width, height, background color and font size) to customize your buttons. To create identical ones, the initial button can be copied: select it and push the OPTION key simultaneously until a duplicate appears.</p><p>In order to get those rows of four, implement the Stack View technique, a method used to distribute items proportionally along the screen axes. To do so, while selecting the four buttons, click on <em>EmbedIn</em> and choose the Stack view option. Make sure you change the Distribution property to “Fill Equally” (providing equal button size) and Spacing (between buttons) to 10 pixels to have a well-positioned Stack.</p><p>After copying the first stack to create four new ones (as in the mock-up), all stacks are embedded in one new stack. Subsequently, we add our result label, placing it above the first row of buttons, thus being part of the just-created stack, and a container (with the label put inside it) to facilitate design.</p><p>To ensure the app works with any iPhone screen size, constraints are set to the overall stack. While selected, define a 15px constraint to top, bottom, left and right of the stack using the <em>Add New Constraints </em>button. As a result, the spacing from the left, right, top and bottom of the screen to the stack border will always be 15 px. The figure below further illustrates the stack’s constraints addition (a) and post-addition visualization on the Interface Builder (b).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hpbFsGiIA81g-No5pZx8nw.png" /><figcaption>Constraints addition (a) &amp; visualization post-addition (b)</figcaption></figure><p>Constraints are also set to the label (10px to the left/right and 0px to top/bottom of container). Therefore, elements will dynamically adjust to screen sizes and orientation. According to the specifications added, the width and height of the buttons/label will therefore vary, which can be verified by selecting another iPhone in the <em>View As </em>button.</p><p>Finally, our bottom row currently has four buttons, not three. To fix this, start by deleting one button and, by selecting the two buttons to the left (0 and dot), add an “Equal widths” constraint. Repeat the process with the two right buttons (dot and equal). Then, select the “0” button in our <em>Main.storyboard </em>UI and find the “Proportional Width to” constraint in the inspector bar’s size attribute. Currently, the multiplier is 1 (i.e. the buttons have equal size) but changing it to 1:2 will make the “0” button twice as big as the dot button (further adjust to 1:2.1 to account for spacing), thus giving us our mock-up design!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RRm4mi_ShspY6jzlsU6Nkg.png" /><figcaption>Process of customizing bottom row design</figcaption></figure><h4>Making the app responsive through IBActions/Outlets</h4><p>Now that our UI is finished, the buttons and label must be connected to the code for proper user interaction. As both the <em>ViewController</em>.<em>swift </em>and <em>Main.storyboard </em>files are needed, we employ the <em>Assistant Editor </em>button to display both files simultaneously.</p><p>There are two ways to connect a button to the VC file: an <em>IBOutlet</em>, in which the button can only change appearance (e.g. its text field), and an <em>IBAction</em>, in which a given function is performed when the user-button interaction occurs. To create either, click on the button to be connected and the CONTROL button, move the mouse while holding it, from the button to where the connection will be placed in the VC file. A small pop-up then appears asking for some specifications: a choice between an Outlet or Action, a name, a type (in this case: <em>UIButton</em>) and an event (if doing an Action). The figure below further illustrates the process.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cij8_q4mOvG6F263YvJnKw.png" /><figcaption>IBAction (a) creation &amp; (b) set-up</figcaption></figure><p>Since the numerical buttons will have the same functionality, they should have the same <em>IBAction</em>. As such, after creating an <em>IBAction </em>for one, add more buttons to it by going into the Interface Builder (in <em>Main.storyboard</em>) and right-clicking in VC. At the bottom, the currently-built actions are displayed. Clicking on the “+” button and pushing the arrow to the to-be-included button will add it to the <em>IBAction</em>.</p><p>Overall, seven <em>IBAction</em>s should be created: one for the number buttons, one for the four operation buttons (addition, subtraction, multiplication and division) and one for each of the five remaining buttons. As for the label, an <em>IBOutlet </em>should be set-up, allowing edits to its text field.</p><p>These actions/outlets will be triggered whenever the user presses the associated button and will perform the encoded functionality, which will be built in our <em>ViewController.swift </em>file.</p><h4><strong>Adding logic to the buttons’ actions</strong></h4><p>To start off, defining some global variables will aid during the course of the code:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b01b898fc02e30df60a41315e6b41a82/href">https://medium.com/media/b01b898fc02e30df60a41315e6b41a82/href</a></iframe><p>Following, we setup the <em>IBAction </em>of the numerical buttons to display the user input in the result label, checking first whether it is a new input number or not:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/aff3e853c596b4ff52c9a58bdc878246/href">https://medium.com/media/aff3e853c596b4ff52c9a58bdc878246/href</a></iframe><p>The <em>IBAction </em>for the dot button displays a “0.” in the results label when the user enters a new input. Otherwise, it appends the dot at the end of the label (assuming no other dot is already present).</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/923230553a8292e21d5f242a974b11a7/href">https://medium.com/media/923230553a8292e21d5f242a974b11a7/href</a></iframe><p>Two functions were created to implement and execute the mathematical operations. <em>implementOperation </em>calls the <em>executeOperation </em>method and simply updates our global variables (to reflect past/current user input) before and after calling it. <em>executeOperation </em>computes the actual mathematical operation and displays the result.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/84afac59017a4b1cf5f25402f6b23fb0/href">https://medium.com/media/84afac59017a4b1cf5f25402f6b23fb0/href</a></iframe><p>The operations’ <em>IBAction </em>starts by checking if the calculator is in the middle of another operation, in which case it performs it, by calling <em>implementOperation </em>and updating our global variable to reflect the newly entered operation. Otherwise, it updates our global variables to reflect the new operation entered.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/33266b3494eec236ebe06bbf6d3624f6/href">https://medium.com/media/33266b3494eec236ebe06bbf6d3624f6/href</a></iframe><p>The equal sign <em>IBAction</em> implements the operation if the application is in the middle of one. If not, it uses the same 2nd value used by the previous operation, with the new 1st value being the one displayed. That is, if the previous operation was 20–2 (= 18), by clicking on the equal button, the new one will be 18–2.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1a306f1ff6b9a99acd8aab296f428728/href">https://medium.com/media/1a306f1ff6b9a99acd8aab296f428728/href</a></iframe><p>The remaining ‘AC’, ‘+/-’ and ‘%’ buttons’ <em>IBActions </em>have simple functionalities. The first cleans the history of values and operation and displays a 0 at the results label. The second changes the sign of the results field’s value. The last one solely multiplies the value in the result field by 0.01 and displays the result.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/713dc0413b8587cd9403eead3bb8e5f5/href">https://medium.com/media/713dc0413b8587cd9403eead3bb8e5f5/href</a></iframe><p>Altogether, this is the process to follow when building an iOS calculator with the same functionality as Apple’s. The full code is available <a href="https://github.com/pecarval/Calculator">here</a>.</p><h4><strong>A few last-minute additions</strong></h4><p>While the app is functional, some little improvements can be done.</p><p>A launch screen and app icons can be added, to provide a better design for the app, both from the main iPhone menu and while the app is loading. Make your own app icons in <a href="http://canva.com/">Canva</a> and <a href="http://appicon.co/">appicon.co</a>!</p><p>A number formatter should be added to correctly handle large values.</p><p>Lastly, when terminating the calculator app, the label’s value is lost. However, this does not happen with iOS’. To save this value, and show it when the app is initialized, User Defaults can be used.</p><h3><strong>What did we learn?</strong></h3><p>Building this calculator application enabled us to learn about basic iOS design (adding UI elements, customize and connect them to the code) as well as programming the actual calculator functionality in Swift.</p><p>To further improve on your iOS application development skills, a suggestion would be to explore table views (table of cells e.g. the list of conversations in WhatsApp), Core Data (Apple’s object-oriented database framework) and then implement your very own Reminders application to mimic Apple’s native one!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9cdd1ecf56b9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Importance of the PDLC when developing a Technological Product]]></title>
            <link>https://medium.com/@pedromoliveira/the-importance-of-the-pdlc-when-developing-a-technological-product-fc51277bf328?source=rss-1101e77ae57a------2</link>
            <guid isPermaLink="false">https://medium.com/p/fc51277bf328</guid>
            <category><![CDATA[tesla]]></category>
            <category><![CDATA[product-development]]></category>
            <category><![CDATA[google]]></category>
            <category><![CDATA[apple]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Pedro Oliveira]]></dc:creator>
            <pubDate>Mon, 01 Apr 2019 19:01:20 GMT</pubDate>
            <atom:updated>2019-04-01T19:01:20.826Z</atom:updated>
            <content:encoded><![CDATA[<h4>Why some companies succeeded (and others failed) in the ever-evolving technology market</h4><p>In this article, the Product Development Lifecycle (PDLC), used in the development of technological products, will be discussed. Following, two distinct products in three different industries (smartphones, transportation and wearable technology) will be analyzed, with conclusions drawn at the end as to which phases of the PDLC contributed to the product’s success (or failure).</p><h3><strong>The Product Development Lifecycle (PDLC)</strong></h3><p>One of the most common PDLC lifecycles encompasses seven stages: Analysis, Design, Development and Testing, Implementation, Evaluation, Launch and Assessment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mEMsR6UcMzAf6kzRNEhSXg.png" /><figcaption>Product Development Lifecycle (PDLC)</figcaption></figure><p>The <em>Analysis</em><strong> </strong>stage comprises mainly two phases: Preliminary analysis and System analysis. The former looks into the problem the product is solving, investigating other solutions to prove the chosen one’s feasibility. It also analyses the market, mainly other competitors (if any) and the potential share, to ensure economical and operational product viability.</p><p>System analysis defines end user requirements. Is my phone able to take a call while texting? Can my electric car battery last for more than 3 hours? These questions can be user requirements and the company should think strategically on which features to offer.</p><p>The next step is <em>designing</em> the product, through a business plan, pseudocode, process diagrams, among other things (e.g. screen layout). Following, <em>Development</em> takes place most times by writing code. After completion, the features are tested together through, for example, unit (in which individual source code units are tested) or black-box testing (in which code is tested without knowing its internal structure), to ensure interoperability, correct behavior and absence of bugs. “Is my previously-developed weather app working seamlessly with my new phone’s operating system?” is an example of a question that could be asked during this phase.</p><p><em>Implementation</em> ensures that all problems found previously are fixed for the device to be deployed and put into production. During this stage, documentation, detailing how the product is built and how to maintain it, is written for device maintenance, as the support team was (likely) uninvolved in the build.</p><p><em>Evaluation</em> is then reached. Considerations taken here include system reliability testing and assessment of business objectives (Were they met?). Once finished, the product is <em>launched</em>.</p><p>The final stage is <em>Assessment</em>, in which the product’s features are analyzed by investigating how the customer uses them, to consider an upgrade or removal. Critical thinking should also occur to ensure modernity and innovation. Even though a product might be new when released, it can quickly become obsolete by new features of competing products. It is crucial that a company keeps an eye on its competitors and strives for innovation to continue securing their place in the market, and remain relevant. This might involve re-starting the project lifecycle.</p><h3><strong>Technological Industries and their Success/Failure</strong></h3><p>Reflecting upon the PDLC, an examination, for each device/gadget, can take place to pinpoint where it triumphed or, opposingly, where it could have benefitted from waiting before release.</p><h4><strong>Smartphone Industry</strong></h4><p>Looking at the smartphone industry, it is inevitable that Apple, and the iPhone, are your first thought. Released in 2007, it is hard to think of that first iPhone nowadays, as it did not feature 3G or an App store and had a mere 2MP camera resolution. However, that shows just how well Apple understands the PDLC and the need to innovate.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Z3bO92aJef7L4fnhnganAg.jpeg" /><figcaption><em>Steve Jobs (Apple’s late CEO) presenting the first iPhone [Paul Sakuma/AP]</em></figcaption></figure><p>At the time, the iPhone was truly revolutionary. No company had made a phone relying solely on a touch screen (LG had released the LG PRADA months prior, with a touchscreen but a physical keyboard). In the years to come, by constantly rethinking their operating system (iOS) and adding exciting features (the App store, FaceTime, a “selfie” camera, Touch ID), Apple cemented its phone as the most desirable customer electronic device.</p><p>On the other hand, Blackberry, a past leader in the smartphone market, failed to innovate, causing them to go from a 50% to a 0.048% global market share in the smartphone industry. While the company might be unfamiliar to some (if so, learn more <a href="https://www.cnn.com/2013/07/09/business/gallery/ym-blackberry-through-the-ages/index.html">here</a>), a Blackberry phone was once the most attractive smartphone, particularly for businessmen, due to its small QWERTY keyboard that made it almost instant to send an e-mail.</p><p>The Blackberry’s biggest strength proved to be its weakness, as it thought its physical keyboard would triumph against the touchscreen keyboard. When it realized that was not the case (with the release of the touchscreen Blackberry Torch in 2008), most people had already switched to the iPhone.</p><p>Nonetheless, Blackberry’s main misstep was its lack of vision, as it did not foresee applications as the future of mobile. iOS 2 introduced the App store, creating a world of possibilities for many businesses and customers. What 90s kid doesn’t remember <a href="https://www.youtube.com/watch?v=A3MfQIswl3k">“drinking a beer” with an iPhone</a>? The app world revolutionized the mobile experience and Blackberry, with a poor app store experience and no developer support, failed to progress into that market.</p><p>In the end, by focusing on its business customers, as it dominated the corporate market, the brand failed to appeal to the general audience and lost its popularity quickly, as the regular customer drove the smartphone revolution in the following years.</p><h4>Transportation Industry</h4><p>Being heavily influenced by science fiction’s vision of the future, the products coming from the transportation industry have sometimes lead to failure. Segway, the company that brought to market a two-wheeled futuristic-looking personal transporter (the Segway PT) in 2001, is an example. On the technological side, the product balanced itself well and was easier to drive than a car. However, it floundered when released, selling 10,000 units in the first 2 years, the same <a href="https://www.wired.com/2003/03/segway/).">number of units predicted by the founders to sell per week</a>.</p><p>The main reason of failure was the absence of use cases. There was no clear market for the product nor a need for it over a car/bicycle, especially considering its $4,000 price tag. In fact, many companies tested it, but its market was ultimately sightseeing tours and Segway polo (yes, <a href="https://www.youtube.com/watch?v=kYbUWQdWOIY">really</a>). Moreover, Segway developed the product in complete secrecy, with no user feedback, thus leading the public to complain about its heaviness, which did not allow people to carry it, and the absence of a parking place, in a world that has yet to support bicycle parking (a 19th century invention).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CYHY_r71MripfHXko0jrhw.jpeg" /><figcaption><a href="https://commons.wikimedia.org/wiki/File:Segway_polo(2959051218_a887a9becd_o).jpg"><em>Segway polo players</em></a></figcaption></figure><p>More than that, no regulation existed around the Segway PT as it was a total invention. The company unsuccessfully attempted to work with law enforcement offices and the device was banned in certain locations.</p><p>The publicity ultimately ruined Segway. Initially seen as the next revolutionary product, the Segway PT was announced on public TV and <a href="https://www.newyorker.com/magazine/2001/12/17">featured in <em>The New Yorker</em>’s cover</a>. Expectations were high, leading to massive negative publicity upon its release, with high-profile figures’ accidents making it worse. For example, President George W. Bush’s fall was caught by the press, while James Heselden, Segway corporation’s owner, fell to his death off a cliff while riding one.</p><p>Another example of the transportation industry that, unlike Segway, has succeeded until now, is Tesla. Much like Apple in the smartphone world, a Tesla car is the most desired car nowadays, a feat achieved mostly through its sexy and “cool” cars that had a clear market: high-end electric sports cars. By starting in the luxury department, Tesla was able to garner enough money to produce more affordable cars, and eventually appeal to a broader audience.</p><p>Like other electric car companies/initiatives before it, Tesla was, by many industry experts, predicted to fail. However, when its first car (Tesla Roadster) was released, it won numerous awards for its innovative technology. Presently, with the help of its multiple Research &amp; Development (R&amp;D) teams, the company ensures production of the most advanced technology, proving why other car companies (Mercedes-Benz, Toyota, GM) use it in their cars.</p><p>Finally, with Elon Musk as a CEO, a visionary entrepreneur with established businesses (PayPal, SpaceX), Tesla was able to go in the right direction. Like Steve Jobs, Elon Musk inspires and motivates his employees to continuously innovate.</p><h4><strong>Wearable Technology Industry</strong></h4><p>Similarly influenced by science fiction, many technologically-questionable products have arisen from the wearable tech industry, for instance, the Google Glass.</p><p>In its core, they are smart glasses with an optical head-mounted display, allowing the user to see images through them. Saying the Segway PT had an enormous public expectation is an overstatement when compared with the Glass, which was everywhere: “Best Invention of the Year” by TIME, in a NYFW show, worn publicly by high-profile celebrities (Oprah, Prince Charles, Beyoncé), tested by world leaders, featured in a 12-page spread in Vogue, the list goes on.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*icTcVwsSdOUACwAhvblw9A.jpeg" /><figcaption><em>Diane von Furstenberg (in the center) sent her NYFW models on the runway with a pair, and is pictured here with Google co-founder Sergey Brin (on the left) [</em>Frazer Harrison/Getty Images for Mercedes-Benz<em>]</em></figcaption></figure><p>All this exposure made the Google Glass the most-watched product of 2012 and, without a doubt, began its end. So, what exactly happened? Well, the device was a prototype. Developed at a top-secret lab inside Google, with few employees, the Google Glass remained in secrecy for years. During its development, many questions arose about the course of action to go with the product and, to infer how to proceed, Google decided to let users test it.</p><p>Initially only available to Google Explorers, a select number of geeks and journalists, for $1,500, the product became highly desirable, appearing in every media outlet. Soon after, negative reviews came in from early testers: bad battery life, tons of bugs, amongst other issues. The so-called “Explorers” were mocked for wearing the glasses and the product quickly became a failure, being met with poor sales when released.</p><p>Questions were also raised regarding security and privacy. Equipped with a built-in camera, many wondered if the Google Glass was recording them if near a user wearing a pair, while cinemas and other establishments banned the Glass, sentencing it to its death.</p><p>Comparing the Google Glass to another wearable technology gadget, the Apple Watch, shows the difference in paths of these two highly-anticipated gadgets. While some insiders state the Watch has not sold as expected (since Apple did not release sales numbers), it is the number one watch in the world, surpassing Rolex. How was this outcome possible then?</p><p>To begin with, the first Apple Watch started at $349 and, depending on the case/bracelet, could go up to $10,000. This caters to two audiences: the general audience, who wants a cheap smartwatch, and the individual looking for a luxury item. The Watch’s design, both light and stylish, was appealing. Moreover, its functionality proved useful as, by focusing on fitness and health, Apple made its target audience view the Watch as a way to keep on track with their exercise, on top of instant messaging through their wrist.</p><p>Finally, Apple was able to continuously release additional features through its new series of watches, such as an electrical heart sensor, LTE connectivity and GPS.</p><h3><strong>So, how does this all tie together?</strong></h3><p>So far, we have looked into the PDLC and the defining gadgets in three different industries, but how exactly could the former have helped the latter?</p><p>Considering the mobile phone industry, it is easy to spot Blackberry’s mistake: Innovation and Vision. Obviously, it is impossible to predict the future but Blackberry should not have relied on its already-existent technology and business model to drive its business strategy. Following the iPhone’s release, a clear investigation on how to impress the general audience should have taken place. This continuation of innovation strategy falls under the <em>Assessment</em> stage of the PDLC in which teams are meant to continuously question their product and come up with new and exciting ways to re-invent it.</p><p>The company’s leader also comes into play. The visionary Steve Jobs was able to think ahead of time and predict where the industry was headed. Blackberry lacked the vision, with Blackberry’s co-CEO being quoted as saying “Camera phones will be rejected by corporate users” and only introducing a camera in a Blackberry phone in 2006.</p><p>In the transportation industry, by comparing Tesla and Segway, the difference is clear: Target audience and Market. Tesla knew who their audience was and tailored its product to them, whereas Segway was overly confident, not considering how the product would be received and thus dismissing design, price or even law regulation. This falls into the <em>Analysis</em> and <em>Design </em>stages of the PDLC, where teams should define clearly who is their product’s audience and how to attract it.</p><p>Additionally, Segway may have also benefitted if it had spent more time design-thinking about the day-to-day use of its product, an area where user feedback would have been useful, had it not been developed in isolation. Many of the problems that arose with the Segway PT were due to it being a total invention, thus becoming unclear on how law enforcement should act and how people should use it. Should Segway PTs be allowed on the road or sidewalks? Where can I park my Segway PT? How can I carry my Segway PT if I only have stairs? A clear assessment in the lifecycle’s early stages would have enhanced the customer experience and possibly changed its course.</p><p>Finally, observing the wearable tech industry, it is straightforward to spot the issue with Google Glass: it skipped stages entirely! By marketing their product before it completed development and testing, Google technically released an unfinished product, which was in turn criticized by the media. Even though the aim was for product growth via user feedback, these studies can and should happen inside a lab by inviting people to test your product.</p><p>The Apple Watch did not have the same problem since it was only released after <em>Implementation</em>. The product could have still been received badly but stood more of a chance than the Google Glass since it followed the product development lifecycle.</p><p>Ultimately, Google should have been prepared for ethical, legal and social questions following the product’s release. How can an individual feel safe in a urinal when the person next to them is wearing a Google Glass? Why should a theater company run the risk of having its shows recorded? These are valid privacy questions that needed a solution.</p><p>Contrarily, Apple, which recently released an Electrocardiogram (ECG) feature with its Apple Watch Series 4, clearly anticipated the doubts associated with the credibility of its service by having the US Food and Drug Administration clear the product as safe for use, prior to announcing it. Furthermore, having the American Heart Association President speak at its announcement event reassured users of its trustworthiness and weakened any adversity towards managing their health with the product.</p><p>Perhaps an explanation (of sorts) for Google’s lack of preparation in the Glass development is that, while Apple’s main business model is selling devices, Google’s is monetizing advertisements through selling customer data. It is not a product company, for the most part, thus being ill-prepared when developing the Glass.</p><p>As a closing remark, technological companies should, more than ever, think about the user. Almost all the devices discussed, in some way or another, triumphed/failed due to the user and its needs. Ultimately, the customer decides on your product’s success and, if they are not satisfied with it, you should not be either.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fc51277bf328" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>