<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Enieber Cunha</title>
    <description>The latest articles on DEV Community by Enieber Cunha (@enieber).</description>
    <link>https://dev.to/enieber</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F29095%2F6f9c7891-707b-431a-9b32-54bd9d9b4503.jpeg</url>
      <title>DEV Community: Enieber Cunha</title>
      <link>https://dev.to/enieber</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/enieber"/>
    <language>en</language>
    <item>
      <title>Update to esy</title>
      <dc:creator>Enieber Cunha</dc:creator>
      <pubDate>Wed, 04 Nov 2020 02:14:46 +0000</pubDate>
      <link>https://dev.to/enieber/update-to-esy-2p4a</link>
      <guid>https://dev.to/enieber/update-to-esy-2p4a</guid>
      <description>&lt;p&gt;When I wanna update version of &lt;a href="https://esy.sh/"&gt;esy&lt;/a&gt; has much error, after some hours I find &lt;a href="https://github.com/esy/esy/issues/1099#issuecomment-629055070"&gt;this response in github&lt;/a&gt; that fix the error.&lt;/p&gt;

</description>
      <category>reason</category>
      <category>esy</category>
      <category>ocaml</category>
      <category>npm</category>
    </item>
    <item>
      <title>Don't use .first() without handling exceptions</title>
      <dc:creator>Enieber Cunha</dc:creator>
      <pubDate>Tue, 03 Nov 2020 19:29:08 +0000</pubDate>
      <link>https://dev.to/enieber/don-t-use-first-without-handling-exceptions-25dc</link>
      <guid>https://dev.to/enieber/don-t-use-first-without-handling-exceptions-25dc</guid>
      <description>&lt;p&gt;When you work with kotlin is much common you need get first caracter of string. So you need function &lt;code&gt;stringVariable.first()&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The problem occorer when you not handling execption of this methods, &lt;a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.text/first.html#exceptions"&gt;like NoSuchElementException&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;So use the try cat and not use in if like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight kotlin"&gt;&lt;code&gt;&lt;span class="kd"&gt;val&lt;/span&gt; &lt;span class="py"&gt;name&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"Kotlin"&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;first&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;==&lt;/span&gt; &lt;span class="s"&gt;"K"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="o"&gt;..&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;if you change the name value to another has exception: NoSuchElementException or NoSuchElementException when send crash you app.&lt;/p&gt;

</description>
      <category>kotlin</category>
      <category>android</category>
    </item>
    <item>
      <title>Build faster for Android using react-native with alias</title>
      <dc:creator>Enieber Cunha</dc:creator>
      <pubDate>Mon, 26 Nov 2018 12:41:14 +0000</pubDate>
      <link>https://dev.to/enieber/build-faster-for-android-using-react-native-with-alias-5h39</link>
      <guid>https://dev.to/enieber/build-faster-for-android-using-react-native-with-alias-5h39</guid>
      <description>&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F1364%2F1%2AsSx4CEuBbKLS4j1E-qrljQ.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F1364%2F1%2AsSx4CEuBbKLS4j1E-qrljQ.jpeg" title="Tasks manager" alt="alt text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When I started developing using React Native I had some problems with the android cache, both the cache of the libs and the generated cache of the project itself. To do a simple build I had to remove folders and check for some answers in StackOverflow to handle with cache errors.&lt;/p&gt;

&lt;p&gt;Over time, take the react-native experience with some errors and to avoid them I use some scripts that help me on a daily. To help in other projects using react-native I've created a project with some alias that you can find it on Github.&lt;/p&gt;

&lt;h2&gt;
  
  
  React Native Android Alias
&lt;/h2&gt;

&lt;p&gt;Explaining the aliases a little more, the most used by me are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;rn-clear: In this alias I remove the entire android build folder, so I have a project without cache.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;rn-start: I use this command to start the app in dev mode. It also compile the app for some devices.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;ad-clear: The purpose of this command is to clear the entire project, even removing the native libs cache.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;rn-server: This alias is used to start the node js server which is responsible for sending the js code to the app that is currently being developed.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusions
&lt;/h2&gt;

&lt;p&gt;Although the project seems not very robust, I had saved hours and hours with these aliases, because with them I can compile for a project in development mode:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  rn-clear &amp;amp;&amp;amp; rn-start
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or even compile for production without any problems, I just need to ensure that the project is correctly configured and have set up the keys and versioning. After that I just run this command and enjoy:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  ad-clean &amp;amp;&amp;amp; rn-clear &amp;amp;&amp;amp; rn-release
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you have liked and want to &lt;a href="https://github.com/enieber/alias/" rel="noopener noreferrer"&gt;contribute to the project&lt;/a&gt;, simply send a Pull Request or open an Issue in Github. &lt;/p&gt;

&lt;p&gt;Thanks to &lt;a href="https://twitter.com/augustochimi" rel="noopener noreferrer"&gt;Augusto Chmieleski&lt;/a&gt; for helping in the translation&lt;/p&gt;

</description>
      <category>reactnative</category>
      <category>development</category>
      <category>android</category>
      <category>agile</category>
    </item>
  </channel>
</rss>
