<?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 Rightpoint on Medium]]></title>
        <description><![CDATA[Stories by Rightpoint on Medium]]></description>
        <link>https://medium.com/@Rightpoint?source=rss-89be00badb49------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*jNQ8KTVq2yJ_JotZCWgKfw.png</url>
            <title>Stories by Rightpoint on Medium</title>
            <link>https://medium.com/@Rightpoint?source=rss-89be00badb49------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 15:36:23 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@Rightpoint/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[Implementation of a QMS for Medical Software Development in an Agile Team]]></title>
            <link>https://medium.com/rightpoint/implementation-of-a-qms-for-medical-software-development-in-an-agile-team-5b35d0fca12?source=rss-89be00badb49------2</link>
            <guid isPermaLink="false">https://medium.com/p/5b35d0fca12</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[rightpoint]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[product-management]]></category>
            <category><![CDATA[react-native]]></category>
            <dc:creator><![CDATA[Rightpoint]]></dc:creator>
            <pubDate>Fri, 17 Apr 2020 19:15:34 GMT</pubDate>
            <atom:updated>2020-04-17T19:15:34.272Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Iqxx3u7xOM9tlSA2TXPQPQ.jpeg" /></figure><p><em>Introduction by Andrew Tremblay:</em></p><p>Before we talk about Quality Management Systems, or agile teams, or ISO standards, we should talk briefly about their history. We should talk about <strong>Therac-25</strong>.</p><p>Therac-25 was a radiation therapy machine built by AECL (a Canadian medical device manufacturer) in 1982. It was designed to use radiation to destroy harmful cells in cancer patients. Tragically, between 1985 and 1987 at least six accidents occurred with Therac-25, where patients were exposed to <strong><em>one hundred times </em></strong>the intended dose of radiation, resulting in severe burns and radiation poisoning.</p><p>After its recall, an audit of the Therac-25 showed that the main cause of the device failure could be traced to <em>poor software design</em>. AECL had reused software from previous medical device models, removing hardware failsafes in place of software ones. They neglected to independently review the newly written software and had no way to automate any of their tests.</p><p>While the events of Therac-25 were happening in Canada, a US congressional investigation on device safety was being launched. It found that from the years 1983 to 1989, 44 percent of all medical device recalls were due to faulty product design. In response to this (and other investigations), the Safe Medical Devices Act (SMDA) of 1990 was passed. Among many international restrictions, the Act required medical device manufacturers to have a Quality Management System (QMS) in order to be considered to follow Current Good Manufacturing Practices.</p><p>ISO 13485 came about as a result of the SMDA to define such a system. The FDA announced last spring that it would be adopting ISO 13485:2016 as its standard for evaluating QMSs. It is not only one of the primary requirements in the manufacture of medical devices for the USA and Canada, but for the European Union as well. It is the base test for the Medical Devices Single Audit Program (MDSAP), currently operated by Australia, Brazil, Canada, Japan and the USA.</p><p>Many of those mistakes of Therac-25 now seem impossible, but these risks are no less present now than ever as our software constantly integrates into our every moment. It is to mitigate these risks that a QMS is used, and it’s one of the reasons why we implemented one.</p><h3>Quality Management System</h3><p>At Rightpoint, one of our missions is to <em>improve lives through technology</em>. Medical applications are increasingly able to impact the lives of patients and help them onto a path of better health.</p><p>While we know we have the expertise to design and develop medical applications, a large part of building software in the medical device domain is to ensure the quality and safety of the software. This is accomplished by using a QMS which is an integral part of organizing and controlling our work to ensure that the products we build are safe and effective while consistently meeting customer expectations.</p><p>Adhering to ISO 13485:2016 standard helps ensure that we’re building safe software and that we’ve taken the precautions needed to reduce the likelihood of risk to the patient using these applications. This certification enhances our abilities to build an entire medical product for our clients and eases the regulatory pathway for them by being able to show that the software was built via processes that adhere to internationally accepted quality standards.</p><h3>Preparing for the Certification</h3><p>To determine the level of effort that would be required to obtain the certification, we first performed a Gap Analysis of our current processes and documentation. This Gap Analysis takes us item by item through the ISO 13485:2016 standard and identifies what components of the standard we already meet, what we have documentation for, and where there are weaknesses in our process. In Rightpoint’s specific case, many of the ISO 13485:2016 requirements were already being met from a process perspective, but we lacked the formal documentation and process controls required to claim adherence to this standard.</p><h3>Building the Team</h3><p>With the gaps in our processes defined, we now needed to identify those people in our organization would be vital to the operation of our QMS. These key players would need to help us not only build the QMS and obtain certification, but also remain available to help us continually improve the system. They would also need to go through various levels of training to show their competency with the ISO 13485:2016 standard as well as our own processes. We chose to have representatives across the various teams within Rightpoint, who are all vital to the development of a medical software product, including:</p><ul><li>Software Engineering</li><li>UX/UI Design</li><li>Product / Project Management</li><li>Quality Assurance</li><li>Operations</li><li>Business Development</li><li>Executive Leadership</li></ul><p>This core team would be vital in participating in training sessions, reviewing process documentation, and participating in prototype development of medical device software under our new QMS.</p><h3>Agile Approach to Risk</h3><p>Due to the Agile nature of our development process, we took an Agile approach to risk analysis during the development process. Typically, we use the concept of “Stories” within a backlog or sprint to plan and execute on work items, each with acceptance criteria. Before any story can be considered “Done” — several new steps to our process needed to occur. These include:</p><ul><li>Failure Mode Effects Analysis (FMEA) Documentation</li><li>Formal Test Protocol Authoring</li><li>Test Protocol Execution and Documentation</li></ul><p>The FMEA Documentation for each story includes a probability of failure occurrence, severity of failure occurrence and an overall Impact rating based on the probability and severity. Additionally, each risk must include our approach to mitigation of the risk as well as the description of the contingency of the risk.</p><h3>Documentation</h3><p>We approached the development of the QMS with this mindset: “We have a process that works — we have proven over many years that we are capable of producing high quality software. Let’s formalize the process and fill any gaps called out by the ISO 13485:2016 standard.” With this approach, we were able to maintain the way our product teams are used to working while adding minimal overhead to achieve compliance with the ISO standard. We still adhere to an Agile framework for product development, while meeting the requirements of ISO 13485 — AAMI provides guidance in their approach to agile software development in their TIR45 Document (Guidance on the use of AGILE practices in the development of medical device software).</p><p>While many of the processes for our QMS were already in place, there were gaps that needed to be filled. Among the major items that needed to be addressed were a process for Risk Analysis, Design History File, and Device Master Record (DMR) procedures and several other medically-focused procedures that we would otherwise not have focused on without a QMS.</p><h3>Approach to Document Control</h3><p>A key aspect of any QMS is Document Control — this includes tracking the version history of documents, control of who can view and edit documents as well as a review process for changes to process documentation.</p><p>Document control is not a foreign concept to Software Engineers, who comprise a significant portion of the team members at Rightpoint. Most engineers are familiar with using systems such as Git to manage the version history as well as review processes for changes to source code. Our question was “why can’t we use the tools we’re already accustomed to for document control of our QMS”?</p><p>It turns out, given the correct document format for our QMS, we could absolutely leverage the same tools software developers are used to using. Using tools like Github, document authors could create rich sets of documentation, and they would file “Pull Requests” — just like they would with changes to software components — to get approval on documentation changes in the system. Additionally, we can leverage GitHub’s powerful access control to determine who has rights to author and modify documents. We can also enforce rules, such as required reviews on pull requests, before a documentation change becomes final.</p><h3>The Audit</h3><p>At the stage when we had a good foundation of documentation written as the basis of our QMS, we scheduled our certification audits with an accredited ISO 13485:2016 Registrar (in our case, NQA). This is a two-part process where we have a Stage 1 audit which covers our documentation and processes. Later, we go through a Stage 2 audit which will look at records of use of our QMS and how it has been leveraged.</p><h3>Stage 1 Audit</h3><p>As a result of our Stage 1 Audit there were a few minor findings including missing procedures for Verification and Validation (V&amp;V) of software as well as the absence of any records demonstrating effectiveness of the QMS — this was due to the fact we had not yet kicked off a project that would be built under these new procedures.</p><p>As a result of the Stage 1 audit we updated several of our procedures and thoroughly documented our V&amp;V strategy. Some of these updates were performed as CAPAs (Corrective Action Preventive Action) to the QMS — showing that we adhered to our agreed upon process for making procedural improvements to the QMS.</p><h3>POC Project</h3><p>It was now time to put our QMS into practice, even though it was not yet ISO 13485:2016 Certified. We used a real Early Stage development project for one of our existing clients as first project within the new QMS — while also maintaining compatibility with our client’s QMS, since they were still on the hook for their own design controls. This gave us the experience of leveraging our own QMS to manage the lifecycle of the application components we were building and led to several more findings that could be used in the Stage 2 Audit.</p><h3>Stage 2 Audit</h3><p>NQA returned to perform a 3-day on-site audit where all our documented processes as well as records of use of our QMS were explored by the auditor. Many of the Rightpoint staff members who trained to use our QMS and the development of our first QMS based project were interviewed on their relevant areas of expertise relative to the QMS.</p><h3>Certification</h3><p>After three days with the auditor he was able to file his final report with the registrar: we had no major findings that needed to be immediately fixed before a recommendation for certification could be made. The result was a recommendation for Rightpoint to be certified to the ISO 13495:2016 standard.</p><h3>Next Steps</h3><p>Part of the focus of ISO 13485 is the concept of Continual Improvement — that over time, as we exercise our QMS and build medical products for our clients, we will continue to revise and improve our processes. We are now using our QMS to deliver high quality software components to our clients who are working on products that are Software as Medical Devices. We will be audited annually by our ISO 13485 Registrar to ensure that we are meeting all the required standards in the ISO standard and that our system is constantly improving.</p><p><em>Sources:</em></p><p><a href="https://en.wikipedia.org/wiki/Therac-25">https://en.wikipedia.org/wiki/Therac-25</a></p><p><a href="https://archive.org/details/medicaldevicesaf00unit/page/2">https://archive.org/details/medicaldevicesaf00unit/page/2</a></p><p><a href="https://www.reginfo.gov/public/do/eAgendaViewRule?pubId=201804&amp;RIN=0910-AH99">https://www.reginfo.gov/public/do/eAgendaViewRule?pubId=201804&amp;RIN=0910-AH99</a></p><p><a href="https://www.iso.org/iso-13485-medical-devices.html">https://www.iso.org/iso-13485-medical-devices.html</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5b35d0fca12" width="1" height="1" alt=""><hr><p><a href="https://medium.com/rightpoint/implementation-of-a-qms-for-medical-software-development-in-an-agile-team-5b35d0fca12">Implementation of a QMS for Medical Software Development in an Agile Team</a> was originally published in <a href="https://medium.com/rightpoint">Rightpoint</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Using an ‘API Button’ as a Microsoft Flow Trigger]]></title>
            <link>https://medium.com/rightpoint/using-an-api-button-as-a-microsoft-flow-trigger-69f1992f1667?source=rss-89be00badb49------2</link>
            <guid isPermaLink="false">https://medium.com/p/69f1992f1667</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[microsoft]]></category>
            <category><![CDATA[rightpoint]]></category>
            <dc:creator><![CDATA[Rightpoint]]></dc:creator>
            <pubDate>Fri, 17 Apr 2020 19:04:46 GMT</pubDate>
            <atom:updated>2020-04-17T19:04:46.866Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PgxmEZ1mc56lXastPuZLng.jpeg" /></figure><p>In one of my <a href="http://www.kevinnewhouse.com/api-button-low-cost-iot/">previous writings</a>, I talked about building an “API Button” that could execute a web request to our API. In my example, we called a <a href="http://www.kevinnewhouse.com/goal-celebration-api/">Goal Celebration API</a>, which triggered some smart lights and music in my basement. However, the whole point of our API Button is that it’s extremely flexible — we can use it to call any Web API. In this post, we’ll walk through how to use the API Button as a Microsoft Flow trigger.</p><h3>Background</h3><p>I was thinking of how can we improve API Button’s usability without adding too much extra maintenance. After all, not everyone wants to take apart their button, update LUA code, and manually re-deploy every time there’s an update to their business logic. Enter Microsoft Flow.</p><p>The idea is that I’d have my button call a lightweight Web API (hosted using the Azure Function free plan). Then, with just a little mapping and preparation, I can send the request over to my Flow. It actually ended up being a much simpler process than I expected. Start to finish, I was able to complete these steps in about 30 minutes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/710/0*fOELYNX5i05P5VMh.png" /></figure><h3>Setting up our Flow</h3><p>From a configuration standpoint, I think it’s actually easier to begin at the end of our workflow and work our way back to the start. First, let’s set up a new Microsoft Flow at <a href="http://flow.microsoft.com/">flow.microsoft.com</a>. If you’ve used IFTTT before, you’ll notice that Microsoft Flow is similar, with triggers and actions. To start, click <strong>My Flows</strong> and then <strong>Create from blank</strong>. This will walk us through the process of creating a new Flow.</p><p>First, we’ll be prompted to select a trigger. For our trigger, we’re going to select <strong>Request — When a HTTP request is received</strong>. This allows the Flow to be invoked by a POST request. For the action on our Flow, we can select whatever task we’d like — the whole idea here is that we can have Flow trigger anything we’d like. For testing purposes, I selected <strong>Send an email</strong>. When I was finished, my configuration looked like this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/706/0*D7DwxSRske5kI-AJ.png" /></figure><p>Don’t forget to copy the HTTP POST URL from this step. We’ll need it so that we can invoke it from our Web API.</p><h3>Calling our Flow trigger via API</h3><p>Next, we’re going to create a function that triggers our Flow via a POST request inside a Web API. I did this via .NET hosted in an Azure Function, however, you may implement it however it’s most convenient to you. Here’s a sample code block for my Web API Controller:</p><pre>using System.Collections.Generic;<br>using System.Configuration;<br>using System.Net.Http;<br>using System.Threading.Tasks;<br>using System.Web.Http;</pre><pre>namespace ButtonPressFlowAPI.Controllers<br>{<br>    [RoutePrefix(&quot;api&quot;)]<br>    public class ButtonPressFlowApiController : ApiController<br>    {<br>        private readonly string _flowApiAddress = ConfigurationManager.AppSettings[&quot;FlowApiAddress&quot;];</pre><pre>        [HttpGet]<br>        [Route(&quot;flow/{ip}&quot;)]<br>        public async Task&lt;HttpResponseMessage&gt; CallFlowApi(string ip)<br>        {<br>            var message = $&quot;The API was triggered from IP Address {ip}&quot;;<br>            var values = new Dictionary&lt;string, string&gt;()<br>            {<br>                { &quot;message&quot;, message }<br>            };</pre><pre>            var client = new HttpClient();</pre><pre>            var result = await client.PostAsJsonAsync(_flowApiAddress, values);<br>            return result;<br>        }<br>    }<br>}</pre><p>Now that we’ve got our Web API up and running, we can test that our API is calling Flow correctly via a quick <a href="https://www.getpostman.com/">Postman</a> test. To do so, we simply open Postman, enter our API’s URL and send a GET request. Alternatively, since we’re only performing a GET request, you could just open a new tab in your browser and enter the URL.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/856/0*buOK36bX7cE5ban0.png" /></figure><p>If everything worked properly, shortly after our API is triggered, we’ll receive an e-mail that states, “The API was triggered from IP Address 127.0.0.1”.</p><h3>Configuring the button</h3><p>Now that we have our API working properly, we can configure our API Button accordingly. This is simply a matter of modifying our code to use our new Azure Function URL and perform a GET request:</p><pre>#include &lt;esp8266httpclient.h&gt;</pre><pre>local ssid = &quot;Bill Wi The Science Fi&quot;<br>local password = &quot;IAmNotTellingYou&quot;</pre><pre>wifi.sta.config {ssid=ssid, pwd=password}</pre><pre>-- Config<br>local button_pin = 3     --&gt; Pin D3<br>local count = 0</pre><pre>-- init GPIO pin properly<br>-- some hardware might not need the &quot;gpio.PULLUP&quot; part, mine does<br>gpio.mode(button_pin, gpio.INT, gpio.PULLUP)</pre><pre>-- Function calls API<br>function callApi ()<br>    local ip = wifi.sta.getip()<br>    print(ip)<br>    http.get(&quot;http://azure.function.url.here/api/flow/&quot;..ip,<br>        function(statusCode, data)<br>            if (statusCode &lt; 0) then<br>                print(&quot;HTTP request failed&quot;)<br>            else<br>                print(code, data)<br>            end<br>        end)<br>end</pre><pre>-- define a callback function named &quot;goalBtn&quot;, short for &quot;pin callback&quot;<br>function btnPress()<br>    print(&quot;Button Press!&quot;)<br>    callApi()<br>end</pre><pre>-- register a button event<br>-- that means, what&#39;s registered here is executed upon button event &quot;up&quot;<br>gpio.trig(button_pin, &quot;up&quot;, btnPress)</pre><p>Fun fact: My Wi-Fi password in college actually was “IAmNotTellingYou”. Trying to explain that to friends was always an ordeal.</p><h3>What else?</h3><p>Now that we have our API Button configured properly, it’s simply a matter of connecting the button to the Internet (as we’ve done before), pressing the button and receiving an e-mail shortly after. Although this is meant to be a very basic example, we can easily apply these concepts to a more advanced Flow. However, since we are using Flow instead of performing tasks programmatically, our logic can be easily maintained without digging through code.</p><p>Additionally, we can leverage this model to apply to other scenarios outside of Flow. In fact, now that our API Button is calling an Azure Function, we can modify this model to call any external service that we can reach with .NET. For example, instead of calling Flow, we could be calling IFTTT. Or, better yet, we can roll our own API (as we did with the Goal Celebration API), where our options are nearly limitless. Here are a few fun ideas my colleagues and I had along the way:</p><ul><li>DIY Photo Booth — Press a button, call an API that’s connected to a Wi-Fi enabled camera. The camera snaps a picture and uploads it to a cloud service. You could even set up a touch screen so users can enter their e-mail address to receive a link after the upload completes.</li><li>Find My Phone — Press a button, call an API that connects to a native app installed on your phone to play a ringtone.</li><li>“Away Mode” — Press a button while leaving the house, and perform a series of smart home tasks, such as:</li><li>Set the thermostat to a conservative temperature</li><li>Turn off the lights</li><li>Turn off the speakers</li><li>Turn off the smart TV</li><li>Lock the front door</li><li>Remote start and warm up the car</li></ul><p>Hopefully, this might inspire you to create your own API Button, either with Flow or a custom API, to help make life a little easier. Have some ideas or questions? Leave them in the comments below!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=69f1992f1667" width="1" height="1" alt=""><hr><p><a href="https://medium.com/rightpoint/using-an-api-button-as-a-microsoft-flow-trigger-69f1992f1667">Using an ‘API Button’ as a Microsoft Flow Trigger</a> was originally published in <a href="https://medium.com/rightpoint">Rightpoint</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Getting Started with HealthKit]]></title>
            <link>https://medium.com/rightpoint/getting-started-with-healthkit-7b5933a246cd?source=rss-89be00badb49------2</link>
            <guid isPermaLink="false">https://medium.com/p/7b5933a246cd</guid>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[healthkit]]></category>
            <category><![CDATA[apple-health-kit]]></category>
            <category><![CDATA[rightpoint]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Rightpoint]]></dc:creator>
            <pubDate>Fri, 17 Apr 2020 18:05:01 GMT</pubDate>
            <atom:updated>2020-04-17T18:11:26.487Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yDssXkAJ5P-h87LFFi6zAg.jpeg" /></figure><p>Out of sheer curiosity, I often find myself checking my daily step count on Apple’s <a href="https://www.apple.com/ios/health">Health app</a>. In an attempt to get a basic intro to Swift, I sought out to replicate this functionality by creating my own custom application. In this post, I’m going to walk through how to display the number of steps a user has taken today using <a href="https://developer.apple.com/healthkit">HealthKit</a>. However, this article just scratches the surface of all HealthKit has to offer. Check out the documentation if you’re interested in acquiring other health-related <a href="https://developer.apple.com/documentation/healthkit/health_data_types">data types</a>.</p><p>Before we get started, I recommend having a physical iPhone (rather than the virtual simulator) to use in testing the app, as the simulator will always return a step count of zero.</p><p>Start by creating an empty, single-view application in Xcode. Once we have that, we can take a couple preliminary steps to tell our application that we want to use HealthKit to access the user’s health data.</p><p>First, we should turn on HealthKit in the Capabilities section of the app’s settings.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*M_reHyslwXQ_eOhv.gif" /></figure><p>Next, we need to add two properties to the Info.plist file. The two keys that we need to specify are:</p><ul><li>Privacy — Health Share Usage Description</li><li>Privacy — Health Update Usage Description</li></ul><p>The description in the <strong>Value</strong> field is shown to the user when the app requests access to the user’s health data. (We can leave the <strong>Type</strong> field as the default String value.)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*wNY5lygjeWUtLS2k.gif" /></figure><p>Once we’ve turned on HealthKit in the app’s capabilities and have specified those two properties in Info.plist, we can begin to dive into the code. Please note that for simplicity’s sake, I’ll be putting all of the code in the default view controller in this brief walkthrough. In a production application, however, it is typically best practice to avoid leaving all of your code in a single file.</p><p>Our next step is to open Main.Storyboard, add a UILabel, and create an outlet for the label in ViewController.swift. Any name should do, but for this example, I used stepsLabel.</p><p>At the top of our view controller, we need to add an import statement for HealthKit. Then, we need to declare a new global variable, named healthStore in this example. Its value should be set to HKHealthStore(). This <a href="https://developer.apple.com/documentation/healthkit/hkhealthstore">HKHealthStore </a>object will provide us with the user’s step count.</p><p>Since health-related information is private (by default) to the user, we need to ask the user for their permission to access it. This relates back to the set-up we did inside of the Info.plist file. We can do this within the viewDidLoad() method of the view controller. This will open up a dialog when the user opens the app, which will ask for permission to access the user’s health data.</p><pre>// Access Step Count <br>let healthKitTypes: Set = [ HKObjectType.quantityType(forIdentifier: HKQuantityTypeIdentifier.stepCount)! ] </pre><pre>// Check for Authorization <br>healthStore.requestAuthorization(toShare: healthKitTypes, read: healthKitTypes) { (success, error) in </pre><pre>    if (success) { </pre><pre>        // Authorization Successful <br>        self.getSteps { (result) in </pre><pre>            DispatchQueue.main.async { <br>                let stepCount = Int(result) <br>                self.stepsLabel.text = String(stepCount) <br>            } </pre><pre>        } </pre><pre>    } // end if </pre><pre>} // end of checking authorization</pre><p>Let’s break this code block down into a few key parts.</p><p>The top line (where we set the healthKitTypes variable) states that we want to specifically access the user’s step count. (Again, if you’re interested in other data types, you can list multiple <a href="https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier">types</a> here, but for this app, we only want to access the user’s step count.)</p><p>After stating our desired type(s), we request authorization. If the request is successful, we can then <a href="https://developer.apple.com/documentation/healthkit/queries">query</a> the HealthKit store for data. Once we get a result back, we can set our label’s text property to the resulting step count.</p><p>In this example, the query is constructed in a separate method, named getSteps. (This method’s full signature is func getSteps(completion: @escaping (Double) -&gt; Void).)</p><pre>let stepsQuantityType = HKQuantityType.quantityType(forIdentifier: .stepCount)!</pre><pre>let now = Date()<br>let startOfDay = Calendar.current.startOfDay(for: now)<br>var interval = DateComponents()<br>interval.day = 1</pre><p>At the beginning of the getSteps method, we declare and initialize a few variables that will be used to construct our query. In the code above, we set a variable (stepsQuantityType) to the quantityType that we requested access to earlier in the viewDidLoad method. We also need to specify a start and end time, as we are attempting to get the number of steps taken within a given time span. In this example, we are fetching the number of steps taken in the present day, so we get the current date/time information, as well as the date/time information for the start of the current day (i.e. midnight of the current day).</p><pre>let query = HKStatisticsCollectionQuery( <br>     quantityType: stepsQuantityType, <br>     quantitySamplePredicate: nil, <br>     options: [.cumulativeSum], <br>     anchorDate: startOfDay, <br>     intervalComponents: interval)</pre><p>Directly below those variable declarations (still inside of the getSteps method), we can create the query object, as shown above. Here, we are using an <a href="https://developer.apple.com/documentation/healthkit/hkstatisticscollectionquery">HKStatisticsCollectionQuery</a>. This query object will grab the user’s latest step count throughout the day.</p><pre>query.initialResultsHandler = { _, result, error in <br>        var resultCount = 0.0 <br>        result!.enumerateStatistics(from: startOfDay, to: now) { statistics, _ in <br>        if let sum = statistics.sumQuantity() { <br>            // Get steps (they are of double type)<br>            resultCount = sum.doubleValue(for: HKUnit.count()) <br>        } // end if <br>        // Return <br>        DispatchQueue.main.async { <br>            completion(resultCount) <br>        } <br>    } <br>}</pre><p>After declaring the query, we set up the initialResultsHandler, which returns, as you may have guessed, the query’s initial results. In this block of code, we simply get and return the user’s step count.</p><pre>query.statisticsUpdateHandler = { </pre><pre>    query, statistics, statisticsCollection, error in <br>    // If new statistics are available <br>    if let sum = statistics?.sumQuantity() { <br>        let resultCount = sum.doubleValue(for: HKUnit.count()) <br>        // Return <br>        DispatchQueue.main.async { <br>            completion(resultCount) <br>        } <br>    } // end if <br>}</pre><p>In order to get the most up-to-date step count, we should add the statisticsUpdateHandler, which monitors the HealthKit store and updates the count if new data becomes available.</p><pre>healthStore.execute(query)</pre><p>Lastly, at the bottom of the getSteps method, we execute the query.</p><p>If you were following along, try now running the app, allow the app to access your health data (only if you want to), and you should see the number of steps that you’ve taken today (while you were carrying your iPhone/wearing your Apple Watch).</p><p>In closing, I’d like to reiterate that HealthKit offers a wide array of data types. If you’re interested, check out the documentation to see the growing list of information that you may find useful in building your next health/fitness app.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/0*bN43TmPZXA6KFNts.gif" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7b5933a246cd" width="1" height="1" alt=""><hr><p><a href="https://medium.com/rightpoint/getting-started-with-healthkit-7b5933a246cd">Getting Started with HealthKit</a> was originally published in <a href="https://medium.com/rightpoint">Rightpoint</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Getting your .Net API from the server to the client with Swagger & Swashbuckle]]></title>
            <link>https://medium.com/rightpoint/getting-your-net-api-from-the-server-to-the-client-with-swagger-swashbuckle-acedbb542e33?source=rss-89be00badb49------2</link>
            <guid isPermaLink="false">https://medium.com/p/acedbb542e33</guid>
            <category><![CDATA[swagger]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[rightpoint]]></category>
            <category><![CDATA[swashbuckle]]></category>
            <dc:creator><![CDATA[Rightpoint]]></dc:creator>
            <pubDate>Fri, 17 Apr 2020 17:55:34 GMT</pubDate>
            <atom:updated>2020-04-17T17:55:34.754Z</atom:updated>
            <content:encoded><![CDATA[<h3>Getting your .Net API from the server to the client with Swagger &amp; Swashbuckle</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9SgYxRKJ-2VoSqE69_H1IA.jpeg" /></figure><p>The internet runs on APIs, and solid API specifications are as valuable as the tools that eventually implement them. Here at Rightpoint, we realize there are many ways to write an API, just as there are many ways to spin up a server and consume the API with a webpage or some other client. We’ve found that .Net core and Typescript are great options for this. And just like how .Net and React stand out from the rest when it comes to implementing a web experience, so does Swagger come close to perfecting that first step in any significantly large web project, building and managing the API.</p><p>Throughout this post we’re going to take a walk through swagger-ton, a small example .Net core Web API project, and with push-button-ease generate a Typescript React Client that uses the same API. We’ll do this without actually writing any API boilerplate code ourselves! The credit to this miraculous cross-platform solution goes almost exclusively to the Swagger tool.</p><h3>What is Swagger / OpenAPI?</h3><p><a href="https://swagger.io/docs/specification/2-0/what-is-swagger/">Swagger</a> (which is part of the OpenAPI initiative to standardize APIs across the internet) allows you to describe the structure of your APIs so that machines can read them. The ability of APIs to describe their own structure is the root of all the awesomeness in Swagger. Why is it so great? Well, by reading your API’s structure, we can automatically build beautiful and interactive API documentation. We can also automatically generate client libraries for your API in many languages and explore other possibilities like automated testing. Swagger does this by asking your API to return a YAML or JSON that contains a detailed description of your entire API. This file is essentially a resource listing of your API which adheres to OpenAPI Specification. The specification asks you to include information like:</p><ul><li>What are all the operations that your API supports?</li><li>What are your API’s parameters and what does it return?</li><li>Does your API need some authorization?</li></ul><p>And even fun things like terms, contact information and license to use the API. You can write a Swagger spec for your API manually, or have it generated automatically from annotations in your source code. Check swagger.io/open-source-integrations for a list of tools that let you generate Swagger from code.</p><h3>What is Swashbuckle?</h3><p>Swashbuckle is a .Net library to generate swagger definitions by looking at the source code of your project. You can also get it to look at the XML documentation of your project to generate rich descriptions automatically.</p><h3>What is going to be shown?</h3><ol><li>Adding swagger to a .Net core Web API project</li><li>“Decorating” the project to get a good description in the swagger UI</li><li>Generating client-side Javascript from the swagger definition file</li></ol><h3>Adding Swagger to your .Net core Web API project</h3><p>This step is pretty simple. Add the Swashbuckle nuget package to your project. <a href="https://github.com/domaindrivendev/Swashbuckle.AspNetCore">Swashbuckle</a> is a package that implements Swagger definition files for you and also provides a UI based on your swagger definition.</p><ol><li>Add the nuget package Swashbuckle.AspNetCore</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*mdmISMXkdPPzJnfW.png" /></figure><pre>services.AddSwaggerGen(c =&gt;<br>           {<br>               c.SwaggerDoc(&quot;v1&quot;, new Info { Title = &quot;swagger-ton&quot;, Version = &quot;v1&quot; });<br>           });</pre><p>also in the Configure method on Startup.cs add the follow to generate swagger UI</p><pre>app.UseSwagger();<br>            app.UseSwaggerUI(c =&gt;<br>            {<br>                c.SwaggerEndpoint(&quot;/swagger/v1/swagger.json&quot;, &quot;swagger-ton V1&quot;);<br>            });</pre><p>Now run the project (f5). Once the web browser shows up and loads the default route, change the relative path to /swagger and bam you got swagger.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*cRaHIHYGvQhUZ-AU.png" /></figure><p>You might notice that there are no descriptions of what the API will do. In the next section, we will explore adding more metadata around your API’s.</p><h3>“Decorating” the project to get good descriptions in the swagger UI</h3><p>You will notice that there are no descriptions displayed or even a name associated with the operation.</p><p>In order to have descriptions, we have to tell Swashbuckle how to pick them out. Swashbuckle supports using descriptions from XML comment documentation. Below is the code snippet that tells Swashbuckle to use comments as descriptions in the Swagger file.</p><pre>services.AddSwaggerGen(c =&gt;<br>            {<br>                c.SwaggerDoc(&quot;v1&quot;, new Info { Title = &quot;swagger-ton&quot;, Version = &quot;v1&quot; });<br>                var baseDirectory = AppDomain.CurrentDomain.BaseDirectory;<br>                var commentsFileName = Assembly.GetEntryAssembly().GetName().Name + &quot;.xml&quot;;<br>                var commentsFile = Path.Combine(baseDirectory, commentsFileName);<br>                c.IncludeXmlComments(commentsFile);<br>            });</pre><p>There is one more step if you run the project now it will throw an exception.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*SyLDjNqMOB_0wqO6.png" /></figure><p>The XML comment needs to be generated. You can do this with the UI to generate the XML doc. In the path input field next to the checkbox make it a relative path so if you move this project to be part of DevOps it will generate the file correctly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/835/0*K10dxuDQjFIzty1h.png" /></figure><p>Now lets add some comments. Modify the controller to have XML comments</p><pre>/// &lt;summary&gt;<br>    /// This api is for values<br>    /// &lt;/summary&gt;<br>    [Route(&quot;[controller]&quot;)]<br>    [ApiController]<br>    public class GenerateValueController : ControllerBase<br>    {<br>        /// &lt;summary&gt;<br>        /// Concatenates the params together<br>        /// &lt;/summary&gt;<br>        /// &lt;param name=&quot;id&quot;&gt;Id Param&lt;/param&gt;<br>        /// &lt;param name=&quot;value1&quot;&gt;Val1 Param&lt;/param&gt;<br>        /// &lt;param name=&quot;value2&quot;&gt;Val2 Param&lt;/param&gt;<br>        /// &lt;returns&gt;&lt;/returns&gt;<br>        [HttpGet(&quot;{id}&quot;)]<br>        public ActionResult&lt;string&gt; Get(int id,string value1, string value2)<br>        {<br>            return &quot;value_&quot; + id.ToString() + value1 + &quot;_&quot; + value2;<br>        }</pre><pre>        /// &lt;summary&gt;<br>        /// Submit a value<br>        /// &lt;/summary&gt;<br>        /// &lt;param name=&quot;value&quot;&gt;&lt;/param&gt;<br>        [HttpPost]<br>        public void Post([FromBody] string value)<br>        {<br>        }</pre><pre>        /// &lt;summary&gt;<br>        /// Update a value<br>        /// &lt;/summary&gt;<br>        /// &lt;param name=&quot;id&quot;&gt;Id of value&lt;/param&gt;<br>        /// &lt;param name=&quot;value&quot;&gt;The value to update&lt;/param&gt;<br>        [HttpPut(&quot;{id}&quot;)]<br>        public void Put(int id, [FromBody] string value)<br>        {<br>        }</pre><pre>        /// &lt;summary&gt;<br>        /// This deletes the value<br>        /// &lt;/summary&gt;<br>        /// &lt;param name=&quot;id&quot;&gt;&lt;/param&gt;<br>        [HttpDelete(&quot;{id}&quot;)]<br>        public void Delete(int id)<br>        {<br>        }<br>    }</pre><p>And here is the output from Swashbuckle UI.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*sqmI3L-39b5-YsmA.png" /></figure><h3>Generating client-side Javascript from the swagger definition file</h3><p>Now here comes the exciting part. From the swagger definition file, we are going to generate client-side code that you could incorporate into your React Typescript project.</p><p>The first step is to download the swagger definition file. Its located at this link on the Swagger UI and the link would be <a href="https://localhost:44370/swagger/v1/swagger.json">https://localhost:44370/swagger/v1/swagger.json</a>.</p><p>Now you are going to load the website <a href="http://editor.swagger.io/">http://editor.swagger.io/</a> and paste the file contents into the left site. Click cancel to not convert to YAML. Once that is done and the linter passes you can choose from any number of generators.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*PJ0NTKQQ-Asbjx3f.png" /></figure><p>Choose what type of client you want to generate for your project. In the example we are going to choose Typescript-fetch.</p><p>A Zip file with the contents is sent to you. In our case the files in the image below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/197/0*OPVq3ebHsR3FFFts.png" /></figure><p>We care most about the api.ts and configuration.ts files those would normally get place in your client front end project. The API.ts file is quite large. Here is a <a href="https://rplabs.wpengine.com/dev/2019/07/swagger/client/api.ts">link to it from the repo.</a></p><p>The beginning of our API client code is now largely complete, and the best part is, if we ever write another endpoint in our .Net web code, generating the client code for that endpoint needs only one step: the regeneration of the client code step. And if the project changes and we need to refactor significantly, say for example we want to use angular as well as typescript? We can just ask for that client to be generated as well.</p><p>Thanks for walking through this process with us. Automatic generation of the client from the swagger file is one of the most exciting things to come out of the OpenApi definition movement. We’ll be continuing to leverage OpenApi in our .Net projects, and hope you will as well.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=acedbb542e33" width="1" height="1" alt=""><hr><p><a href="https://medium.com/rightpoint/getting-your-net-api-from-the-server-to-the-client-with-swagger-swashbuckle-acedbb542e33">Getting your .Net API from the server to the client with Swagger &amp; Swashbuckle</a> was originally published in <a href="https://medium.com/rightpoint">Rightpoint</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Using Native Modules for Location Services in React Native iOS]]></title>
            <link>https://medium.com/rightpoint/using-native-modules-for-location-services-in-react-native-ios-c7c62e2dc8fd?source=rss-89be00badb49------2</link>
            <guid isPermaLink="false">https://medium.com/p/c7c62e2dc8fd</guid>
            <category><![CDATA[rightpoint]]></category>
            <category><![CDATA[location-services]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[techonology]]></category>
            <category><![CDATA[react-native]]></category>
            <dc:creator><![CDATA[Rightpoint]]></dc:creator>
            <pubDate>Fri, 17 Apr 2020 17:46:15 GMT</pubDate>
            <atom:updated>2020-04-17T17:46:15.615Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2ROcsonbl642JmS3uObS1g.jpeg" /></figure><h4>About Location Services</h4><p>Location-based functionality is a common trope in mobile apps. Typical use cases range anywhere from serving ads relevant to a certain location, to presenting special content at specific places, to out-right navigational aid. If you should find your own react native app would benefit from location services there are a few approaches to take.</p><p>The easiest, of course, is pure react native! <a href="http://facebook.github.io/react-native/docs/geolocation.html">The documentation</a> leaves a bit to be desired, but if you only need location info while your app is open and do not require any advanced features, you can get location info in your app using an extension to the GeoLocation Web Spec.</p><p>In some instances, you may need more customizable location services, or periodic updates in the background. In these instances, there is no avoiding it — we’ve gotta dust off our Objective-C skills and go with <a href="https://facebook.github.io/react-native/docs/native-modules-ios.html">a native module</a>. Fortunately, Apple provides the means for us to approach Location Services in a few different ways. In this example, we will make a Native Module that uses <a href="https://developer.apple.com/documentation/corelocation/getting_the_user_s_location/using_the_significant-change_location_service">Significant-Change Location Service</a>, which provides a good balance between power-saving and accuracy.</p><h4>Updating info.plist</h4><p>Let’s first take care of some housekeeping before we start writing code. Open up Xcode or an inline editor and add the following entitlements:</p><pre>&lt;key&gt;NSLocationAlwaysAndWhenInUseUsageDescription&lt;/key&gt;<br>&lt;string&gt;This is needed to get location updates in the background&lt;/string&gt;<br>&lt;key&gt;NSLocationWhenInUseUsageDescription&lt;/key&gt;<br>&lt;string&gt;This is needed to get location updates when in use&lt;/string&gt;</pre><p>N.B — these keys changed slightly starting with iOS 11, so if you support older versions, the <a href="https://developer.apple.com/documentation/bundleresources/information_property_list/nslocationalwaysusagedescription">NSLocationAlwaysUsageDescription</a> key is also required.</p><p>You’ll also need to open up the Project Editor in Xcode (by double-clicking the top-most node of the Project Navigator). Under the “Targets” section, toggle Background Modes to be ON and check both Location Updates and Background Fetch from the list.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/950/0*Fi_0qJT9a3-MDK-p.png" /></figure><p>With that done, we are ready to start bridging our javascript to native code!</p><h4>Adding the Native Module</h4><p>If you’ve written iOS apps in Swift or Objective C, the process of adding a native module should be very familiar, since a Native Module is just an Objective-C class that implements a native API we can’t get to in React Native via an existing module. We start by creating a header file that will define the module, like so:</p><pre>#import &lt;React/RCTBridgeModule.h&gt;</pre><pre>@interface MyLocationDataManager : NSObject &lt;RCTBridgeModule&gt;<br>@end</pre><p>Now, let’s create the module:</p><pre>#import &quot;MyLocationDataManager.h&quot;<br>#import <br>#import <br>#import <br>#import </pre><pre>@implementation MyLocationDataManager<br>{<br>  CLLocationManager * locationManager;<br>  NSDictionary * lastLocationEvent;<br>}</pre><pre>- (dispatch_queue_t)methodQueue<br>{<br>  return dispatch_get_main_queue();<br>}</pre><pre>RCT_EXPORT_MODULE(MyLocationDataManager);</pre><pre>- (NSDictionary *)constantsToExport<br>{<br>  return @{ @&quot;listOfPermissions&quot;: @[@&quot;significantLocationChange&quot;] };<br>}</pre><pre>+ (BOOL)requiresMainQueueSetup<br>{<br>  return YES;  // only do this if your module exports constants or calls UIKit<br>}</pre><pre>//all methods currently async<br>RCT_EXPORT_METHOD(initialize:(RCTPromiseResolveBlock)resolve<br>                 rejecter:(RCTPromiseRejectBlock)reject) {<br>  RCTLogInfo(@&quot;Pretending to do something natively: initialize&quot;);</pre><pre>  resolve(@(true));<br>}<br></pre><pre>RCT_EXPORT_METHOD(hasPermissions:(NSString *)permissionType<br>                 hasPermissionsWithResolver:(RCTPromiseResolveBlock)resolve<br>                 rejecter:(RCTPromiseRejectBlock)reject) {<br>  RCTLogInfo(@&quot;Pretending to do something natively: hasPermissions %@&quot;, permissionType);<br>  <br>  BOOL locationAllowed = [CLLocationManager locationServicesEnabled];<br>  <br>  resolve(@(locationAllowed));<br>}</pre><pre>RCT_EXPORT_METHOD(requestPermissions:(NSString *)permissionType<br>                 requestPermissionsWithResolver:(RCTPromiseResolveBlock)resolve<br>                 rejecter:(RCTPromiseRejectBlock)reject)<br>{<br>  NSArray *arbitraryReturnVal = @[@&quot;testing...&quot;];<br>  RCTLogInfo(@&quot;Pretending to do something natively: requestPermissions %@&quot;, permissionType);<br>  <br>  // location<br>  if (!locationManager) {<br>    RCTLogInfo(@&quot;init locationManager...&quot;);<br>    locationManager = [[CLLocationManager alloc] init];<br>  }<br>  <br>  locationManager.delegate = self;<br>  locationManager.allowsBackgroundLocationUpdates = true;<br>  locationManager.pausesLocationUpdatesAutomatically = true;</pre><pre>  if ([locationManager respondsToSelector:@selector(requestAlwaysAuthorization)]) {<br>    [locationManager requestAlwaysAuthorization];<br>  } else if ([locationManager respondsToSelector:@selector(requestWhenInUseAuthorization)]) {<br>    [locationManager requestWhenInUseAuthorization];<br>  }</pre><pre>  [locationManager startUpdatingLocation];<br>  [locationManager startMonitoringSignificantLocationChanges];</pre><pre>  resolve(arbitraryReturnVal);<br>}</pre><pre>- (NSArray *)supportedEvents {<br>    return @[@&quot;significantLocationChange&quot;];<br>}</pre><pre>- (void)locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray *)locations {<br>    CLLocation* location = [locations lastObject];<br>    <br>    lastLocationEvent = @{<br>                          @&quot;coords&quot;: @{<br>                                  @&quot;latitude&quot;: @(location.coordinate.latitude),<br>                                  @&quot;longitude&quot;: @(location.coordinate.longitude),<br>                                  @&quot;altitude&quot;: @(location.altitude),<br>                                  @&quot;accuracy&quot;: @(location.horizontalAccuracy),<br>                                  @&quot;altitudeAccuracy&quot;: @(location.verticalAccuracy),<br>                                  @&quot;heading&quot;: @(location.course),<br>                                  @&quot;speed&quot;: @(location.speed),<br>                                  },<br>                          @&quot;timestamp&quot;: @([location.timestamp timeIntervalSince1970] * 1000) // in ms<br>                        };</pre><pre>    RCTLogInfo(@&quot;significantLocationChange : %@&quot;, lastLocationEvent);<br>    <br>    // TODO: do something meaningful with our location event. We can do that here, or emit back to React Native<br>    // https://facebook.github.io/react-native/docs/native-modules-ios.html#sending-events-to-javascript<br>}</pre><pre>@end</pre><p>It’s important that before we attempt to start getting location info, we request the users permission to use that capability. Notice also, that we request the more intense permission () and fall back to the less demanding option if possible. As is always the case in The Land of Apple, we only have one chance to ask for these permissions in-app (though a user can always modify them from settings), so carefully consider when and where in the app this should occur. Generally speaking, it’s best to ask for permissions only at the time the app starts needing them, so that the user is saturated with requests up front.Once we’ve identified an appropriate place to request location data, we can import our native module and make the request:</p><pre>// @flow<br>import { NativeModules } from &#39;react-native&#39;;</pre><pre>var location = NativeModules.MyLocationDataManager;</pre><pre>async requestPermissions() {<br>  const result = await location.requestPermissions(&#39;&#39;);</pre><pre>  return result;<br>}</pre><p>We’re now ready to get location data! From here, we have a few options for using info from our native module. We can subscribe to events, or call custom methods directly as above, depending on our needs. Be sure to <a href="https://facebook.github.io/react-native/docs/native-modules-ios.html">review the documentation</a> for the implementation that most suits your needs.For now though, let’s test our native module using basic logging , which we added to MyLocationDataManager.m on line 98. The easiest way to test significant location change is via the simulator, which allows us the control of mocking a location without leaving the comfort of our chairs 🙃Once the simulator is running and the app has started (via normal react-native run-ios, or deployed directly from XCode), then launch the debugging bridge and open an inspector so we can see the console output as it is emitted from the app. Once our debugger is connected, we can navigate in-app to where we request location data. We should see our permission request:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/271/0*Q7efgh5b9Ti_g2Iw.png" /></figure><p>From the Simulator menu, we can update the simulator location of our device from the Debug dropdown:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/767/0*hprFQy4RqsdQKicP.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_3vj730ZqODKp6Pv.png" /></figure><p>…and the change is emitted into the console via RCTLogInfo. We did it! With location data verified, we’re now ready to write up whatever more sophisticated implementation(s) suit our needs. But, that’s an exercise for another day 🤔</p><h4>Troubleshooting Tips</h4><p>If you’re having trouble getting the location data permissions to show, here are some common questions to ask yourself:</p><ul><li>is info.plist updated with the required entitlements? Are the entitlement keys free of typos?</li><li>is info.plist using the correct keys? (<a href="https://developer.apple.com/documentation/bundleresources/information_property_list/nslocationalwaysandwheninuseusagedescription"><em>NSLocationAlwaysAndWhenInUseUsageDescription</em></a><em> for iOS 11 and beyond and </em><a href="https://developer.apple.com/documentation/bundleresources/information_property_list/nslocationalwaysusagedescription"><em>NSLocationAlwaysUsageDescription</em></a><em> for anything prior?</em>)</li><li>Are both keys included if older and contemporary iOS versions are supported?</li><li>Have Background Modes been enabled from the Project Editor?</li><li>Have we requested the users’ permission prior to subscribing to location change events or querying for location data explicitly?</li><li>Has permission for location data previously been denied to the app?</li></ul><p>Hopefully, this brief look at Native Modules in React Native was illuminating! Stay tuned for a follow-up post about getting location data in Android, and check out the <a href="https://facebook.github.io/react-native/docs/native-modules-android">official documentation</a> in the meantime. Shout out to <a href="https://github.com/npomfret">npomfret</a>, whose source repo <a href="https://github.com/npomfret/react-native-location-change">here</a> heavily influenced the content for my example location manager above.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c7c62e2dc8fd" width="1" height="1" alt=""><hr><p><a href="https://medium.com/rightpoint/using-native-modules-for-location-services-in-react-native-ios-c7c62e2dc8fd">Using Native Modules for Location Services in React Native iOS</a> was originally published in <a href="https://medium.com/rightpoint">Rightpoint</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Using ML.NET in Xamarin projects]]></title>
            <link>https://medium.com/rightpoint/using-ml-net-in-xamarin-projects-9d45618e72ad?source=rss-89be00badb49------2</link>
            <guid isPermaLink="false">https://medium.com/p/9d45618e72ad</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[xamarin]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[rightpoint]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Rightpoint]]></dc:creator>
            <pubDate>Fri, 17 Apr 2020 17:28:22 GMT</pubDate>
            <atom:updated>2020-04-17T17:28:22.631Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qhveu4f9tyUkUGbsTjiNaA.jpeg" /></figure><p>A little more than a month ago I <a href="https://twitter.com/breakpointv16/status/1153445190847385600">asked</a> my followers on Twitter what they would want me to write about:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*HEdv4EbjfO3l70mN.png" /></figure><p>As it turns out, AutoML and Xamarin were the most requested combination. So, let’s talk about it!</p><p>If you’re trying to learn more about machine learning, but don’t have a special degree and/or experience there’re always several ways to start:</p><ul><li>theory (algorithms, creating models, learning about tools, etc),</li><li>jump-start playing with pre-built models, APIs and SDKs (cognitive services, AI building blocks from Google, etc.) or</li><li>combine both approaches.</li></ul><p>When I’m asked about tools for beginners, I recommend <a href="https://azure.microsoft.com/en-us/services/cognitive-services/">Cognitive Services</a>. Microsoft provides great documentation, there are lots of samples online, and you can access the services through a REST API, so they can be implemented in all kinds of applications.</p><p>If you’re a .NET developer who has already checked out Cognitive Services, and want to have a more customized experience, or you just want to build ML models based on your custom datasets, then <a href="https://dotnet.microsoft.com/apps/machinelearning-ai/ml-dotnet">ML.NET</a> can be the right tool for you. I first heard about ML.NET at Build when it was released; since then it has gotten a slew of <a href="https://github.com/dotnet/machinelearning/tree/master/docs/release-notes">new features and improvements</a>. I’m not going to go into details about ML.NET since they’re all covered in the docs, but I want to highlight a couple of things:</p><ul><li>ML.NET has been used internally by many Microsoft teams for more than 8 years in products such as Bing Ads, PowerBI, Azure ML Studio, etc.</li><li>ML.NET is made for developers — with or without a data science background</li><li>With ML.NET you can consume other popular ML frameworks (TensorFlow, ONNX, Infer.NET, and more)</li></ul><p>Building new models, figuring out the best approach, and the most efficient model type can be very confusing especially when you’re just starting out, but AutoML is designed to help you to solve those problems. There are three ways to use automated ML:</p><ul><li>Using a graphical user interface with the ML.NET Model Builder</li><li>On the command line with the ML.NET CLI</li><li>Via an application with the automated ML API</li></ul><h4>Let’s dive into the first approach:</h4><p>As a sample, I decided to create a very simple messaging app with just two fields: recipient and message and a send button. The goal of this app is to use a machine learning model to decide if the message a user is trying to send might be offensive and warn the sender — an idea was shared with me by one of the attendees at Xamarin Dev Summit (https://xamarindevelopersummit.com/). Side note: if you’re that great person and you’re reading this post, please, remind me your name, so I can give you proper credit.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/302/0*9qXzYJ2rBEgQMn4G.png" /></figure><p>I started with creating a blank Xamarin.Forms app in Visual Studio. I switched to Visual Studio 2019, but VS 2017 can be used as well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/516/0*0r_aruQSA__6rGDx.png" /></figure><p>I’m sure you know the structure of a Xamarin.Forms solution. You can add support for UWP, TvOS, WatchOS, etc, but I just added Android and iOS projects.</p><p>Then I added <a href="https://marketplace.visualstudio.com/items?itemName=MLNET.07">ML.NET Model Builder Visual Studio extension from the Visual Studio Marketplace</a> (note: you need to do it only once).</p><p>Now with all the tools ready, it is time to think about data for the machine learning model. I usually use <a href="https://www.kaggle.com/">Kaggle</a> for my data needs. This time I was also able to find a dataset with labeled text messages: 1 for offensive and 0 for neutral. The dataset wasn’t very well maintained but I thought it would be good enough for testing purposes. If you’re building production grade models, definitely make sure that the data is correct, unbiased, and the dataset is well maintained. Data is the base of every machine learning model; it’ll only know and learn from data you provide.</p><p>The next step was to create a machine learning model using Model Builder and the dataset. You can find the detailed instructions <a href="https://dotnet.microsoft.com/learn/ml-dotnet/get-started-tutorial/intro">here</a>. The model builder is checking several types of models and uses the best one for your dataset, and also gives you a recommendation on how long you need to train your model for. I chose “Sentiment Analysis” scenario, uploaded data file and selected “label” column for prediction. That’s pretty much it — Model Builder did everything else for me.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*rUgJCs-nZO4TIsEA.png" /></figure><p>As a result, Model Builder added 2 more projects to my solution: ML.NET model project and a Console App for testing the model.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/277/0*1GLSJ5r92teUUwxd.png" /></figure><p>I tried to make it work with Xamarin without additional manipulations, by just using ML.NET in the shared code to access the model and provide predictions. Unfortunately, I was getting System.DllNotFoundException:’CpuMathNative’ error. I ended up reaching out to Cesar De la Torre Llorente — Principal PM for ML.NET. As it turned out, ML.NET doesn’t support ARM processors right now due to native C/C++ code is not being ported to ARM. It would be absolutely amazing if they added ARM support soon so we can enjoy the benefits of ML.NET in Xamarin and IoT projects without additional middleware. If you think the same, please, reach out to me or Cesar directly (you can find his info <a href="https://devblogs.microsoft.com/cesardelatorre/author/cesardl/">here</a> or just comment/vote for the issue on <a href="https://github.com/dotnet/machinelearning/issues/22">GitHub</a>), so his team can prioritize it.</p><p>I still wanted to finish my project at this point, so I created a Web API to wrap ML.NET functionality as a workaround. It’s a simple API with only one controller used to return a prediction based on the MLModel. In our case, “Prediction” is just a Boolean value indicating if the message is rude/offensive or not. I decided it would be easy to host the Web API on Azure, so I just created an Azure Web App right from my Visual Studio (Publish dialog) and deployed my code there.</p><p>From the shared code in Xamarin, I was passing the text of the message to the API and getting a prediction back. Then, I was using SMS class from <a href="https://docs.microsoft.com/en-us/xamarin/essentials/sms">Xamarin.Essentials</a> to either send the message to the recipient or display an alert dialog with a warning that the message could be rude or offensive. Users can then confirm if they still want to send it.</p><pre>if (prediction) <br>{ <br>    var sendText = await DisplayAlert(&quot;Warning&quot;, &quot;The message you&#39;re about to send might be rude and/or offensive. Are you sure you want to send it?&quot;, &quot;Yes&quot;, &quot;No&quot;);</pre><pre>if (sendText) await SendSms(text, recipient); <br>} <br>else <br>    await SendSms(text, recipient);</pre><p>The Xamarin.Essentials library provides cross-platform APIs so you don’t have to write platform-specific code. Really easy.</p><p>I’m definitely disappointed I couldn’t use ML.NET in a Xamarin.Forms app directly and had to figure out a workaround. That said, I’m glad I was still able to use AutoML, and build a high efficiency model using a custom dataset to create a POC for something that could potentially be a very useful app.</p><p>You can find my code for this proof of concept project on GitHub: <a href="https://github.com/Veroni4ka/messaging-app">https://github.com/Veroni4ka/messaging-app</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9d45618e72ad" width="1" height="1" alt=""><hr><p><a href="https://medium.com/rightpoint/using-ml-net-in-xamarin-projects-9d45618e72ad">Using ML.NET in Xamarin projects</a> was originally published in <a href="https://medium.com/rightpoint">Rightpoint</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Secrets of Git — git gotchas, tips & tricks]]></title>
            <link>https://medium.com/rightpoint/secrets-of-git-git-gotchas-tips-tricks-82a1df9fcc5d?source=rss-89be00badb49------2</link>
            <guid isPermaLink="false">https://medium.com/p/82a1df9fcc5d</guid>
            <category><![CDATA[tips-and-tricks]]></category>
            <category><![CDATA[git]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[rightpoint]]></category>
            <category><![CDATA[github]]></category>
            <dc:creator><![CDATA[Rightpoint]]></dc:creator>
            <pubDate>Fri, 17 Apr 2020 17:12:47 GMT</pubDate>
            <atom:updated>2020-04-17T18:45:57.651Z</atom:updated>
            <content:encoded><![CDATA[<h3>Secrets of Git — git gotchas, tips &amp; tricks</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*vwtQKul2lKRUMkfi" /><figcaption>Photo by <a href="https://unsplash.com/@lukechesser?utm_source=medium&amp;utm_medium=referral">Luke Chesser</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Git is by-and-large the only game in town when it comes to source control these days. <a href="https://bitbucket.org/blog/sunsetting-mercurial-support-in-bitbucket">Bitbucket’s recent decision of sunsetting its support for mercurial</a> has all but cemented git as <strong><em>the</em></strong> way developers share and track code. Git itself is quite old by some standards, created in 2005 by Linus Torvalds for easier distributed code management for building his Linux operating system (The torch was then quickly passed to Junio Hamano, who has been the maintainer of git since 2005 and <a href="https://git-blame.blogspot.com/p/git-public-repositories.html">whose blog and public repositories hold a wealth of information on git</a>).</p><p>Such a popular and long-maintained tool has many helpful scripts and shortcuts hidden in its documentation. If you like digging through the docs as much as we do then some of these “secrets” might be familiar, but we’ve seen many of these tricks underused, and we’d like to share a few that we have found.</p><h3>The Easy Wins — Alias &amp; Autocorrect</h3><p>If you use git, you probably use git all day, that usually means a lot of the same old usual commands. git status, git add, git commit, git push, git pull:</p><pre>$ git status<br> ...<br> modified:   some_file.txt<br> ... <br>$ git add some_file.txt<br>$ git commit -m &#39;added some file&#39;<br> ...<br>$ git push<br> ...<br>$ git pull</pre><p>A quick look at your bash_history can probably confirm it, but a huge majority of your commands probably begin with git. If it does, a quick and easy win is to alias the commands you use most often. Enter the git <strong>alias</strong> config command.</p><pre>$ git config --global alias.s status<br>  <br>$ git config --global alias.c commit<br>  <br>$ git config --global alias.co checkout<br>  <br>$ git config --global alias.p push<br>  <br>$ git config --global alias.pl pull</pre><p>Globally aliasing git commands vastly reduces the amount of manual typing you need to do. Take a look at some of the commands above, aliased for convenience.</p><pre>$ git s # same as git status</pre><pre>$ git c -m &#39;added some file&#39;</pre><p>Just be careful not to make the aliases too vague to be useful. 🙂</p><pre>$ git p # git push or pull? Depends on what you defined</pre><p>A common reason to alias larger commands is so that you don’t misspell them when you’re using them. Every developer using git from the command line has seen this message at least once in their lives:</p><pre>$ git psuh<br>  <br>git: &#39;psuh&#39; is not a git command. See &#39;git --help&#39;.<br>  <br>Did you mean this?<br>  <br>  push</pre><p>The most infuriating thing about this gotcha message is that git clearly knows there is only one possible command you could have meant, what if there was a way for git to just catch those spelling mistakes and resubmit the command correctly? Turns out there is with git <strong>help.autocorrect</strong> setting.</p><pre>git config --global help.autocorrect 10</pre><p>This command enables a git autocorrect setting with a timeout. After x milliseconds of inactivity after a git command with only one correct suggestion, git will correct and retry the command. The timeout is case you disagree with git’s logic. In this case you have 0.1 seconds to cancel the command with control+C.</p><pre>$ git psuh<br>WARNING: You called a Git command named &#39;psuh&#39;, which does not exist.</pre><pre>Continuing in 0.1 seconds, assuming that you meant &#39;push&#39;.</pre><pre>Everything up-to-date</pre><h3>More Impressive Tricks — pickaxe, scripts, and hooks</h3><p>Let’s say for example after a long day of coding &amp; committing you are ready to push changes to a branch, but remembered that you accidentally committed your production credentials to the branch!</p><pre>let myEmail = &#39;someone@rightpoint.com&#39;</pre><pre>let password = &#39;N0tMyR3alP4ssword!</pre><p>A simple git blame on the line could work, if the line was still there, but let’s say that the line was already deleted and that change committed. The password is now floating somewhere inside your git history. This is no small problem, <a href="https://nakedsecurity.sophos.com/2019/03/25/thousands-of-coders-are-leaving-their-crown-jewels-exposed-on-github/">thousands of API and cryptographic keys leak to GitHub every day</a> by accident.</p><p>A crude solution would be to roll back everything, remove the offensive line, recommit, and force push. But force push is destructive, and should not be treated lightly. But what if there are commits you want to keep, or what if someone already pushed these changes? Why can’t you just rebase the single offensive commit and keep everything else?</p><p>Well you’d need to find the commit first, and if you had a lot of spare time on your hands then hunting for it might be fun. But if it’s urgent or late on a Friday afternoon or both, sometimes it’s better to find these things quickly.</p><p><a href="https://git-scm.com/docs/gitdiffcore#_diffcore_pickaxe_for_detecting_addition_deletion_of_specified_string">The git pickaxe</a> is an advanced feature for those very annoying (and hopefully rare) scenarios of source control; It digs through the entire commit history for a string (or regex pattern), returning all matching commit hashes.</p><pre>$ git log -p -S &quot;the thing you want to find&quot;</pre><p>This allows you to find a change in your codebase without knowing when (or even where) it occurred:</p><pre>$ git log -p -S &quot;const password = &#39;N0tMyR3alP4ssword!&quot;</pre><pre>commit 41658be12110473f85014dc47c7d691758407213</pre><pre>Author: hopefully_not_you &lt;an@email.com&gt;</pre><pre>Date: ...the rest of the commit, including a diff of the file</pre><p>Of course, sometimes the pickaxe is rather too effective in finding what you ask it for, (finding common things like generic variable names could give you more results than anticipated). For best use, try to ensure that your search query is unique across all of time and space. Or try the other flags in git log for limiting your results to a set time.</p><pre>$ git log -p -S &quot;const password = &#39;N0tMyR3alP4ssword!&quot; --since=&quot;2019-09-01&quot; # limits the results to a safe time in the past</pre><p>Now let’ s go back to the common events in your daily programming routine. Let’s say that you do the same basic things when starting a new feature branch; you pull &amp; checkout master, you create a branch name (with a certain naming scheme) with an empty commit, and then you push it:</p><pre>git pull<br>  git checkout master<br>  git branch feature/EXAMPLE-100-my-new-feature<br>  git checkout feature/EXAMPLE-100-my-new-feature<br>  git commit -m &#39;[EXAMPLE-100] starting work&#39; --allow-empty<br>  git push --set-upstream origin feature/EXAMPLE-100-my-new-feature</pre><p>While aliases might cut down on some of the typing, it’s still the same old commands, time after time, that we need to keep making. That’s a lot of repetitive work!</p><p>A bash function would be perfect for this kind of scenario. Add the following to your bash_profile</p><pre># $/.bash_profile <br>    createEmptyBranch() {<br>      git checkout master &amp;&amp; \<br>      git pull &amp;&amp; \<br>      git branch $1 &amp;&amp; \<br>      git checkout $1 &amp;&amp; \<br>      git commit -m &#39;starting work&#39; --allow-empty &amp;&amp; \<br>      git push --set-upstream origin $1    <br>    }</pre><p>And now in a fresh terminal the following function should be available to you:</p><pre>$ createEmptyBranch my-test-branch<br>  Switched to branch &#39;master&#39;<br>  Your branch is up to date with &#39;origin/master&#39;.<br>  Already up to date.<br>  Switched to branch &#39;my-test-branch&#39;<br>  [my-test-branch f58c0e6] starting work<br>  Enumerating objects: 1, done.<br>  ...<br>   * [new branch]      my-test-branch -&gt; my-test-branch<br>  Branch &#39;my-test-branch&#39; set up to track remote branch &#39;my-test-branch&#39; from &#39;origin&#39;.</pre><p>If you’ve never herd of a bash script, they’re really worth their own blog post to dive into, but for our current purposes you can think of them as aliases for multiple command line commands. They are called, in order, halting if any of the intermittent commands fail (which is the purpose of the &amp;&amp; symbols).</p><p>They are especially useful when you need to conform to certain naming conventions for automation. For example, if you’re using a tracking system like Jira and all branch names and commits require a ticket number the following scripts might be quite useful:</p><pre># $/.bash_profile </pre><pre>  # creates a new branch a jira url and additional description, for example:  <br>  # $ createEmptyJiraFeatureBranch <a href="https://example.jira.com/EXAMPLE-100">https://example.jira.com/EXAMPLE-100</a> my-example-feature<br>  # creates a branch named:&#39;feature/EXAMPLE-100-my-example-feature&#39; with empty commit: &#39;[EXAMPLE-100] starting work&#39;<br>  createEmptyJiraFeatureBranch(){<br>    local JIRA_TICKET=$(echo $1| cut -d&#39;/&#39; -f 5)<br>    local BRANCH_NAME=&quot;feature/$JIRA_TICKET-$2&quot;<br>    git pull<br>    git checkout master<br>    git branch $BRANCH_NAME<br>    git checkout $BRANCH_NAME<br>    git commit -m &#39;[$JIRA_TICKET] starting work&#39; --allow-empty<br>    git push --set-upstream origin $BRANCH_NAME   <br>  }<br>  <br>  # updates master and starts a merge from an arbitrary branch <br>  mergeMaster(){<br>    local BRANCH=$(git rev-parse --abbrev-ref HEAD)<br>    git checkout master<br>    git pull<br>    git checkout $BRANCH<br>    git merge master<br>  }  </pre><pre>  # functions can be composed of existing functions, here is an arbitrary example:  <br>  # same parameters as createEmptyJiraFeatureBranch<br>  createBranchAndImmediatelyMerge(){<br>    createEmptyJiraFeatureBranch $1 $2<br>    mergeMaster<br>  }</pre><p>git hooks are one productive step further in that they are scripts that run automatically when you’re doing something else in git.</p><p>Inside every git repository is a directory called “.git/hooks”:</p><pre>$ ls .git/hooks/<br>    applypatch-msg.sample<br>    commit-msg.sample<br>    fsmonitor-watchman.sample<br>    post-checkout<br>    post-commit<br>    post-merge<br>    post-update.sample<br>    pre-applypatch.sample<br>    pre-commit.sample<br>    pre-push<br>    pre-push.sample<br>    pre-rebase.sample<br>    pre-receive.sample<br>    prepare-commit-msg.sample<br>    update.sample</pre><p>Containted in this directory are all customizable behaviors that run during certain times in your workflows, along with several sample files to give you ideas.</p><p>For example, if we wanted a to add a jira ticket number to the beginning of our commit message we could create the folowing file named .git/hooks/prepare-commit-msg</p><pre>#!/bin/bash<br>  # Include any branches for which you wish to disable this script<br>  if [ -z &quot;$BRANCHES_TO_SKIP&quot; ]; then<br>    BRANCHES_TO_SKIP=(master develop staging test)<br>  fi<br>  # Get the current branch name and check if it is excluded<br>  BRANCH_NAME=$(git symbolic-ref --short HEAD)<br>  BRANCH_EXCLUDED=$(printf &quot;%s\n&quot; &quot;${BRANCHES_TO_SKIP[@]}&quot; | grep -c &quot;^$BRANCH_NAME$&quot;)<br>  # Trim it down to get the parts we&#39;re interested in<br>  # only currently works with branches of acertain structure: e.g. feature/EXAMPLE-##-foo or bugfix/EXAMPLE-####-bar  <br>  TRIMMED=$(echo $BRANCH_NAME | sed -e &#39;s:^.*\/\([^-]*-[^-]*\)-.*:\1:&#39; -e \<br>      &#39;y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/&#39;)<br>  # If it isn&#39;t excluded, preprend the trimmed branch identifier to the given message<br>  if [ -n &quot;$BRANCH_NAME&quot; ] &amp;&amp;  ! [[ $BRANCH_EXCLUDED -eq 1 ]]; then<br>    sed -i.bak -e &quot;1s/^/[$TRIMMED] /&quot; $1<br>  fi</pre><p>(Don’t forget to run “git init” before expecting to see your new hooks.)</p><p>This will allow us to skip writing each commit with the same jira ticket that’s in our branch.</p><pre>git checkout some/EXAMPLE-100-branch-name<br>git commit -m &#39;I&#39;m going to be prepended&#39;<br>git log -1<br>commit ... (HEAD -&gt; some/EXAMPLE-100-branch-name, some/EXAMPLE-100-branch-name)<br>Author: ...<br>Date:   ...</pre><pre>  [EXAMPLE-100] I&#39;m going to be prepended</pre><p>These hooks even occur inside other source control tools in other applications, such as the source control inside VSCode:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/598/0*QhtJFl67FNSnaL-J.png" /></figure><p>Development workflows have gotten more diverse and customized over the years, and here at Rightpoint we know how much they can vary from project to project. It’s challenging to give general advice on such a complicated topic, and we don’t expect every one of these tools will be useful to you immediately. We hope that your development experience is slightly improved by at least one of them, that maybe it piques your interest in digging into the documentation yourself.</p><p>Do you have a git secret? Or maybe another way to use the tools we described? Share it with us in the comments!</p><p>Here are some new ones from our readers that we really like:</p><p>Delete all local git branches: Useful after a long day of closing PRs</p><pre>clean-git-branch() {<br>  echo Cleaning branches...<br>  git for-each-ref --format &#39;%(refname:short)&#39; refs/heads | grep -v master | xargs git branch -D<br>  echo Done.<br>}</pre><p>Submitted by <a href="https://github.com/JoeM-RP/">Joe Meyer</a> (originally from <a href="https://stackoverflow.com/a/10610669/4597704">this StackOverflow post</a>)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=82a1df9fcc5d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/rightpoint/secrets-of-git-git-gotchas-tips-tricks-82a1df9fcc5d">Secrets of Git — git gotchas, tips &amp; tricks</a> was originally published in <a href="https://medium.com/rightpoint">Rightpoint</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Salesforce Dreamforce: The Inspiration for Organized Chaos]]></title>
            <link>https://medium.com/@Rightpoint/salesforce-dreamforce-the-inspiration-for-organized-chaos-dbb2e093c326?source=rss-89be00badb49------2</link>
            <guid isPermaLink="false">https://medium.com/p/dbb2e093c326</guid>
            <category><![CDATA[salesforce]]></category>
            <category><![CDATA[digital-inspiration]]></category>
            <dc:creator><![CDATA[Rightpoint]]></dc:creator>
            <pubDate>Wed, 10 Oct 2018 18:08:45 GMT</pubDate>
            <atom:updated>2018-10-10T21:52:23.691Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4a1fk_dXxl4nSPqWT_2LFg.png" /></figure><p>Amish Dholakia, Digital Strategy Director, Rightpoint</p><p>When was the last time you were truly inspired? Was it when Steve Jobs delivered his commencement speech at Stanford? Was it when Barack Obama made his inaugural address to the nation? Or maybe when you heard Martin Luther King’s “I have a dream” speech for the first time? I can count on one hand the number of times I have truly been inspired to make a change, go down an uncertain path, or even pursue the unachievable. The reality of our fast-moving world is that great is not good enough anymore, and good is quite bad. To capture the attention of the masses, there needs to be something so moving, so groundbreaking that it causes legitimate pause and strikes at the core of our roots.</p><p>There was a bit more to Dreamforce, Salesforce’s annual conference, this year than the usual technology announcements. It wasn’t because of the 171,000 registered attendees or the 10 million people watching the event live online or even the fact that there were over 2,700 sessions happening across the 4-day event. It was because of the messages that were being delivered, particularly the message that was delivered during Mr. Marc Benioff’s keynote. Typically, Salesforce’s executive teams conduct a roadshow around the country performing their planned keynotes in front of smaller audiences to understand the reaction of the crowd and adjust the message so it is perfect by the time they get to the big stage at Dreamforce. However, this year, when Marc spoke at Dreamforce — the entire message was unrehearsed, from the heart, and most importantly inspirational.</p><p>He spoke about us understanding what it meant to leave something better in our places. He connected that message to the children in today’s community and how our public school systems need help (resources, funding, etc.) to provide the necessary platform for success for these children. He even went so far as instructing his entire leadership team to “own” helping a school by providing them with whatever resources are needed 24/7. Rather than getting up on stage and talking about the tremendous amount of success Salesforce has seen in the past year, he chatted about how we, as people, could be doing better for our community, for children, and for each other. This Salesforce technology that has now grown beyond the simple CRM capabilities is meant to bridge that gap. To this end, he introduced Philanthropy Cloud. This new product now allows organizations to ultimately drive donations to various non-profit organizations around the world and promote a larger community effort. Many details were not shared about the Philanthropy Cloud, but it certainly shows their commitment to truly making this effort or idea a reality.</p><p>Additional takeaways from Salesforce Dreamforce 2018 include:</p><ol><li><strong>Salesforce is connecting the customer experience.</strong></li></ol><p>The real “light bulb” moment for those in attendance this year was the introduction (or re-introduction) of a new platform/program called Customer 360. This is somewhat more focused towards the “administrators” of the Salesforce ecosystem allowing them to now connect multiple Salesforce clouds together. They will also be able to connect to many of their legacy systems through API calls which will allow Salesforce to act as the “hub-and-spoke” of the technical architecture. A lot of this “connection” is being powered by the Integration Cloud (also known as Mulesoft which Salesforce acquired for $6.5 billion). Organizations will now be able to bridge the gap and understand the full end-to-end experience being followed by their customers while adjusting areas that could improve the customer journey.</p><p><strong>2. Data and automation matter a lot more.</strong></p><p>Many of the sessions focused on centralizing data as a result of Customer 360’s capabilities with Mulesoft. This undoubtedly lead to an increased involvement from Einstein (the AI platform that is a part of the Saleforce product suite). Salesforce has worked to make the next version of Einstein stronger, and it now spreads across many of the clouds (marketing, service, etc.). While Einstein will partner heavily with Mulesoft, it will allow organizations to find the discrepancies in their data and clean it for a stronger understanding of the customer journey. The other announcement that was made centered around Einstein Voice. This is a new capability that enables Salesforce users to use voice to manage platform capabilities. For example, sales representatives can use their voice to ask about opportunities in their pipeline. Marketers can use Einstein Voice to learn click-through results from a recent email campaign. There is an abundance of use cases where service, sales, marketing and commerce employees can utilize Einstein Voice to do their jobs. This appears as a step towards adding more consumer-like capabilities into the Salesforce platform that will likely help improve utilization rates across employees. In terms of the use cases for AI, many organizations talked about specific tactical tasks such as forecasting customer traffic and empowering employees. In fact, employee empowerment was highlighted as a primary benefit of AI during the event keynote.</p><p>3. <strong>Commerce Cloud is ready for the big leagues.</strong></p><p>Commerce cloud was certainly discussed more during this year’s Dreamforce than in previous years. The seamless integration (through Mulesoft) to the other clouds makes it significantly more appealing to both B2B and B2C organizations. The power of commerce was highlighted during the keynote through examples of United Way (non-profit organization), Brunello Cucinelli (luxury clothing retailer), and Marriott (worldwide leader in hospitality management). The keynotes/demos went on to show that the value proposition for commerce cloud becomes a lot more obvious when it is combined with the Service and Marketing Cloud.</p><p>4. <strong>Salesforce is investing in strategic partners around the technology ecosystem.</strong></p><p>Salesforce announced a partnership with Apple and has expanded their relationship with Amazon Web Services this year. Again, there weren’t a lot of details behind this, but speculation suggests that this may be the groundwork for a bigger announcement in the coming years. For now, they have simply announced that the companies intend to be more integrated and collaborate more towards achieving customer success.</p><p>In the end, it was an exhausting 4 days filled with futuristic demos, groundbreaking announcements, and pie-in-the-sky visions. Organizations, both big and small, likely left the event with new ideas and inspiration. But as with any conference of this size, they’ll now face the challenge of how to make it actionable in their own world. The partners (both vendor and AppExchange) in the Salesforce ecosystem were quite revitalized by the various new opportunities that have now been created in the market at their respective clientele. If nothing else, there was one very obvious takeaway no matter what session or keynote you attended: Salesforce is showing no signs of slowing down and the best may still be yet to come.</p><p>And that inspirational thought will be the way the organized chaos known as Dreamforce will be remembered.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dbb2e093c326" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Three Ways iOS12 Will Impact You]]></title>
            <link>https://medium.com/@Rightpoint/three-ways-ios12-will-impact-you-e8f42985c47f?source=rss-89be00badb49------2</link>
            <guid isPermaLink="false">https://medium.com/p/e8f42985c47f</guid>
            <category><![CDATA[mobile]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[product-development]]></category>
            <category><![CDATA[apple]]></category>
            <category><![CDATA[mobile-strategy]]></category>
            <dc:creator><![CDATA[Rightpoint]]></dc:creator>
            <pubDate>Fri, 05 Oct 2018 14:52:53 GMT</pubDate>
            <atom:updated>2018-10-10T21:35:32.022Z</atom:updated>
            <content:encoded><![CDATA[<p>Justin Kaufman, Senior Director, Mobile &amp; Emerging Tech, Rightpoint</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v24zxxzpw5eNPUtCak7ZeA.png" /></figure><p>This September, Apple took several bold steps that will help brands build lasting relationships with their customers. Across hardware, software, and apps, Apple is building a platform that works for users, on their own terms. Thanks to under-the-hood improvements to performance and repairability, consumers won’t need to replace their phones quite as often as in the past. Paired with new and exciting features that learn how you work and play, Apple’s made sure that customers will be loyal to the platform and, as a consequence, its apps.</p><p>Here are some of the major changes in iOS 12 and how they’ll impact app publishers.</p><ol><li>Notifications</li><li>Workflows</li><li>Personalization</li></ol><p>Notifications<br>With the latest release, Apple has completely revamped notifications to reduce interruptions. Each app’s notifications are now grouped together. Users can perform complex actions, including composing messages, from within a notification, itself. In addition, notifications can be silenced or disabled entirely from the lockscreen; no more hunting in settings. iOS will actually <em>prompt</em> users to disable notifications from apps they seldom use. A new “Screen Time” feature encourages users to disconnect and highlights apps that send the most highlights.</p><p>Apple’s created a system that rewards respectful communication. Engaging customers with useful notifications will get apps noticed. Apps that spam users with marketing messages, meanwhile, will get silenced. With iOS’ custom notification settings, quality apps can finally break through the noise and reach users. All they need to do is send specific, personalized, and actionable notifications.</p><p>Actions<br>iOS 12 offers new and more convenient ways for customers to interact with apps. In addition to tapping an app or swiping to its Today widget, users can now trigger actions from search, Siri, and Apple Watch. Imagine asking Siri to “order my regular coffee” or tapping your wrist to kick off your commute by reporting traffic conditions and resuming your audiobook. By opting into the new action and shortcut system, app publishers can serve customers without forcing them to break their flow navigating an app.</p><p>Personalization<br>Apple recognizes that technology should conform to people, not the other way around. Both Notifications and Workflows rely on sophisticated machine learning models that adapt to users’ habits over time. Apple has made these tools available to developers so that they, too, can anticipate user preferences and goals. Apps can leverage Core ML and ARKit to understand users’ behavior and environments. It’s easier than ever for apps to adapt to user habits, repeat frequent tasks, and recommend interesting content. Anything your app learns can be surfaced as an action, simultaneously growing user engagement with your brand and customer satisfaction.</p><p>Improving the longevity of devices, limiting notifications, offering quick access to app actions, and learning user habits all demonstrate Apple’s commitment to customer experience. In the iOS 12 era, apps that support users’ objectives without stealing their attention will prevail.</p><p>Want to talk about mobile &amp; web excellence? We have a long history of building engaging mobile applications, rich web-based technologies and CMS based applications. <a href="https://www.rightpoint.com/company/contact">We’d love to work with you.</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e8f42985c47f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Voice Interfaces Will Require New Product Strategies]]></title>
            <link>https://medium.com/@Rightpoint/voice-interfaces-will-require-new-product-strategies-3fc8f67477e?source=rss-89be00badb49------2</link>
            <guid isPermaLink="false">https://medium.com/p/3fc8f67477e</guid>
            <dc:creator><![CDATA[Rightpoint]]></dc:creator>
            <pubDate>Fri, 05 Oct 2018 14:49:39 GMT</pubDate>
            <atom:updated>2018-10-10T21:35:58.205Z</atom:updated>
            <content:encoded><![CDATA[<p>Greg Raiz, Chief Innovation Officer, Rightpoint &amp; Founder of RaizLabs</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HUq653-XbgH8ubQC9YqraA.jpeg" /></figure><p>Voice is the new interface and every major device is starting to build in these capabilities. My car, phone, and computer all have elements of Voice integrated both via speaking and hearing. Alexa and Google Home have broken into the mainstream and they are just getting started. These devices are voice-activated assistants that answer questions, play music and perform a collection of other at-home tricks.</p><p>While these new voice devices are amazing, we’re still living in the DOS days of voice. What do I mean? In the early days of computers, we didn’t have graphical user-interfaces, we had command-line interfaces where you would see a cursor. These cursors would blink and you needed to type a command in a very specific way. Want to change folders? It’s “cd.” Want to delete a file? It’s either “rm” or “del”, and be careful that you don’t accidentally delete your entire computer. We’re in the same era of voice. You can’t just say something, you have to say it just so.</p><p>“Alexa, ask Spotify to play rock music on living room speakers.”</p><p>Who talks like that?</p><p>Human conversations have subtlety, context, back-and-forth, introjections, and situational awareness. Conversations don’t have “skills” that need to be installed. As voice technologies continue to advance they will sound and behave more and more conversational.</p><p>Siri was first, Alexa created a market, Google is expanding it.</p><p>Siri was a small startup that <a href="https://techcrunch.com/2010/04/28/apple-buys-virtual-personal-assistant-startup-siri/">Apple acquired in 2010</a>. At the time Siri was doing some basic voice work but it was largely a digital assistant. Amazon introduced the Echo in 2014 and the breakthrough was largely its improvement in response performance. Where Siri would take a few seconds to respond, the Echo would respond near-instantly. Performance is often a key software innovation and differentiator that is not talked about often enough. With the basics of assistance and performance, the next major advancement has been Google’s broad ability to interpret language.</p><p>While we’re nowhere near the Hal 9000 or Star trek fiction of voice recognition we are getting closer to it every day. Earlier this year Google announced Duplex, a new voice technology that it’s testing.</p><p>Now, talking computers are nothing new. We’ve had talking robots in Star Wars since the 1970’s and the idea that a computer could speak and carry out helpful tasks have been a sci-fi narrative for many years. What’s different about Duplex is that it’s not just a computer that we know is a computer, it’s a computer pretending to be human.</p><p>The advancement of Duplex shows how much closer we are to some of the natural speech problems of introjections, interpretation and open-ended conversations.</p><p>At Rightpoint we’re working on open-ended speech problems and how they can apply to real product innovations. We believe that the digital kiosks and mobile apps of the future will be much closer to natural conversations that we’ve been having for years.</p><p>In the 1940’s-50’s Alan Turing devised a test to see if a computer could pass as a human, this was later called the Turing test. The test sparked a race to try to build software that could pass for intelligence. While there’s been a ton of progress in computer science toward the Turing test, the next chapter seems to be the Voice Turing test and by that measure, we’re getting much closer.</p><p><em>Interested in having voice capabilities added to your product experience? Rightpoint works with Alexa, Google and Cortana technologies to build tomorrow’s voice apps today. </em><a href="https://www.rightpoint.com/company/contact?_ga=2.46754276.250593867.1536854067-867413353.1532358621"><em>Contact us</em></a><em> to learn more.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3fc8f67477e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>