<?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 Ng on Medium]]></title>
        <description><![CDATA[Stories by Ashley Ng on Medium]]></description>
        <link>https://medium.com/@shley_ng?source=rss-b861d7b70fe3------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Jyp3FGEHb7KxFmUmKvs6Mg.jpeg</url>
            <title>Stories by Ashley Ng on Medium</title>
            <link>https://medium.com/@shley_ng?source=rss-b861d7b70fe3------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 08:33:05 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@shley_ng/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[Slack Time 4.5 and 5]]></title>
            <link>https://medium.com/@shley_ng/slack-time-4-5-and-5-b719d241324e?source=rss-b861d7b70fe3------2</link>
            <guid isPermaLink="false">https://medium.com/p/b719d241324e</guid>
            <category><![CDATA[personal-growth]]></category>
            <category><![CDATA[tedtalks]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[personal-development]]></category>
            <dc:creator><![CDATA[Ashley Ng]]></dc:creator>
            <pubDate>Tue, 15 Jan 2019 22:39:03 GMT</pubDate>
            <atom:updated>2019-01-15T22:39:03.529Z</atom:updated>
            <content:encoded><![CDATA[<p>It’s been a while since I’ve made a slack time post. With the combination of some work related retreats and the holidays, I wasn’t able to write anything up. So why 4.5? Well, one of the slack days fell on a retreat day for my company, so I only had half a day. But between then and the most recent one, I had a very nice vacation that was a good reset button. I “worked” a lot on side projects (which there may be a blog post about in the future) as well as just relax and play some video games. Well let’s get on with the Slack Time update.</p><h3>Slack Time 4.5</h3><p><a href="https://www.raywenderlich.com/158-coordinator-tutorial-for-ios-getting-started">Coordinator Tutorial for iOS: Getting Started</a></p><p>I did a pretty simple coordinator pattern tutorial. The tutorial makes an app to show some Kanji. Maybe I just don’t understand the Kanji language, but I felt like the flow of the app was very strange and how it reused some views. It seems like the coordinator pattern might be quite similar to to a Router pattern (that would be an interesting comparison to do!). I do have RayWenderlich architecture books (which i haven’t quite started), so I hope the book goes into more detail about this pattern.</p><p><a href="https://fluffy.es/persist-data/">When to use UserDefaults, Keychain, or Core Data</a></p><p>I was recently using UserDefaults for a side project, and came across this article and decided to give it a read. For one, I learned that you can actually see what is stored in your UserDefaults file 🤯. I had also never used Keychain before to store anything, so I’d like to find some tutorials on that.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F6Om91KRQCiM%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D6Om91KRQCiM&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F6Om91KRQCiM%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/b5e2b4d7be1f59b3a31eef3673ff1e6a/href">https://medium.com/media/b5e2b4d7be1f59b3a31eef3673ff1e6a/href</a></iframe><p>The following video we super helpful, and I have already used it in a few side projects. In short you should add this extension (or something similar) to your project when using TableViews or reusable views.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/852/1*Gqnj7vyKJLBxrMo97PuRMA.png" /></figure><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FL-f1KSPKm4I%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DL-f1KSPKm4I&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FL-f1KSPKm4I%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/fc8f834bdf68d2a1819d7c072b090ee9/href">https://medium.com/media/fc8f834bdf68d2a1819d7c072b090ee9/href</a></iframe><p>I’ve really haven’t done a whole lot with animation. They’re super cool, but I’ve just never spent a whole lot of time focusing on it. Hudl as well as my side projects haven’t done much with CardViews explicitly, but this was a pretty cool animation to learn. Definitely something to think about more with devices like iPhoneX.</p><h3>Slack Time 5</h3><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fembed.ted.com%2Ftalks%2Fbarry_schwartz_the_way_we_think_about_work_is_broken&amp;display_name=TED&amp;url=https%3A%2F%2Fwww.ted.com%2Ftalks%2Fbarry_schwartz_the_way_we_think_about_work_is_broken&amp;image=https%3A%2F%2Fpi.tedcdn.com%2Fr%2Fpe.tedcdn.com%2Fimages%2Fted%2Fccff17e420da45a3422fc521da2173a99029548c_2880x1620.jpg%3Fh%3D316%26w%3D560&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=ted" width="560" height="316" frameborder="0" scrolling="no"><a href="https://medium.com/media/ba40483a5505802088a097eae7bdeae3/href">https://medium.com/media/ba40483a5505802088a097eae7bdeae3/href</a></iframe><p>In this TED Talk, Barry answers the questions “Why do we work?”. If you think the answer is for money, then this is the TED Talk for you. So why do most people do a job that doesn’t get them excited to get out of bed? He goes on to explain how we got into this state and how how we should be thinking about human nature.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fembed.ted.com%2Ftalks%2Fandy_puddicombe_all_it_takes_is_10_mindful_minutes&amp;display_name=TED&amp;url=https%3A%2F%2Fwww.ted.com%2Ftalks%2Fandy_puddicombe_all_it_takes_is_10_mindful_minutes&amp;image=https%3A%2F%2Fpi.tedcdn.com%2Fr%2Ftalkstar-photos.s3.amazonaws.com%2Fuploads%2Ffc646047-513d-40cd-b610-b70f9e582a02%2FAndyPuddicombe_2012S-embed.jpg%3Fh%3D316%26w%3D560&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=ted" width="560" height="316" frameborder="0" scrolling="no"><a href="https://medium.com/media/5e608693081588e44a68deafbb126203/href">https://medium.com/media/5e608693081588e44a68deafbb126203/href</a></iframe><p>Andy talks about the power of mediation and being mindful of being present. He explains that mediation doesn’t have to be sitting cross-legged on the floor with incense burning. It’s more about stepping back and seeing the thought clearly.</p><p><a href="https://www.udemy.com/the-complete-react-native-and-redux-course/">https://www.udemy.com/the-complete-react-native-and-redux-course/</a></p><p>This redux course was something I had started a while ago, but made significant progress over my Christmas and New Year break and then finished up during slack time. In general, I love Stephen Grider’s courses and highly recommend them. As for redux, he makes it super easy to understand. There is quite a lot of terminology in redux that can be confusing but he breaks it down and makes it easy to understand. The only thing is I wish it was done in TypeScript.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b719d241324e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Slack Time #4]]></title>
            <link>https://medium.com/@shley_ng/slack-time-4-6fd26084fde?source=rss-b861d7b70fe3------2</link>
            <guid isPermaLink="false">https://medium.com/p/6fd26084fde</guid>
            <category><![CDATA[personal-growth]]></category>
            <category><![CDATA[tedtalks]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[redux]]></category>
            <category><![CDATA[personal-development]]></category>
            <dc:creator><![CDATA[Ashley Ng]]></dc:creator>
            <pubDate>Wed, 05 Dec 2018 19:16:11 GMT</pubDate>
            <atom:updated>2018-12-05T19:16:11.637Z</atom:updated>
            <content:encoded><![CDATA[<p>Slack time #4 was a pretty heavy in react native and TED talks. After struggling through the Javascript for the react native tutorial, I really should look into using TypeScript, as well just learn more about it. I think I got stuck on an issue for like 30+ minutes because I forgot to export something.</p><p>Started the day off with an iOS tutorial, and going through some enum development ( I absolutely love using enums if I can). After going through it, I realized I already did this tutorial previously or it was just <em>really</em> similar to a conference session at 360iDev.</p><p><a href="https://www.raywenderlich.com/5542-enum-driven-tableview-development">Enum-Driven TableView Development</a></p><p>Second thing on the list was this Todo list tutorial for React Native. I only linked one video, but it is one of four videos. It also had some “extra credit” at the end to implement filtering. Which I probably stumbled around trying to get all the reducers and actions setup for it.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FpyfPG7erRxI%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DpyfPG7erRxI&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FpyfPG7erRxI%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/1e259067998fb185eecfebcbba0a5de6/href">https://medium.com/media/1e259067998fb185eecfebcbba0a5de6/href</a></iframe><p>Here comes the TED talks.</p><p>Adam’s talk wasn’t what I entirely expected. He talked about our “range of acceptable behavior”. How sometimes we’re too scared to speak up or ask questions or we speak up too much and get punished for it by getting dismissed, demeaned, or even ostracized. He linked our range of acceptable behavior to our power in a situation. Something I didn’t expect was that he touched on this power difference is one and the same as a gender difference.</p><blockquote>On average, women make less ambitious offers and get worse outcomes than men. There is one situation where women get the same outcome as men. When they advocate for others.</blockquote><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fembed.ted.com%2Ftalks%2Fadam_galinsky_how_to_speak_up_for_yourself&amp;display_name=TED&amp;url=https%3A%2F%2Fwww.ted.com%2Ftalks%2Fadam_galinsky_how_to_speak_up_for_yourself&amp;image=https%3A%2F%2Fpi.tedcdn.com%2Fr%2Ftalkstar-photos.s3.amazonaws.com%2Fuploads%2F20d6d96c-e0a3-4a74-ab27-092603dbee9b%2FAdamGalinsky_2016X-embed.jpg%3Fh%3D316%26w%3D560&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=ted" width="560" height="316" frameborder="0" scrolling="no"><a href="https://medium.com/media/fab3bfe28a9a2bca95022ab7d07e9fed/href">https://medium.com/media/fab3bfe28a9a2bca95022ab7d07e9fed/href</a></iframe><p>Ernesto was a lot more story telling and I didn’t take a whole lot of notes on it, but it short it’s exactly what he titled his session. Just shut up and listen. <em>“You never arrive with any ideas…you find out what the person wants to do”</em>.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fembed.ted.com%2Ftalks%2Fernesto_sirolli_want_to_help_someone_shut_up_and_listen&amp;display_name=TED&amp;url=https%3A%2F%2Fwww.ted.com%2Ftalks%2Fernesto_sirolli_want_to_help_someone_shut_up_and_listen&amp;image=https%3A%2F%2Fpi.tedcdn.com%2Fr%2Fpe.tedcdn.com%2Fimages%2Fted%2F807cae8b77dc45876db09f711309d529dc250034_1600x1200.jpg%3Fh%3D316%26w%3D560&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=ted" width="560" height="316" frameborder="0" scrolling="no"><a href="https://medium.com/media/b36bccbd3f59ef1d2818f69ade56e3b3/href">https://medium.com/media/b36bccbd3f59ef1d2818f69ade56e3b3/href</a></iframe><p>There were quite a few books I was eyeing by Brené Brown, so I decided to watch her TED talk to see what sort of topics she was passionate about. After reading over my notes a few times, I really don’t think there is a great way to sum up her talk besides giving a really vague overview: She dives into our emotions, such as shame, worthiness and compassion, and then our needs for connection. So you’ll just have to actually watch it to find all the juicy details 🙂.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fembed.ted.com%2Ftalks%2Fbrene_brown_on_vulnerability&amp;url=https%3A%2F%2Fwww.ted.com%2Ftalks%2Fbrene_brown_on_vulnerability&amp;image=https%3A%2F%2Fpi.tedcdn.com%2Fr%2Fpe.tedcdn.com%2Fimages%2Fted%2F3820be698584de25ea375c0bf57ee620caf94b8d_1600x1200.jpg%3Fh%3D316%26w%3D560&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=ted" width="560" height="316" frameborder="0" scrolling="no"><a href="https://medium.com/media/0d60753d1479208f59c6b2dc773a764d/href">https://medium.com/media/0d60753d1479208f59c6b2dc773a764d/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6fd26084fde" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Slack Time #3]]></title>
            <link>https://medium.com/@shley_ng/slack-time-3-de37224c20a5?source=rss-b861d7b70fe3------2</link>
            <guid isPermaLink="false">https://medium.com/p/de37224c20a5</guid>
            <category><![CDATA[tedtalks]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[unit-testing]]></category>
            <category><![CDATA[react-native]]></category>
            <dc:creator><![CDATA[Ashley Ng]]></dc:creator>
            <pubDate>Mon, 26 Nov 2018 15:57:03 GMT</pubDate>
            <atom:updated>2018-11-26T15:57:03.089Z</atom:updated>
            <content:encoded><![CDATA[<p>I started my day off with a TED talk about meaningful work. It compared two condition, meaningful and Sisyphic conditions. Sisyphic for the story of Sisyphus, who pushes a rock up a mount, and just before the top, the rock rolls back down. Dan goes on to talk about a few different examples of meaningful and efficient work, and what are things we do to demean the work we do.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fembed.ted.com%2Ftalks%2Fdan_ariely_what_makes_us_feel_good_about_our_work&amp;display_name=TED&amp;url=https%3A%2F%2Fwww.ted.com%2Ftalks%2Fdan_ariely_what_makes_us_feel_good_about_our_work&amp;image=https%3A%2F%2Fpi.tedcdn.com%2Fr%2Fpe.tedcdn.com%2Fimages%2Fted%2Fe15921c40cf97c7ced77eedd51eb9eaa75d29980_1600x1200.jpg%3Fh%3D316%26w%3D560&amp;type=text%2Fhtml&amp;schema=ted" width="560" height="316" frameborder="0" scrolling="no"><a href="https://medium.com/media/2c638320c07cf065110e0b920c4194ba/href">https://medium.com/media/2c638320c07cf065110e0b920c4194ba/href</a></iframe><p>I heard about lottie a few times before, but had not actually seen anyone use it, especially at Hudl. I decided to see what it was all about with a tutorial that come up in my Youtube subscriptions. Turns out, adding lottie animations is SUPER easy. Just as Sean says, like 99% of the work is just creating the animations in Adobe After Effects.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FdM6u5FlZB70%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DdM6u5FlZB70&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FdM6u5FlZB70%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/affb056c710a7bcf51dfa457a7c058ae/href">https://medium.com/media/affb056c710a7bcf51dfa457a7c058ae/href</a></iframe><p>I moved onto a react native tutorial since I hadn’t done much with react native in a while. I saw Unsure Programmer shared somewhere and decided to see what the channel was all about. The first video(s) I watched were re-creating Apple’s App of the Day animation in React Native (3 part video series). I really wasn’t aware of all the animation APIs available in react native.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FTuGdl_UFTuM%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DTuGdl_UFTuM&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FTuGdl_UFTuM%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/0e7c64423b6856b019efbee2bc39103a/href">https://medium.com/media/0e7c64423b6856b019efbee2bc39103a/href</a></iframe><p>On the meaningful work train, I watch a TED talk about living a meaningful life. Emily talked about what the differences is between happiness and having meaning, and what the four pillars are to live a meaningful life. It’s definitely a video I recommend watching.</p><blockquote>…meaning gives you something to hold onto.</blockquote><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fembed.ted.com%2Ftalks%2Femily_esfahani_smith_there_s_more_to_life_than_being_happy&amp;url=https%3A%2F%2Fwww.ted.com%2Ftalks%2Femily_esfahani_smith_there_s_more_to_life_than_being_happy&amp;image=https%3A%2F%2Fpi.tedcdn.com%2Fr%2Ftalkstar-photos.s3.amazonaws.com%2Fuploads%2F500cb54f-211f-4f7d-8202-a99507891b80%2FEmilyEsfahaniSmith_2017-embed.jpg%3Fh%3D316%26w%3D560&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=ted" width="560" height="316" frameborder="0" scrolling="no"><a href="https://medium.com/media/fc32e09efc5b78edbfd186cec2531b97/href">https://medium.com/media/fc32e09efc5b78edbfd186cec2531b97/href</a></iframe><p>I watch another video from Unsure Programmer about redux (and have his other redux videos in my lineup for next time). I know redux is pretty heavily used in our javascript code at Hudl. I already have a pretty good grasp of the architecture from learning the Flux patter on iOS, but decided to see how it’s done in javascript.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FKcC8KZ_Ga2M%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DKcC8KZ_Ga2M&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FKcC8KZ_Ga2M%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/83974e4dd42fb1adfcac719e3d257525/href">https://medium.com/media/83974e4dd42fb1adfcac719e3d257525/href</a></iframe><p>A continuation from last slack time, I decided to see what else Apple’s NumberFormatter could do by writing unit tests against the API. I didn’t test everything, but just to get my feet wet with the API.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b5ad707ea4a0a7feb5b23d8933090b4e/href">https://medium.com/media/b5ad707ea4a0a7feb5b23d8933090b4e/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=de37224c20a5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Slack Time #2]]></title>
            <link>https://medium.com/@shley_ng/slack-time-2-c039c38d2bb4?source=rss-b861d7b70fe3------2</link>
            <guid isPermaLink="false">https://medium.com/p/c039c38d2bb4</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[personal-development]]></category>
            <category><![CDATA[tedtalks]]></category>
            <category><![CDATA[personal-growth]]></category>
            <dc:creator><![CDATA[Ashley Ng]]></dc:creator>
            <pubDate>Fri, 02 Nov 2018 17:52:29 GMT</pubDate>
            <atom:updated>2018-11-02T17:52:29.851Z</atom:updated>
            <content:encoded><![CDATA[<p>I had my second slack day and got quite a few blog posts up. Half of them were just finishing things up from last time, but it feels good to finally cross those things off my to do list</p><h4>TED Talk</h4><p>I watched <em>The Puzzle of Motivation</em> by Dan Pink. Coincidentally, he talks about Google’s 20% time as well as Atlassian’s FedEx days during his talk. But the he surrounds his whole talk around the quote:</p><blockquote>There is a mismatch between what science knows and what business does.</blockquote><p>Meaning that science has proven that a reward for performance is only effective in a narrow band of circumstances because it narrows our focus and we don’t see the big picture or look outside the box. He uses the Candle Problem as an example of the correlation between speed of performance and rewards. Instead of focusing on extrinsic rewards, we should be focusing on intrinsic rewards/motivators.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fembed.ted.com%2Ftalks%2Fdan_pink_on_motivation&amp;url=https%3A%2F%2Fwww.ted.com%2Ftalks%2Fdan_pink_on_motivation&amp;image=https%3A%2F%2Fpi.tedcdn.com%2Fr%2Fpe.tedcdn.com%2Fimages%2Fted%2F110884_800x600.jpg%3Fh%3D316%26w%3D560&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=ted" width="560" height="316" frameborder="0" scrolling="no"><a href="https://medium.com/media/8eb5e08c2d3a4a329e673d4458c4c161/href">https://medium.com/media/8eb5e08c2d3a4a329e673d4458c4c161/href</a></iframe><h4>Clean Code</h4><p>Finally got around to posting the chapter from last week as well as reading the next chapter, Concurrency. It was an interesting topic to learn and to try and wrap your head around. It brought me back to my college days talking about deadlock, synchronized code, and shared resources.</p><h4>Design Patterns</h4><p>Put up the blog post on the design pattern I started last time. Spoiler, it was the Facade pattern. You can read the full blog post here as well as see the example app with the pattern in use.</p><p><a href="https://medium.com/@shley_ng/architecture-design-patterns-facade-b1af5ae1b2c0">Architecture Design Patterns: Facade</a></p><h4>Unit Tests</h4><p>Another thing I wrapped up from last time. All I needed to do was write some example unit tests in a Playground, and I decided to use NumberFormatter and NSNumber APIs as the example. It was actually pretty interesting looking at all the things NumberFormatter could do that I didn’t know. So might have to mess with that a little more.</p><p><a href="https://medium.com/@shley_ng/unit-tests-a2ac3d60d69c">Unit Tests</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c039c38d2bb4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Unit Tests]]></title>
            <link>https://medium.com/@shley_ng/unit-tests-a2ac3d60d69c?source=rss-b861d7b70fe3------2</link>
            <guid isPermaLink="false">https://medium.com/p/a2ac3d60d69c</guid>
            <category><![CDATA[personal-development]]></category>
            <category><![CDATA[unit-testing]]></category>
            <dc:creator><![CDATA[Ashley Ng]]></dc:creator>
            <pubDate>Fri, 02 Nov 2018 00:04:20 GMT</pubDate>
            <atom:updated>2018-11-02T00:04:20.027Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://www.swiftbysundell.com/posts/reducing-flakiness-in-swift-tests">Reducing flakiness in Swift tests</a></p><ul><li>Flakiness is what happens when tests don’t run consistently — when you get different outcomes depending on time, which machine they’re being run on, or whether they’re run on CI or on the computer you work on.</li><li>Writing test is about making assumptions, but some times we go too far in making assumptions.</li></ul><h4>Things that cause flakiness and ways to fix it</h4><ul><li>Having wait times. Dispatch.main.asyncAfter(deadline: .now() + 5) {}. You should remove the wait times and one way to do that is by creating a protocol (you can see an example of this in the article).</li><li>Jumping between queues, such as background thread and main thread for UI updates. The solution given was just to perform everything on the main thread. The solution give is below.</li></ul><pre>func performUIUpdates(completion: @escaping () -&gt; Void) {<br>    if Thread.isMainThread {<br>        completion()<br>    } else {<br>        DispatchQueue.main.async(execute: completion)<br>    }<br>}</pre><ul><li>Waiting for elements to appear on screen for UI tests. Xcode UI test runner takes into account animations and has an internal wait time (you’ll see Waiting for app to idle in the logs), but custom animations will through this off. So the solution is to wait for an element to appear with a small extension to XCTestCase func wait(forElement: element: XCUIElement, timeout: TimeInterval). Even though we just talked about timeouts above, _____ says the exact timeout is not really important since UI tests can sometimes be really slow to execute. So it doesn’t hurt to add a couple of extra seconds to avoid flakiness.</li></ul><p><a href="http://www.mockobjects.com/2007/04/test-smell-everything-is-mocked.html">Test Smell: Everything is mocked</a></p><p>Pretty good short article, just wish it had more relevant iOS terminology and examples.</p><ul><li>when to <strong>not</strong> mock your class: it has only accessors or simple methods that act on values it holds, it doesn’t have any interesting behavior.</li><li>Don’t mock third party libraries directly. Define an interface for the service that directly applies to your needs (integration tests).</li></ul><p><a href="https://medium.com/javascript-scene/what-every-unit-test-needs-f6cd34d9836d">5 Questions Every Unit Test Must Answer</a></p><ul><li>Before you implement, write test first. TDD.</li><li>Failing tests should read like a high-quality bug report. What is in a good test failure report? 1) What are you testing? 2) what should it do? 3) What was the output (actual behavior)? 4) What was the expected output (expected behavior)? Which I think is something we struggle with at Hudl. It’s usually clear what test broke, but deciphering what part _____</li></ul><h4>What are you testing?</h4><p>The compose() function takes any number of stamps and produces a new stamp</p><h4>What should the feature do?</h4><p>Write a simple string in the test as a clear focus on the requirement(s). &#39;compose() should return a function&#39;. What component aspect are we testing, this will differ based on the granularity on the coverage of the test. We are to test the return type of compose(), to make sure it returns a function instead of undefined.</p><pre>test(&#39;Compose function output type.&#39;, assert =&gt; {<br>    &#39;compose() should return a function.&#39;<br>});</pre><blockquote>If the only available assertion in every test suite was <em>`equal()`,</em> almost every test suite in the world would be better for it.</blockquote><p>The writer states this is because it answers the two most important questions about the unit test; what is the actual output, and what is the expected output? If you finish a test without answering those two questions, you don’t have a real unit test.</p><pre>test(&#39;Compose function output type.&#39;, assert =&gt; {<br>    const actual = typeof compose();<br>    const expected = &#39;function&#39;;<br>    assert.equal(actual, expected,<br>        &#39;compose() should return a function.&#39;);<br>    assert.end()<br>});</pre><p>I thought the above article was pretty interesting but was geared towards javascript, so I decided to do a more iOS relevant example. In doing so, I learned that you could also write and run unit tests in Playgrounds.</p><p><a href="https://medium.com/@johnsundell/writing-unit-tests-in-swift-playgrounds-9f5b6cdeb5f7">Writing unit tests in Swift playgrounds</a></p><p>So here’s an example of writing some simple unit tests for NSNumber and NumberFormatter</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9410915c0fbdddd25b6fc40c3cfdd87e/href">https://medium.com/media/9410915c0fbdddd25b6fc40c3cfdd87e/href</a></iframe><p><a href="https://medium.com/practical-ios-development/the-anatomy-of-a-well-architected-ios-unit-test-a509d2be9ec0">Four simple rules for architecting iOS unit tests</a></p><h4>Isolate components</h4><ul><li>Tests one behavior of one component at a time.</li><li>You should have one XCTestCase file for every component</li><li>Have a good naming convention for your tests and files. class PayrateValidator is in a file called PayrateValidator.swift, which has a test class PayrateValidatorTests which lives in a file called PayrateValidatorTests.swift.</li><li>The key to writing good unit tests is understanding that you need to break your app into smaller pieces that you can test.</li></ul><h4>Isolate Behaviors</h4><ul><li>A well-architected unit test suite breaks each component into behaviors, each with its own function to test them.</li><li>each function should only have one XCTAssert()</li></ul><h4>Do include inverse behavior</h4><ul><li>You want to know that your component does what it should do <strong>and</strong> also doesn’t do what it shouldn’t do.</li></ul><h4>Do be descriptive</h4><ul><li>methods should be descriptive. Exactly what is being tested and how the component is expected to behave.</li><li>A well-architected set of unit tests should function as documentation.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a2ac3d60d69c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Architecture Design Patterns: Facade]]></title>
            <link>https://medium.com/@shley_ng/architecture-design-patterns-facade-b1af5ae1b2c0?source=rss-b861d7b70fe3------2</link>
            <guid isPermaLink="false">https://medium.com/p/b1af5ae1b2c0</guid>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[design-patterns]]></category>
            <category><![CDATA[facade]]></category>
            <category><![CDATA[ios]]></category>
            <dc:creator><![CDATA[Ashley Ng]]></dc:creator>
            <pubDate>Thu, 01 Nov 2018 20:29:06 GMT</pubDate>
            <atom:updated>2018-11-01T20:29:06.824Z</atom:updated>
            <content:encoded><![CDATA[<p>Finally got around to doing another design pattern, the facade. This one was pretty relevant because we’re using it in our current project at work. I don’t think the NasaAPOD app I’ve been working on is a great example of using the facade because the facade is suppose to hide the complexity of a system behind a simple API. The app is already pretty simple, so the facade isn’t complex at all. If I was to fully utilize the facade pattern though, the ApiFacade.swift file would also store and fetch from CoreData instead of fetching from the API every time. This is some pseudo-code of the difference in the fetch function.</p><pre>/// Current Implementation<br>func fetchPhotoInfo(completion: @escaping([NasaPhotoInfo]) -&gt; Void {<br>    // fetch photos from api<br>}</pre><pre>/// Implementation to fully utilize the facade<br>func fetchPhotoInfo(completion: @escaping([NasaPhotoInfo]) -&gt; Void {<br>    // check if photos are in core data<br>    // return photos if in core data    <br>    // fetch photos from api<br>    // store photos in core data<br>    // return photos<br>}</pre><p>Also since going through this facade architecture, I’ve done more with Codable and realized I could clean up my code if I used it instead of doing the mess below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aHi-E_v70a1gBC4NGaoi-g.png" /></figure><p>To wrap up, this was a pretty easy pattern to implement. Like I said earlier, the current features of the app don’t really show off the facade pattern well since it doesn’t have a complex API. I might expand on the app to store to CoreData to just show it off more, but I’d do it in a separate branch because I don’t want to have to setup CoreData in the rest of the existing apps.</p><ul><li><a href="https://github.com/ashleyng/ArchitectureDesignPatterns/tree/master/NasaAPOD-Facade">ashleyng/ArchitectureDesignPatterns</a></li><li><a href="https://medium.com/swiftworld/swift-world-design-patterns-facade-579ef4b3319f">Swift World: Design Patterns — Facade</a></li></ul><ul><li>a simpler interface to a complex subsystem.</li></ul><p><a href="https://wysockikamil.com/swift-facade-pattern/">Design Patterns with Swift: Facade pattern</a></p><ul><li>Hide complexity of a system, class or logic and provide all functionalities behind a simple interface.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b1af5ae1b2c0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Clean Code: Emergence]]></title>
            <link>https://medium.com/@shley_ng/clean-code-emergence-a7f2f247538e?source=rss-b861d7b70fe3------2</link>
            <guid isPermaLink="false">https://medium.com/p/a7f2f247538e</guid>
            <category><![CDATA[personal-development]]></category>
            <category><![CDATA[clean-code]]></category>
            <category><![CDATA[swift]]></category>
            <dc:creator><![CDATA[Ashley Ng]]></dc:creator>
            <pubDate>Thu, 01 Nov 2018 19:43:41 GMT</pubDate>
            <atom:updated>2018-11-01T19:43:41.392Z</atom:updated>
            <content:encoded><![CDATA[<p>A design is “simple” if it follows 4 rules (in order of importance)</p><ol><li>Runs all the tests</li><li>Contains no duplication</li><li>Expresses the intent of the programmer</li><li>Minimizes the number of classes and methods</li></ol><h4>Runs all the tests</h4><ul><li>A design must produce a system that acts as intended.</li><li>Making a the system testable pushes us towards a design where our classes are small and single purpose (SRP), and are not as tightly coupled with DI, interfaces, and abstractions.</li><li>Writing tests leads to better design.</li></ul><h3>Refactoring</h3><ul><li>Incrementally refactor. Each few lines of code, pause and reflect on the new design. Did we just degrade it? Run tests to demonstrate that we haven’t broken anything.</li></ul><h4>No Duplication</h4><ul><li>There are different types of duplication: lines of code that look exactly the same, implementation</li></ul><pre>struct ItemList {<br>    private var items: [Int] = []<br>    func size() -&gt; Int {<br>        return items.count<br>    }<br>    func isEmpty() -&gt; Bool {<br>        return 0 == size()<br>    }<br>}</pre><ul><li>talks about the “Template Method” which looks like just using extensions</li></ul><pre>struct VacationPolicy {<br>    func alterForLegalMinimums() // this should be protected<br>}<br>extension VacationPolicy {<br>    func accrueVacation() {<br>        calculateBaseVacationHours()<br>        alterForLegalMinimums()<br>        applyToPayroll()<br>    }<br>    private func calculateBaseVacationHours() { }<br>    private func alterForLegalMinimums() { }<br>}<br>struct USVacationPolicy: VacationPolicy {<br>    func alterForLegalMinimums() { }<br>}<br>struct EUVacationPolicy: VacationPolicy {<br>    func alterForLegalMinimums() { }<br>}</pre><h4>Expressive</h4><ul><li>Code should clearly express the intent of its author. The clearer the author can make the code, the less time others will have to spend understanding it.</li><li>You can do this by: choosing good names, keep function classes small, using standard nomenclatures, well written unit tests (someone reading the tests should be able to get a quick understanding of what a class is all about), and the most important way is to try. Too often we get the code working and then move on. Take a little pride in your workmanship, and spend time cleaning it up.</li></ul><h4>Minimal Classes and Methods</h4><ul><li>In an effort to make our classes and methods small, we might create too many tiny classes and methods. So we should keep our functions and class count small.</li><li>Goal should be to keep our overall system small while we are also keeping our functions and classes small.</li><li>Remember this is the lowest priority of Simple Design.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a7f2f247538e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Slack Time]]></title>
            <link>https://medium.com/@shley_ng/slack-time-3c229a6c41a8?source=rss-b861d7b70fe3------2</link>
            <guid isPermaLink="false">https://medium.com/p/3c229a6c41a8</guid>
            <category><![CDATA[unit-testing]]></category>
            <category><![CDATA[tedtalks]]></category>
            <category><![CDATA[personal-development]]></category>
            <category><![CDATA[clean-code]]></category>
            <dc:creator><![CDATA[Ashley Ng]]></dc:creator>
            <pubDate>Mon, 08 Oct 2018 17:01:11 GMT</pubDate>
            <atom:updated>2018-10-08T17:01:11.590Z</atom:updated>
            <content:encoded><![CDATA[<p>What is slack time? Well you might be more familiar with Google’s 20% time. If you’re not, slack time is scheduled time in your work calendar that you can use for innovation. Usually consists of side projects that would benefit the company and is not related to the current work you’re doing. Hudl also promotes it as personal growth time to focus on individual improvement, which is generally what I use it for.</p><p>My team has recently moved to a new project that doesn’t have a mobile focus and is completely server side code (learning C# for the first time!). Before, I was scheduling slack time ad-hoc when there was a lull in squad work, but with this change, I decided to actually schedule one day a sprint for it. For me, it’s not only about doing personal growth but to stay active in the mobile world. My plan is to mainly do some form of reading or tutorials with a mobile emphasis. With that said, I had my first scheduled slack time, and I accomplished so much on my to do list!</p><h4>Unit Test</h4><p>I read about five articles on unit tests. More around the topic of “what are good unit tests” and not “how to write unit tests”. I also learned you can write unit test in Playground, so I plan on re-writing some of the examples in the articles with unit tests in Playgrounds.</p><h4>Clean Code: Emergence</h4><p>Been a while since I’ve read a chapter from Clean Code, and the last chapter (one I haven’t made a blog post for) was a bit off-putting because it didn’t feel super relatable to iOS. It used a lot of java examples, like JavaBeans, and that made it super hard to relate to. The Emergence chapter was a fairly short one, but it went through Kent Beck’s rules for Simple Design.</p><h4>TED Talks</h4><p>I had read or heard from someone that if you want to get better at public speaking, you should watch TED talks. I’ve been doing this a bit more often since I’ve realized my goal of doing a conference presentation is looking more and more realistic. The video I watched was by Tim Ferris and “defining fears instead of goals”. I think the presentation could be summed up in a single quote he shares:</p><blockquote>We suffer more often in our imagination than in reality — Seneca</blockquote><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fembed.ted.com%2Ftalks%2Ftim_ferriss_why_you_should_define_your_fears_instead_of_your_goals&amp;display_name=TED&amp;url=https%3A%2F%2Fwww.ted.com%2Ftalks%2Ftim_ferriss_why_you_should_define_your_fears_instead_of_your_goals&amp;image=https%3A%2F%2Fpi.tedcdn.com%2Fr%2Ftalkstar-photos.s3.amazonaws.com%2Fuploads%2F6b784c62-b4d0-4b3a-a1de-89de39b002bc%2FTimFerriss_2017-embed.jpg%3Fh%3D316%26w%3D560&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=ted" width="560" height="316" frameborder="0" scrolling="no"><a href="https://medium.com/media/3b7fa90d6ae909c866f1f6f3a43b87ca/href">https://medium.com/media/3b7fa90d6ae909c866f1f6f3a43b87ca/href</a></iframe><h4>Architecture Design Patterns</h4><p>You might be familiar with my long running series of design patterns, and I have started the next pattern after a few months hiatus. Still have a little bit more code to write and write the blog post, but no spoilers on which one I’m working on 😉.</p><h4>Ray Wenderlich Design Patterns</h4><p>As you might have figured out by now, I like working through design patterns. I’ve had Ray Wenderlich’s book for a while but just read the first two chapters. They were more of introductory chapters about what a design pattern is and how to read a class diagram.</p><p>Whew, what a list! I really didn’t expect to get all of this done in a single day, but it has me looking forward to my next slack day.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3c229a6c41a8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[360iDev 2018 Pt. 1]]></title>
            <link>https://medium.com/@shley_ng/360idev-2018-pt-1-407e2fff6bcc?source=rss-b861d7b70fe3------2</link>
            <guid isPermaLink="false">https://medium.com/p/407e2fff6bcc</guid>
            <category><![CDATA[presentations]]></category>
            <category><![CDATA[connection]]></category>
            <category><![CDATA[conference]]></category>
            <dc:creator><![CDATA[Ashley Ng]]></dc:creator>
            <pubDate>Wed, 05 Sep 2018 20:42:35 GMT</pubDate>
            <atom:updated>2018-09-05T20:42:35.205Z</atom:updated>
            <content:encoded><![CDATA[<p>Last week I attended 360iDev in Denver, Colorado for the first. The conference is a four day event held in Downtown Denver with nearly fifty total sessions offered. As the name kind of eludes to, it’s mainly iOS related topics, but they also had sessions about soft skills and inspirational, non-code sessions. Of course I couldn’t attend every single session, but luckily they do record them. I was able to go to twenty-four sessions, and will talk about some of my favorites. I’ll first share some of the more soft skills and inspirational sessions here, and then do another post on the more technical sessions.</p><p>Overall the conference was a blast and I met a lot of great people! I walked away with some awesome ideas for projects and growth items, which you will hopefully see on here in the near future. I will definitely consider going back, maybe as a speaker next time 😉.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9xp9UJS4SbVq5JXR65goQg.jpeg" /><figcaption>Photo by Tim Mitra</figcaption></figure><h3>Crafting Great Presentations</h3><p>The first day of the conference consisted of 3.5 hour workshops, and the first one I decided to go to was “Crafting Great Presentations” by Jay Thrash. Even though this was at a conference, his tips don’t only apply to conference style presentations, it can be for local meet-ups or even just a presentation at work. He grouped the entire session into three main parts, each for a phase you should have when crafting a presentation: 1) conceive your message, 2) visualize, bring your story to life, 3) present.</p><h4>Conceive</h4><blockquote>Every day, with every action and choice, you’re either a teacher and inspiration, or a lesson and a reminder — Cat Stewart</blockquote><p>The conceive step is all about coming up with your message, and ways to craft your message. Jay talked about a four step process that you can use to figure out what your message should be: topic, brainstorm, story, and then structure. Your <strong>topic</strong> should be something your passionate about. If you’re not passionate about it, that lack of enthusiasm can come across when giving the presentation. <strong>Brainstorm</strong> — do research on the topic and find others who have gone through the same thing, as well as other’s who have the opposite experience. You can also apply divergent versus convergent thinking to fine tune your topic. Figure out what are all the things that fit into the topic, then select the best pieces. <strong>Story </strong>— be a story teller, don’t make it just about being a presentation. Convey the highs and lows till you found the solution, and make the audience understand and reenforce why are you struggling with this. <strong>Structure</strong> — use visuals to reenforce your story, not compete with it. As you go through those steps to create your message, you want to keep in mind a few things:</p><ul><li>Your message should<strong> have a purpose.</strong> What are you trying to get across to your audience?</li><li>Your message should <strong>capture the attention</strong> of the audience and <strong>build a relationship with them</strong>. You can do this by empathizing with them. What is it that brings them in? What are their struggles?</li><li>Your message should <strong>resonate with the audience</strong>. You want your message to be shared further than the single point in time you gave your presentation</li></ul><h4>Visualize</h4><p>At this point you should have your message picked out, and you should start crafting the presentation and bringing your message to life. You want you presentation to be more than just words. When giving the presentation, the audience is splitting their time between you and the slides. <strong>So</strong> <strong>when</strong> <strong>the audience is focusing all their attention on the slides or you’re reading verbatim, they’re probably not hearing what you’re saying. As a result, what is the point of you as the presenter? </strong>This is a disservice to yourself and to the audience. Might as well of printed it off and handed it out. At Hudl, we have company designed slides that we should be using, but Jay gave some design and content guidelines to practice when making your own slides:</p><ul><li>Color should be kept simple (4–5 colors), and should be used consistently throughout the presentation. E.g. one color consistently used of background, one color consistently used for key points, etc.</li><li>Contrast is critical, test your different color combinations with background color(s).</li><li>Typography should be kept simple, same as color. Choose 4–5 fonts and use them consistently. Assign a purpose for each one.</li><li>Use all the space, don’t use tiny fonts. The bigger the font, the easier it is to read</li><li>Layout, again, use consistently. It makes it easier for your audience to consume. It shouldn’t be difficult for your audience to find the most important information</li><li>Images — go big!</li><li>Be aware of text on images. Alter the image so that the text is clearly seen</li><li>Live coding — If you’re brave enough to actually do this: practice, practice, practice. Also highlight key changes. You may not need to see me physically type all the code to get the point across.</li><li>Animations — less is more. Use it to focus attention, but just enough to draw attention. Too many can become distracting.</li></ul><h4>Presentation</h4><blockquote>How well we communicate is determined not by how well we say things, but how well we are understood. — Andrew Grove</blockquote><p>It’s almost time to give your presentation. Before the day actual comes, you should go through your preflight checklist</p><ul><li><strong>Backup copy of presentation somewhere.</strong> In the cloud or on a USB, preferably USB so that if something goes wrong with your computer, you can easily just copy it over to someone else’s computer.</li><li>You have all the dongles and batteries you need.</li><li>“Clean your room”, i.e. clean your desktop!</li></ul><p>At this point, you should have practiced your presentation a lot. <strong>You gain confidence through practicing, and what you’re saying should now be second nature. </strong>One tip Jay gave was to record yourself going through a practice run. Then listen and critique yourself. This also helps if you think you explained or said something in a super awesome way. So when you go back and listen to it, you can remember exactly how you said it. Some other presenter tips were:</p><ul><li>Practice pausing; <strong>you don’t need to keep talking the entire time.</strong></li><li>Be careful with anything ad-lib. You want to be aware of your boundaries and make sure you don’t cover anything to early</li><li><strong>Don’t rely to heavily on your notes. </strong>The more you put on your notes, the more dependent you are on the notes and less engaged you are with the audience.</li></ul><p>Now it’s over, but that doesn’t mean your role is over as a presenter. You should be available for questions and be an active part of the community that was there. Start up conversations or ask for feedback from people who attended. Then refine and repeat the process for the next time you present.</p><h3>Wired for Connections</h3><blockquote>I use to think I needed more ink in my pen or a bigger pen to make a mark.</blockquote><p>The keynote of the conference was given on the second day by Tammy Coron. She talked about the struggles she had growing up, as well as the struggles she faces today at making connections. Growing up she didn’t connect with people because she didn’t think she was worth it. She saw flaws in herself and was concerned with what other people thought of her. She was terrified of people, and that people were going to pass judgement. She thought, <em>“It was not worth it for you to be friends with me.”</em></p><blockquote>Fitting in is about assessing a situation and becoming who you need to be to be accepted. Belonging on the other hand, doesn’t require us to change who we are; it requires us to be who we are — Brene Brown</blockquote><p>She then told use a story about <a href="https://www.lifecoachtraining.com/blog/entry/the_water_bearer_a_teaching_story">a water bearer and his broken pots</a>. The moral of the story is that we are so concerned with the imperfections and flaw we see in ourself that we forget to see the beauty we provide around us.</p><p>Meeting new people has always been a struggle for me. I blame it on being an introvert, but I face some of the same struggles as Tammy with meeting new people. I struggle with starting conversations and always worry about what I’m going to say, but Tammy gave advice to just <strong>be present. </strong><em>“When I worry about how to respond to what you’re saying, I completely miss what you’re saying.”</em></p><p>Her closing line was that we just need to connect with people, and she had some stats from Gallup that showed we are likely to be more engaged and satisfactory when we have a best friend or close friend in the workplace.</p><blockquote>What does it take to put your mark on this world? It doesn’t matter how big your pen is, doesn’t matter how much ink you have. What matters is you have to take cap off. Be willing to show the world your insides.</blockquote><p>That is how we leave a mark in this world, by making connections with people.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=407e2fff6bcc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Architecture Design Patterns: Flux]]></title>
            <link>https://medium.com/@shley_ng/architecture-design-patterns-flux-7b6eb6ea2635?source=rss-b861d7b70fe3------2</link>
            <guid isPermaLink="false">https://medium.com/p/7b6eb6ea2635</guid>
            <category><![CDATA[design-patterns]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[flux]]></category>
            <category><![CDATA[personal-development]]></category>
            <dc:creator><![CDATA[Ashley Ng]]></dc:creator>
            <pubDate>Wed, 01 Aug 2018 21:26:09 GMT</pubDate>
            <atom:updated>2018-08-01T21:26:09.427Z</atom:updated>
            <content:encoded><![CDATA[<p>Next in design patterns is Flux. Most of the popular design patterns used in iOS are multidirectional. Meaning the data moves freely between view controllers and view models and presenters, etc. While Flux has a uni-directional data flow. Meaning the data only flows one way through the app like so:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/843/1*axeE2F5FcLthTG1guspuxw.png" /></figure><p>And I’m sure if you’ve seen this diagram if you’ve ever googled Flux or Redux. But this is how I interpreted the diagram based the Ray Wenderlich tutorial (found at the end of this post) and the structure of the NasaAPOD-Flux app.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/892/1*oUDZDxqwwC7vBAkeKGeFeA.png" /></figure><p>Usually the View listens for actions (button presses, etc) and sends these actions to reducers. The reducers update the state (or data model). Then it goes back to the view with the new state. The state should <strong>never</strong> be changed by the view</p><p>Here’s a quick and dirty snippet of code on Flux versus MVC architecture. The snippet is just to show the difference at a glance, and is just a simple example. After making it, I realized it does a pretty poor job at showing the benefits of Flux over MVC. If you had a more complex data model/state and a more complex UI, it would be a lot easier to handle state changes or UI changes.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ea41187e6521c3f68deb2c98c101c902/href">https://medium.com/media/ea41187e6521c3f68deb2c98c101c902/href</a></iframe><p>I based the associated NasaAPOD app on the Ray Wenderlich tutorial, so there are a lot of similarities between the two. One thing I did find strange is that the Reducers are not in any sort of model. They’re global functions and are separated out into different files based on the kind of Reducer it is. I don’t know which way is the best practice, but unless I find otherwise, I’d rather put them into some sort of class.</p><p>I also encountered an issue where I thought I needed to subscribe to two different states in the NasaAPOD app. When going to the details page of a photo, I needed to know what the photos were and which one was tapped. Originally the photos were only in PhotosState and not in the RoutingState. Based on what I found through Google and GitHub issues, it seemed like it wasn’t so straight forward to do this with ReSwift. After some thinking, I realized I didn’t need to subscribe to the two different states, I just needed my two reducers, routingReducer and favoritePhotoReducer, to listen for the same action. Then both states have a copy of the photos and both states stay in sync because they listen to the same actions.</p><p><a href="https://github.com/ashleyng/ArchitectureDesignPatterns">ashleyng/ArchitectureDesignPatterns</a></p><h4>Tutorials</h4><p><a href="https://www.raywenderlich.com/155815/reswift-tutorial-memory-game-app">ReSwift Tutorial: Memory Game App</a></p><p>Components in ReSwift:</p><ul><li>Views: react to <strong>store</strong> changes. send <strong>actions</strong></li><li>Actions: initiate a state change. an action is handled by a <strong>reducer</strong></li><li>Reducer: directly change the application state, which stored in the <strong>store</strong></li><li>Store: stores the current value of the application state. Views can subscribe and react to changes.</li><li>Reducer: returns the changed app state</li><li>Action: a simple structure that can contain variables. reducer handles a dispatched action and changes the state of the app depending on the type of the acion and its parameters</li><li>There are a lot of different files with only single function in them</li><li>“The helper functions are also pure global functions. You could put them in a class, or a structure, but they should always remain pure.”</li></ul><p><a href="https://medium.com/mackmobile/getting-started-with-redux-in-swift-54e00f323e2b">Getting started with Redux in Swift - Part 1</a></p><ul><li>It is important to point out that the structures must be immutable so that Redux works, only then we ensure that the <strong>State</strong> is changed exclusively by the <strong>Reducers</strong>, so I used Structs and Enums instead of Classes:</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7b6eb6ea2635" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>