<?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: acuevasd</title>
    <description>The latest articles on DEV Community by acuevasd (@acuevasd).</description>
    <link>https://dev.to/acuevasd</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%2F1001356%2F7005f6f3-757a-4863-bdb3-3f2de7d61a51.png</url>
      <title>DEV Community: acuevasd</title>
      <link>https://dev.to/acuevasd</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/acuevasd"/>
    <language>en</language>
    <item>
      <title>Final project review</title>
      <dc:creator>acuevasd</dc:creator>
      <pubDate>Sat, 04 Mar 2023 22:25:30 +0000</pubDate>
      <link>https://dev.to/acuevasd/final-project-review-3n7c</link>
      <guid>https://dev.to/acuevasd/final-project-review-3n7c</guid>
      <description>&lt;p&gt;Tips:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;indirect associations, instead of &lt;code&gt;belongs_to&lt;/code&gt; is &lt;code&gt;has_one&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;migrations after scaffold need to be updated manually&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Links:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://guides.rubyonrails.org/association_basics.html#creating-join-tables-for-has-and-belongs-to-many-associations"&gt;3.3.2 Creating Join Tables for has_and_belongs_to_many Associations&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
    <item>
      <title>The Joy of React</title>
      <dc:creator>acuevasd</dc:creator>
      <pubDate>Tue, 07 Feb 2023 02:58:42 +0000</pubDate>
      <link>https://dev.to/acuevasd/the-joy-of-react-97o</link>
      <guid>https://dev.to/acuevasd/the-joy-of-react-97o</guid>
      <description>&lt;p&gt;Platform Renders:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;react-dom&lt;/code&gt; for the web&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;react-native&lt;/code&gt; for mobile (iOS / Android) or desktop (Windows / MacOS) applications&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;react-three-fiber&lt;/code&gt; for 3D scenes using WebGL and Three.js&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Steps in render function:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;create a DOM element&lt;/li&gt;
&lt;li&gt;update properties&lt;/li&gt;
&lt;li&gt;&lt;p&gt;put it in the container&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;We can only use JS expressions inside the {}&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>devto</category>
      <category>web3</category>
      <category>announcement</category>
    </item>
    <item>
      <title>Auth reviews</title>
      <dc:creator>acuevasd</dc:creator>
      <pubDate>Tue, 31 Jan 2023 22:52:43 +0000</pubDate>
      <link>https://dev.to/acuevasd/auth-reviews-902</link>
      <guid>https://dev.to/acuevasd/auth-reviews-902</guid>
      <description>&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;:index,:show,:new,:edit&lt;/code&gt; are the get routes&lt;/li&gt;
&lt;li&gt;Levels: route (for everybody), controller (for some people)&lt;/li&gt;
&lt;li&gt;We always should review authorization for every action, not just hide the routes. But always, don't show people things they should not be able to see&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>discuss</category>
    </item>
    <item>
      <title>Scrimba's JavaScript Deep Dive - Part IV</title>
      <dc:creator>acuevasd</dc:creator>
      <pubDate>Tue, 31 Jan 2023 22:52:25 +0000</pubDate>
      <link>https://dev.to/acuevasd/scrimbas-javascript-deep-dive-part-iv-1408</link>
      <guid>https://dev.to/acuevasd/scrimbas-javascript-deep-dive-part-iv-1408</guid>
      <description>&lt;p&gt;Array &amp;amp; Sets&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;More flexible than Objects&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;indexOf&lt;/code&gt;= -1 means the value does not exist in the array. We can use &lt;code&gt;includes&lt;/code&gt; or &lt;code&gt;some&lt;/code&gt; (like callback functions). We also have &lt;code&gt;every&lt;/code&gt; to review a condition in all elements of the array&lt;/li&gt;
&lt;li&gt;map method return an array of the same length, if we want a subset of the array, we can use the method &lt;code&gt;filter&lt;/code&gt;. But if there is not element matching, we will get an empty array. &lt;/li&gt;
&lt;li&gt;Also we can use &lt;code&gt;reduce&lt;/code&gt; can also be used, but need more arguments. This is the most powerful method for arrays&lt;/li&gt;
&lt;li&gt;push to add elements to array, but it will replicate to other arrays with reference (as array is a subtype of objects). We can use &lt;code&gt;concat&lt;/code&gt; to copy and add values, or use spread operators to clone arrays and &lt;code&gt;slice&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;object.keys()&lt;/code&gt;: allow to generate an array and use the key names&lt;/li&gt;
&lt;li&gt;Set don't count equal elements,  unless they are in [i], as they will be arrays. We can use this method to find the unique data sets&lt;/li&gt;
&lt;li&gt;Array methods: map(), filter(), reduce(), some()/every(), find()/findeIndex(), forEach(). Plus: slice(), concat(), includes() + spread. Use the best for each case, that makes the code easier to write and follow&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
    <item>
      <title>Scrimba's JavaScript Deep Dive - Part III</title>
      <dc:creator>acuevasd</dc:creator>
      <pubDate>Sun, 29 Jan 2023 23:27:05 +0000</pubDate>
      <link>https://dev.to/acuevasd/scrimbas-javascript-deep-dive-28m5</link>
      <guid>https://dev.to/acuevasd/scrimbas-javascript-deep-dive-28m5</guid>
      <description>&lt;p&gt;Functions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;define by &lt;code&gt;function&lt;/code&gt;as key word&lt;/li&gt;
&lt;li&gt;a function will return &lt;code&gt;undefined&lt;/code&gt;by default&lt;/li&gt;
&lt;li&gt;closure: how to remember values (or pass down)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;toFixed&lt;/code&gt;: return string, so we need to update the type&lt;/li&gt;
&lt;li&gt;we can also use default values (with equal in the declaration of arguments)&lt;/li&gt;
&lt;li&gt;we need to write functions think that arguments will not be correctly given&lt;/li&gt;
&lt;li&gt;arrow function don't need &lt;code&gt;function&lt;/code&gt; key word, just &lt;code&gt;=&amp;gt;&lt;/code&gt;. But by default they use implicit return (so we don't need the key word)&lt;/li&gt;
&lt;li&gt;higher order function: call an function in a function (all callbacks are higher order)&lt;/li&gt;
&lt;li&gt;arrow function need a variable storage the function&lt;/li&gt;
&lt;li&gt;functions can be thought like actions, so better to name them as verbs. Be explicit (it don't need to be short), but be consistent with the names you use (simple prefix are great!)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Object and Maps:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;We can create objects to organize, with keys (references)&lt;/li&gt;
&lt;li&gt;key don't need " &lt;/li&gt;
&lt;li&gt;to use them &lt;code&gt;object.key&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;object are great for static information &lt;/li&gt;
&lt;li&gt;object are collection of primitive (6 types: undefined, null, boolean, number, string, and symbol)&lt;/li&gt;
&lt;li&gt;object are not the equally to other (exactly the same) &lt;/li&gt;
&lt;li&gt;object are passed as reference (not a copy), so if we are not careful, we can update both objects at once &lt;/li&gt;
&lt;li&gt;dot notation is the most comfortable way to reach values&lt;/li&gt;
&lt;li&gt;we can destructured objects properties and make them into variables of the same name using &lt;code&gt;{ }&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Object.assign({}, obj1,obj2)&lt;/code&gt; we should make a new object, to merge to previous objects. Or &lt;code&gt;...obj&lt;/code&gt; to spread. For both, order matters, the last is the one that will be use.&lt;/li&gt;
&lt;li&gt;Maps: when key is not a string or symbol&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>react</category>
      <category>frontend</category>
      <category>webdev</category>
      <category>mui</category>
    </item>
    <item>
      <title>Scrimba's JavaScript Deep Dive - Part II</title>
      <dc:creator>acuevasd</dc:creator>
      <pubDate>Sat, 28 Jan 2023 00:08:18 +0000</pubDate>
      <link>https://dev.to/acuevasd/scrimbas-javascript-deep-dive-part-ii-461c</link>
      <guid>https://dev.to/acuevasd/scrimbas-javascript-deep-dive-part-ii-461c</guid>
      <description>&lt;p&gt;Types &amp;amp; Conditionals:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If, else if or else -&amp;gt; as usual&lt;/li&gt;
&lt;li&gt;Switch (something) {case break and default}: can be more useful &lt;/li&gt;
&lt;li&gt;Primitive types (string, number, boolean, undefined, null &amp;amp; symbol) or Object (everything else). We can look for type with &lt;code&gt;typeof&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;explicit type conversion (with functions) or implicit (automatic // coercion)&lt;/li&gt;
&lt;li&gt;In conditionality, java script will convert to boolean. All value will be "truthy" (coercion to true) and "falsy" (coercion to false). Remember that: "false", "0", " '' " (empty), "null", "undefined" and "NaN" are the falsy values.&lt;/li&gt;
&lt;li&gt;For direct comparison, we need to use &lt;code&gt;===&lt;/code&gt; as other equals change types. And avoid direct comparison (&lt;code&gt;=&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Ternaries do not allow actions. They are nice with value assignment with conditionals&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;&amp;amp;&amp;amp;&lt;/code&gt; has higher precedent than &lt;code&gt;||&lt;/code&gt;, unless we are using &lt;code&gt;()&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>welcome</category>
      <category>devto</category>
      <category>community</category>
    </item>
    <item>
      <title>Scrimba's JavaScript Deep Dive - Part I</title>
      <dc:creator>acuevasd</dc:creator>
      <pubDate>Fri, 27 Jan 2023 18:08:45 +0000</pubDate>
      <link>https://dev.to/acuevasd/scrimbas-javascript-deep-dive-2ecj</link>
      <guid>https://dev.to/acuevasd/scrimbas-javascript-deep-dive-2ecj</guid>
      <description>&lt;p&gt;Getting Started:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Text in Javascript ALWAYS needs to have to be grab in quotes&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Variables &amp;amp; String&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;by default, variables have the value "undefined", meaning is empty&lt;/li&gt;
&lt;li&gt;we can declare and assign variables at the same time&lt;/li&gt;
&lt;li&gt;camel-cased: first letter is lowercase, but next word is uppercase (by convention). For example: firstName&lt;/li&gt;
&lt;li&gt;Requirements: 1) name just letter, number, "$", and "_" 2) first character must not be a number, 3) cannot use reserved name (like "var")&lt;/li&gt;
&lt;li&gt;Browser: window // Server: global&lt;/li&gt;
&lt;li&gt;Sloppy (normal) mode: default // Strict mode: throws more errors, but prevents better -&amp;gt; &lt;code&gt;"use strict";&lt;/code&gt; But this does not solve all the problems&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;let&lt;/code&gt;&amp;amp; &lt;code&gt;const&lt;/code&gt; to declare variables, but let can be reassigned (like &lt;code&gt;var&lt;/code&gt;). Use cont unless it will be reassigned&lt;/li&gt;
&lt;li&gt;Variable shadowing: let &amp;amp; const are block-scoped&lt;/li&gt;
&lt;li&gt;Template literal for string interpolation: to add variables in strings &lt;code&gt;Hi ${username}&lt;/code&gt; (we can do operations or put conditions inside the {} ). It use &lt;strong&gt;`&lt;/strong&gt;  not '&lt;/li&gt;
&lt;li&gt;Variables names are case sensitive &lt;/li&gt;
&lt;li&gt;Variables names should be descriptive and in camel-cased. Any variable can be of any type, that is why is so important to follow this convention, so others know what we are doing&lt;/li&gt;
&lt;li&gt;Other conventions: &lt;code&gt;isSomething&lt;/code&gt; or &lt;code&gt;hasSomething&lt;/code&gt; to do condicional, for constant we use all caps and _ to separate (FIRST_NUMBER)&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
    <item>
      <title>Class Week 4</title>
      <dc:creator>acuevasd</dc:creator>
      <pubDate>Wed, 25 Jan 2023 02:47:42 +0000</pubDate>
      <link>https://dev.to/acuevasd/class-week-4-31e8</link>
      <guid>https://dev.to/acuevasd/class-week-4-31e8</guid>
      <description>&lt;ul&gt;
&lt;li&gt;User can see profile (or comment/like picture) if a user is public, my profile or user is a leader for current user&lt;/li&gt;
&lt;li&gt;We need to be careful to change in every view&lt;/li&gt;
&lt;li&gt;&lt;p&gt;has_one: does the at(0) on the collection, it works if we know we just have one element (example: owner)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Be careful with the logic, true/false and &amp;amp;&amp;amp; or ||&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;We do tests to see if they are working (and sometimes the code for the test is longer than the app's)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Authentication != authorization. Device for first, and pundit for second&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
    <item>
      <title>Reviewing class 2</title>
      <dc:creator>acuevasd</dc:creator>
      <pubDate>Tue, 17 Jan 2023 03:17:31 +0000</pubDate>
      <link>https://dev.to/acuevasd/reviewing-class-2-3dng</link>
      <guid>https://dev.to/acuevasd/reviewing-class-2-3dng</guid>
      <description>&lt;ul&gt;
&lt;li&gt;Remember to do not touch the part of the navbar that makes it collapsible&lt;/li&gt;
&lt;li&gt;Create new resources, THEN migration to Add to column&lt;/li&gt;
&lt;li&gt;We have to restart when we add a new gem&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>programming</category>
      <category>systemdesign</category>
      <category>career</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Photogram 4</title>
      <dc:creator>acuevasd</dc:creator>
      <pubDate>Sun, 15 Jan 2023 03:43:20 +0000</pubDate>
      <link>https://dev.to/acuevasd/photogram-4-4j85</link>
      <guid>https://dev.to/acuevasd/photogram-4-4j85</guid>
      <description>&lt;p&gt;This video starts with how to push/pull git commits&lt;/p&gt;

&lt;p&gt;New:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Device does not generate the routes&lt;/li&gt;
&lt;li&gt;Resources with only, the array is not necessary when we have only one -&amp;gt; &lt;code&gt;resources :users, only: [:show]&lt;/code&gt; same that &lt;code&gt;resources :users, only: :show&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
    <item>
      <title>Photogram 3</title>
      <dc:creator>acuevasd</dc:creator>
      <pubDate>Sun, 15 Jan 2023 02:15:28 +0000</pubDate>
      <link>https://dev.to/acuevasd/photogram-3-3bdf</link>
      <guid>https://dev.to/acuevasd/photogram-3-3bdf</guid>
      <description>&lt;ul&gt;
&lt;li&gt;In routes: if there is a conflict, the most specific route should be before the other (order matters)&lt;/li&gt;
&lt;li&gt;Quick link: &lt;a href="https://github.com/faker-ruby/faker" rel="noopener noreferrer"&gt;Faker&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;When creating sample_data, do a few users that you know&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Also remember:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;For random robot pictures: &lt;code&gt;"https://robohash.org/#{rand(9999)"&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>webdev</category>
      <category>html</category>
      <category>pwa</category>
      <category>architecture</category>
    </item>
    <item>
      <title>Photogram 1&amp;2</title>
      <dc:creator>acuevasd</dc:creator>
      <pubDate>Sun, 15 Jan 2023 01:21:01 +0000</pubDate>
      <link>https://dev.to/acuevasd/photogram-12-4ji2</link>
      <guid>https://dev.to/acuevasd/photogram-12-4ji2</guid>
      <description>&lt;p&gt;Reminders&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Add index to foreign keys!&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;New:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;rails db:rollback&lt;/code&gt; is just for the last migration&lt;/li&gt;
&lt;li&gt;We write the &lt;code&gt;sample data&lt;/code&gt; to review databases and their associations&lt;/li&gt;
&lt;li&gt;When creating sample data, &lt;code&gt;p u.errors.full_massages&lt;/code&gt; to see erros that may be happening &lt;/li&gt;
&lt;li&gt;We can use &lt;code&gt;&amp;lt;&amp;lt;&lt;/code&gt; to push (creating) record in a table&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>gratitude</category>
    </item>
  </channel>
</rss>
