<?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: Mashcuy Lab</title>
    <description>The latest articles on DEV Community by Mashcuy Lab (@mashcuy_lab).</description>
    <link>https://dev.to/mashcuy_lab</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%2F1781221%2F7aa0d4f0-fe5d-4f50-97ed-d1765d336efb.png</url>
      <title>DEV Community: Mashcuy Lab</title>
      <link>https://dev.to/mashcuy_lab</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mashcuy_lab"/>
    <language>en</language>
    <item>
      <title>Advanced React #1</title>
      <dc:creator>Mashcuy Lab</dc:creator>
      <pubDate>Fri, 09 Aug 2024 02:30:50 +0000</pubDate>
      <link>https://dev.to/mashcuy_lab/advanced-react-5998</link>
      <guid>https://dev.to/mashcuy_lab/advanced-react-5998</guid>
      <description>&lt;p&gt;In this article we are summarizing the most interesting parts of: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Nadia Makarevich - Advanced React Chapter 1 "Intro to re-renders"&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Lifecycle of a component
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;mounting: component is created for the first time&lt;/li&gt;
&lt;li&gt;unmounting: react removes the component when is no needed&lt;/li&gt;
&lt;li&gt;re-rendering: updates the component with new information&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Myth: components re-render when it's props change
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;when a change over a state happens, react will re-render all the components hierarchy, props doesn't matter&lt;/li&gt;
&lt;li&gt;react will check props only if we use &lt;code&gt;useMemo&lt;/code&gt; it props change it will re-render, not otherwise.&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
    <item>
      <title>Refactoring #3</title>
      <dc:creator>Mashcuy Lab</dc:creator>
      <pubDate>Fri, 09 Aug 2024 02:00:59 +0000</pubDate>
      <link>https://dev.to/mashcuy_lab/refactoring-3-575h</link>
      <guid>https://dev.to/mashcuy_lab/refactoring-3-575h</guid>
      <description>&lt;p&gt;In this article we are summarizing the most interesting parts of: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Martin Fowler - Refactoring (2018) Chapter 7 "Encapsulation"&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This chapter give us some encapsulation advices:&lt;/p&gt;

&lt;h1&gt;
  
  
  General idea
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;encapsulate mutable date in a project can give us the advantage to see when and how data structures are modified&lt;/li&gt;
&lt;li&gt;we give the responsibility of modify it's own attributes to the class.&lt;/li&gt;
&lt;li&gt;encapsulation means that modules need to know less about other parts of the system&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Encapsulate Record
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;replace js objects by classes&lt;/li&gt;
&lt;li&gt;identify how and where are they being used&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Encapsulate Collection
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;don't publish your collections to be modified from outside your class, use methods instead (add, remove, etc)&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Replace primitive with object ⭐
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;in early stages of development we represent simple facts as simple data items as strings or numbers. With the time those simple facts are not simple anymore.&lt;/li&gt;
&lt;li&gt;a Linkedin url may be represented as a simple string but then we could need formatting, extracting info or many other operations&lt;/li&gt;
&lt;li&gt;as soon as we realize that we need to do other operations than a simple print we create a new class for that bit of data.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Extract class
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;classes always grow in it's responsibilities, then we need to extract them in new classes&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Substitute algorithm
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;refactor complex algorithms with simpler ones. &lt;/li&gt;
&lt;li&gt;if you understand better the problem and can use another perspective that give more clarity to the solution, then it worth to substitute it.&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
    <item>
      <title>Session #3</title>
      <dc:creator>Mashcuy Lab</dc:creator>
      <pubDate>Fri, 09 Aug 2024 01:19:30 +0000</pubDate>
      <link>https://dev.to/mashcuy_lab/session-3-bnb</link>
      <guid>https://dev.to/mashcuy_lab/session-3-bnb</guid>
      <description>&lt;h1&gt;
  
  
  Summary
&lt;/h1&gt;

&lt;h2&gt;
  
  
  What I learned from 472 PRs, 130K lines of code and 1 year working for a USA startup
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;My first PR vs my latest PR&lt;/li&gt;
&lt;li&gt;No, you cannot do everything &lt;/li&gt;
&lt;li&gt;Plan your day = Be effective&lt;/li&gt;
&lt;li&gt;Communication: inform your progress when is needed, unblock your teammates, perform QA&lt;/li&gt;
&lt;li&gt;Is ok to not be ok&lt;/li&gt;
&lt;li&gt;Dump your brain

&lt;ul&gt;
&lt;li&gt;something is blocking you? explain the problem in a note&lt;/li&gt;
&lt;li&gt;there is a lot of things to do? make a prioritized list&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Do things that gives you fulfillment&lt;/li&gt;

&lt;li&gt;Understand what is expected from your work&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;
  
  
  How to structure a productive day
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Fulfillment: mind, body &amp;amp; spirit&lt;/li&gt;
&lt;li&gt;Pareto law: 80% of effects comes from 20% of causes

&lt;ul&gt;
&lt;li&gt;Master key skills&lt;/li&gt;
&lt;li&gt;Prioritize key practices&lt;/li&gt;
&lt;li&gt;Learn key concepts&lt;/li&gt;
&lt;li&gt;Focus on key tasks&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Laborit law: people gravitate towards the least effort path at expense of important or difficult tasks

&lt;ul&gt;
&lt;li&gt;Prioritize more urgen + important tasks (don't focus on difficulty)&lt;/li&gt;
&lt;li&gt;Break complex tasks into smaller manageable tasks&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Parkinson law: work expands to fill the available time

&lt;ul&gt;
&lt;li&gt;Set strict deadlines&lt;/li&gt;
&lt;li&gt;Seek efficiency, not perfection&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;
  
  
  Efficient learner
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;create a distraction-free environment&lt;/li&gt;
&lt;li&gt;be an active note-taker&lt;/li&gt;
&lt;li&gt;prioritize your health&lt;/li&gt;
&lt;li&gt;revise your knowledge actively: explain it easily&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Code for 4 hours straight (with no breaks ?)
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;plan your work yesterday&lt;/li&gt;
&lt;li&gt;high priority tasks =&amp;gt; most optimal timeframe&lt;/li&gt;
&lt;li&gt;no phone, no notifications, no emails, no slack.&lt;/li&gt;
&lt;li&gt;drink water, exercise, sleep.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Optimize your development process
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;technical aspects

&lt;ul&gt;
&lt;li&gt;follow standards&lt;/li&gt;
&lt;li&gt;do regular code reviews&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;experience aspects

&lt;ul&gt;
&lt;li&gt;master your IDE&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

</description>
    </item>
    <item>
      <title>Session #2</title>
      <dc:creator>Mashcuy Lab</dc:creator>
      <pubDate>Mon, 22 Jul 2024 17:12:44 +0000</pubDate>
      <link>https://dev.to/mashcuy_lab/session-2-25km</link>
      <guid>https://dev.to/mashcuy_lab/session-2-25km</guid>
      <description>&lt;h1&gt;
  
  
  Summary
&lt;/h1&gt;

&lt;p&gt;Welcome to our new members Nicole &amp;amp; Marco 🎉&lt;/p&gt;

&lt;h2&gt;
  
  
  Getonbrd insights 2024 Q2
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn6fcwmlf7hd9hu1z6zow.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn6fcwmlf7hd9hu1z6zow.png" alt="Image description" width="800" height="508"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;We recommend fastAPI or flask instead of Django.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjpa8a1sz7pbhv205tgcz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjpa8a1sz7pbhv205tgcz.png" alt="Image description" width="800" height="512"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Don't be discouraged by the increased competition; instead, use it as motivation to deepen your knowledge of JavaScript.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Patterns in the real life #1
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://docs.google.com/presentation/d/17Ait9DoUqBfpZXP90YlW-VK7hXAlNb0kt5zGzGSLvRA/edit?usp=sharing" rel="noopener noreferrer"&gt;Singleton pattern&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Web streams with bun 🙉
&lt;/h2&gt;

&lt;p&gt;Some excellent examples of the use of Streams here:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/gustavoam-asdf/document-list-migrator" rel="noopener noreferrer"&gt;https://github.com/gustavoam-asdf/document-list-migrator&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/gustavoam-asdf/vimeo-downloader-extension" rel="noopener noreferrer"&gt;https://github.com/gustavoam-asdf/vimeo-downloader-extension&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Keep an eye to 👀
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;LLM's APIs (openAI)&lt;/li&gt;
&lt;li&gt;Most used/payed technologies (typescript, python, React, Next.js, FastAPI)&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Give support ❤️ to
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.facebook.com/MerakT01/?_rdr" rel="noopener noreferrer"&gt;MerakT&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://llamafood.com/" rel="noopener noreferrer"&gt;Llamafood&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>community</category>
      <category>programming</category>
    </item>
    <item>
      <title>Refactoring #2</title>
      <dc:creator>Mashcuy Lab</dc:creator>
      <pubDate>Sat, 20 Jul 2024 16:29:14 +0000</pubDate>
      <link>https://dev.to/mashcuy_lab/refactoring-2-8n0</link>
      <guid>https://dev.to/mashcuy_lab/refactoring-2-8n0</guid>
      <description>&lt;p&gt;In this article we are summarizing the most interesting parts of: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Martin Fowler - Refactoring (2018) Chapter 3 "Bad Smells in Code"&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This chapter helps us to detect bad code practices:&lt;/p&gt;

&lt;h2&gt;
  
  
  Mysterious name
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;you can't think of a good name for something&lt;/li&gt;
&lt;li&gt;you are often afraid to rename things&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;solution&lt;/em&gt; a good name can save you &lt;strong&gt;hours&lt;/strong&gt; &lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Duplicated code
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;solution&lt;/em&gt; unify code with the same structure&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Long function
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;solution&lt;/em&gt; long term software is written in short functions&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Long parameter list
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;solution&lt;/em&gt; depend on objects and not on attributes&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Divergent change
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;every time there is a new user type, then I'll have to change these three/four functions&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;solution&lt;/em&gt; reduce coupling by joining similar functions together and consider them a new &lt;code&gt;module&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Primitive obsession
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;a telephone is more than a collection of characters&lt;/li&gt;
&lt;li&gt;a url is more than a string&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;solution&lt;/em&gt; move those primitive types to it's own meaningful types&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Repeated switches
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;if the same switch/case or if/else structure is repeated many times. &lt;/li&gt;
&lt;li&gt;
&lt;em&gt;solution&lt;/em&gt; we should consider replace conditional with polymorphism.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Speculative Generality
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;over engineering a feature is very common&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;solution&lt;/em&gt; get rid of functions that handles things that aren't required yet&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Middle man
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;is common that a class ends up delegating much of it's behavior to other classes&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;solution&lt;/em&gt; remove those classes and replace them with the actual functionality&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Data class
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;solution&lt;/em&gt; instead of having classes with only fields, getters and setters, use interfaces or types&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
    <item>
      <title>Refactoring #1</title>
      <dc:creator>Mashcuy Lab</dc:creator>
      <pubDate>Sat, 20 Jul 2024 15:51:08 +0000</pubDate>
      <link>https://dev.to/mashcuy_lab/refactoring-1-4iic</link>
      <guid>https://dev.to/mashcuy_lab/refactoring-1-4iic</guid>
      <description>&lt;p&gt;In this article we are summarizing the most interesting parts of: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Martin Fowler - Refactoring (2018) Chapter 6 "A First Set of Refactorings"&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Extract variable
&lt;/h1&gt;

&lt;p&gt;❌&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;order&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;quantity&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;order&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;itemPrice&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;max&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;order&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;quantity&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;order&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;itemPrice&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mf"&gt;0.05&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;min&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;order&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;quantity&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;order&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;itemPrice&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mf"&gt;0.1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;✅&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;basePrice&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;order&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;quantity&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;order&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;itemPrice&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;quantityDiscount&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;max&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;order&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;quantity&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;order&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;itemPrice&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mf"&gt;0.05&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; 
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;shipping&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;min&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;basePrice&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mf"&gt;0.1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;basePrice&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;quantityDiscount&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;shipping&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Changing a parameter
&lt;/h1&gt;

&lt;p&gt;❌&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;inNewEngland&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;aCustomer&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
   &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;MA&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;CT&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;ME&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;VT&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;NH&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;RI&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nf"&gt;includes&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;aCustomer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;address&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;state&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;newEnglanders&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;someCustomers&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;c&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;inNewEngland&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;c&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;✅&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;inNewEngland&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;stateCode&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
   &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;MA&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;CT&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;ME&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;VT&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;NH&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;RI&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nf"&gt;includes&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;stateCode&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;newEnglanders&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;someCustomers&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;c&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;inNewEngland&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;address&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;state&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Split Phase
&lt;/h1&gt;

&lt;p&gt;❌&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;orderData&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;orderString&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;split&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="se"&gt;\s&lt;/span&gt;&lt;span class="sr"&gt;+/&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;productPrice&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;priceList&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;orderData&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nf"&gt;split&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;-&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]];&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;orderPrice&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;parseInt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;orderData&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;productPrice&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;✅&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;orderRecord&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;parseOrder&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;order&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;orderPrice&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;price&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;orderRecord&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;priceList&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;parseOrder&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;aString&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
 &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;values&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;aString&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;split&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="se"&gt;\s&lt;/span&gt;&lt;span class="sr"&gt;+/&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; 
 &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;productID&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;values&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nf"&gt;split&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;-&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
  &lt;span class="na"&gt;quantity&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;parseInt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;values&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]),&lt;/span&gt; 
 &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;price&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;order&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;priceList&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
 &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;order&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;quantity&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;priceList&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;order&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;productID&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt; 
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
    </item>
    <item>
      <title>Session #1</title>
      <dc:creator>Mashcuy Lab</dc:creator>
      <pubDate>Mon, 15 Jul 2024 04:09:03 +0000</pubDate>
      <link>https://dev.to/mashcuy_lab/session-1-2bl</link>
      <guid>https://dev.to/mashcuy_lab/session-1-2bl</guid>
      <description>&lt;p&gt;Welcome to our new members James &amp;amp; Alvaro 🥳&lt;/p&gt;

&lt;h1&gt;
  
  
  Session Summary
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Dev key abilities
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;be a solver&lt;/li&gt;
&lt;li&gt;automate repetitive tasks &lt;/li&gt;
&lt;li&gt;communicate&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Learn things fast
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;master the basics&lt;/li&gt;
&lt;li&gt;go for real projects (not the todo list ✏️)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Signs of a bad programmer
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;you want to delete the whole project and start from scratch&lt;/li&gt;
&lt;li&gt;lack of curiosity&lt;/li&gt;
&lt;li&gt;over engineering &lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Regrets of an experienced engineer
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;not taking enough risks&lt;/li&gt;
&lt;li&gt;not finding a good work/life balance&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Question of the week
&lt;/h1&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;What do I need to be "ready"?&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;fluency in the language/framework&lt;/li&gt;
&lt;li&gt;software architectures&lt;/li&gt;
&lt;li&gt;stop procrastinating&lt;/li&gt;
&lt;li&gt;organize my time better&lt;/li&gt;
&lt;li&gt;perform more real life projects&lt;/li&gt;
&lt;li&gt;improve soft skills&lt;/li&gt;
&lt;li&gt;english ⭐&lt;/li&gt;
&lt;li&gt;work/life balance&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>community</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
