<?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 Peter Kowalczyk on Medium]]></title>
        <description><![CDATA[Stories by Peter Kowalczyk on Medium]]></description>
        <link>https://medium.com/@peterkow?source=rss-ccf86984b28a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*UupixY5omkKkDtupFBYOsg.jpeg</url>
            <title>Stories by Peter Kowalczyk on Medium</title>
            <link>https://medium.com/@peterkow?source=rss-ccf86984b28a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 01:24:51 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@peterkow/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[All You Have To Know About Monorepo]]></title>
            <link>https://medium.com/aurity/all-you-have-to-know-about-monorepo-340a501536c5?source=rss-ccf86984b28a------2</link>
            <guid isPermaLink="false">https://medium.com/p/340a501536c5</guid>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[monorepo]]></category>
            <dc:creator><![CDATA[Peter Kowalczyk]]></dc:creator>
            <pubDate>Wed, 31 Jul 2019 11:36:01 GMT</pubDate>
            <atom:updated>2019-08-01T09:07:24.407Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IQzypPer-ReXZy-UA_YfUQ.png" /></figure><p>Those who have <a href="https://youtu.be/PvabBs_utr8?t=16m24s">tried splitting a project into multiple packages</a> know how hard it is to make changes across various packages at the same time. To make the changing process easier, some companies with big projects adopted a monorepo approach which reduces the hassle of writing code across packages.</p><h3>What Is Monorepo</h3><p>Monorepo is source control pattern where all of the source code of some project is kept in a single repository. You can have many projects, and they don’t have to be related. Each package/project in monorepo usually represents one repository.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v7Dp0N4yw_0dQ6KyqVmj2A.png" /></figure><h3>Why Using Monorepo?</h3><p>It supports the 3 main rules in programming. If you still don’t know which one are, those go back and read</p><p><a href="https://blog.aurity.co/the-3-main-programming-rules-every-developer-should-follow-ed5df2caabdd">The 3 Main Programming Rules Every Developer Should Follow</a></p><p>But in short, monorepo helps you to:</p><ul><li>Keep your code simple and avoid unnecessary complexity — The <strong>KISS </strong>rule “keep it simple, stupid.”</li><li>Reduce repetition of the code — The rule number two, Don’t Repeat Yourself (<strong>DRY</strong>).</li><li>With the rule of <strong>Composition </strong>by identifying the simple objects that form complex ones when putting together.</li></ul><p>But beside of keeping your code simple, clean, and organised monorepo has additional advantages:</p><ol><li>Sharing logic and seamlessly working between different packages;</li><li>Sharing the best practices with tslint/eslint, tsconfig/babel with ease across all your apps;</li><li>CI/CD pipelines work well together, building all related apps based on current changes.</li></ol><h3>Tools for Monorepo</h3><p>Create separate packages inside a single repository to have a better code-sharing. This way, teams can share parts of their projects with each other without setting up and maintaining many repositories.</p><p>To manage your monorepo I suggest using the following tools:</p><h3><a href="https://lerna.js.org/">Lerna</a></h3><p>Lerna is a tool that optimizes the workflow around managing multi-package repositories with git and npm. Lerna requires some work at the get-go and more along the way but is a solid way to keep a small number of core packages in a single repository and publish each independently to NPM.</p><p>Lerna automates tasks for packages in the monorepo by managing all dependencies and publishing all packages to npm and will update git tags, etc. Then, packages can be installed from NPM’s registry.</p><p>My favorite command is lerna run test — — since develo it will run all tests, but only in all dependant packages based on changes again develop branch.</p><h3><a href="https://yarnpkg.com/lang/en/docs/workspaces/">Yarn workspaces</a></h3><p>An even better tool is Yarn workspaces as it installs and manages all dependencies better than Lerna, so you have less struggles with symlinks.</p><p>Making Workspaces native to Yarn enables a faster installation by preventing package duplication across Workspaces. Yarn can also create symlinks between Workspaces that depend on each other and will ensure the consistency and correctness of all directories.</p><h3>How to work with Monorepo?</h3><h4>Clone:</h4><p>Start by cloning the full repository using just git clone command.</p><h4>Install:</h4><p>In rootroot folder using</p><p>yarn <strong>install</strong></p><p><strong>Note:</strong> → do it from the root directory as it will create node_module folder and share npm packages between other applications/packages/services etc. Worth to mention that each application might have its own node_module package if the application requires a specific version of the library or if it isn’t shared. Other npm modules are symlinked to node_modulein the root.</p><h4>Run:</h4><p>To run one of the scripts from packages simply</p><p>yarn workspace your-<strong>package</strong>-name script-name</p><p><strong>OR </strong>simply</p><p><strong>cd</strong> packages/app &amp;&amp; yarn start</p><h4>Add npm libraries</h4><p>yarn workspace your-<strong>package</strong>-name add react react-dom --dev</p><p>This will add react and react-dom as devDependencies in your package.</p><h3>Remove npm libraries</h3><p>If you want to remove a package:<br>yarn workspace your-<strong>package</strong>-name <strong>remove</strong> react react-dom</p><h4>Test</h4><p>To invoke the test script for each workspace us</p><p>yarn workspaces run <strong>test</strong></p><h3>Conclusion</h3><p>The discussion around Monorepos is thriving in the community. While most agree on the benefits of a multi-repo architecture, some cases show it is too hard to maintain multiple packages from various repositories. Especially, when working on a shared library.</p><p>To make this easier, new tools emerged in the ecosystem. Lerna which automates keeping and publishing larger packages in a single repository and Yarn that helps with the installation of dependencies from multiple packages.</p><p>After all, remember that sharing code is not just about technology but also about people. Each team member has to be oriented to writing reusable code, encouraging communication and efficiency.</p><p>Read next:</p><ul><li><a href="https://blog.aurity.co/file-structure-in-react-or-native-repository-765550a10ddb">File Structure in React or Native Repository</a></li><li><a href="https://blog.aurity.co/immutable-js-vs-seamless-immutable-f3f18c4d25fb">Immutable.js vs Seamless-immutable</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=340a501536c5" width="1" height="1" alt=""><hr><p><a href="https://medium.com/aurity/all-you-have-to-know-about-monorepo-340a501536c5">All You Have To Know About Monorepo</a> was originally published in <a href="https://medium.com/aurity">Aurity.co</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The 3 Main Programming Rules Every Developer Should Follow]]></title>
            <link>https://medium.com/aurity/the-3-main-programming-rules-every-developer-should-follow-ed5df2caabdd?source=rss-ccf86984b28a------2</link>
            <guid isPermaLink="false">https://medium.com/p/ed5df2caabdd</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[development]]></category>
            <dc:creator><![CDATA[Peter Kowalczyk]]></dc:creator>
            <pubDate>Mon, 22 Jul 2019 13:45:28 GMT</pubDate>
            <atom:updated>2019-07-22T13:45:28.694Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="The 3 Main Programming Rules" src="https://cdn-images-1.medium.com/max/1024/1*tuNmKHqGdOJFWmBHMwKoaQ.png" /></figure><p>Have you ever had to take a step back after making two steps just to be able to take the third one?</p><p>That will happen to you if you try to write the code skipping these 3 main rules. Sooner or later, you will learn the importance of mastering the basics and the wisdom of using it. But don’t be fulled, this journey never ends, and there is always something to improve.</p><p>When a friend asked me at which point do I think I’m a good developer, my answer was — NEVER 😅. However, there are some general rules that can help you build scalable applications. They are very basic but worth to remember.</p><p>In programming, everything comes down to these main three rules:</p><h3>1. Keep Your Code Simple, Stupid</h3><p><a href="https://en.wikipedia.org/wiki/KISS_principle#cite_note-EPar-2">KISS</a> is an acronym for “keep it simple, stupid.” It is a design principle noted by the U.S. Navy in 1960. The KISS principle states that most systems work best if they are kept simple rather than made complicated. Therefore, simplicity should be a key goal in design, and unnecessary complexity should be avoided.</p><blockquote>“Keep it simple, stupid.” — <a href="http://en.wikipedia.org/wiki/Kelly_Johnson_(engineer)">Kelly Johnson</a></blockquote><p>KISS teach us that the complication isn’t a sign of brilliance — it indicates a lack of investment. It shows the incapacity to break down the aspects of a problem to find a solution that could be presented and explained to anyone in a couple of sentences.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cvg5Qkui3RVGlWnDYAUp2g.png" /></figure><p>No tool can address simplicity. Like a <a href="https://codeclimate.com/">CodeClimate</a> tool, it can find your biggest slowdowns and understand where pull requests get stuck, but it can’t tell you how well your code is defined or how to make it simple. That’s why each <a href="https://www.aurity.co/what-we-do/developer-recruitment">developer</a> should make sure to keep the code truly simple while developing.</p><h3>2. Don’t Repeat Yourself</h3><p>DRY or Don’t Repeat Yourself is a software development principle which has reducing repetition of code as the main goal.</p><p>It highlights the importance of avoiding duplication. However, sometimes, the repetition is hard to spot. Sometimes we repeat the code just to be aligned with the first rule — as getting rid of duplicated code could require more complexity.</p><p>Usually, developers get rid of the duplicated code when they do refactoring following the rule of three. This means that it is acceptable to repeat the same code once, but when you do it three times, it’s time for refactoring.</p><h3>3. Composition</h3><p><em>Composition — the act of combining parts or elements to form a whole.</em></p><p>It is all about taking simple objects and combining them into more complex ones. To build a car, you would define a function for constructing essential features like engine, design, or brakes.</p><figure><img alt="The composition rule in programming" src="https://cdn-images-1.medium.com/max/1024/1*Q033goOrRi-6TMDBPRLEIQ.png" /></figure><p>In the case of Front-end development, you would have to translate a design into the code. Each design is composed of visual elements. Before they start, developers try to identify which parts of those elements have to be turned into a component and which ones not.</p><p>When following the rule of composition, you will tend to avoid the creation of extremely complex components. The general rule is that each component should do just one thing. If you find that a small part you’ve created does too many things, you probably want to break it into multiple components. On the other side, if the component does too little, you probably want to skip making that component or merge it with another one.</p><p>The best practice of using the rule of composition is first to identify the components and then bring them to life by combining together into the bigger picture.</p><h3>Conclusion</h3><p>To be sure that your code follows KISS, DRY, and Composition rules, my suggestion is to write a test for it — simple. 😊</p><p>Quite frequently, when things are overcomplicated, they are hard to test. This approach will allow you to write more declarative code, which is easy to understand for everyone.</p><p>Because of this approach, I start using monorepo for projects where you can use all these rules and share a lot of the code.</p><p>Monorepo significantly increases the ability to seamlessly work between different packages, extract them, and share them between frontend, backend, and other services.</p><h4>Read next:</h4><ul><li><a href="https://blog.aurity.co/file-structure-in-react-or-native-repository-765550a10ddb">File Structure in React or Native Repository</a></li><li><a href="https://blog.aurity.co/quick-overview-why-typescript-or-flow-is-awesome-b1a0f57a8c8e">Quick Overview why TypeScript or Flow is Awesome</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ed5df2caabdd" width="1" height="1" alt=""><hr><p><a href="https://medium.com/aurity/the-3-main-programming-rules-every-developer-should-follow-ed5df2caabdd">The 3 Main Programming Rules Every Developer Should Follow</a> was originally published in <a href="https://medium.com/aurity">Aurity.co</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TypeScript TsLint + TSAirBnb + Prettier + Jest + Babel 7 with React Native]]></title>
            <link>https://medium.com/aurity/typescript-tslint-tsairbnb-prettier-jest-babel-7-with-react-native-3ad9969c56a3?source=rss-ccf86984b28a------2</link>
            <guid isPermaLink="false">https://medium.com/p/3ad9969c56a3</guid>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[typescript]]></category>
            <dc:creator><![CDATA[Peter Kowalczyk]]></dc:creator>
            <pubDate>Wed, 05 Sep 2018 14:03:11 GMT</pubDate>
            <atom:updated>2018-09-28T11:38:59.656Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SBIqC4vwN2MXlFkgOnAz0A.png" /></figure><p>How to start with <strong>TypeScript</strong> + <strong>TsLint</strong> + TS<strong>AirBnb</strong> + <strong>Prettier</strong> + <strong>Jest with Babel 7 </strong>for your <strong>React Native</strong> project? Now it is all very simple just follow these simple steps:</p><h4><strong>1. Init your RN 🚀</strong></h4><ul><li>react-native init NAME_XXX</li><li>cd NAME_XXX</li></ul><h4>2. Add TypeScript</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d169703c8af24f9a935e8702c1e64b99/href">https://medium.com/media/d169703c8af24f9a935e8702c1e64b99/href</a></iframe><ul><li>update rn-cli.config.js</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d12c09024f6ee7d64e116b2bd1efcec6/href">https://medium.com/media/d12c09024f6ee7d64e116b2bd1efcec6/href</a></iframe><ul><li>example tsconfig.json</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/65cc55671a096f20cced0d2a9f4eceda/href">https://medium.com/media/65cc55671a096f20cced0d2a9f4eceda/href</a></iframe><h4>3. Rename .jsx to .tsx and move to /src folder</h4><ul><li>App.js →App.tsxApp.js→ src./App.ts</li><li><strong>NOT</strong> index.js, while it’s entry point for the packager</li></ul><h4>4. Add Tests</h4><ul><li>yarn add ts-jest -D</li><li>to tsconfig.jsonadd &quot;types&quot;: [&quot;jest&quot;]</li><li>add typing &quot;yarn add -D @types/jest @types/react @types/react-native @types/react-test-renderer</li><li>Update your package.json replacing &quot;jest&quot;with</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2578a0707d1b5d1a15ca5d1cf035ec82/href">https://medium.com/media/2578a0707d1b5d1a15ca5d1cf035ec82/href</a></iframe><h4>6. Example test</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/469bc6ae31e5cc6581cf0f5417421ac6/href">https://medium.com/media/469bc6ae31e5cc6581cf0f5417421ac6/href</a></iframe><h4>5. Add Prettier and Tslint 🎉</h4><ul><li>yarn add prettier tslint tslint-config-prettier tslint-react lint-staged tslint-config-airbnb husky -D</li><li>update package.json</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/735e410c38806065c093cd90ba1b6da8/href">https://medium.com/media/735e410c38806065c093cd90ba1b6da8/href</a></iframe><h4>7. Done ✅</h4><ul><li>Commit will automatically run Tslint and Prettier ✅</li><li>yarn start🚀</li><li>example repo in here → <a href="https://github.com/aurity/boilerplate_ts_rn">https://github.com/aurity/boilerplate_ts_rn</a> 🎉</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3ad9969c56a3" width="1" height="1" alt=""><hr><p><a href="https://medium.com/aurity/typescript-tslint-tsairbnb-prettier-jest-babel-7-with-react-native-3ad9969c56a3">TypeScript TsLint + TSAirBnb + Prettier + Jest + Babel 7 with React Native</a> was originally published in <a href="https://medium.com/aurity">Aurity.co</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Immutable.js vs Seamless-immutable]]></title>
            <link>https://medium.com/aurity/immutable-js-vs-seamless-immutable-f3f18c4d25fb?source=rss-ccf86984b28a------2</link>
            <guid isPermaLink="false">https://medium.com/p/f3f18c4d25fb</guid>
            <category><![CDATA[programming-languages]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[coding]]></category>
            <dc:creator><![CDATA[Peter Kowalczyk]]></dc:creator>
            <pubDate>Thu, 16 Aug 2018 10:27:19 GMT</pubDate>
            <atom:updated>2018-08-16T10:27:19.092Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_W_Oi5ecL--THbR58_Qsww.png" /></figure><p>This post is not about performance; it won’t give you the answer which one to use and why, but instead will provide you with more knowledge about Immutable.js and Seamless.</p><p>Still up to learn more? Great! Let ‘s see the main differences between these two libraries:</p><h3>Seamless-immutable</h3><h4>1. Syntax</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/26800586383b4226c61d29a99dbdd8ef/href">https://medium.com/media/26800586383b4226c61d29a99dbdd8ef/href</a></iframe><p>Best in here is that you might even don’t know that you are using an immutable object, but as we know: <em>“with great power comes great responsibility.” </em>We have to remember that we can’t mutate object this way, what’s more, this will throw <strong>Error</strong> and your code will 💣💥</p><h4>2. API</h4><ul><li><strong>Set</strong> — sets new data in the same object</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4e4e0891cefb10d6b38b0172ba0a047d/href">https://medium.com/media/4e4e0891cefb10d6b38b0172ba0a047d/href</a></iframe><ul><li><strong>Get</strong> — no getters, while we can access data as follows</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/22bb683f0ea704ec7a42e79cba1d77fb/href">https://medium.com/media/22bb683f0ea704ec7a42e79cba1d77fb/href</a></iframe><p><strong>Note!</strong></p><pre>myObj.user.name = &#39;Chuck&#39;;<br>// Uncaught <strong>TypeError</strong>: Cannot assign to read only property &#39;name&#39; of object</pre><p>Will throw 💥 an exception when you want to override immutable object, while Immutable.js will remain silent 👊</p><h3>Immutable.js</h3><h4>1. Syntax</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9b0e90551d0ef8fa872dabda2d2f0674/href">https://medium.com/media/9b0e90551d0ef8fa872dabda2d2f0674/href</a></iframe><h4>2. API</h4><ul><li><strong>Set</strong> —sets new data in the same object</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/16578b6fd822bf2db10b096398b4b711/href">https://medium.com/media/16578b6fd822bf2db10b096398b4b711/href</a></iframe><ul><li><strong>Get</strong> — gets data</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/109256b056055787a87a6fbbe5756e56/href">https://medium.com/media/109256b056055787a87a6fbbe5756e56/href</a></iframe><h3>Summary</h3><ul><li>Seamless is easy to start with and it will throw an error when you do something wrong. Hopefully not in production 😅.</li><li>ImmutableJS is backed up by Facebook, has a large community and it is continuously evolving. Now <strong>v4</strong> is in the pipeline, although it has some breaking changes if you want to migrate.</li><li><a href="https://www.youtube.com/watch?v=pLvrZPSzHxo&amp;feature=youtu.be&amp;t=1441">Persistent data structures</a> with ImmutableJS.</li><li>Seamless integrates with 3rd party libraries, while it can be still accessible in the same way as JS object.</li></ul><p>Please share with me your opinion and findings!</p><h4>Interested in more posts?</h4><ul><li><a href="https://blog.aurity.co/airbnb-sunsetting-and-facebook-sunrising-react-native-c1488525c2ef">Airbnb Sunsetting and Facebook Sunrising React Native</a></li><li><a href="https://blog.aurity.co/do-i-need-typescript-or-flow-5b73f0744cb2">Do I need TypeScript or Flow?</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f3f18c4d25fb" width="1" height="1" alt=""><hr><p><a href="https://medium.com/aurity/immutable-js-vs-seamless-immutable-f3f18c4d25fb">Immutable.js vs Seamless-immutable</a> was originally published in <a href="https://medium.com/aurity">Aurity.co</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[File Structure in React or Native Repository]]></title>
            <link>https://medium.com/aurity/file-structure-in-react-or-native-repository-765550a10ddb?source=rss-ccf86984b28a------2</link>
            <guid isPermaLink="false">https://medium.com/p/765550a10ddb</guid>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[javascript-tips]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Peter Kowalczyk]]></dc:creator>
            <pubDate>Tue, 14 Aug 2018 11:26:02 GMT</pubDate>
            <atom:updated>2019-10-16T11:08:59.367Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wqIagTQRpTVqIf-Na8wQ6g.png" /></figure><p>Surprisingly common question:</p><blockquote>How do I structure my React or React Native repository?</blockquote><h4>Simple answer:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e_k3oxWIJ0cLPMhKdc2WvQ.png" /></figure><h4>Long answer:</h4><p>There is no “one size fits all” solution. However, the approach mentioned above works, and for sure you’ll want to apply it after reading this section. As there are also some patterns you might use in your projects, I decided to put them in one place, so you can start with a more suitable approach from the beginning and not reinventing the wheel.</p><p>As a starting point, it’s good to understand what you want to build. There are five main categories for a repo you can choose from:</p><ol><li>Hack project/ Pet project</li><li>MVP</li><li>Production App</li><li>Huge app</li><li>Cross-platform RN + Web app</li></ol><p>Before we go deeper into the repo purpose, let’s explain first some base technic you might use.</p><h3>Base technics</h3><h4>1. Grouping by features</h4><p><strong><em>Feature</em></strong> — a distinctive attribute or aspect of something.</p><p><strong><em>Example</em></strong>: An app for managing orders that includes some users:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8c94ca2edc820af96ebdadd41c6529d9/href">https://medium.com/media/8c94ca2edc820af96ebdadd41c6529d9/href</a></iframe><p>➕Pros: easy to navigate → When you work on “orders” you have everything in one folder.</p><h4>2. Grouping by Type</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/038ee5045a52ece496353915b3a0c1f9/href">https://medium.com/media/038ee5045a52ece496353915b3a0c1f9/href</a></iframe><p>➕Pros: standard open source structure→ Although a bit overused 😅</p><h4>3. Hybrid Feature / Types</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c0d3c748b6767e75b2ef029672563d40/href">https://medium.com/media/c0d3c748b6767e75b2ef029672563d40/href</a></iframe><p>➕Pros: your structure will grow, and it will be still manageable, but keep your eye on too deep nesting (aliases might help here 💪).</p><h3>General rules</h3><ul><li>Don’t overthink it, but stay flexible to be able to change it</li><li>Avoid too much nesting</li><li>Be ready to refactor</li><li>Use aliases</li><li>Agree with other team members on some structure you want to follow</li></ul><h3>Repo purpose</h3><h4>1. Hack project/ Pet project</h4><p>Probably you don’t want to overthink it, go with “The simple answer” ^^</p><h4>2. MVP</h4><p>Bottomline, take some boilerplate which you like and go with it 🚀.</p><p>You can start with grouping by Type and then if you need more flexibility you can add a feature group.</p><h4>3. Production App</h4><p>A hybrid approach is something that you want to explore and agree with your team.</p><h4>4. Huge App</h4><p>At the point when you have 40+ features, it is easier for everyone to navigate to a specific feature and work on a specific area which might be a just pure component or redux layer. At this point, you also have some Junior devs which very often are overwhelmed with the codebase, so it’s easier for them to navigate and follow the team’s pattern.</p><h4>5. Cross-platform RN + Web app</h4><p>Now you are sharing probably up to 95% of the codebase between Web, iOS, Android and if you have server sider rendering probably also between node environment. The first thing which will save you is file extensions, which are relevant to the environment.</p><pre>- order.web.jsx<br>- order.ios.jsx<br>- order.android.jsx<br>- order.native.jsx<br>- order.node.js</pre><p>Here you can find the hybrid approach with aliases that works quite well →</p><p><a href="https://www.npmjs.com/package/babel-plugin-module-resolver">babel-plugin-module-resolver</a></p><p>Below is the example of repo structure I used for 95% code reuse, for fully cross-platform support.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d0375b0ac36e8da60314a67bc906b045/href">https://medium.com/media/d0375b0ac36e8da60314a67bc906b045/href</a></iframe><h3>💥 Bonus 💥</h3><p>File name conventions:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/762/1*-rgOTNJyvcqGV8WAtj0JoQ.gif" /><figcaption>search by filename</figcaption></figure><p>My favourite is to search by filename, but your file names should be meaningful. The best is to agree with the team extensions you want to use. Here is our list:</p><pre>- .page<br>- .container.<br>- .service.<br>- .helper.<br>- .api.<br>- .redux.<br>- .actions.<br>- .reducers.<br>- .styles.</pre><h3>Conclusion</h3><p>Start where you want, and you feel comfortable, but it’s good to know your options and some proven tactics. If you give it a try, please let me know how did that go.</p><h4>Interested in more posts?</h4><ul><li><a href="https://blog.aurity.co/challenge-yourself-to-be-the-best-javascript-developer-a3a571fe10ca">Challenge Yourself To Be The Best JavaScript Developer</a></li><li><a href="https://blog.aurity.co/do-i-need-typescript-or-flow-5b73f0744cb2">Do I need TypeScript or Flow?</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=765550a10ddb" width="1" height="1" alt=""><hr><p><a href="https://medium.com/aurity/file-structure-in-react-or-native-repository-765550a10ddb">File Structure in React or Native Repository</a> was originally published in <a href="https://medium.com/aurity">Aurity.co</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Challenge Yourself To Be The Best JavaScript Developer]]></title>
            <link>https://medium.com/aurity/challenge-yourself-to-be-the-best-javascript-developer-a3a571fe10ca?source=rss-ccf86984b28a------2</link>
            <guid isPermaLink="false">https://medium.com/p/a3a571fe10ca</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[development]]></category>
            <category><![CDATA[javascript-tips]]></category>
            <dc:creator><![CDATA[Peter Kowalczyk]]></dc:creator>
            <pubDate>Fri, 03 Aug 2018 11:07:02 GMT</pubDate>
            <atom:updated>2018-08-03T11:07:02.701Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fhaqmT0Bt1qVtkIvqz-Y-A.png" /></figure><blockquote>Because you can!</blockquote><p>It’s really good when you can see the results of your hard work. When you can outperform your expectations and solve a complex problem in a blink of an eye.</p><p>How to get to there? Sometimes we try hard but still, we are not happy with the results we achieved. It’s like going to the gym for a whole year and just seeing small progress. I was there as well, as many people before me, so I’ve made a short list of tips and tricks that might help you to become a pro JavaScript developer.</p><h4>1. Everything starts with basics</h4><p>Make sure you know JS well, try new patterns, play with them, and get understanding of all pros and cons of each approach. Learning and practicing could be time-consuming, but you can’t build a skyscraper without solid fundamentals.</p><h4>2. Functional programming</h4><p>The more pure and simple your code is the easier is to refactor it. In an agile environment, a change is something natural and having a clean approach for your code enables you to refactor things quickly. Pure functions help you to reduce boundaries for your problem and understand your code.</p><h4>3. Write your tests</h4><p>Tests are great way of trying all possible edge cases and clean the code. I catch myself quite often on this, its like rubber duck. You tell her a story about your code and then 💥 new 🐛 just 🔨.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/946/1*xKYQXhgI5NRE2TrM7-V7Ow.png" /><figcaption><a href="https://swag.devrant.com/products/devducks-js-javascript-rubber-duck">https://swag.devrant.com/products/devducks-js-javascript-rubber-duck</a></figcaption></figure><h4>4. Use typescript or flow and eslint/ tslint</h4><p>They are your friends who tell you how to make your code better and more maintainable. Also, Airbnb rules always give you new hints on how to write nice react components.</p><h4>5. Think about the problem and pick the right tool</h4><p>We very often jump on solving problems without even thinking about them. The more you know about the problem and requirements the better tools you can pick. Do your homework, do research, ask other devs, product owner etc. Your chances of implementing right thing with cleaner code are now substantially higher.</p><h4>6. Don’t be afraid to take new challenges</h4><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F8YBB2VvznTi701NQFr%2Ftwitter%2Fiframe&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Forbitgum-deal-agree-lets-do-it-8YBB2VvznTi701NQFr&amp;image=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2F8YBB2VvznTi701NQFr%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="244" frameborder="0" scrolling="no"><a href="https://medium.com/media/ec07e04f15614641508bf3c400de612a/href">https://medium.com/media/ec07e04f15614641508bf3c400de612a/href</a></iframe><p>As a developer the more new problems you can work on the more you can learn. You need to make sure you are putting the bar higher each time to learn new tricks.</p><h4>7. Open source is amazing</h4><p>Open source is a good starting point as well as for mastering your skills in some <a href="https://en.wikipedia.org/wiki/Problem_domain">domain problems</a>. However, building a whole architecture for Uber or Airbnb is a whole different story. Being a part of the <a href="https://www.aurity.co/join-us">company that builds exceptional solutions</a> could be an excellent opportunity for learning many new things. Writing to do app by yourself is simple, but developing Uber apps with a team is a bit more complicated.</p><h4>8. Be proactive</h4><p>Sometimes we tend not to get very involved in the development of the whole product and just focus on some features. The lack of proactivity limits your horizon and understanding of the whole problem. See point <em>1 —</em> the more you know about the problem the better solution you can apply. Talk with your team lead, product owner, designer and try to understand what is really important.</p><h4>9. Code, code, and code</h4><p>You need to experience by yourself what it works and what it doesn’t. That’s why I always try to help others and take more opportunities to build different products and see the final result. This approach will enable you to try more things and learn from them, which will additionally help you to make decisions faster and more accurate.</p><h4>10. Communication</h4><p>This is probably the second most critical skill, so don’t ignore it! Teams build big things, so excellent communication is the key. Give your opinion, but also give others the opportunity to talk. Communication includes both sides, so monolog is not a conversation. Engage with others and help with things that might not be development related.</p><p>I hope this article will give you a better understanding of what it takes to become the best JavaScript developer. If you want to learn more about React, React Native, develop high scalable apps and create your own tools for development, feel free to drop me a line!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a3a571fe10ca" width="1" height="1" alt=""><hr><p><a href="https://medium.com/aurity/challenge-yourself-to-be-the-best-javascript-developer-a3a571fe10ca">Challenge Yourself To Be The Best JavaScript Developer</a> was originally published in <a href="https://medium.com/aurity">Aurity.co</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Airbnb Sunsetting and Facebook Sunrising React Native]]></title>
            <link>https://medium.com/aurity/airbnb-sunsetting-and-facebook-sunrising-react-native-c1488525c2ef?source=rss-ccf86984b28a------2</link>
            <guid isPermaLink="false">https://medium.com/p/c1488525c2ef</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[facebook]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[airbnb]]></category>
            <dc:creator><![CDATA[Peter Kowalczyk]]></dc:creator>
            <pubDate>Mon, 09 Jul 2018 10:43:40 GMT</pubDate>
            <atom:updated>2018-07-10T13:33:25.935Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fN-nSsTIg3SPzvHo-nZvvA.png" /></figure><h3><strong>Facebook sunrise</strong></h3><p>Facebook <a href="https://facebook.github.io/react-native/blog/2018/06/14/state-of-react-native-2018">announced</a> that they are pleased with React Native and they are going to make it even better with large-scale rearchitecture to make the framework more flexible and integrate better with native infrastructure in hybrid JavaScript/native apps.</p><p><strong><em>Main things are:</em></strong></p><ul><li>Changing the threading model for more speed</li><li>Call synchronously into JavaScript on any thread for high-priority updates</li><li>Rework bridge to make it faster and more lightweight</li><li>Add more documentation for topics like startup optimization</li></ul><h3><strong>Airbnb sunset</strong></h3><p>On the other hand, Airbnb post about <a href="https://medium.com/airbnb-engineering/sunsetting-react-native-1868ba28e30a">Sunsetting React Native</a> was a shock for everyone. One of the most significant contributor to React and RN ecosystem just decided to drop React Native in favor of Native approach. If you haven’t read the full explanation here are main takeaways:</p><ul><li>Mixing native apps with RN is hard</li><li>Team size and scale of your application matters</li><li>React Native Immaturity is a challenge</li><li>The performance was not a problem!</li></ul><h3><strong>Great, but what’s next?</strong></h3><p>I must say that I am a huge fan of Airbnb, their <a href="https://airbnb.design/building-a-visual-language/">Unified Design Language System (DLS)</a> and forward thinking about app development. Even to go beyond React Native and to bring React Native to Web with <a href="http://airbnb.io/react-sketchapp/docs/guides/universal-rendering.html">react-primitives</a> or playing with Sketch in tandem with React Native. However, I am pleased that we all got this ice bucket on our heads!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/672/1*tNYkTnns-MqLF4PjkWlBbQ.gif" /></figure><h3><strong>Hype is real!</strong></h3><p>We all get this hype about React Native and that we can build apps for both platforms and we get more and more tools with it like <a href="https://expo.io/">expo</a> to kickstart our projects. Moreover, I must say it’s a great feeling to see that you “can” clone the Airbnb app in just a week. However, the truth is that React Native development is troublesome, it requires you to understand iOS and Android native specifics, knows how to build and distribute the app for both platforms, how to tackle designs challenges and many more.</p><blockquote>When you understand you are in trouble, it’s too late…</blockquote><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FNVNfGt95DLfnq%2Ftwitter%2Fiframe&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FNVNfGt95DLfnq%2Fgiphy.gif&amp;image=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FNVNfGt95DLfnq%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="244" frameborder="0" scrolling="no"><a href="https://medium.com/media/655bf4e2ba892b06075852e96851812a/href">https://medium.com/media/655bf4e2ba892b06075852e96851812a/href</a></iframe><h3><strong>Takeaways</strong></h3><p>App development is not straightforward, and it’s even harder when you think about team management, designing, testing and making sure you hit your deadlines. These aspects you should consider when deciding about the technology and when you consider getting help from some external consultants. The truth is you don’t have to reinvent the wheel and spend enormous money on research like Airbnb or Facebook. Partner up with someone who already has this knowledge and can take you further in the long run. In our opinion:</p><blockquote>React Native is excellent, and it’s not going anywhere soon.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*wGh5gx8_3DLWL6qPD8w_Ig.png" /><figcaption><strong>The truth about a RN learning curve as a bonus :)</strong></figcaption></figure><figure><a href="https://www.aurity.co/"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e_O-l3j8STKCjkE91X5jdA.png" /></a></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c1488525c2ef" width="1" height="1" alt=""><hr><p><a href="https://medium.com/aurity/airbnb-sunsetting-and-facebook-sunrising-react-native-c1488525c2ef">Airbnb Sunsetting and Facebook Sunrising React Native</a> was originally published in <a href="https://medium.com/aurity">Aurity.co</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Quick Overview why TypeScript or Flow is Awesome]]></title>
            <link>https://medium.com/aurity/quick-overview-why-typescript-or-flow-is-awesome-b1a0f57a8c8e?source=rss-ccf86984b28a------2</link>
            <guid isPermaLink="false">https://medium.com/p/b1a0f57a8c8e</guid>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[code]]></category>
            <category><![CDATA[cutting-edge]]></category>
            <category><![CDATA[flow]]></category>
            <dc:creator><![CDATA[Peter Kowalczyk]]></dc:creator>
            <pubDate>Tue, 10 Apr 2018 09:06:53 GMT</pubDate>
            <atom:updated>2018-07-10T13:38:50.663Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*dJnewkmlAgqu3PuggBGiKw.gif" /></figure><p>Every time we consult the architecture for JS applications and prepare the groundwork that scales clients’ application faster we run into a question:</p><blockquote>“Should we use TypeScript or Flow and what are the benefits?”</blockquote><p>Here is a quick explanation and GIF examples, which are worth more than 1000 words:</p><h4>1. Documentation</h4><p>TypeScript is like <a href="https://swagger.io/">Swagger</a>, and it documents code by giving us a description of objects, structures, and possible usage.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YCL5ugwYU7igzVWn3A2X3A.gif" /><figcaption>Documentation in your code</figcaption></figure><h4>2. Faster Development</h4><p>Very often while compiling the code, the editor will throw out an error about possible issues. Therefore you will avoid console.log statement.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rkXu5dnk2c8mVYGK9UgHJw.gif" /><figcaption>Autocompletion, automatic imports and much more! Yes it’s better than for standard JS :)</figcaption></figure><h4>3. Refactoring</h4><p>Blazing fast and easy to refactor your code, just change the interface and fix all the errors. Refresh the app, and it works! No console logs!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7JiF8OwHsI4eJ2q4gOS1ug.gif" /><figcaption>Forget about undefined: Change, Fix, Deploy!</figcaption></figure><h4>4. Guidance on how to use methods — my favorite!</h4><p>Auto-completion and Type-Checking can guide you about usage for components. If you click RN element (e.g., TouchableHighlight), it shows the attributes of this element. It has the support of many code editors.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JvxirUQwc7NWEDIpJrfPFg.gif" /></figure><blockquote>Remarks: <em>These examples are based on TypeScript, which in our opinion is more strict and has better support for developers</em></blockquote><p><em>There is much more, and I could talk about it even more. If you have some questions, leave a comment below. Tell me what are your favorites and if still, you are wondering you should use Types check this short article</em><a href="https://medium.com/@peterkow/do-i-need-typescript-or-flow-5b73f0744cb2"> “Do I need TypeScript or Flow?”</a></p><figure><a href="https://www.aurity.co/"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e_O-l3j8STKCjkE91X5jdA.png" /></a></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b1a0f57a8c8e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/aurity/quick-overview-why-typescript-or-flow-is-awesome-b1a0f57a8c8e">Quick Overview why TypeScript or Flow is Awesome</a> was originally published in <a href="https://medium.com/aurity">Aurity.co</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Do I need TypeScript or Flow?]]></title>
            <link>https://medium.com/aurity/do-i-need-typescript-or-flow-5b73f0744cb2?source=rss-ccf86984b28a------2</link>
            <guid isPermaLink="false">https://medium.com/p/5b73f0744cb2</guid>
            <category><![CDATA[cutting-edge-technology]]></category>
            <category><![CDATA[flow]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[coding-style]]></category>
            <category><![CDATA[typescript]]></category>
            <dc:creator><![CDATA[Peter Kowalczyk]]></dc:creator>
            <pubDate>Sat, 24 Mar 2018 16:11:31 GMT</pubDate>
            <atom:updated>2019-09-18T11:17:42.742Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*paQniiYs9Q2n-N5fPhByPA.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@grohsfabian?utm_source=medium&amp;utm_medium=referral">Fabian Grohs</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>The question about TypeScript or Flow is brought up many times at conferences, meetups and at work. It seems that people are confused when and how Types can help them, so here is a quick summary When and Why!</p><h3>When to use TypeScript/ Flow — and why?</h3><h4>1. You have a big scale project</h4><p>As TypeScript (Static types) enforces you to use typing in your code, it actually helps <strong><em>document</em></strong> the code and understand it better. The bigger the project is, the smarter it is to use typing to avoid the future mess in the code. TypeScript allows you to create more reusable parts, which will help<strong><em> save you time </em></strong>in the long run. There is a reason why Slack, Airbnb, Uber, Facebook use them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wiP8aoJYEC5B6iVFOVIZYQ.gif" /><figcaption>Nope!</figcaption></figure><h4>2. Quality of the code is important for the project</h4><p>Nowadays, having <strong><em>eslint with airbnb rules is a standard</em></strong>, but TypeScript/Flow is next level. It checks your work and guides you where you might make a mistake. If you need to have a <strong><em>clean and bug free code</em></strong>, you could use the help of Type-Checking.</p><h4>3. Your team is big and/or I have junior developers in a team</h4><p>Everyone needs a rubber duck sometimes to share some thoughts, and Type-Checking can be yours for free. Type-Checking can validate your code in `ms` and help you navigate through your codebase. This is especially helpful for <strong><em>junior developers </em></strong>who sometimes get lost in the codebase and `<strong><em>undefined</em></strong>` is their nightmare.</p><h4>4. You want to avoid ‘dummy’ testings</h4><p>TypeScript cooperates with your code editor (e.g. Webstorm) and will shoot errors at you everytime you make any typing error. This doesn’t mean that you will magically have less bugs in your code, but you will notice them on an early stage — so you will be able to <strong><em>skip a lot of `console.log`</em></strong> tests. You would be surprised how often you `console.log`.</p><h4>5. You refactor your code often</h4><p>This is somehow connected to everything mentioned above. If you have a big code that needs to stay clean, and you need to refactor it often due to project requirement changes TypeScript will help you <strong><em>refactor the code faster </em></strong>and with a smaller amount of errors. A simple example is when we have defined interface for fetching data from some endpoint. When requirements change we need to only update our interface, but immediately we get all errors about misused structure in components and functions.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgfycat.com%2Fifr%2FReliableRegalHedgehog&amp;url=https%3A%2F%2Fgfycat.com%2Fgifs%2Fdetail%2FReliableRegalHedgehog&amp;image=https%3A%2F%2Fthumbs.gfycat.com%2FReliableRegalHedgehog-size_restricted.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=gfycat" width="2956" height="1460" frameborder="0" scrolling="no"><a href="https://medium.com/media/3b34744e1dbc63a559494713d879b463/href">https://medium.com/media/3b34744e1dbc63a559494713d879b463/href</a></iframe><h4>6. I just started to learn javascript</h4><p>Learning TypeScript will take you five extra minutes (I will share some tutorial later), but it will help you to see simple errors immediately and you can explore available typings with a library provided by the community. Therefore, you will spend <strong><em>more time by doing things, rather than chasing bugs.</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/260/1*jzbNXFnrY9Mpt0IvvPJwKQ.gif" /></figure><p>If any of the statement above correlates with the case you have — you <strong>SHOULD USE</strong> TypeScript.</p><h3>When to avoid using TypeScript — and why?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*gxssnq_tznJoccOqWwWJ3A.gif" /></figure><h4>1. Hackathons</h4><p>TypeScript is helpful in certain projects, but it can be quite painful in others. If we want to develop something extremely fast and don’t want to/don’t have time to set up everything properly — it is better to avoid Typings. Hackathons are special types of projects, when people collaborate with each other and want to close certain idea fast, so there is no time to set up or teach people how to use new technology.</p><h4>2. Pet Projects</h4><p>Every time you create your own pet project it is usually a small application that only you work on. As long as this app is not a way for you to learn TypeScript — you don’t need to add it to your project.</p><h4>3. Test ideas</h4><p>There are also situations when you have a quick idea on how to approach certain topic and you want to quickly test if it works. If this is the case — you don’t need to make your small test over complicated by adding static typing there.</p><h3>Try it yourself and see why TypeScript is Awesome</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*dJnewkmlAgqu3PuggBGiKw.gif" /></figure><h4>Bonus — good reads:</h4><ul><li><a href="https://slack.engineering/typescript-at-slack-a81307fa288d">https://slack.engineering/typescript-at-slack-a81307fa288d</a></li><li><a href="https://medium.freecodecamp.org/typescript-javascript-with-super-powers-a333b0fcabc9">https://medium.freecodecamp.org/typescript-javascript-with-super-powers-a333b0fcabc9</a></li><li><a href="https://devhints.io/typescript">https://devhints.io/typescript</a></li><li><a href="https://blog.aurity.co/creating-react-native-app-boilerplate-with-flow-jest-enzyme-prettier-and-eslint-cefdbce3b3d">https://blog.aurity.co/creating-react-native-app-boilerplate-with-flow-jest-enzyme-prettier-and-eslint-cefdbce3b3d</a></li></ul><figure><a href="https://www.aurity.co/"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_kR3HfxaQT-epsaxjKPeXg.png" /></a></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5b73f0744cb2" width="1" height="1" alt=""><hr><p><a href="https://medium.com/aurity/do-i-need-typescript-or-flow-5b73f0744cb2">Do I need TypeScript or Flow?</a> was originally published in <a href="https://medium.com/aurity">Aurity.co</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[11 Things I Wish Someone Told Me Before Turning 30]]></title>
            <link>https://medium.com/@peterkow/11-things-i-wish-someone-told-me-before-turning-30-8fefb3c35fef?source=rss-ccf86984b28a------2</link>
            <guid isPermaLink="false">https://medium.com/p/8fefb3c35fef</guid>
            <category><![CDATA[personal-development]]></category>
            <category><![CDATA[life-lessons]]></category>
            <category><![CDATA[entrepreneurship]]></category>
            <category><![CDATA[personal-growth]]></category>
            <category><![CDATA[self-awareness]]></category>
            <dc:creator><![CDATA[Peter Kowalczyk]]></dc:creator>
            <pubDate>Thu, 15 Feb 2018 22:54:07 GMT</pubDate>
            <atom:updated>2018-02-15T22:59:13.349Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*5agEGn1MKZaAB7SD." /><figcaption>Photo by <a href="https://unsplash.com/@barbaralcada?utm_source=medium&amp;utm_medium=referral">Barbara Alçada</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>As I turned 30, questions like “What is the purpose of life?” and “What do I want to do in my life?” started popping up in my mind. I began really digging deeper, asking myself what makes me happy? What is the meaning of my life and do I spend it well? It seemed that the answer was more challenging than I initially anticipated.</p><p>I know that I’m not alone in thinking these questions. If you are reevaluating your purpose and life’s calling too, allow me to share some pearls of wisdom I’ve gained over the last 30 years.</p><h4>1. There are no rules in this world!</h4><p>Ok, maybe 2:</p><ul><li><strong>The laws of physics (but we still we don’t understand all of them)</strong></li><li><strong>The principle of karma (what we say, do, or think will create a force that will react accordingly)</strong></li></ul><p>My main point here is not to discuss how to defy the laws of gravity but to remind you that whatever you decide to do or be in your life you can make it happen. Whatever business you want to create, idea to conceive, movement to spread or experience to have, there is no one stopping you but yourself. When you change your mindset to “<strong>I can do it,”</strong> the world will align with your energy and magically adjust to you.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/563/1*nutpEftHt2asvxE9w7BLBA.png" /><figcaption><a href="https://twitter.com/qk_thrive/status/709946230038777856">https://twitter.com/qk_thrive/status/709946230038777856</a></figcaption></figure><h4>2. Remember that you’re the one setting the rules</h4><p>Remember the first point! Seriously, it’s trickier than you think. Even though you truly believe you live your life according to with what you hold in your heart, your mind, your spirit, or the Supreme Creator, it’s so easy to copy others. We reflect the rules built by others.</p><p>This is especially notable thanks to social media. We live in a world of influencers, filling the little red heart or giving a thumbs up to the beautiful and successful people that “have it made” and share their inspirational snapshots. We subconsciously follow ideas, careers, business trends, and so on, which are set by others. This is because we think there is no other way when the reality is that there are so many other ways it’s simply a matter of coming up with what exemplifies your truth.</p><blockquote>“Everything around you that you call life was made up by people that were no smarter than you. And you can change it, you can influence it. Once you learn that, you’ll never be the same again.” — Steve Jobs</blockquote><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FhK_yGDn6BVQ%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DhK_yGDn6BVQ&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FhK_yGDn6BVQ%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/76b1e333458ae32af7507883f720d95b/href">https://medium.com/media/76b1e333458ae32af7507883f720d95b/href</a></iframe><h4>3. It all starts with YOU</h4><p>How well do you think you know yourself? When was the last time you had a moment to think about what you really want? Take the time to spend some quality time with yourself. Go travel, explore something unknown on your own, and learn what you really want. Try to find what makes you happy, define your values, and discover what matters to YOU. Consider spending one month with yourself, jump into a different continent or culture, and begin listening to your soul.</p><blockquote>“Knowing yourself is the begging of all wisdom.” — Aristotle</blockquote><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FVIrqjSa11tE%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DVIrqjSa11tE&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FVIrqjSa11tE%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/3a81635864322a72cf926f353694731f/href">https://medium.com/media/3a81635864322a72cf926f353694731f/href</a></iframe><h4>4. There is no defined purpose in life</h4><p>A bit hard to accept and difficult to explain, but true to speak. You are born, you live, you die and that’s it. As long as you’re living and breathing now, this is your chance to do something. When you understand that, you won’t care about the non-essential things. You don’t give a f*ck about trying to be someone else. You don’t care about money, cars, your job title, having the perfect six-pack. Being in control takes on a whole new meaning: you are free to be in control of your own life.</p><h4>5. Money is not what it’s all about</h4><p>Money is the biggest misconception in this world. We earn money because we are helping or assisting others in achieving a goal or task. The more we help the more we get. This is something to take as a privilege. You earn a trust from a society and get a contribution for what you did well. You’ll need to give it back in order to use it, so why not use it well?</p><p>Use your experience to create more good and serve others. Clothing, houses, gadgets — these are all things that are, well, just things. They don’t make you smarter or happier or a better person. The impact which you create in the world is what will stay when you are gone. Everything else will be recycled, demolished, and forgotten. People will move onto the next thing but a legacy lives on. Maybe one day you’ll wake up and magically have a million dollars in your bank account, but trust me when I say that this day will be like every other.</p><blockquote>“Be the change you want to see in the world.” — Mahatma Gandhi</blockquote><h4>6. Don’t choose to work — play</h4><p>Do what you love! I agree, it’s extremely hard to understand what it is exactly that you really and truly love to do. It took me 18 years to arrive to a point of realization and acknowledge what I am passionate about. For me, I love to build things: software, products, ideas, teams.</p><p>That’s why I started <a href="http://www.aurity.co/">Aurity</a>, a team/framework where people can fulfill themselves. A place where you can collaborate, where you don’t follow the rules, where you are your own boss. There’s no CEO, there aren’t any managers, it’s just people playing freely, trying to help others using the latest technology. And what’s even better? It doesn’t matter where you live — the company is fully functioning 100% remotely.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OAavt2NBEQDt-Isg_Zbu_w.jpeg" /></figure><h4>7. You can have results or excuses, not both</h4><p>Whenever you think something is beyond your power or doesn’t work, it’s just because you don’t understand the real problem at hand. You need to ask yourself, “What am I missing?” Be honest with yourself, don’t look for excuses. Keep pushing yourself to the unfamiliar and learn what you don’t know.</p><h4>8. Feed your mind well</h4><p>Every day we tend to scroll Instagram, Facebook, Netflix and other channels that are essentially fillers and timesucks. We feed our mind with rubbish information and pointless conversation, as we discuss our past, gossip, or take a jab at politics. It’s like feeding your brain with McDonalds every day — it’s juicy and fun but in the end it does more harm.</p><p>Instead, choose to watch a <a href="http://www.ted.com/">Ted Talk</a>, get inspired on Medium, chat with creative people, and <a href="https://www.headspace.com/">meditate</a>.</p><h4>9. Take care of your body</h4><p>It’s a vehicle that goes everywhere with you throughout all your life. It will take you to amazing places and let you experience incredible things. Drinking all weekend and eating junk food is just saying that you want to fast forward and pass through your life without really living it. Your body is a temple, take care of it.</p><h4>10. Share, share, share!</h4><p>Share ideas, thoughts, experiences, and anything you have that could benefit the greater mankind. We are too worried about sharing with others, maybe because we might get less out of it or someone will take our idea and steal our success. That is so year-2000-millenium mentality. We need to trust each other and understand that together we can achieve much more.</p><p>This is what we strive to redefine today, redistributing the wealth to everyone and creating/giving opportunities. It’s a task for our generation to shape a new, open world where we can grow and focus on things that matter with full transparency. Who knows, maybe <a href="https://www.ted.com/talks/don_tapscott_four_principles_for_the_open_world_1">something like blockchain</a> can lend us a hand in making some majorly impactful changes.</p><h4>11. It’s all about the people</h4><p>You can achieve a lot on your own but when collaborating with others you can achieve everything. Think of it this way: the best things are made by nature. They are the strongest, pure and can adapt to any conditions. That being said, the best teams are formed organically, not by money, authorities, or rules. People don’t work for others, they work for themselves, for their livelihood.</p><p>Find a team which encourages your growth and will be a fan for your flames.This is how you’ll be taken to the next level and achieve greatness. Together is better!</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FJmckExQy3fI%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DJmckExQy3fI&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FJmckExQy3fI%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/97f94f47dead870a3b5e038e5419363e/href">https://medium.com/media/97f94f47dead870a3b5e038e5419363e/href</a></iframe><h3>Concluding Actions</h3><p>If you are at the beginning of your “journey to self,” start right now and start with WHY. Find out your “Why” and keep moving forward. If you’ve already found your green grass and are standing on your patch, water it. Nurture, experience, and keep going. Life is all about the journey — the destination is what you make of it.</p><p>Like what you’ve read or thinking you’d like to become part of a like-minded team? I’m here and ready to start the conversation.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FiHcxkmwBOJY%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DiHcxkmwBOJY&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FiHcxkmwBOJY%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/5dc3958b9da9bd0432c0ac4fe9a4d400/href">https://medium.com/media/5dc3958b9da9bd0432c0ac4fe9a4d400/href</a></iframe><p>I hope you’ve found this piece inspiring. Share your thoughts and let’s connect: it all starts here and now.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8fefb3c35fef" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>