<?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 ashley_wnj on Medium]]></title>
        <description><![CDATA[Stories by ashley_wnj on Medium]]></description>
        <link>https://medium.com/@ashleywnj?source=rss-f27fe8fc984d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*dmbNkD5D-u45r44go_cf0g.png</url>
            <title>Stories by ashley_wnj on Medium</title>
            <link>https://medium.com/@ashleywnj?source=rss-f27fe8fc984d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 01:14:36 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ashleywnj/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[Test Automation — exploring some options to reduce cost and improve quality]]></title>
            <link>https://medium.com/@ashleywnj/test-automation-exploring-some-options-to-reduce-cost-and-improve-quality-ba6c45e6c481?source=rss-f27fe8fc984d------2</link>
            <guid isPermaLink="false">https://medium.com/p/ba6c45e6c481</guid>
            <category><![CDATA[testing]]></category>
            <category><![CDATA[emr-software]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[home-care-provider]]></category>
            <category><![CDATA[healthcare]]></category>
            <dc:creator><![CDATA[ashley_wnj]]></dc:creator>
            <pubDate>Fri, 15 Mar 2019 18:13:25 GMT</pubDate>
            <atom:updated>2019-03-15T18:13:25.080Z</atom:updated>
            <content:encoded><![CDATA[<h3>Test Automation — exploring some options to reduce cost and improve quality</h3><blockquote>Gauge and Taiko, a perfect balance of feature-rich, but easy to get started.</blockquote><p>While I am not a QA Analyst and have no deep experience in browser automation setup, I am continuously looking for ways to improve quality while reducing complexity, with the ultimate purpose of identifying cost-effective solutions. Reducing the costs associated with development allows us to reduce the overall cost of the solution, which we can then use to support our customers, who we know have to operate under constant reimbursement pressure and need to operate as efficiently as possible.</p><p>After several hours of acceptance &amp; regression testing for a new release, I took a break this weekend to explore some of the automation options that exist. ( I thought it would be a fun and distracting way to spend a few early morning hours on Saturday). We, of course, have a QA Analyst who works on browser-based regression automation suites &amp; tests with Selenium, the de facto standard, but I was searching for a toolset that would enable broader participation in the process and with fewer maintenance needs.</p><p>There are many proprietary options out there, some of which are using interesting approaches with AI. However, one option surfaced and caught my attention: <a href="https://gauge.org/">Gauge</a>, I took a quick look and was intrigued, the approach defined by the ThoughtWorks Team made sense to me. When used in combination with Taiko, it provides a simple yet powerful alternate toolset with a different philosophy.</p><h4>Setup</h4><p>Gauge supports multiple languages, IDEs, CI/CD tools, and automation drivers. I opted to go with JavaScript, Taiko, and VS Code. The <a href="https://gauge.org/getting-started-guide/we-start/">Get Started docs </a>are comprehensive and easy to follow; For that reason, I won’t recount all of my setup steps</p><h4>First Impression</h4><p>In a short period, less than an hour, I was able to write and run two specifications with seven scenarios, I was amazed at how much sense this all made to me.</p><p>First of all, with VS Code it is pure magic, the ability to write a spec in markdown, which then generates a corresponding JS function that requires minimal editing, or to be in a JS file and “peak” into the references for any specific function, makes it very easy to keep track of what you are attempting to achieve.</p><p><strong>Write Specifications</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*67DG7bq1ig7TVTFlZZwktA.png" /><figcaption>Image 1 — Writing Specifications</figcaption></figure><p><em>Business Test Cases</em> are written using markdown, a simple example of a Spec file I created to explore the setup and syntax are shown in <em>image 1.</em></p><p>Several elements make this logical and easy: Using the <a href="https://marketplace.visualstudio.com/items?itemName=getgauge.gauge">VS Code plugin </a>alerts you that no implementation step is found, and prompts you to create one, as shown in <em>image 2</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/767/1*qt68F6u-taFS9NCam_yfAQ.png" /><figcaption>Image 2 — prompt to create implementation step</figcaption></figure><p>Each spec file must have a heading and a minimum of one scenario, with each scenario containing one or more steps. A spec file heading is denoted using # (markdowns H1 tag), a scenario heading is ## (markdowns h2), and steps are identified using markdown unordered list syntax, the asterisk (*)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/980/1*wSGtkwHIirSyDA0qruDtwQ.png" /><figcaption>Image 3 — Specification file</figcaption></figure><p>The corresponding implementation of these steps is shown in image 4. Note the variable defined in markdown using quotes, is passed to the JS function within the angle brackets (the variable within the JS function can be renamed to something that is easier to read when working within the JS file)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/783/1*-fyYhYav6uPVvBTvoJnO-A.png" /><figcaption>Image 4 — Implementation of the steps</figcaption></figure><p><strong>Running the Test</strong></p><p>Once you have completed writing a <em>specification</em> and corresponding <em>implementation</em>, the test can be run from the command line using <em>gauge run specs, </em>which will run all of the specifications within the project, or you can specify specific scenarios by merely adding the name of one or more specs to run, for example, <em>gauge run specs Admin and Master Files.</em></p><p>The results of the test are viewable within the terminal (Image 5) or via an HTML report that provides additional details (Images 6 &amp; 7)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A9o2CJkQkUvmdey0v761Qg.png" /><figcaption>Image 5</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PI6i1mhSJlHrcOwsVumd5A.png" /><figcaption>Image 6 — High-level Visual Report</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KNPsUdYSJEPPW4WgW0Zrfw.png" /><figcaption>Image 7 — Formatted Report</figcaption></figure><p>Guage and Taiko are exciting tools, definitely, worth further exploration — a perfect balance of feature-rich, but easy to get started. I will follow up with a video overview. As someone just evaluating these tools at a high-level, I would also welcome any additional input or guidance.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ba6c45e6c481" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[componentDidUpdate() — prevState, prevProps and a silly mistake]]></title>
            <link>https://medium.com/@ashleywnj/componentdidupdate-prevstate-prevprops-and-a-silly-mistake-38afc72f5abc?source=rss-f27fe8fc984d------2</link>
            <guid isPermaLink="false">https://medium.com/p/38afc72f5abc</guid>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[ashley_wnj]]></dc:creator>
            <pubDate>Sun, 06 May 2018 18:21:19 GMT</pubDate>
            <atom:updated>2018-05-06T18:21:19.874Z</atom:updated>
            <content:encoded><![CDATA[<p>I added a component to my app that enabled a user to search and retrieve data for a particular Home Health Care Provider.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*NeR9UgZX6DRM7JYwuSslcA.png" /></figure><p>To update the data based on the user input required the use of <a href="https://reactjs.org/docs/react-component.html#componentdidupdate">componentDidUpdate</a>, seems relatively straightforward. However I made a simple mistake — huge thank you to <a href="https://learn.handlebarlabs.com/">Spencer Carli</a>, (who offers code review consulting, in addition to creating fabulous courses) for helping identify and correct the issue.</p><h4>The mistake</h4><p>I added the componentDidUpdate() lifecycle method and compared <em>State:</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/910/1*6ZVlmB0GOGw4kiDJCIis1Q.png" /><figcaption>This code resulted in multiple API requests per second</figcaption></figure><p>Because I was only comparing <strong><em>State</em></strong> to <strong><em>prevState</em></strong><em>, </em>I did not set up to include <strong><em>prevProps </em></strong>as a parameter<strong><em>. </em></strong>It worked, the search returned the data as expected — I only caught the issue due to getting into the habit of using console.log when creating / adding data return methods. The console.log showed that I was hitting my API multiple times per second. Spencer identified the issue within a minute or two — I needed to include prevProps as an included parameter.</p><pre>componentDidUpdate(prevProps, prevState)</pre><p>This resolved the issue — app works perfectly and only one request to the API</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/996/1*K2S0JlDCUnbGb8rHSIal1w.png" /><figcaption>Simple addition of prevProps parameter corrected the multiple call issue</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=38afc72f5abc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DataMiner: Home Health Care — Patient Survey data update]]></title>
            <link>https://medium.com/@ashleywnj/dataminer-home-health-care-patient-survey-data-update-d48136968df7?source=rss-f27fe8fc984d------2</link>
            <guid isPermaLink="false">https://medium.com/p/d48136968df7</guid>
            <category><![CDATA[healthcare]]></category>
            <dc:creator><![CDATA[ashley_wnj]]></dc:creator>
            <pubDate>Sun, 29 Apr 2018 11:53:51 GMT</pubDate>
            <atom:updated>2018-04-29T12:08:30.886Z</atom:updated>
            <content:encoded><![CDATA[<p>With the release of the latest Medicare Provider Patient Survey results, for the <em>data collection period of October 2017 through September 2017</em>, DataMiner has an additional view that shows all of an organization’s Star Rating results, across their multiple provider numbers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/621/1*G-6UyyxUFfEup1DNCJsHSA.png" /></figure><p>Simply select <strong><em>Satisfaction by Provider </em></strong>from the Main Menu, enter the beginning of the provider name and tap the search button. In the example shown in the image, all 161 of the providers CCN’s that received a Star Rating are accessible in one scrollable view.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d48136968df7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AppSync, Resolvers, DynamoDB & Queries]]></title>
            <link>https://medium.com/@ashleywnj/appsync-resolvers-dynamodb-queries-570ea33526b5?source=rss-f27fe8fc984d------2</link>
            <guid isPermaLink="false">https://medium.com/p/570ea33526b5</guid>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[aws-appsync]]></category>
            <category><![CDATA[aws-mobile]]></category>
            <category><![CDATA[graphql]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[ashley_wnj]]></dc:creator>
            <pubDate>Sun, 25 Mar 2018 13:01:43 GMT</pubDate>
            <atom:updated>2018-03-25T13:11:17.560Z</atom:updated>
            <content:encoded><![CDATA[<p>In a previous post, I documented my experience with loading DynamoDB; this post is a brief description of understanding how to get data out, in a format I need. What I have learned may result in rebuilding one of the larger tables, but for now this is how I approached it. I would welcome any guidance on how to improve this solution or recommendations on learning resources related to designing NoSQL data structures with GraphQL implementations.</p><h4>Reason for selecting DynamoDB and AppSync</h4><p>I have a comprehensive understanding &amp; knowledge of MSSQL and MySQL, from both a database design and development standpoint. I should have probably just gone with developing traditional APIs. However, the concepts and advantages of NoSQL and the entire AWS Mobile ecosystem is too intriguing to pass up.</p><p>In addition to wanting to learn more about AWS Mobile solutions, such as the potential increased performance, ability to scale, relatively low cost AND the ability to use the Apollo Client in my React-Native app, I had to at least give the AWS GraphQL implementation a try. The potential upside made the learning curve a worthwhile investment.</p><h4>My Issue</h4><p>I initially created the table with the ID field as the Primary partition key, then State Name as the Primary sort key.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1014/1*gflV6o9YQHj-01w6Zmk-NQ.png" /><figcaption>Selecting a specific record</figcaption></figure><p>This setup works fine for selecting a random list or for specific records for which the ID is known.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/782/1*SYVx4fpm-yAyjtzBip9tPg.png" /></figure><p>This simple query returns the data as expected.</p><p>I tried editing the resolver to use “filter” on the generic “list all” schema, (replicating a simple SQL where clause) each variation I tried returned an error:</p><blockquote>“message”: “Validation error of type MissingFieldArgument: Missing field argument id”.</blockquote><p>Back to the <a href="https://docs.aws.amazon.com/appsync/latest/devguide/resolver-mapping-template-reference-dynamodb.html#aws-appsync-resolver-mapping-template-reference-dynamodb-query">documentation</a>. A piece I had missed in the first few pass-throughs:</p><blockquote>The Query request mapping document lets you tell the AWS AppSyncDynamoDB resolver to make a Query request to DynamoDB, and allows you to specify the following: Which index to use.</blockquote><h4>Back to DynamoDB</h4><p>The Index Tab of the selected table provides an option to create secondary indices</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zL-lUmr0WW6CpiPViHaYYA.png" /><figcaption>Indexes tab of a selected table</figcaption></figure><p>In creating the secondary index, you have to specify what data fields you want to have access to in your query; I went with the “All” option, just to keep it simple. I will probably revisit this choice and compare access and performance in the future.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CibZaAWl_LMGfautuMCCRg.png" /></figure><p><strong>Note </strong>that this <strong><em>does</em></strong> incur a cost, mine totaled $1.46 per month.</p><p>With the new index in place, I modified the resolver to require the index and included the options:</p><blockquote>“index” : “StateName-index-copy”,</blockquote><blockquote>“select”: “ALL_ATTRIBUTES”</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hNT5aH2F1kr74surhZVOvQ.png" /><figcaption>The Resolver using the secondary index</figcaption></figure><p>This resolved (pun intended) my issue of accessing all records for StateName, in different views of my React-Native app I can now use the primary filter and specify which fields to return:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RXGMJSSZf0FUpjerkGdphQ.png" /><figcaption>Simple query using the secondary index resolver</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=570ea33526b5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AppSync, S3, Data Pipeline & DynamoDB]]></title>
            <link>https://medium.com/@ashleywnj/appsync-s3-data-pipeline-dynamodb-854f99d70b41?source=rss-f27fe8fc984d------2</link>
            <guid isPermaLink="false">https://medium.com/p/854f99d70b41</guid>
            <category><![CDATA[appsync]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[ashley_wnj]]></dc:creator>
            <pubDate>Sat, 10 Mar 2018 13:59:11 GMT</pubDate>
            <atom:updated>2018-03-10T16:34:55.484Z</atom:updated>
            <content:encoded><![CDATA[<p>I cannot say I’m entirely comfortable with AWS yet, but I plan to be, and these posts are to help me on that journey; it has taken some time to get setup, but certainly worth the time investment.</p><h4>The Why</h4><p>I have been developing a data-driven app with React Native and looking to use the Apollo client and AWS AppSync, <a href="https://code.tutsplus.com/tutorials/code-an-app-with-graphql-react-native-and-aws-appsync-the-app--cms-30569">based on this tutorial </a>from Nader Dabit.</p><p>Nader’s post provides the step-by-step setup and uses a GraphQL database using AWS AppSync and React Native.</p><h4>My challenge</h4><p>I needed to load 30,000 rows of data into DynamoDB, being new to the AWS ecosystem, this required some investigation and a couple of failed attempts; This was challenging due to some of the AWS documentation — a lot of which is excellent, but some of which I found confusing and somewhat circular.</p><blockquote>Once figured out, however, it is just pure magic.</blockquote><p><strong>To load the data:</strong></p><ul><li>Amazon Simple Storage Service — S3. This was surprisingly simple to setup and provide role access to from the pipeline and DynamoDB, plus upload times are blazingly fast.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TloeAwUTDb4ShaYCNmE6SQ.png" /></figure><ul><li>AWS Data Pipeline, its web service that is used to automate movement and transformation of data. The use of variables makes this a little intimidating at first, but the <a href="https://docs.aws.amazon.com/datapipeline/latest/DeveloperGuide/dp-concepts.html">documentation on pipeline setup</a> is very good, with several templates to select from.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v-JkVEQKKerNZJYRKv4rAg.png" /></figure><ul><li>DynamoDB, AWS’s fast and flexible NoSQL database service — again, relatively straightforward setup, although the Key / Sort definitions caught me out on the first setup.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OFnunrG_LLrlzMfiYLUuBg.png" /></figure><p><strong>I encountered two primary issues (as you can see from the 3 failed attempts):</strong></p><ul><li>Ensuring correct authorization to allow access to each service, here the <a href="https://docs.aws.amazon.com/datapipeline/latest/DeveloperGuide/dp-getting-started.html">AWS documentation shines</a>, just follow the guides on IAM roles — I could have saved myself some time if I had read through the documentation first.</li><li>File format needed to import into DynamoDB — this caused me the most issues, according to the documentation, I should have been able to import from a tab-delimited file. Several failed attempts and the only hint in the error log <em>MalformedJsonException: Expected ‘:’ at line 1 column 6</em>. This is where, in my opinion, the AWS documentation becomes circular — thankfully I found, buried in the google searches, a <a href="https://calorious.wordpress.com/2016/03/18/episode-4-importing-json-into-dynamodb/">helpful post </a>.</li></ul><h4>My solution</h4><p>Due to future requirements, I wanted to use S3 and the Pipeline, despite the initial issues and the low cost</p><blockquote>(the multiple failed attempts, plus the eventual load of 36,000 rows, cost $7.20, going forward it will be a dollar or two a month — tremendous value).</blockquote><p>I converted the tab-delimited file to rows of dynamoDB JSON objects; each object separated on a new line — I am setting up a script to do this, however, for the initial quick “test” I cheated and used a quick excel function:</p><blockquote>=CONCATENATE(“{“,”””id”””,”:”,”{“,”””s”””,”:”,””””,A2,””””, “}”, “,”)</blockquote><p>This was a low effort way to test the load and to make sure I had the correct format.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wL_p-TAl4Pzi42WZAgqeKQ.png" /><figcaption>Tab delimited format</figcaption></figure><p>I did this for each column and it transformed my tab-delimited into the dynamoDB JSON objects needed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/982/1*ICHxFzgXnjIjOXxvoUuplw.png" /></figure><blockquote>The alternative is to create a Node app, as outlined in the referenced post <a href="https://calorious.wordpress.com/2016/03/18/episode-4-importing-json-into-dynamodb/">Importing JSON into DynamoDB post</a>.</blockquote><p>I now have the beginnings of a solution that will scale (once I have the script to convert my data into dynamoDB JSON objects).</p><p>Once you have the data, graphQL AppSync is relatively straightforward.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1JksxBr1NyPEjYXLZiSC2Q.png" /><figcaption>AppSync query builder</figcaption></figure><p>Now I’ll head back to Nader’s article to incorporate this into my React Native mobile app. More to follow.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=854f99d70b41" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[React Native — componentDidUpdate()]]></title>
            <link>https://medium.com/@ashleywnj/react-native-componentdidupdate-f6d27ece9349?source=rss-f27fe8fc984d------2</link>
            <guid isPermaLink="false">https://medium.com/p/f6d27ece9349</guid>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[learning-to-code]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[ashley_wnj]]></dc:creator>
            <pubDate>Fri, 02 Mar 2018 14:57:06 GMT</pubDate>
            <atom:updated>2018-03-02T15:34:57.752Z</atom:updated>
            <content:encoded><![CDATA[<p>I am surprised I did not get blocked for what must have appeared to be a “Denial of Service” attack. My lesson — read the docs!</p><p>I built a simple React Native app that pulls and displays Home Health Care statistics for all States (geographic) and Counties.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/876/1*6_INl9QpdNAA1l81vKAcew.png" /></figure><p>The user selects the State, and the data is refreshed to show the relevant providers.</p><p>Fairly straightforward: setup an end-point, create a filter for State, <a href="https://reactjs.org/docs/faq-ajax.html#how-can-i-make-an-ajax-call">use fetch</a> …. render with Flatlist and style with <a href="https://react-native-training.github.io/react-native-elements/docs/rating.html">React-Native-Elements </a>(Card &amp; Rating) — quick aside Elements is a great component library.</p><h4>The “gotchas”</h4><p>During the development cycle everything ran fine on the Simulator, navigation was fast, screen refresh rate / data-loading was fast.</p><p>I then created the standalone binaries and submitted to the app &amp; play stores (I used <a href="https://expo.io/">Expo</a>, the most fantastic tool/solution I have ever used). The deployed app on iOS was slow — navigation lagged, screen refresh rates were inconsistent and would take between 5 to 20 seconds.</p><p>I could not identify the cause — Android ran fine, Simulator ran fine — I tried a few variations on stack versus tab navigation — no luck. I reached out to <a href="https://medium.com/u/1ec17560bf99">Spencer Carli</a> who provides tutorials/training on <a href="https://learn.handlebarlabs.com/">Handlebar Labs</a> — great RN courses, some paid / some free — Spencer helped me identify three key issues.</p><p>I’ll write another post to cover them all, however getting to the point of this post, and this is embarrassing — the way I was using componentDidUpdate() to fetch the data resulted in a separate API call for each entity in the state selected, returning all entities with each call. A State such as Florida or Texas has a few thousand providers! No wonder it was slow.</p><p>The “fix” — using the <a href="https://reactjs.org/docs/react-component.html#componentdidupdate">prevProps parameter — from the docs</a> and a simple if statement.</p><p>componentDidUpdate() is invoked immediately after updating occurs. This method is not called for the initial render. This is also a good place to do network requests as long as you compare the current props to previous props (e.g. a network request may not be necessary if the props have not changed).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OGtIPj110XUvRr7Kk-DcTQ.png" /></figure><p>I am amazed by the tooling and community around React Native — loving both learning and developing — before my next project, I need to step back and heed the advice of Spencer, that he covers in his article <a href="http://I am amazed by the tooling and community around React Native — loving both learning and developing — before my next project, I need to step back and heed the advice of Spencer that he covers in his article How to Become a React Native Developer in 2018.">How to Become a React Native Developer in 2018.</a> Grateful for the help!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f6d27ece9349" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[React Navigation — Cannot read property ‘navigate’ of Undefined]]></title>
            <link>https://medium.com/@ashleywnj/react-navigation-cannot-read-property-navigate-of-undefined-94ff5e9d3c2a?source=rss-f27fe8fc984d------2</link>
            <guid isPermaLink="false">https://medium.com/p/94ff5e9d3c2a</guid>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[ashley_wnj]]></dc:creator>
            <pubDate>Sun, 04 Feb 2018 13:48:38 GMT</pubDate>
            <atom:updated>2018-02-04T13:48:38.701Z</atom:updated>
            <content:encoded><![CDATA[<p>Last night I once again received a lesson that reading the docs is a great place to start, this time with React Navigation.</p><p>My project has a chart component (courtesy of <a href="https://formidable.com/open-source/victory/docs/victory-chart/">Victory Chart</a>, a fantastic charting library), then rendered as a child of a screen component.</p><p>The desired behaviour was that <strong><em>tapping</em></strong> on a chart area would then navigate to a detail component — somewhat basic functionality. However, it generated the error: “Cannot read property ‘navigate’ of Undefined in React Navigation.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YaZzI1C3F-NceWwZ5knfKQ.png" /></figure><p>After spending an hour or two trying several solutions from Stack Overflow, none of the proposed solutions worked for my particular use case.</p><p>An “ah ha” moment … perhaps read the documentation, sure enough, five minutes later and I was back on track, error resolved, the desired behavior implemented.</p><p>I followed the documentation and added <br><strong><em>import { withNavigation } from ‘react-navigation’; </em></strong>to my child component.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1010/1*EUFxyah-lGBYFzMMRfPJVg.png" /></figure><p>Then added the export to the end of the file, including withNavigation: <strong><em>export default withNavigation(ChartStatePenetrationItem);</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MpG7Q_yTetCk8VEeDAPKsw.png" /></figure><p>The documentation for React Navigation is extremely well done. The <a href="https://reactnavigation.org/docs/navigation-prop.html">Navigation prop reference API documentation </a>took me five minutes to solve the issue — perhaps one day I’ll start with the documentation :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=94ff5e9d3c2a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[An app that delivers on its promise]]></title>
            <link>https://medium.com/@ashleywnj/an-app-that-delivers-on-its-promise-300e694d9101?source=rss-f27fe8fc984d------2</link>
            <guid isPermaLink="false">https://medium.com/p/300e694d9101</guid>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[slack]]></category>
            <dc:creator><![CDATA[ashley_wnj]]></dc:creator>
            <pubDate>Thu, 29 Dec 2016 10:53:18 GMT</pubDate>
            <atom:updated>2016-12-29T10:53:18.809Z</atom:updated>
            <content:encoded><![CDATA[<p>A few weeks ago I was introduced to an app that promised to make expense reports “Quick and easy”. <a href="https://www.certify.com/">Certify</a>, a web and mobile app for managing expenses, delivers on that promise. There are some apps that I would categorise as <em>‘a delight to use’, </em>Certify falls into that category.</p><p>It may seem silly to get excited by an app for expense report management, but the ease of use helps with the mundane and time consuming process of expense report submission; this ensures that the correct expenses are captured and reported close to the event. The benefit for the company — providing greater insight into spend versus budget, for the employee — easier to submit, faster payment: no lost expenses or interest on overdue credit cards.</p><h4><strong>Three methods to capture expenses</strong></h4><p>All are built with a simple workflow — that is the delight.</p><p>The three options:</p><ul><li><strong>Take a picture</strong>: From within the app on your mobile device, take a picture of the receipt.</li><li><strong>Email receipts: </strong>Attach an image of a receipt in an email and send to Certify</li><li><strong>Integrations:</strong> It took me two minutes to setup Uber</li></ul><p>All three options auto populate the required fields, even the photo option will add the detail it reads from the image, so far it has worked flawlessly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/203/1*VsyfchN7noM6YvQMp-14Jg.png" /></figure><p>A simple and elegant app that hides the sophisticated rules and workflows that help streamline the entire process of expense reporting.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=300e694d9101" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Learning Laravel: Small steps — Rate Limiting & testing]]></title>
            <link>https://medium.com/@ashleywnj/learning-laravel-small-steps-rate-limiting-testing-9c22165fd65?source=rss-f27fe8fc984d------2</link>
            <guid isPermaLink="false">https://medium.com/p/9c22165fd65</guid>
            <category><![CDATA[phpunit]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[laravel]]></category>
            <dc:creator><![CDATA[ashley_wnj]]></dc:creator>
            <pubDate>Mon, 04 Jul 2016 11:22:29 GMT</pubDate>
            <atom:updated>2016-07-04T11:25:13.867Z</atom:updated>
            <content:encoded><![CDATA[<p>This past week I started to look at refining one of the APIs developed for my Spark based app, with a focus on the addition of rate Limiting and tests, (I know, tests first and then refactor — next time).</p><p>Thanks to <a href="https://laracasts.com/series/whats-new-in-laravel-5-2/episodes/2">Laracasts</a> and a blog post by <a href="https://mattstauffer.co/blog/api-rate-limiting-in-laravel-5-2">Matt Stauffer</a> this became a fairly straightforward exercise, although I have to admit I got a little lost while going down an <a href="https://github.com/jkbrzt/httpie">httpie</a> path — a very cool tool, but not one I should have tried to apply to ‘everything’, more on that later.</p><p>Laracasts provides a solid overview of rate limiting, (a feature added to Laravel in version 5.2) in a 9 minute video. In the examples provided by both Laracasts and Matt, the Rate Limiting<strong> throttle middleware<em> </em></strong>is attached to a route.</p><p>My app was already using <strong>auth middleware<em> </em></strong>in the api’s controller:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/462/1*9RAazBGp8U5ESFg6ck1NqA.png" /><figcaption>auth middleware in api controller</figcaption></figure><p>It therefore made sense to add Rate Limiting simply by adding ‘throttle’ to the existing closure: <strong><em>middleware([‘auth’, ‘throttle’])</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/501/1*QT_fV3UnzzESr3DFsanLlA.png" /></figure><p>By default the ThrottleRequests.php middleware defaults to a maximum attempt rate of 60 in 1 minute - this can be overridden as shown in the screenshot above. I initially set this to 3 so that I could easily test it in the browser. It worked perfectly, now for the tests.</p><p><strong>A quick side trip</strong></p><p>In the Laracasts video Jeffrey Way introduced <a href="https://github.com/jkbrzt/httpie">httpie</a>, a cool tool that helped further my understanding of api’s / web-services. If you do not have access to Laracasts (I highly recommend signing up, it is an amazing resource) a quick overview of httpie is provided by <a href="https://youtu.be/x0iWeM4gbHQ">David on YouTube</a>.</p><p>I lost some time and gained some knowledge while trying to incorporate httpie into my phpunit tests and explore its possibilities.</p><p>My initial though was to execute the httpie command from within my phpunit tests by using <strong><em>exec() </em></strong>and then compare the headers and values against the rate I set in my controller.</p><p>The headers that confirm the <strong>throttle middleware</strong> is called and the rate at which it is set.</p><pre>X-RateLimit-Limit: 60<br>X-RateLimit-Remaining: 59</pre><p>I tried a few options to return the header information and to test the ‘To Many Attempts’ message.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/957/1*YbHa_fL5OltHLiawzhHFnw.png" /><figcaption>This was just one variation, intitally I was checking for the presence of a header X-RateLimit-Limit</figcaption></figure><p>This created an issue, the <strong><em>exec()</em></strong> command runs independently of the authenticated user, i.e. $this-&gt;be(User::find(1) does not provide authentication for the command running within the exec(). Since both auth and throttle required middleware, I obviously could not use the <strong><em>withoutMiddleware </em></strong>function. After an hour or so looking at options with httpie, the obvious solution was to drop it and move on.</p><p>I modified the test to instead hit the end-point a set number of times and check for the status code 429 and check to see that the html contained ‘Too Manny Attempts’.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/829/1*euMSZIurxNySONkU4rXcOg.png" /></figure><p>This worked<strong><em>.</em></strong></p><p>One caution: although it may seem obvious, the count in the while loop has to be exactly 1 (one) greater than the set limit; the while loop then ends and the very next attempt elicits the ‘Too many Attempts’ response.</p><p><strong>One final attempt to test by reading the header:</strong></p><p>I used a series of options to get and read the header, the most promising of which was <strong><em>assertArraySubset()</em></strong></p><pre>$url = ‘<a href="http://art-t.dev/adrs%27">http://art-t.dev/adrs&#39;</a>;<br>$headers = get_headers($url, 2);<br>$this-&gt;assertArraySubset([‘X-Ratelimit-Limit’ =&gt; ‘50’], $headers);</pre><p>This only worked if I once again dropped the<strong><em> auth middleware.</em></strong></p><p>I finaly had a working solution thanks to <a href="https://laracasts.com/discuss/channels/testing/test-rate-limit-throttling-catch-22">@ohfss on Laracasts forums</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/767/1*I5-v01gWj0HTm-x71F-B_A.png" /><figcaption>Working solution to test header key and value</figcaption></figure><p>This solution, after fetching the page, used <strong><em>$response-&gt;headers-&gt;get(‘X-Ratelimit-Limit’)</em></strong> to get a specific header ‘key’ and then <strong><em>assertEquals(50, $header_value)</em></strong> to check for the required value associated with the header.</p><p>Note: This is definitely a learning journey, as such any alternate approaches or recommendations are appreciated — the exercise of writing these small steps down are primarily an opportunity to reinforce what I have learned.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9c22165fd65" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Learning Laravel: Small steps using Vue]]></title>
            <link>https://medium.com/@ashleywnj/learning-laravel-small-steps-using-vue-531371052d11?source=rss-f27fe8fc984d------2</link>
            <guid isPermaLink="false">https://medium.com/p/531371052d11</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[laravel]]></category>
            <category><![CDATA[laravel-spark]]></category>
            <category><![CDATA[vuejs]]></category>
            <dc:creator><![CDATA[ashley_wnj]]></dc:creator>
            <pubDate>Fri, 17 Jun 2016 10:52:25 GMT</pubDate>
            <atom:updated>2016-06-17T10:57:32.163Z</atom:updated>
            <content:encoded><![CDATA[<p>The first iteration of my web-app with Laravel’s <a href="https://spark.laravel.com/docs/1.0/installation">Spark</a> used the standard blade functionality to enter and display data. Larvel makes this so, so easy — however to perform the submission and display the updates, like most (all?) php applications, required a page refresh. <em>I know that whenever I use a web-app that performs a full page refresh, I’m a little disappointed.</em></p><p>Luckily Spark comes with <a href="https://vuejs.org/examples/grid-component.html">Vue.js</a> — Vue.js is a fast lightweight JavaScript framework that, like laravel is well documented and easy to use — particularly since Jeffrey Way provides many lessons on <a href="https://laracasts.com/">Laracasts</a>. Using Laravel to create an API, it becomes fairly easy to perform the actions I wanted using the AJAX capabilities of Vue.</p><p>My challenge and learning opportunity was to:</p><ul><li>Submit and save the completed form</li><li>Launch a modal form with some of the data elements just submitted</li><li>If a specific workflow selected from options presented in the Modal then go back to the page to enter the next record &amp; show a complete status list of all active records.</li></ul><p><strong>The Vue file</strong></p><p>To achieve all three requirements I spent a few hours playing with <a href="http://vuejs.org/guide/instance.html">Methods</a> — trying to filter and reload etc. I could get the first two bulleted items to work fine — the key to all three was pulling the properties from the Vue Data Object into a function outside of the Vue component and then calling the function on page creation and following any user driven events — found this solution thanks to <a href="http://stackoverflow.com/questions/35604987/is-there-a-proper-way-of-resetting-a-components-initial-data-in-vuejs">Stackoverflow</a> &amp; Linus Borg</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/696/1*xyQIQloVYNFCYbtVbkdJow.png" /></figure><p><strong><em>function initialState() {<br> return {<br>…<br> } <br>}</em></strong></p><p>Then pull in the Data object properties by calling the function</p><p><strong><em>Vue.component(‘home’, {<br> props: [‘user’],</em></strong></p><p><strong><em>data: function() {<br> return initialState(); <br> },</em></strong></p><p>At the time the page is initially loaded</p><p><strong><em>created() {<br> this.getAdrList();<br> this.getAssignUser();<br> },</em></strong></p><p>and following user events</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/706/1*zYIfLgQzRNmw0xopypHRdA.png" /></figure><p>This is definitely a learning journey, as such any alternate approaches or recommendations are appreciated.</p><p><strong>NOTE:</strong> While it is possible to build a SPA using Vue without Laravel, I prefer the routing, controller and data access functionality provided by Laravel — perhaps when I have an increased understanding of all components I’ll venture into just using Vue for a project</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=531371052d11" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>